diff options
Diffstat (limited to 'system/impermanence')
-rw-r--r-- | system/impermanence/default.nix | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/system/impermanence/default.nix b/system/impermanence/default.nix index 71b023ff..3c859688 100644 --- a/system/impermanence/default.nix +++ b/system/impermanence/default.nix @@ -1,19 +1,32 @@ -{...}: { +{ + config, + lib, + ... +}: let + networkmanager = + if config.networking.networkmanager.enable + then [ + "/etc/NetworkManager" # store the networkmanager configs + ] + else []; + directories = + [ + "/etc/nixos" + "/var/log" + # TODO the following entries need to be checked + #"/var/lib/bluetooth" + #"/var/lib/nixos" + #"/var/lib/systemd/coredump" + ] + ++ networkmanager; +in { # needed for the hm impermanence config programs.fuse.userAllowOther = true; environment.persistence = { "/srv" = { hideMounts = true; - directories = [ - "/etc/nixos" - "/var/log" - "/etc/NetworkManager" # this shouldn't hurt even if networkmanager isn't installed - # TODO this needs to be checked - #"/var/lib/bluetooth" - #"/var/lib/nixos" - #"/var/lib/systemd/coredump" - ]; + inherit directories; files = [ "/etc/machine-id" ]; |