diff --git a/home/nixos-common.nix b/home/nixos-common.nix index 2cc35f4..6f4e168 100644 --- a/home/nixos-common.nix +++ b/home/nixos-common.nix @@ -42,71 +42,62 @@ ./zsh ]; - home.persistence = { - "/persist/system/${config.home.homeDirectory}" = { - directories = [ - ".abook" - ".bitmonero" - ".cache" - ".config/Nextcloud" - ".config/ardour6" - ".config/chromium" - ".config/kdeconnect" - ".config/kicad" - ".config/whatsapp-for-linux" - ".gnupg/private-keys-v1.d" - ".hydrogen" - ".librewolf" - ".local/share/keyrings" - ".local/share/mpd" - ".local/share/webkitgtk" - ".local/state/wireplumber" - ".mozilla" - ".newsboat" - ".vagrant.d" - ".vdirsyncer" - ".wine" - ]; - files = [ - ".gnupg/pubring.kbx" - ".gnupg/trustdb.gpg" - ".mailsynclastrun" - ".ssh/known_hosts" - ".zsh_history" - ".lmmsrc.xml" - ]; - allowOther = true; - }; - - "/persist/user/${config.home.homeDirectory}" = { - directories = [ - ".config/Signal" - ".config/Element" - ".config/SuperCollider" - ".local/share/SuperCollider" - ".local/share/TelegramDesktop" - ".local/share/dino" - ".local/share/Bisq" - ".password-store" - ".walletwasabi" - ".Slic3r" - "Calendars" - "Contacts" - "Documents" - "Downloads" - "Images" - "Maildir" - "Monero" - "Nextcloud" - "code" - "configs" - "misc" - "workspace" - "Audio" - ]; - files = [ ]; - allowOther = true; - }; + home.persistence."/persist/${config.home.homeDirectory}" = { + directories = [ + ".Slic3r" + ".abook" + ".bitmonero" + ".cache" + ".config/Element" + ".config/Nextcloud" + ".config/Signal" + ".config/SuperCollider" + ".config/ardour6" + ".config/chromium" + ".config/kdeconnect" + ".config/kicad" + ".config/whatsapp-for-linux" + ".gnupg/private-keys-v1.d" + ".hydrogen" + ".librewolf" + ".local/share/Bisq" + ".local/share/SuperCollider" + ".local/share/TelegramDesktop" + ".local/share/dino" + ".local/share/keyrings" + ".local/share/mpd" + ".local/share/webkitgtk" + ".local/state/wireplumber" + ".mozilla" + ".newsboat" + ".password-store" + ".vagrant.d" + ".vdirsyncer" + ".walletwasabi" + ".wine" + "Audio" + "Calendars" + "Contacts" + "Documents" + "Downloads" + "Images" + "Maildir" + "Monero" + "Nextcloud" + "code" + "configs" + "misc" + "workspace" + ]; + files = [ + ".gnupg/pubring.kbx" + ".gnupg/trustdb.gpg" + ".mailsynclastrun" + ".ssh/known_hosts" + ".zsh_history" + ".lmmsrc.xml" + ]; + allowOther = true; }; home.sessionVariables = { diff --git a/nixos/common.nix b/nixos/common.nix index 5a8a897..f4fce4a 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -231,14 +231,7 @@ options = [ "defaults" "size=2G" "mode=755" ]; }; - "/persist/system" = { - device = "/dev/mapper/system"; - fsType = "btrfs"; - options = [ "subvol=persist" "compress=zstd" ]; - neededForBoot = true; - }; - - "/persist/user" = { + "/persist" = { device = "/dev/mapper/user"; fsType = "btrfs"; options = [ "subvol=persist" "compress=zstd" ]; @@ -266,31 +259,24 @@ swapDevices = [{ device = "/swap/swapfile"; }]; - environment.persistence = { - "/persist/system" = { - directories = [ - "/var/log" - "/var/lib/bluetooth" - "/var/lib/systemd/coredump" - "/var/lib/docker" - ]; - files = [ - "/etc/machine-id" - #"/etc/nix/id_rsa" - "/etc/ssh/ssh_host_ed25519_key" - "/etc/ssh/ssh_host_ed25519_key.pub" - "/etc/ssh/ssh_host_rsa_key" - "/etc/ssh/ssh_host_rsa_key.pub" - ]; - }; - "/persist/user" = { - directories = [ - "/etc/NetworkManager/system-connections" - "/etc/nixos" - "/var/lib/libvirt" - "/etc/wireguard" - ]; - }; + environment.persistence."/persist" = { + directories = [ + "/etc/NetworkManager/system-connections" + "/etc/nixos" + "/etc/wireguard" + "/var/lib/bluetooth" + "/var/lib/docker" + "/var/lib/libvirt" + "/var/lib/systemd/coredump" + "/var/log" + ]; + files = [ + "/etc/machine-id" + "/etc/ssh/ssh_host_ed25519_key" + "/etc/ssh/ssh_host_ed25519_key.pub" + "/etc/ssh/ssh_host_rsa_key" + "/etc/ssh/ssh_host_rsa_key.pub" + ]; }; # Open ports in the firewall.