From 436ade540fef06ce2efc017f60c9552d24f2a601 Mon Sep 17 00:00:00 2001 From: colin Date: Fri, 24 Jun 2022 21:10:49 -0700 Subject: [PATCH] tune /var/lib impermanence (for lappy) --- machines/lappy/default.nix | 3 +++ modules/impermanence.nix | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/machines/lappy/default.nix b/machines/lappy/default.nix index 0fb5b4e9..28f4956c 100644 --- a/machines/lappy/default.nix +++ b/machines/lappy/default.nix @@ -10,6 +10,9 @@ boot.loader.efi.canTouchEfiVariables = false; colinsane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ]; + # TODO: only here for debugging + # services.ipfs.enable = true; + # docs: https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion system.stateVersion = "21.05"; } diff --git a/modules/impermanence.nix b/modules/impermanence.nix index f779a3d9..7cc34780 100644 --- a/modules/impermanence.nix +++ b/modules/impermanence.nix @@ -44,7 +44,26 @@ in # "/etc/nixos" "/etc/ssh" # TODO: more granular persistence of /var/lib - "/var/lib" + # "/var/lib/AccountsService" # not sure what this is, but it's empty + "/var/lib/alsa" # preserve output levels, default devices + # "/var/lib/blueman" # files aren't human readable + "/var/lib/bluetooth" # preserve bluetooth handshakes + "/var/lib/colord" # preserve color calibrations (?) + # "/var/lib/dhclient" # empty on lappy; dunno about desko + # "/var/lib/fwupd" # not sure why this would need persistent state + # "/var/lib/geoclue" # empty on lappy + # "/var/lib/logrotate.status" # seems redundant with what's in /var/log? + "/var/lib/machines" # maybe not needed, but would be painful to add a VM and forget. + # "/var/lib/misc" # empty on lappy + # "/var/lib/NetworkManager" # looks to be mostly impermanent state? + # "/var/lib/NetworkManager-fortisslvpn" # empty on lappy + "/var/lib/nixos" # has some uid/gid maps; not sure what happens if we lose this. + # "/var/lib/PackageKit" # wtf is this? + # "/var/lib/power-profiles-daemon" # redundant with nixos declarations + # "/var/lib/private" # empty on lappy + # "/var/lib/systemd" # nothing obviously necessary + # "/var/lib/udisks2" # empty on lappy + # "/var/lib/upower" # historic charge data. unnecessary, but maybe used somewhere? "/var/log" "/mnt" # TODO: what even GOES in /srv?