forked from mirrors/nixpkgs
nixos/top-level.nix: Make extensible
This commit is contained in:
parent
9b2af8673b
commit
4ec415cff9
|
@ -88,6 +88,8 @@ let
|
|||
|
||||
echo -n "${toString config.system.extraDependencies}" > $out/extra-dependencies
|
||||
|
||||
${config.system.systemBuilderCommands}
|
||||
|
||||
${config.system.extraSystemBuilderCmds}
|
||||
'';
|
||||
|
||||
|
@ -96,7 +98,7 @@ let
|
|||
# kernel, systemd units, init scripts, etc.) as well as a script
|
||||
# `switch-to-configuration' that activates the configuration and
|
||||
# makes it bootable.
|
||||
baseSystem = pkgs.stdenvNoCC.mkDerivation {
|
||||
baseSystem = pkgs.stdenvNoCC.mkDerivation ({
|
||||
name = "nixos-system-${config.system.name}-${config.system.nixos.label}";
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
|
@ -120,7 +122,7 @@ let
|
|||
|
||||
# Needed by switch-to-configuration.
|
||||
perl = pkgs.perl.withPackages (p: with p; [ FileSlurp NetDBus XMLParser XMLTwig ]);
|
||||
};
|
||||
} // config.system.systemBuilderAttrs);
|
||||
|
||||
# Handle assertions and warnings
|
||||
|
||||
|
@ -228,6 +230,24 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
system.systemBuilderCommands = mkOption {
|
||||
type = types.lines;
|
||||
internal = true;
|
||||
default = "";
|
||||
description = ''
|
||||
This code will be added to the builder creating the system store path.
|
||||
'';
|
||||
};
|
||||
|
||||
system.systemBuilderAttrs = mkOption {
|
||||
type = types.attrsOf types.unspecified;
|
||||
internal = true;
|
||||
default = {};
|
||||
description = ''
|
||||
Derivation attributes that will be passed to the top level system builder.
|
||||
'';
|
||||
};
|
||||
|
||||
system.extraSystemBuilderCmds = mkOption {
|
||||
type = types.lines;
|
||||
internal = true;
|
||||
|
|
Loading…
Reference in a new issue