From a0b6d84f54438c2219d28d6e6a9460bbccb36f00 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 2 Feb 2023 17:23:19 +0100 Subject: [PATCH] nixos: Recommend persisting /var/lib/nixos The `/var/lib/nixos` directory contains the uid and gid map for entities without a static id. Not persisting them means your user and group ids could change between reboots, which is likely undesirable. --- README.org | 1 + nixos.nix | 2 ++ 2 files changed, 3 insertions(+) diff --git a/README.org b/README.org index 7e80452..7e8476c 100644 --- a/README.org +++ b/README.org @@ -39,6 +39,7 @@ directories = [ "/var/log" "/var/lib/bluetooth" + "/var/lib/nixos" "/var/lib/systemd/coredump" "/etc/NetworkManager/system-connections" { directory = "/var/lib/colord"; user = "colord"; group = "colord"; mode = "u=rwx,g=rx,o="; } diff --git a/nixos.nix b/nixos.nix index f35e6d1..f0fb383 100644 --- a/nixos.nix +++ b/nixos.nix @@ -285,6 +285,7 @@ in example = [ "/var/log" "/var/lib/bluetooth" + "/var/lib/nixos" "/var/lib/systemd/coredump" "/etc/NetworkManager/system-connections" ]; @@ -349,6 +350,7 @@ in directories = [ "/var/log" "/var/lib/bluetooth" + "/var/lib/nixos" "/var/lib/systemd/coredump" "/etc/NetworkManager/system-connections" { directory = "/var/lib/colord"; user = "colord"; group = "colord"; mode = "u=rwx,g=rx,o="; }