From 7815ef2a22e3ae684852f1f28cedae6354263034 Mon Sep 17 00:00:00 2001 From: Soispha Date: Sat, 8 Jul 2023 13:53:11 +0200 Subject: Fix(treewide): Move all persistent dirs to impermanence to set permissions --- system/impermanence/default.nix | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'system/impermanence/default.nix') diff --git a/system/impermanence/default.nix b/system/impermanence/default.nix index 32ad9f7..198eeba 100644 --- a/system/impermanence/default.nix +++ b/system/impermanence/default.nix @@ -1,23 +1,20 @@ {...}: { + # TODO: Only activate them if their module is also active + imports = [ + ./mods/acme.nix + ./mods/keycloak.nix + ./mods/mail.nix + ./mods/minecraft.nix + ./mods/nix-sync.nix + ./mods/openssh.nix + ./mods/users.nix + ]; + environment.persistence."/srv" = { hideMounts = true; directories = [ "/etc/nixos" "/var/log" - "/var/lib/postgresql" - "/var/lib/acme" - { - directory = "/var/lib/nix-sync"; - user = "nix-sync"; - group = "nix-sync"; - mode = "0700"; - } - { - directory = "/var/lib/sshd"; - user = "root"; - group = "root"; - mode = "0755"; - } ]; files = [ "/etc/machine-id" -- cgit 1.4.1