put all persistance on the user volume
parent
6a2a4a3ef4
commit
a6a9a3648d
|
@ -42,13 +42,16 @@
|
||||||
./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/Element"
|
||||||
".config/Nextcloud"
|
".config/Nextcloud"
|
||||||
|
".config/Signal"
|
||||||
|
".config/SuperCollider"
|
||||||
".config/ardour6"
|
".config/ardour6"
|
||||||
".config/chromium"
|
".config/chromium"
|
||||||
".config/kdeconnect"
|
".config/kdeconnect"
|
||||||
|
@ -57,39 +60,22 @@
|
||||||
".gnupg/private-keys-v1.d"
|
".gnupg/private-keys-v1.d"
|
||||||
".hydrogen"
|
".hydrogen"
|
||||||
".librewolf"
|
".librewolf"
|
||||||
|
".local/share/Bisq"
|
||||||
|
".local/share/SuperCollider"
|
||||||
|
".local/share/TelegramDesktop"
|
||||||
|
".local/share/dino"
|
||||||
".local/share/keyrings"
|
".local/share/keyrings"
|
||||||
".local/share/mpd"
|
".local/share/mpd"
|
||||||
".local/share/webkitgtk"
|
".local/share/webkitgtk"
|
||||||
".local/state/wireplumber"
|
".local/state/wireplumber"
|
||||||
".mozilla"
|
".mozilla"
|
||||||
".newsboat"
|
".newsboat"
|
||||||
|
".password-store"
|
||||||
".vagrant.d"
|
".vagrant.d"
|
||||||
".vdirsyncer"
|
".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"
|
".walletwasabi"
|
||||||
".Slic3r"
|
".wine"
|
||||||
|
"Audio"
|
||||||
"Calendars"
|
"Calendars"
|
||||||
"Contacts"
|
"Contacts"
|
||||||
"Documents"
|
"Documents"
|
||||||
|
@ -102,12 +88,17 @@
|
||||||
"configs"
|
"configs"
|
||||||
"misc"
|
"misc"
|
||||||
"workspace"
|
"workspace"
|
||||||
"Audio"
|
|
||||||
];
|
];
|
||||||
files = [ ];
|
files = [
|
||||||
|
".gnupg/pubring.kbx"
|
||||||
|
".gnupg/trustdb.gpg"
|
||||||
|
".mailsynclastrun"
|
||||||
|
".ssh/known_hosts"
|
||||||
|
".zsh_history"
|
||||||
|
".lmmsrc.xml"
|
||||||
|
];
|
||||||
allowOther = true;
|
allowOther = true;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "${pkgs.neovim}/bin/nvim";
|
EDITOR = "${pkgs.neovim}/bin/nvim";
|
||||||
|
|
|
@ -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,32 +259,25 @@
|
||||||
|
|
||||||
swapDevices = [{ device = "/swap/swapfile"; }];
|
swapDevices = [{ device = "/swap/swapfile"; }];
|
||||||
|
|
||||||
environment.persistence = {
|
environment.persistence."/persist" = {
|
||||||
"/persist/system" = {
|
|
||||||
directories = [
|
directories = [
|
||||||
"/var/log"
|
"/etc/NetworkManager/system-connections"
|
||||||
|
"/etc/nixos"
|
||||||
|
"/etc/wireguard"
|
||||||
"/var/lib/bluetooth"
|
"/var/lib/bluetooth"
|
||||||
"/var/lib/systemd/coredump"
|
|
||||||
"/var/lib/docker"
|
"/var/lib/docker"
|
||||||
|
"/var/lib/libvirt"
|
||||||
|
"/var/lib/systemd/coredump"
|
||||||
|
"/var/log"
|
||||||
];
|
];
|
||||||
files = [
|
files = [
|
||||||
"/etc/machine-id"
|
"/etc/machine-id"
|
||||||
#"/etc/nix/id_rsa"
|
|
||||||
"/etc/ssh/ssh_host_ed25519_key"
|
"/etc/ssh/ssh_host_ed25519_key"
|
||||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||||
"/etc/ssh/ssh_host_rsa_key"
|
"/etc/ssh/ssh_host_rsa_key"
|
||||||
"/etc/ssh/ssh_host_rsa_key.pub"
|
"/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.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
|
Loading…
Reference in New Issue