From f4507b6fddfe6755894f06dee3247c0f43cd26b0 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 22 Oct 2022 10:51:01 +0000 Subject: sys/x220: re-install with non-persistent btrfs --- sys/x220.nix | 64 +++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 29 deletions(-) (limited to 'sys') diff --git a/sys/x220.nix b/sys/x220.nix index a886fd0d0376..8c08eaf172d2 100644 --- a/sys/x220.nix +++ b/sys/x220.nix @@ -16,54 +16,60 @@ boot.loader.grub.enable = false; boot.loader.generic-extlinux-compatible.enable = true; - boot.cleanTmpDir = true; + boot.initrd.postDeviceCommands = '' + mkdir /mnt + mount /dev/mapper/root /mnt + btrfs subvolume delete /mnt/boot + btrfs subvolume create /mnt/boot + umount /mnt + ''; - networking.hostId = "008dd68a"; - - boot.supportedFilesystems = [ "zfs" ]; - - boot.zfs.requestEncryptionCredentials = true; + boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/c28ed0c0-4fa9-4d8a-a771-5fddac61adda"; fileSystems."/" = { - device = "rpool/root"; - fsType = "zfs"; + device = "/dev/disk/by-uuid/c068093d-512b-43d3-a4c3-cab52a190bfd"; + fsType = "btrfs"; + options = [ "subvol=boot" ]; }; fileSystems."/home" = { - device = "rpool/home/qyliss"; - fsType = "zfs"; + device = "/dev/disk/by-uuid/c068093d-512b-43d3-a4c3-cab52a190bfd"; + fsType = "btrfs"; + options = [ "subvol=persist/safe/home" ]; }; - fileSystems."/root" = { - device = "rpool/home/root"; - fsType = "zfs"; + fileSystems."/nix" = { + device = "/dev/disk/by-uuid/c068093d-512b-43d3-a4c3-cab52a190bfd"; + fsType = "btrfs"; + options = [ "subvol=persist/local/nix" ]; }; - fileSystems."/nix" = { - device = "rpool/nix"; - fsType = "zfs"; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/6F69-3310"; + fsType = "vfat"; }; - fileSystems."/var" = { - device = "rpool/var"; - fsType = "zfs"; + fileSystems."/persist" = { + device = "/dev/disk/by-uuid/c068093d-512b-43d3-a4c3-cab52a190bfd"; + fsType = "btrfs"; + options = [ "subvol=persist" ]; }; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/6c2a9dd7-45b4-413a-bded-fccf682ffa36"; - fsType = "ext4"; + fileSystems."/srv" = { + device = "/dev/disk/by-uuid/c068093d-512b-43d3-a4c3-cab52a190bfd"; + fsType = "btrfs"; + options = [ "subvol=persist/safe/srv" ]; }; - swapDevices = [ - { - device = "/dev/disk/by-partuuid/82326179-f409-4f28-9233-805c44a04879"; - randomEncryption = true; - } - ]; + fileSystems."/var/lib/machines" = { + device = "/dev/disk/by-uuid/c068093d-512b-43d3-a4c3-cab52a190bfd"; + fsType = "btrfs"; + options = [ "subvol=persist/safe/var/lib/machines" ]; + }; networking.hostName = "x220"; - system.stateVersion = "18.09"; + system.stateVersion = "22.05"; users.users.qyliss.hashedPassword = "$5$rounds=1000000$tySRQ3rdqbPOduux$NcW7CoffEScpmOyS0Ga9gE5ZNLt8PT6.2Gvwn91vQn7"; -- cgit 1.4.1