put all persistance on the user volume

feat/kile-v2
Ricard Illa 2022-05-11 19:59:39 +02:00
parent 6a2a4a3ef4
commit a6a9a3648d
No known key found for this signature in database
GPG Key ID: F69A672B72E54902
2 changed files with 75 additions and 98 deletions

View File

@ -42,71 +42,62 @@
./zsh ./zsh
]; ];
home.persistence = { home.persistence."/persist/${config.home.homeDirectory}" = {
"/persist/system/${config.home.homeDirectory}" = { directories = [
directories = [ ".Slic3r"
".abook" ".abook"
".bitmonero" ".bitmonero"
".cache" ".cache"
".config/Nextcloud" ".config/Element"
".config/ardour6" ".config/Nextcloud"
".config/chromium" ".config/Signal"
".config/kdeconnect" ".config/SuperCollider"
".config/kicad" ".config/ardour6"
".config/whatsapp-for-linux" ".config/chromium"
".gnupg/private-keys-v1.d" ".config/kdeconnect"
".hydrogen" ".config/kicad"
".librewolf" ".config/whatsapp-for-linux"
".local/share/keyrings" ".gnupg/private-keys-v1.d"
".local/share/mpd" ".hydrogen"
".local/share/webkitgtk" ".librewolf"
".local/state/wireplumber" ".local/share/Bisq"
".mozilla" ".local/share/SuperCollider"
".newsboat" ".local/share/TelegramDesktop"
".vagrant.d" ".local/share/dino"
".vdirsyncer" ".local/share/keyrings"
".wine" ".local/share/mpd"
]; ".local/share/webkitgtk"
files = [ ".local/state/wireplumber"
".gnupg/pubring.kbx" ".mozilla"
".gnupg/trustdb.gpg" ".newsboat"
".mailsynclastrun" ".password-store"
".ssh/known_hosts" ".vagrant.d"
".zsh_history" ".vdirsyncer"
".lmmsrc.xml" ".walletwasabi"
]; ".wine"
allowOther = true; "Audio"
}; "Calendars"
"Contacts"
"/persist/user/${config.home.homeDirectory}" = { "Documents"
directories = [ "Downloads"
".config/Signal" "Images"
".config/Element" "Maildir"
".config/SuperCollider" "Monero"
".local/share/SuperCollider" "Nextcloud"
".local/share/TelegramDesktop" "code"
".local/share/dino" "configs"
".local/share/Bisq" "misc"
".password-store" "workspace"
".walletwasabi" ];
".Slic3r" files = [
"Calendars" ".gnupg/pubring.kbx"
"Contacts" ".gnupg/trustdb.gpg"
"Documents" ".mailsynclastrun"
"Downloads" ".ssh/known_hosts"
"Images" ".zsh_history"
"Maildir" ".lmmsrc.xml"
"Monero" ];
"Nextcloud" allowOther = true;
"code"
"configs"
"misc"
"workspace"
"Audio"
];
files = [ ];
allowOther = true;
};
}; };
home.sessionVariables = { home.sessionVariables = {

View File

@ -231,14 +231,7 @@
options = [ "defaults" "size=2G" "mode=755" ]; options = [ "defaults" "size=2G" "mode=755" ];
}; };
"/persist/system" = { "/persist" = {
device = "/dev/mapper/system";
fsType = "btrfs";
options = [ "subvol=persist" "compress=zstd" ];
neededForBoot = true;
};
"/persist/user" = {
device = "/dev/mapper/user"; device = "/dev/mapper/user";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=persist" "compress=zstd" ]; options = [ "subvol=persist" "compress=zstd" ];
@ -266,31 +259,24 @@
swapDevices = [{ device = "/swap/swapfile"; }]; swapDevices = [{ device = "/swap/swapfile"; }];
environment.persistence = { environment.persistence."/persist" = {
"/persist/system" = { directories = [
directories = [ "/etc/NetworkManager/system-connections"
"/var/log" "/etc/nixos"
"/var/lib/bluetooth" "/etc/wireguard"
"/var/lib/systemd/coredump" "/var/lib/bluetooth"
"/var/lib/docker" "/var/lib/docker"
]; "/var/lib/libvirt"
files = [ "/var/lib/systemd/coredump"
"/etc/machine-id" "/var/log"
#"/etc/nix/id_rsa" ];
"/etc/ssh/ssh_host_ed25519_key" files = [
"/etc/ssh/ssh_host_ed25519_key.pub" "/etc/machine-id"
"/etc/ssh/ssh_host_rsa_key" "/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_rsa_key.pub" "/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"
];
};
}; };
# Open ports in the firewall. # Open ports in the firewall.