about summary refs log tree commit diff
path: root/sys
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-10-22 10:51:01 +0000
committerAlyssa Ross <hi@alyssa.is>2023-02-08 13:45:56 +0000
commitf4507b6fddfe6755894f06dee3247c0f43cd26b0 (patch)
tree0fd33acc1217b00afe11ebae166bd93d5be66d54 /sys
parentdd042a66555ee72e0df4659fa1d5fb72e9bc5e0a (diff)
downloadnixlib-f4507b6fddfe6755894f06dee3247c0f43cd26b0.tar
nixlib-f4507b6fddfe6755894f06dee3247c0f43cd26b0.tar.gz
nixlib-f4507b6fddfe6755894f06dee3247c0f43cd26b0.tar.bz2
nixlib-f4507b6fddfe6755894f06dee3247c0f43cd26b0.tar.lz
nixlib-f4507b6fddfe6755894f06dee3247c0f43cd26b0.tar.xz
nixlib-f4507b6fddfe6755894f06dee3247c0f43cd26b0.tar.zst
nixlib-f4507b6fddfe6755894f06dee3247c0f43cd26b0.zip
sys/x220: re-install with non-persistent btrfs
Diffstat (limited to 'sys')
-rw-r--r--sys/x220.nix64
1 files changed, 35 insertions, 29 deletions
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";