move hypercube to impermanence

This commit is contained in:
Sean Buckley 2021-08-13 17:13:00 -04:00
parent 31b83182dc
commit f934a6c671

View file

@ -6,6 +6,20 @@
security-tools = true; security-tools = true;
}; };
environment.persistence."/persist" = {
files = [
"/etc/machine-id"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_rsa_key.pub"
"/etc/ssh/ssh_host_rsa_key"
];
directories = [
"/home"
"/var/log"
];
};
networking.search = [ "bck.me" ]; networking.search = [ "bck.me" ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -16,17 +30,16 @@
services.openssh.enable = true; services.openssh.enable = true;
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader.systemd-boot.enable = true; loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;
kernelParams = map (x: "video=DP-${x}:1280x720@60") [ "0" "1" "2" ]; kernelParams = map (x: "video=DP-${x}:1280x720@60") [ "0" "1" "2" ];
initrd.luks.devices.cryptroot1 = { allowDiscards = true; device = "/dev/disk/by-partlabel/_root1"; };
initrd.luks.devices.cryptroot2 = { allowDiscards = true; device = "/dev/disk/by-partlabel/_root2"; };
}; };
fileSystems = { fileSystems = {
"/" = { device = "/dev/disk/by-label/_root"; fsType = "btrfs"; options = [ "discard" "compress=zstd:1" ]; }; "/" = { device = "tmpfs"; fsType = "tmpfs"; options = [ "mode=755" ]; };
"/boot" = { device = "/dev/disk/by-partlabel/_esp"; fsType = "vfat"; }; "/boot" = { device = "/dev/disk/by-partlabel/_esp"; fsType = "vfat"; };
"/nix" = { device = "cube/locker/nix"; fsType = "zfs"; };
"/persist" = { device = "cube/locker/persist"; fsType = "zfs"; };
}; };
system.stateVersion = "21.05"; system.stateVersion = "21.05";