Skip to content

Instantly share code, notes, and snippets.

@stayradiated
Last active July 8, 2025 15:18
Show Gist options
  • Save stayradiated/ff3dbd97aea74961b8acecdfaa6ad702 to your computer and use it in GitHub Desktop.
Save stayradiated/ff3dbd97aea74961b8acecdfaa6ad702 to your computer and use it in GitHub Desktop.
NixOS ISO for Thinkpad X1 Carbon Gen 13 with wifi drivers
{
description = "Official NixOS GNOME ISO with added firmware support";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }: {
nixosConfigurations.iso = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
# This imports the exact same module used for the official GNOME ISO
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix"
# Then we just add our firmware settings as an overlay
({ config, pkgs, ... }: {
# Enable all firmware, including non-free
hardware.enableRedistributableFirmware = true;
hardware.enableAllFirmware = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
})
];
};
packages.x86_64-linux.default = self.nixosConfigurations.iso.config.system.build.isoImage;
};
}
{
description = "NixOS ISO with latest firmware";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }: {
nixosConfigurations.iso = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ config, pkgs, ... }: {
imports = [ "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" ];
# Enable all firmware, including non-free
hardware.enableRedistributableFirmware = true;
hardware.enableAllFirmware = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
})
];
};
packages.x86_64-linux.default = self.nixosConfigurations.iso.config.system.build.isoImage;
};
}
@stayradiated
Copy link
Author

stayradiated commented Apr 16, 2025

nix --extra-experimental-features "nix-command flakes" build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment