nixos/modules/boot/stage2patch.nix
Gerg-L 0d2e560191 switch to using specialArgs for inputs
made dummy option for deadnix to shutup about disko

update flake.lock

stopped using neovim overlay
2023-05-17 22:35:48 -04:00

35 lines
1 KiB
Nix

{
inputs,
lib,
config,
pkgs,
...
}: let
useHostResolvConf = config.networking.resolvconf.enable && config.networking.useHostResolvConf;
bootStage2 = pkgs.substituteAll {
src = pkgs.runCommand "stage-2-init.sh" {} ''
sed '2i exec 1<>/dev/null' ${inputs.unstable}/nixos/modules/system/boot/stage-2-init.sh > $out
'';
shellDebug = "${pkgs.bashInteractive}/bin/bash";
shell = "${pkgs.bash}/bin/bash";
inherit (config.boot) readOnlyNixStore systemdExecutable extraSystemdUnitPaths;
inherit (config.system.nixos) distroName;
isExecutable = true;
inherit useHostResolvConf;
inherit (config.system.build) earlyMountScript;
path = lib.makeBinPath ([
pkgs.coreutils
pkgs.util-linux
]
++ lib.optional useHostResolvConf pkgs.openresolv);
postBootCommands =
pkgs.writeText "local-cmds"
''
${config.boot.postBootCommands}
${config.powerManagement.powerUpCommands}
'';
};
in {
system.build.bootStage2 = lib.mkForce bootStage2;
}