syndicate-flake/nixos/modules/system/boot/stage-2.nix

28 lines
668 B
Nix

{ config, lib, pkgs, ... }:
{
config = {
system.build.bootStage2 = lib.mkForce (pkgs.substituteAll {
src = ./stage-2-init.sh;
shellDebug = "${pkgs.bashInteractive}/bin/bash";
shell = "${pkgs.bash}/bin/bash";
isExecutable = true;
inherit (config.nix) readOnlyStore;
inherit (config.system.build) earlyMountScript;
path = lib.makeBinPath [
pkgs.coreutils
pkgs.utillinux
pkgs.synit-pid1
];
inherit (pkgs) eudev;
postBootCommands = pkgs.writeText "local-cmds" ''
${config.boot.postBootCommands}
${config.powerManagement.powerUpCommands}
'';
});
};
}