about summary refs log tree commit diff
path: root/hosts/profiles
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-03-12 19:59:53 -0800
committerFranck Cuny <franck@fcuny.net>2022-03-12 19:59:53 -0800
commit85fca14d01860ebc3694d0596663c3c22e9edf48 (patch)
treef6a131a8529597ec05917dbfb8215f538501e821 /hosts/profiles
parentdesktop: element and theme (diff)
downloadworld-85fca14d01860ebc3694d0596663c3c22e9edf48.tar.gz
hosts: add profiles
Profiles contain a collection of modules.
Diffstat (limited to 'hosts/profiles')
-rw-r--r--hosts/profiles/nas.nix35
-rw-r--r--hosts/profiles/server.nix7
2 files changed, 42 insertions, 0 deletions
diff --git a/hosts/profiles/nas.nix b/hosts/profiles/nas.nix
new file mode 100644
index 0000000..10ba67c
--- /dev/null
+++ b/hosts/profiles/nas.nix
@@ -0,0 +1,35 @@
+{ config, pkgs, lib, ... }:
+
+{
+  imports = [
+    # other profiles
+    ./server.nix
+    ../common/server/samba.nix
+    ../common/server/prometheus.nix
+    ../common/server/grafana.nix
+    ../common/server/traefik.nix
+    ../common/server/transmission.nix
+    ../common/server/unifi.nix
+    ../common/server/gitea.nix
+    ../common/server/rclone.nix
+  ];
+
+  users.groups.nas.gid = 5000;
+  users.users.nas = {
+    uid = 5000;
+    group = "nas";
+    isSystemUser = true;
+  };
+
+  services.restic.backups = {
+    media = {
+      paths = [ "/data/fast/music" "/data/fast/photos" ];
+      repository = "/data/slow/backups/systems";
+      passwordFile = config.age.secrets.restic-repo-systems.path;
+      timerConfig = { OnCalendar = "00:55"; };
+      initialize = true;
+      extraBackupArgs = [ "--tag media" ];
+      pruneOpts = [ "--keep-daily 7" "--keep-weekly 4" "--keep-monthly 12" ];
+    };
+  };
+}
diff --git a/hosts/profiles/server.nix b/hosts/profiles/server.nix
new file mode 100644
index 0000000..667b828
--- /dev/null
+++ b/hosts/profiles/server.nix
@@ -0,0 +1,7 @@
+o{ config, pkgs, lib, ... }:
+
+{
+  imports = [
+    ../common/server/monitoring.nix
+  ];
+}