From 6c1e59b9555853644bfc436a9fb3e3b97de9ba7a Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 8 Apr 2022 16:53:15 -0700 Subject: hosts: add services to tahoe --- hosts/carmel/default.nix | 3 --- hosts/profiles/nas.nix | 42 ------------------------------------------ hosts/tahoe/default.nix | 9 ++++++++- hosts/tahoe/services.nix | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 46 deletions(-) delete mode 100644 hosts/profiles/nas.nix create mode 100644 hosts/tahoe/services.nix diff --git a/hosts/carmel/default.nix b/hosts/carmel/default.nix index 61599d6..71980f7 100644 --- a/hosts/carmel/default.nix +++ b/hosts/carmel/default.nix @@ -6,9 +6,6 @@ ./boot.nix ./sound.nix ./networking.nix - ../common/desktop - # In order to unlock the root disk remotely - ../common/system/boot-ssh.nix ]; hardware.opengl.driSupport = true; diff --git a/hosts/profiles/nas.nix b/hosts/profiles/nas.nix deleted file mode 100644 index 5ec18d0..0000000 --- a/hosts/profiles/nas.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ config, pkgs, lib, ... }: { - users.groups.nas.gid = 5000; - users.users.nas = { - uid = 5000; - group = "nas"; - isSystemUser = true; - }; - - my.services = { - samba = { - enable = true; - publicShares = [ "/data/fast/music" "/data/fast/videos" ]; - }; - navidrome = { - enable = true; - musicFolder = "/data/fast/music"; - }; - unifi = { enable = true; }; - prometheus = { enable = true; }; - grafana = { enable = true; }; - gitea = { - enable = true; - stateDir = "/var/lib/gitea"; - }; - rclone = { enable = true; }; - traefik = { enable = true; }; - transmission = { enable = true; }; - metrics-exporter = { enable = true; }; - }; - - services.restic.backups = { - media = { - paths = [ "/data/fast/music" "/data/fast/photos" "/data/fast/videos" ]; - 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/tahoe/default.nix b/hosts/tahoe/default.nix index dfac37c..ad48bcc 100644 --- a/hosts/tahoe/default.nix +++ b/hosts/tahoe/default.nix @@ -5,7 +5,7 @@ ./hardware-configuration.nix ./networking.nix ./home.nix - ../profiles/nas.nix + ./services.nix ]; my.system.boot = { @@ -13,6 +13,13 @@ initrd = { network.enable = true; }; }; + users.groups.nas.gid = 5000; + users.users.nas = { + uid = 5000; + group = "nas"; + isSystemUser = true; + }; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/hosts/tahoe/services.nix b/hosts/tahoe/services.nix new file mode 100644 index 0000000..a8badea --- /dev/null +++ b/hosts/tahoe/services.nix @@ -0,0 +1,37 @@ +{ ... }: + +{ + my.services = { + samba = { + enable = true; + publicShares = [ "/data/fast/music" "/data/fast/videos" ]; + }; + navidrome = { + enable = true; + musicFolder = "/data/fast/music"; + }; + unifi = { enable = true; }; + prometheus = { enable = true; }; + grafana = { enable = true; }; + gitea = { + enable = true; + stateDir = "/var/lib/gitea"; + }; + rclone = { enable = true; }; + traefik = { enable = true; }; + transmission = { enable = true; }; + metrics-exporter = { enable = true; }; + }; + + services.restic.backups = { + media = { + paths = [ "/data/fast/music" "/data/fast/photos" "/data/fast/videos" ]; + 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" ]; + }; + }; +} -- cgit 1.4.1