1
0
mirror of https://github.com/kmein/niveum synced 2026-03-18 11:01:07 +01:00
Files
niveum/systems/toum/configuration.nix

128 lines
3.2 KiB
Nix
Raw Normal View History

2019-04-20 09:08:39 +02:00
{ config, pkgs, lib, ... }:
2019-01-31 23:39:38 +01:00
let
kmeinKeys = lib.strings.splitString "\n" (lib.strings.fileContents (pkgs.fetchurl {
url = "https://github.com/kmein.keys";
sha256 = "1b9gbpgihg7zc89ivsz0gs3najp0zg53rcknvzvkm0851fdzkryx";
}));
2019-01-31 23:39:38 +01:00
in {
2019-01-30 13:56:34 +01:00
imports = [
./hardware-configuration.nix
2020-10-21 00:36:10 +02:00
./hass
./telegram-bots
2019-10-26 13:43:30 +02:00
<niveum/configs/distrobump.nix>
<niveum/configs/nixpkgs-unstable.nix>
2020-10-24 13:30:30 +02:00
<niveum/configs/nextcloud.nix>
2019-10-26 13:43:30 +02:00
<niveum/configs/save-space.nix>
<niveum/configs/tmux.nix>
2019-11-30 13:38:56 +01:00
<niveum/configs/version.nix>
2020-07-11 20:42:04 +02:00
<niveum/configs/traadfri.nix>
2019-10-26 13:43:30 +02:00
<niveum/modules/retiolum.nix>
<niveum/modules/telegram-bot.nix>
{
2019-11-30 15:30:05 +01:00
nixpkgs = {
2020-09-10 08:40:23 +02:00
overlays = [ (import <niveum/overlays/toml.nix>) ];
2019-11-30 15:30:05 +01:00
config.packageOverrides = pkgs: {
writeDash = pkgs.writers.writeDash;
writeDashBin = pkgs.writers.writeDashBin;
};
};
2019-11-30 15:30:05 +01:00
2019-07-10 08:04:38 +02:00
services.matterbridge = {
enable = true;
2020-09-10 08:40:23 +02:00
configPath = toString (pkgs.writeTOML (import <niveum/dot/matterbridge.nix> {
2020-10-06 23:21:04 +02:00
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
2019-07-10 18:15:09 +02:00
}));
2019-07-10 08:04:38 +02:00
};
}
2020-06-10 17:37:25 +02:00
{ services.keybase.enable = true; }
2020-10-18 14:02:14 +02:00
{
sound.enable = true;
hardware.pulseaudio.enable = true;
boot.loader.raspberryPi.firmwareConfig = ''
dtparam=audio=on
'';
}
2020-09-10 08:40:23 +02:00
{
imports = [ <stockholm/krebs/3modules/urlwatch.nix> ];
2020-06-10 17:37:25 +02:00
2020-09-10 08:40:23 +02:00
krebs.urlwatch = {
enable = true;
onCalendar = "*-*-* 05:00:00";
sendmail.enable = false;
telegram = {
2020-06-10 17:37:25 +02:00
enable = true;
2020-09-10 08:40:23 +02:00
chatId = [ "18980945" ];
2020-10-06 23:21:04 +02:00
botToken = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
2020-06-10 17:37:25 +02:00
};
2020-09-10 08:40:23 +02:00
urls = [
# "https://michael-klonovsky.de/acta-diurna"
2020-09-10 08:40:23 +02:00
];
};
}
2019-06-05 19:36:29 +02:00
];
2019-06-01 22:13:58 +02:00
nix.nixPath = [ "/var/src" ];
2019-01-30 11:48:35 +00:00
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
2020-10-18 14:02:14 +02:00
networking.hostName = "toum";
2019-01-30 13:56:34 +01:00
2019-01-30 18:16:41 +01:00
time.timeZone = "Europe/Berlin";
2019-01-30 16:24:32 +01:00
2019-01-30 14:00:01 +01:00
networking.wireless = {
2020-01-18 17:10:33 +01:00
enable = false;
2020-06-10 17:37:25 +02:00
networks.Aether = {
pskRaw =
"e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
};
2019-01-30 13:56:34 +01:00
};
2019-01-31 23:39:38 +01:00
2019-01-30 16:46:07 +01:00
environment.variables.TERM = "linux";
2019-10-26 13:43:30 +02:00
environment.variables.HTOPRC = toString <niveum/dot/htoprc>;
2019-01-30 15:44:00 +01:00
2020-10-18 14:02:14 +02:00
environment.systemPackages = with pkgs; [
git vim htop wget reptyr
raspberrypi-tools
];
2019-01-30 16:12:14 +01:00
2019-01-31 23:39:38 +01:00
users.mutableUsers = false;
users.users.me = {
name = "kfm";
home = "/home/kfm";
createHome = true;
group = "users";
2019-06-10 17:06:04 +02:00
extraGroups = [ "wheel" ];
2020-06-10 17:37:25 +02:00
hashedPassword =
"$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
shell = pkgs.bash;
};
2019-06-10 17:06:04 +02:00
security.sudo.enable = true;
services.openssh = {
enable = true;
ports = [ 22022 ];
2019-06-13 14:17:09 +02:00
passwordAuthentication = false;
};
2019-01-30 15:44:00 +01:00
users.users.root.openssh.authorizedKeys.keys = kmeinKeys;
2019-02-05 20:21:51 +01:00
users.users.me.openssh.authorizedKeys.keys = kmeinKeys;
2019-02-05 20:21:51 +01:00
networking.retiolum = {
ipv4 = "10.243.2.3";
ipv6 = "42:0:3c46:56af:d12b:affd:8390:df22";
2019-02-05 20:21:51 +01:00
};
environment.etc."tinc/retiolum/rsa_key.priv" = {
2020-10-06 23:21:04 +02:00
text = builtins.readFile <system-secrets/retiolum.key>;
2019-02-05 20:21:51 +01:00
mode = "400";
};
2020-10-18 14:02:14 +02:00
system.stateVersion = "20.03";
2019-01-30 11:48:35 +00:00
}