Created
September 26, 2024 16:13
-
-
Save tim-tx/3b5a1cf4053d7ade8519e277f1c78aa5 to your computer and use it in GitHub Desktop.
Build a NixOS installer image including unfree broadcom-wl drivers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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