2020-10-31 20:52:10 +01:00
|
|
|
{
|
2022-03-10 21:52:12 +01:00
|
|
|
config,
|
|
|
|
|
pkgs,
|
2023-07-04 16:28:26 +02:00
|
|
|
lib,
|
2022-03-10 21:52:12 +01:00
|
|
|
...
|
|
|
|
|
}: 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
|
2024-11-05 09:09:45 +01:00
|
|
|
./nas.nix
|
2025-03-04 21:48:01 +01:00
|
|
|
../../configs/mycelium.nix
|
2022-03-10 22:59:43 +01:00
|
|
|
./home-assistant.nix
|
2023-02-22 10:02:55 +01:00
|
|
|
../../configs/monitoring.nix
|
|
|
|
|
../../configs/retiolum.nix
|
|
|
|
|
../../configs/printing.nix
|
|
|
|
|
../../configs/spacetime.nix
|
|
|
|
|
../../configs/sshd.nix
|
|
|
|
|
../../configs/tmux.nix
|
2023-05-28 23:21:18 +02:00
|
|
|
../../configs/wpa_supplicant.nix
|
2023-02-22 10:02:55 +01:00
|
|
|
../../configs/nix.nix
|
2024-01-09 08:00:33 +01:00
|
|
|
../../configs/admin-essentials.nix
|
2020-10-28 20:29:41 +01:00
|
|
|
];
|
|
|
|
|
|
2024-01-08 14:55:38 +01:00
|
|
|
services.pipewire.systemWide = true;
|
|
|
|
|
|
2023-02-22 10:02:55 +01:00
|
|
|
age.secrets = {
|
2023-02-28 16:45:20 +01:00
|
|
|
retiolum-rsa = {
|
2023-07-04 16:28:26 +02:00
|
|
|
file = ../../secrets/zaatar-retiolum-privateKey-rsa.age;
|
2023-02-28 16:45:20 +01:00
|
|
|
mode = "400";
|
2024-06-03 07:27:01 +02:00
|
|
|
owner = "tinc-retiolum";
|
|
|
|
|
group = "tinc-retiolum";
|
2023-02-28 16:45:20 +01:00
|
|
|
};
|
|
|
|
|
retiolum-ed25519 = {
|
2023-07-04 16:28:26 +02:00
|
|
|
file = ../../secrets/zaatar-retiolum-privateKey-ed25519.age;
|
2023-02-28 16:45:20 +01:00
|
|
|
mode = "400";
|
2024-06-03 07:27:01 +02:00
|
|
|
owner = "tinc-retiolum";
|
|
|
|
|
group = "tinc-retiolum";
|
2023-02-28 16:45:20 +01:00
|
|
|
};
|
2024-04-04 22:20:52 +02:00
|
|
|
restic = {
|
|
|
|
|
file = ../../secrets/restic.age;
|
|
|
|
|
mode = "400";
|
|
|
|
|
owner = "restic";
|
|
|
|
|
group = "restic";
|
|
|
|
|
};
|
2023-02-22 10:02:55 +01:00
|
|
|
};
|
|
|
|
|
|
2023-07-12 12:28:45 +02:00
|
|
|
services.restic.backups.niveum = {
|
2022-01-19 09:38:36 +01:00
|
|
|
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
|
2025-03-21 09:07:43 +01:00
|
|
|
pkgs.python3 # for sshuttle
|
2021-12-29 18:49:51 +01:00
|
|
|
];
|
2020-10-28 20:29:41 +01:00
|
|
|
|
2022-07-11 18:22:25 +02:00
|
|
|
# since 22.05 timeout fails?
|
2023-06-06 19:59:27 +02:00
|
|
|
# systemd.services.systemd-networkd-wait-online.enable = false;
|
2022-07-11 18:22:25 +02:00
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
2024-07-10 10:27:30 +02:00
|
|
|
system.stateVersion = "23.11";
|
2019-01-30 17:08:07 +01:00
|
|
|
}
|