12 initScriptBuilder = pkgs.substituteAll {
13 src = ./init-script-builder.sh;
16 inherit (config.system.nixos) distroName;
32 boot.loader.initScript = {
38 Some systems require a /sbin/init script which is started.
39 Or having it makes starting NixOS easier.
40 This applies to some kind of hosting services and user mode linux.
42 Additionally this script will create
43 /boot/init-other-configurations-contents.txt containing
44 contents of remaining configurations. You can copy paste them into
45 /sbin/init manually running a rescue system or such.
54 config = mkIf config.boot.loader.initScript.enable {
56 system.build.installBootLoader = initScriptBuilder;