diff options
Diffstat (limited to 'modules/hosts/luna/preservation.nix')
| -rw-r--r-- | modules/hosts/luna/preservation.nix | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/modules/hosts/luna/preservation.nix b/modules/hosts/luna/preservation.nix new file mode 100644 index 0000000..fda7a47 --- /dev/null +++ b/modules/hosts/luna/preservation.nix @@ -0,0 +1,54 @@ +{ self, inputs, ... }: { + +flake.nixosModules.lunaPreservation = { pkgs, lib, ... }: { + boot.tmp.cleanOnBoot = true; + + preservation = { + enable = true; + + preserveAt."/persistent" = { + directories = [ + "/etc/nixos" + { + directory = "/var/lib/nixos"; + inInitrd = true; + } + "/var/lib/systemd/timers" + "/var/lib/bluetooth" + "/etc/NetworkManager/system-connections" + { + directory = "/tmp"; + mode = "1777"; + } + ]; + files = [ + { + file = "/etc/machine-id"; + inInitrd = true; + } + ]; + + users.dk = { + directories = [ + "Pictures" + "Projects" + "Music" + ".config/emacs" + "org" + ".ssh" + ".config/zen" + ".cache" + ".config/nixos" + ".steam" + ".local/share/Steam" + ".config/vesktop" + ".config/ardour9" + ".config/guitarix" + ]; + files = []; + }; + }; + }; +}; + +} |
