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,13 +42,16 @@
./zsh
];
home.persistence = {
"/persist/system/${config.home.homeDirectory}" = {
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"
@ -57,39 +60,22 @@
".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"
".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"
".wine"
"Audio"
"Calendars"
"Contacts"
"Documents"
@ -102,12 +88,17 @@
"configs"
"misc"
"workspace"
"Audio"
];
files = [ ];
files = [
".gnupg/pubring.kbx"
".gnupg/trustdb.gpg"
".mailsynclastrun"
".ssh/known_hosts"
".zsh_history"
".lmmsrc.xml"
];
allowOther = true;
};
};
home.sessionVariables = {
EDITOR = "${pkgs.neovim}/bin/nvim";

View File

@ -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,32 +259,25 @@
swapDevices = [{ device = "/swap/swapfile"; }];
environment.persistence = {
"/persist/system" = {
environment.persistence."/persist" = {
directories = [
"/var/log"
"/etc/NetworkManager/system-connections"
"/etc/nixos"
"/etc/wireguard"
"/var/lib/bluetooth"
"/var/lib/systemd/coredump"
"/var/lib/docker"
"/var/lib/libvirt"
"/var/lib/systemd/coredump"
"/var/log"
];
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"
];
};
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];