diff options
| author | Dominik Kaiser | 2026-06-12 18:10:16 +0200 |
|---|---|---|
| committer | Dominik Kaiser | 2026-06-12 18:10:16 +0200 |
| commit | 2df5bc584899f427495cc20927170de2a2c84b32 (patch) | |
| tree | d1a87bcd3c17d605e3f25e4bb8d7a6ec060c73ba /modules/hosts/luna/preservation.nix | |
| download | nixos-2df5bc584899f427495cc20927170de2a2c84b32.tar.gz nixos-2df5bc584899f427495cc20927170de2a2c84b32.zip | |
Setup luna
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 = []; + }; + }; + }; +}; + +} |
