From 32e63ddf4d8e3be4eb5278b9c6b077519db8921f Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 15 Nov 2025 20:05:02 -0500 Subject: [PATCH] Enable /boot partition. --- .../hosts/i_only_boot_zfs/default.nix | 8 +++--- .../hosts/i_only_boot_zfs/disk-config.nix | 26 +++++++++---------- .../roles/optimized_build/default.nix | 7 +++-- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/nix/configuration/hosts/i_only_boot_zfs/default.nix b/nix/configuration/hosts/i_only_boot_zfs/default.nix index dea30a8..ec2b5b8 100644 --- a/nix/configuration/hosts/i_only_boot_zfs/default.nix +++ b/nix/configuration/hosts/i_only_boot_zfs/default.nix @@ -26,15 +26,15 @@ me.mountPersistence = true; # Toggle to start writing the extlinux config which will be used by zfsbootmenu - boot.loader.generic-extlinux-compatible.enable = true; - boot.loader.systemd-boot.enable = lib.mkForce false; + # boot.loader.generic-extlinux-compatible.enable = true; + # boot.loader.systemd-boot.enable = lib.mkForce false; me.optimizations = { # enable = true; - arch = "kabylake"; + # arch = "kabylake"; # build_arch = "x86-64-v3"; system_features = [ - "gccarch-kabylake" + # "gccarch-kabylake" "gccarch-x86-64-v3" "benchmark" "big-parallel" diff --git a/nix/configuration/hosts/i_only_boot_zfs/disk-config.nix b/nix/configuration/hosts/i_only_boot_zfs/disk-config.nix index 1887e89..0bfa473 100644 --- a/nix/configuration/hosts/i_only_boot_zfs/disk-config.nix +++ b/nix/configuration/hosts/i_only_boot_zfs/disk-config.nix @@ -76,15 +76,15 @@ mountpoint = "/"; postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/root@blank$' || zfs snapshot zroot/linux/nix/root@blank"; }; - # "linux/nix/boot" = { - # type = "zfs_fs"; - # options = { - # mountpoint = "legacy"; - # "org.zfsbootmenu:nixos" = "on"; - # }; - # mountpoint = "/"; - # postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/boot@blank$' || zfs snapshot zroot/linux/nix/boot@blank"; - # }; + "linux/nix/boot" = { + type = "zfs_fs"; + options = { + mountpoint = "legacy"; + "org.zfsbootmenu:nixos" = "on"; + }; + mountpoint = "/boot"; + postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/linux/nix/boot@blank$' || zfs snapshot zroot/linux/nix/boot@blank"; + }; "linux/nix/nix" = { type = "zfs_fs"; options.mountpoint = "legacy"; @@ -129,10 +129,10 @@ "noatime" "norelatime" ]; - # fileSystems."/boot".options = [ - # "noatime" - # "norelatime" - # ]; + fileSystems."/boot".options = [ + "noatime" + "norelatime" + ]; fileSystems."/nix".options = [ "noatime" "norelatime" diff --git a/nix/configuration/roles/optimized_build/default.nix b/nix/configuration/roles/optimized_build/default.nix index 7788174..d7331ac 100644 --- a/nix/configuration/roles/optimized_build/default.nix +++ b/nix/configuration/roles/optimized_build/default.nix @@ -50,10 +50,13 @@ }; config = lib.mkMerge [ + { + boot.zfs.package = pkgs.zfs_unstable; + } (lib.mkIf (!config.me.optimizations.enable) ( lib.mkMerge [ { - boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_16; + boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_17; } ] )) @@ -92,7 +95,7 @@ HZ = lib.kernel.freeform "300"; HZ_300 = lib.kernel.yes; HZ_1000 = lib.kernel.no; - } prev.linux_6_16; + } prev.linux_6_17; } ) (final: prev: {