Skip to content

Instantly share code, notes, and snippets.

@tim-tx
Created September 26, 2024 16:13
Show Gist options
  • Select an option

  • Save tim-tx/3b5a1cf4053d7ade8519e277f1c78aa5 to your computer and use it in GitHub Desktop.

Select an option

Save tim-tx/3b5a1cf4053d7ade8519e277f1c78aa5 to your computer and use it in GitHub Desktop.
Build a NixOS installer image including unfree broadcom-wl drivers
# source: https://blog.thomasheartman.com/posts/building-a-custom-nixos-installer
# set nix channel appropriately
# verify:
# nix-channel --list
# update:
# nix-channel --update nixpkgs
# build:
# nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix
{ config, pkgs, ... }:
{
imports = [
# calamares is the graphical installer
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix>
# Provide an initial copy of the NixOS channel so that the user doesn't need to run "nix-channel --update" first.
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
];
nixpkgs.config.allowUnfree = true;
boot.initrd.kernelModules = [ "wl" ];
boot.kernelModules = [ "kvm-intel" "wl" ];
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
environment.systemPackages = with pkgs; [
# zsh
# git
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment