2020-10-31 20:52:10 +01:00
|
|
|
{
|
2022-03-10 21:52:12 +01:00
|
|
|
config,
|
|
|
|
|
pkgs,
|
|
|
|
|
lib,
|
|
|
|
|
...
|
|
|
|
|
}: let
|
2023-02-22 10:02:55 +01:00
|
|
|
inherit (import ../../lib) retiolumAddresses restic;
|
2022-03-10 21:52:12 +01:00
|
|
|
in {
|
2020-10-28 20:29:41 +01:00
|
|
|
imports = [
|
2022-11-30 10:21:59 +01:00
|
|
|
./atuin.nix
|
2022-01-18 21:29:30 +01:00
|
|
|
./backup.nix
|
2021-12-29 18:49:51 +01:00
|
|
|
./gaslight.nix
|
2020-10-28 20:29:41 +01:00
|
|
|
./hardware-configuration.nix
|
2021-12-29 18:49:51 +01:00
|
|
|
./kiosk.nix
|
|
|
|
|
./moodle-dl-meinhark.nix
|
|
|
|
|
./pulseaudio.nix
|
2022-03-10 22:59:43 +01:00
|
|
|
./home-assistant.nix
|
2023-02-16 08:52:44 +01:00
|
|
|
./mpd.nix
|
2022-01-11 12:07:51 +01:00
|
|
|
./grocy.nix
|
2022-01-17 18:53:26 +01:00
|
|
|
./spotifyd.nix
|
2023-02-22 10:02:55 +01:00
|
|
|
../../configs/keyboard.nix
|
|
|
|
|
../../configs/monitoring.nix
|
|
|
|
|
../../configs/retiolum.nix
|
|
|
|
|
../../configs/printing.nix
|
|
|
|
|
../../configs/spacetime.nix
|
|
|
|
|
../../configs/sshd.nix
|
|
|
|
|
../../configs/tmux.nix
|
|
|
|
|
../../configs/wpa_supplicant.nix
|
|
|
|
|
../../configs/nix.nix
|
2020-10-28 20:29:41 +01:00
|
|
|
];
|
|
|
|
|
|
2023-02-22 10:02:55 +01:00
|
|
|
age.secrets = {
|
|
|
|
|
retiolum-rsa.file = ../../secrets/zaatar-retiolum-privateKey-rsa.age;
|
|
|
|
|
retiolum-ed25519.file = ../../secrets/zaatar-retiolum-privateKey-rsa.age;
|
|
|
|
|
restic.file = ../../secrets/restic.age;
|
|
|
|
|
};
|
|
|
|
|
|
2022-01-19 09:38:36 +01:00
|
|
|
services.restic.backups.moodle-dl = {
|
|
|
|
|
initialize = true;
|
|
|
|
|
inherit (restic) repository;
|
2022-03-10 21:52:12 +01:00
|
|
|
timerConfig = {
|
|
|
|
|
OnCalendar = "daily";
|
|
|
|
|
RandomizedDelaySec = "1h";
|
|
|
|
|
};
|
2023-02-22 10:02:55 +01:00
|
|
|
passwordFile = config.age.secrets.restic.path;
|
2022-01-19 09:38:36 +01:00
|
|
|
paths = [
|
|
|
|
|
"/var/lib/moodle-dl"
|
2022-03-10 23:11:36 +01:00
|
|
|
"/var/lib/containers/storage/volumes/home-assistant"
|
2022-12-03 08:51:11 +01:00
|
|
|
config.services.postgresqlBackup.location
|
2022-01-19 09:38:36 +01:00
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
2020-10-28 20:29:41 +01:00
|
|
|
services.logind = {
|
|
|
|
|
lidSwitch = "ignore";
|
|
|
|
|
lidSwitchDocked = "ignore";
|
|
|
|
|
lidSwitchExternalPower = "ignore";
|
2019-06-17 19:11:31 +02:00
|
|
|
};
|
|
|
|
|
|
2020-10-28 20:29:41 +01:00
|
|
|
services.illum.enable = true;
|
|
|
|
|
|
2022-03-10 21:52:12 +01:00
|
|
|
environment.systemPackages = let
|
2023-02-22 10:02:55 +01:00
|
|
|
worldradio = pkgs.callPackage ../../packages/worldradio.nix {};
|
2021-12-29 18:49:51 +01:00
|
|
|
in [
|
|
|
|
|
(pkgs.writers.writeDashBin "mpv" ''${pkgs.mpv}/bin/mpv --no-video "$@"'')
|
|
|
|
|
(pkgs.writers.writeDashBin "worldradio" ''
|
|
|
|
|
shuf ${worldradio} | ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv --no-video
|
|
|
|
|
'')
|
|
|
|
|
pkgs.git
|
|
|
|
|
pkgs.vim
|
|
|
|
|
pkgs.htop
|
|
|
|
|
pkgs.ncmpcpp
|
|
|
|
|
];
|
2020-10-28 20:29:41 +01:00
|
|
|
|
2022-07-11 18:22:25 +02:00
|
|
|
# since 22.05 timeout fails?
|
|
|
|
|
systemd.services.systemd-networkd-wait-online.enable = false;
|
|
|
|
|
|
2021-12-29 18:49:51 +01:00
|
|
|
networking = {
|
|
|
|
|
hostName = "zaatar";
|
2022-03-10 21:52:12 +01:00
|
|
|
wireless.interfaces = ["wlp2s0"];
|
2021-12-29 18:49:51 +01:00
|
|
|
retiolum = retiolumAddresses.zaatar;
|
2019-09-24 16:46:43 +02:00
|
|
|
};
|
|
|
|
|
|
2020-10-28 20:29:41 +01:00
|
|
|
system.stateVersion = "20.09";
|
2019-01-30 17:08:07 +01:00
|
|
|
}
|