From 6a16de8d1681c0fbd5eb9422aab82b8b9716bd9f Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Wed, 19 Jun 2024 17:15:53 +0200 Subject: [PATCH] Persist /var/log in voyager --- hosts/voyager/default.nix | 4 ++++ system/shared/impermanence/root.nix | 3 +++ 2 files changed, 7 insertions(+) diff --git a/hosts/voyager/default.nix b/hosts/voyager/default.nix index 27e72a1..3abc33c 100644 --- a/hosts/voyager/default.nix +++ b/hosts/voyager/default.nix @@ -44,6 +44,10 @@ # Some people use /nix/persist/system for this, leaving persistent files in /nix subvolume # I much prefer using a standalone subvolume for this though. persistentMountPoint = "/persist"; + + extraDirectories = [ + "/var/log" + ]; }; # Configure automatic root subvolume wiping on boot from initrd diff --git a/system/shared/impermanence/root.nix b/system/shared/impermanence/root.nix index b24b053..4633728 100644 --- a/system/shared/impermanence/root.nix +++ b/system/shared/impermanence/root.nix @@ -32,6 +32,9 @@ in "/etc/nixos" # NixOS configuration source "/etc/NetworkManager/system-connections" # saved network connections "/var/db/sudo" # keeps track of who got the sudo lecture already + # "/var/log" # I sometimes use a subvolume for this, added manually if not + "/var/lib/nixos" + "/var/lib/bluetooth" "/var/lib/systemd/coredump" # captured coredumps ] ++ cfg.extraDirectories;