about summary refs log tree commit diff
path: root/nixos/alpha/hardware-configuration.nix
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2022-01-26 22:35:48 +0900
committersefidel <contact@sefidel.net>2022-01-26 22:40:42 +0900
commite9ca070fbaaac5b4114d384081e0722ab1025260 (patch)
treef67e52b8244c002a5925957cd7a2feed4e3068a4 /nixos/alpha/hardware-configuration.nix
parentf1e005ac85d36002fa240340a07d418b86cb377b (diff)
downloadnixrc-e9ca070fbaaac5b4114d384081e0722ab1025260.tar.gz
nixrc-e9ca070fbaaac5b4114d384081e0722ab1025260.zip
nixos/alpha: zfs
Diffstat (limited to 'nixos/alpha/hardware-configuration.nix')
-rw-r--r--nixos/alpha/hardware-configuration.nix70
1 files changed, 46 insertions, 24 deletions
diff --git a/nixos/alpha/hardware-configuration.nix b/nixos/alpha/hardware-configuration.nix
index 3e99ea9..51e30a7 100644
--- a/nixos/alpha/hardware-configuration.nix
+++ b/nixos/alpha/hardware-configuration.nix
@@ -1,17 +1,5 @@
 { config, lib, pkgs, ... }:
 
-let
-  espDev = "/dev/disk/by-uuid/7905-2E41";
-  btrfsDev = "/dev/disk/by-uuid/dc47a0a6-3c73-45c1-951c-40032e762180";
-  swapDev = "/dev/disk/by-uuid/4a74b247-99e9-42c7-9a86-75aea964bb85";
-  dataDev = "/dev/disk/by-uuid/fe7a00a8-0a3c-48de-9d7a-ed7cf172f501";
-
-  subvolume = name: {
-    device = btrfsDev;
-    fsType = "btrfs";
-    options = [ "subvol=${name}" "compress=zstd" "noatime" ];
-  };
-in
 {
   boot.initrd.availableKernelModules = [ "xhci-pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
   boot.initrd.kernelModules = [ ];
@@ -21,28 +9,62 @@ in
   hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
   hardware.enableRedistributableFirmware = true;
 
-  fileSystems."/" = subvolume "root";
-  fileSystems."/home" = subvolume "home";
-  fileSystems."/nix" = subvolume "nix";
-  fileSystems."/persist" = subvolume "persist";
-  fileSystems."/var/log" = {
-    device = btrfsDev;
-    fsType = "btrfs";
-    options = [ "subvol=log" "compress=zstd" "noatime" ];
-    neededForBoot = true;
+  fileSystems."/" = {
+    device = "rpool/root/nixos";
+    fsType = "zfs";
   };
 
   fileSystems."/boot" = {
-    device = espDev;
+    device = "/dev/disk/by-uuid/55B4-0E38";
     fsType = "vfat";
   };
 
+  fileSystems."/nix" = {
+    device = "rpool/root/nixos/nix";
+    fsType = "zfs";
+  };
+
+  fileSystems."/etc" = {
+    device = "rpool/root/nixos/etc";
+    fsType = "zfs";
+  };
+
+  fileSystems."/var" = {
+    device = "rpool/root/nixos/var";
+    fsType = "zfs";
+  };
+
+  fileSystems."/var/lib" = {
+    device = "rpool/root/nixos/var/lib";
+    fsType = "zfs";
+  };
+
+  fileSystems."/var/log" = {
+    device = "rpool/root/nixos/var/log";
+    fsType = "zfs";
+  };
+
+  fileSystems."/var/spool" = {
+    device = "rpool/root/nixos/var/spool";
+    fsType = "zfs";
+  };
+
+  fileSystems."/home" = {
+    device = "rpool/home";
+    fsType = "zfs";
+  };
+
+  fileSystems."/home/boopy" = {
+    device = "rpool/home/boopy";
+    fsType = "zfs";
+  };
+
   fileSystems."/data" = {
-    device = dataDev;
+    device = "/dev/disk/by-uuid/fe7a00a8-0a3c-48de-9d7a-ed7cf172f501";
     fsType = "ext4";
   };
 
-  swapDevices = [{ device = swapDev; }];
+  swapDevices = [ ];
 
   nix.maxJobs = lib.mkDefault 4;
   powerManagement.cpuFreqGovernor = lib.mkDefault "schedutil";