summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2022-04-16 15:03:24 +0200
committerGitHub <noreply@github.com>2022-04-16 15:03:24 +0200
commitb2383b63292ea4188b80e07988b9484d3620c74b (patch)
tree2e01f0e8d9eb7ff208e5f378333686e5d660eaad
parentc846ab80fcb208a899725e444125f5b17d2dfcff (diff)
parent9ff1ab4037e2c20bb4ff11af452e4321d17edc99 (diff)
downloadnixpkgs-b2383b63292ea4188b80e07988b9484d3620c74b.tar
nixpkgs-b2383b63292ea4188b80e07988b9484d3620c74b.tar.gz
nixpkgs-b2383b63292ea4188b80e07988b9484d3620c74b.tar.bz2
nixpkgs-b2383b63292ea4188b80e07988b9484d3620c74b.tar.lz
nixpkgs-b2383b63292ea4188b80e07988b9484d3620c74b.tar.xz
nixpkgs-b2383b63292ea4188b80e07988b9484d3620c74b.tar.zst
nixpkgs-b2383b63292ea4188b80e07988b9484d3620c74b.zip
Merge pull request #168306 from flokli/nixos-doc-installer-drivers
nixos/doc: add notes on additional drivers or firmware
-rw-r--r--nixos/doc/manual/development/building-nixos.chapter.md31
-rw-r--r--nixos/doc/manual/from_md/development/building-nixos.chapter.xml34
2 files changed, 65 insertions, 0 deletions
diff --git a/nixos/doc/manual/development/building-nixos.chapter.md b/nixos/doc/manual/development/building-nixos.chapter.md
index 3310dee98f9..27d7e1d3855 100644
--- a/nixos/doc/manual/development/building-nixos.chapter.md
+++ b/nixos/doc/manual/development/building-nixos.chapter.md
@@ -30,6 +30,37 @@ To check the content of an ISO image, mount it like so:
 # mount -o loop -t iso9660 ./result/iso/cd.iso /mnt/iso
 ```
 
+## Additional drivers or firmware {#sec-building-image-drivers}
+
+If you need additional (non-distributable) drivers or firmware in the
+installer, you might want to extend these configurations.
+
+For example, to build the GNOME graphical installer ISO, but with support for
+certain WiFi adapters present in some MacBooks, you can create the following
+file at `modules/installer/cd-dvd/installation-cd-graphical-gnome-macbook.nix`:
+
+```nix
+{ config, ... }:
+
+{
+  imports = [ ./installation-cd-graphical-gnome.nix ];
+
+  boot.initrd.kernelModules = [ "wl" ];
+
+  boot.kernelModules = [ "kvm-intel" "wl" ];
+  boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
+}
+```
+
+Then build it like in the example above:
+
+```ShellSession
+$ git clone https://github.com/NixOS/nixpkgs.git
+$ cd nixpkgs/nixos
+$ export NIXPKGS_ALLOW_UNFREE=1
+$ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-graphical-gnome-macbook.nix default.nix
+```
+
 ## Technical Notes {#sec-building-image-tech-notes}
 
 The config value enforcement is implemented via `mkImageMediaOverride = mkOverride 60;`
diff --git a/nixos/doc/manual/from_md/development/building-nixos.chapter.xml b/nixos/doc/manual/from_md/development/building-nixos.chapter.xml
index ad9349da068..e7a76a6d715 100644
--- a/nixos/doc/manual/from_md/development/building-nixos.chapter.xml
+++ b/nixos/doc/manual/from_md/development/building-nixos.chapter.xml
@@ -45,6 +45,40 @@ $ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd
 # mount -o loop -t iso9660 ./result/iso/cd.iso /mnt/iso
 </programlisting>
   </section>
+  <section xml:id="sec-building-image-drivers">
+    <title>Additional drivers or firmware</title>
+    <para>
+      If you need additional (non-distributable) drivers or firmware in
+      the installer, you might want to extend these configurations.
+    </para>
+    <para>
+      For example, to build the GNOME graphical installer ISO, but with
+      support for certain WiFi adapters present in some MacBooks, you
+      can create the following file at
+      <literal>modules/installer/cd-dvd/installation-cd-graphical-gnome-macbook.nix</literal>:
+    </para>
+    <programlisting language="bash">
+{ config, ... }:
+
+{
+  imports = [ ./installation-cd-graphical-gnome.nix ];
+
+  boot.initrd.kernelModules = [ &quot;wl&quot; ];
+
+  boot.kernelModules = [ &quot;kvm-intel&quot; &quot;wl&quot; ];
+  boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
+}
+</programlisting>
+    <para>
+      Then build it like in the example above:
+    </para>
+    <programlisting>
+$ git clone https://github.com/NixOS/nixpkgs.git
+$ cd nixpkgs/nixos
+$ export NIXPKGS_ALLOW_UNFREE=1
+$ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-graphical-gnome-macbook.nix default.nix
+</programlisting>
+  </section>
   <section xml:id="sec-building-image-tech-notes">
     <title>Technical Notes</title>
     <para>