Skip to content

Instantly share code, notes, and snippets.

@fadenb
Created December 26, 2025 10:03
Show Gist options
  • Select an option

  • Save fadenb/39ea4b5ff085d446c08464243e986a1c to your computer and use it in GitHub Desktop.

Select an option

Save fadenb/39ea4b5ff085d446c08464243e986a1c to your computer and use it in GitHub Desktop.
Quick & dirty NixOS 25.11 ISO build for recent Laptop with Intel Core Ultra 7: `nix build .#nixosConfigurations.zfsIso.config.system.build.isoImage --extra-experimental-f eatures "nix-command flakes"`
{
description = "NixOS ISO - Core Ultra 7 Laptop - Linux 6.18 + ZFS 2.4";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
};
outputs = { self, nixpkgs, nixos-hardware }: {
nixosConfigurations.zfsIso = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
nixos-hardware.nixosModules.common-pc-laptop
nixos-hardware.nixosModules.common-pc-ssd
({ pkgs, lib, config, ... }: {
# --- KERNEL & ZFS CONFIGURATION ---
# 1. PIN KERNEL TO 6.18
# We use 6.18 specifically because ZFS 2.4.0 supports *up to* 6.18.
# Using 'latest' might pull 6.19+ and break the build.
boot.kernelPackages = pkgs.linuxPackages_6_18;
# 2. FORCE ZFS 2.4 MODULE
# The 'mkForce' is critical here. It overwrites the broken default
# in the installer that tries to point to the deleted 'zfs' alias.
boot.zfs.modulePackage = lib.mkForce pkgs.linuxPackages_6_18.zfs_2_4;
# 3. SET USERSPACE TOOLS
boot.zfs.package = pkgs.zfs_2_4;
# --- ZFS Settings ---
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
networking.hostId = "8425e349";
# --- Hardware & Drivers ---
boot.initrd.kernelModules = [ "xe" ]; # Intel Arc
hardware.enableAllFirmware = true;
nixpkgs.config.allowUnfree = true;
# --- GUI (XFCE) ---
services.xserver = {
enable = true;
videoDrivers = [ "modesetting" ];
desktopManager.xfce.enable = true;
displayManager.lightdm.enable = true;
displayManager.autoLogin.enable = true;
displayManager.autoLogin.user = "nixos";
};
networking.networkmanager.enable = true;
networking.wireless.enable = false;
environment.systemPackages = with pkgs; [
neovim git pciutils usbutils lm_sensors firefox networkmanagerapplet gparted curl wget
];
isoImage.squashfsCompression = "zstd -Xcompression-level 6";
})
];
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment