diff options
| author | Dominik Kaiser | 2026-06-13 12:43:45 +0200 |
|---|---|---|
| committer | Dominik Kaiser | 2026-06-13 12:43:45 +0200 |
| commit | d6dc581b9c8e5caff8e9f05879c59ad59e176644 (patch) | |
| tree | 2586f613080bf6a3b4f9519981fd98b1a67fbe2a /modules/hosts/sol/preservation.nix | |
| parent | 2df5bc584899f427495cc20927170de2a2c84b32 (diff) | |
| download | nixos-d6dc581b9c8e5caff8e9f05879c59ad59e176644.tar.gz nixos-d6dc581b9c8e5caff8e9f05879c59ad59e176644.zip | |
Add sol
Diffstat (limited to 'modules/hosts/sol/preservation.nix')
| -rw-r--r-- | modules/hosts/sol/preservation.nix | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/modules/hosts/sol/preservation.nix b/modules/hosts/sol/preservation.nix new file mode 100644 index 0000000..a42c890 --- /dev/null +++ b/modules/hosts/sol/preservation.nix @@ -0,0 +1,54 @@ +{ self, inputs, ... }: { + +flake.nixosModules.solPreservation = { 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 = []; + }; + }; + }; +}; + +} |
