added persistence.nix
This commit is contained in:
parent
5b942d4708
commit
fb42ab7421
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
fileSystems."/persist".neededForBoot = true;
|
||||
environment.persistence."/persist" = {
|
||||
hideMounts = true;
|
||||
directories = [
|
||||
"/etc/nixos"
|
||||
"/var/log"
|
||||
"/var/lib/nixos"
|
||||
"/var/lib/systemd/coredump"
|
||||
"/etc/NetworkManager/system-connections"
|
||||
];
|
||||
files = [
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -19,26 +19,10 @@ in
|
|||
|
||||
# Import optional options
|
||||
../common/optional/openssh.nix
|
||||
../common/optional/persistence.nix
|
||||
|
||||
];
|
||||
|
||||
fileSystems."/persist".neededForBoot = true;
|
||||
environment.persistence."/persist" = {
|
||||
hideMounts = true;
|
||||
directories = [
|
||||
"/etc/nixos"
|
||||
"/var/log"
|
||||
"/var/lib/nixos"
|
||||
"/var/lib/flatpak"
|
||||
"/var/lib/systemd/coredump"
|
||||
"/etc/NetworkManager/system-connections"
|
||||
];
|
||||
files = [
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
];
|
||||
};
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
|
@ -47,6 +31,13 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
environment.persistence."/persist" = {
|
||||
hideMounts = true;
|
||||
directories = [
|
||||
"/var/lib/flatpak"
|
||||
];
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "sparky";
|
||||
networkmanager.enable = true;
|
||||
|
|
Loading…
Reference in New Issue