diff --git a/hosts/hp/default.nix b/hosts/hp/default.nix index b49597e..dd869f8 100644 --- a/hosts/hp/default.nix +++ b/hosts/hp/default.nix @@ -1,4 +1,7 @@ { config, lib, pkgs, ... }: +let + persist = "/nix/persist"; +in { sconfig = { gnome = true; @@ -7,18 +10,23 @@ wg-home.enable = true; }; - environment.etc.machine-id.source = "/var/lib/nixos/machine-id"; + environment.etc.machine-id.source = "${persist}/machine-id"; - environment.etc."NetworkManager/system-connections".source = - "/var/lib/nixos/nm-connections"; + environment.persistence."${persist}/system".directories = [ + "/etc/NetworkManager/system-connections" + "/var/lib/bluetooth" + "/var/lib/nixos" + "/var/lib/systemd/coredump" + "/var/log/journal" + ]; services.openssh.hostKeys = [ - { type = "ed25519"; path = "/var/lib/nixos/ssh_host_ed25519_key"; } + { type = "ed25519"; path = "${persist}/ssh_host_ed25519_key"; } ]; users.mutableUsers = false; - users.users.sean.passwordFile = "/var/lib/nixos/shadow_sean"; - users.users.root.passwordFile = "/var/lib/nixos/shadow_sean"; + users.users.sean.passwordFile = "${persist}/shadow_sean"; + users.users.root.passwordFile = "${persist}/shadow_sean"; boot = { loader.systemd-boot.enable = true; @@ -33,7 +41,6 @@ "/boot" = { device = "/dev/disk/by-partlabel/EFI\\x20system\\x20partition"; fsType = "vfat"; }; "/home" = { device = "zroot/locker/home"; fsType = "zfs"; }; "/nix" = { device = "zroot/locker/nix"; fsType = "zfs"; }; - "/var/lib" = { device = "zroot/locker/lib"; fsType = "zfs"; }; "/var/log" = { device = "zroot/locker/log"; fsType = "zfs"; }; };