impermanence: granualize the /home/colin mounts

This commit is contained in:
colin 2022-06-21 01:59:31 -07:00
parent 924b91564e
commit aefd31b1f6
2 changed files with 22 additions and 2 deletions

View File

@ -22,8 +22,23 @@ in
config = mkIf cfg.enable {
environment.persistence."/nix/persist" = {
directories = [
# TODO: more granular persistence of /home
"/home/colin"
"/home/colin/archive"
"/home/colin/dev"
"/home/colin/ref"
"/home/colin/tmp"
"/home/colin/Music"
"/home/colin/Pictures"
"/home/colin/Videos"
# cache is probably too big to fit on the tmpfs
# TODO: we could bind-mount it to something which gets cleared per boot, though.
"/home/colin/.cache"
"/home/colin/.ssh"
# intentionally omitted:
# "/home/colin/.config" # managed by home-manager
# "/home/colin/.local" # nothing useful in here
# "/home/colin/.mozilla" # managed by home-manager
"/etc/NetworkManager/system-connections"
"/etc/nixos"
"/etc/ssh"
@ -36,6 +51,8 @@ in
];
files = [
"/etc/machine-id"
# "/home/colin/knowledge"
"/home/colin/.zsh_history"
# # XXX these only need persistence because i have mutableUsers = true, i think
# "/etc/group"
# "/etc/passwd"

View File

@ -65,6 +65,9 @@ in
videos = "$HOME/Videos";
};
# convenience
home.file."knowledge".source = config.lib.file.mkOutOfStoreSymlink "/home/colin/dev/knowledge";
xdg.configFile."aerc/accounts.conf".source =
config.lib.file.mkOutOfStoreSymlink sysconfig.sops.secrets.aerc_accounts.path;