Skip to content

Instantly share code, notes, and snippets.

@Krutonium
Created February 24, 2024 02:25
Show Gist options
  • Save Krutonium/4bec8f81d0ea1ab60d9f40b5f6433206 to your computer and use it in GitHub Desktop.
Save Krutonium/4bec8f81d0ea1ab60d9f40b5f6433206 to your computer and use it in GitHub Desktop.
Flake to build a NixOS Gnome ISO that is bCacheFS ready with the latest kernel

Build

nix build .#nixosConfigurations.exampleIso.config.system.build.isoImage Then dd it to your least favorite USB Stick for usage.

{
description = "Bcachefs enabled installation media";
inputs.nixos.url = "nixpkgs/nixos-23.11";
outputs = { self, nixos }: {
nixosConfigurations = {
exampleIso = nixos.lib.nixosSystem {
system = "x86_64-linux";
modules = [
"${nixos}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix"
"${nixos}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix"
({ lib, pkgs, ... }: {
boot.supportedFilesystems = [ "bcachefs" ];
boot.kernelPackages = lib.mkOverride 0 pkgs.linuxPackages_latest;
})
];
};
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment