about summary refs log tree commit diff stats
path: root/modules
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-21 15:31:02 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-21 15:31:02 +0200
commite5f9d43d3e4e5fc0ab4c78b48ddc5951bc6876d7 (patch)
treef19f41f645e5b7ff83ef79953600b1208f3b0884 /modules
parentrefactor(pkgs/yt): Package externally and move out-of tree (diff)
downloadnixos-config-e5f9d43d3e4e5fc0ab4c78b48ddc5951bc6876d7.tar.gz
nixos-config-e5f9d43d3e4e5fc0ab4c78b48ddc5951bc6876d7.zip
fix(system/impermanence): Persist `/var/lib/nixos`
Otherwise, users without an explicit uid/gid will get a new one assigned
at each reboot (potentially changing file ownership from one user to
another one).
Diffstat (limited to 'modules')
-rw-r--r--modules/system/impermanence/default.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/system/impermanence/default.nix b/modules/system/impermanence/default.nix
index dca30083..9730dde6 100644
--- a/modules/system/impermanence/default.nix
+++ b/modules/system/impermanence/default.nix
@@ -15,6 +15,7 @@ in {
           "/etc/nixos"
           "/var/log"
           "/var/lib/systemd"
+          "/var/lib/nixos"
         ]
         ++ lib.optional config.networking.networkmanager.enable "/etc/NetworkManager"
         ++ lib.optional config.boot.lanzaboote.enable "/etc/secureboot"
@@ -27,6 +28,7 @@ in {
           "/etc/nixos"
           "/var/log"
           "/var/lib/systemd"
+          "/var/lib/nixos"
         ]
         ++ lib.optional config.networking.networkmanager.enable "/etc/NetworkManager"
         ++ lib.optional config.boot.lanzaboote.enable "/etc/secureboot"