diff options
| author | Michael Hoang <Enzime@users.noreply.github.com> | 2023-07-11 00:30:59 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-11 00:30:59 +1000 |
| commit | 83620edf499ba8033ad43d4f5edc50fdf3eeee5f (patch) | |
| tree | 591b785df5504333eed46de64bb2f5160eb0a3f0 /modules/system | |
| parent | 97d4a9102964aae7deac3290d755e6fbad9b94ab (diff) | |
| parent | b70656affa5e63efcf0a0a728c6f9a26911c7ef4 (diff) | |
Merge pull request #577 from 2xsaiko/outgoing/systembuildercommands
Add system.systemBuilderCommands and systemBuilderArgs
Diffstat (limited to 'modules/system')
| -rw-r--r-- | modules/system/default.nix | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/modules/system/default.nix b/modules/system/default.nix index 58369a8..af90ada 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -43,6 +43,24 @@ in ''; }; + system.systemBuilderCommands = mkOption { + internal = true; + type = types.lines; + default = ""; + description = '' + This code will be added to the builder creating the system store path. + ''; + }; + + system.systemBuilderArgs = mkOption { + internal = true; + type = types.attrsOf types.unspecified; + default = {}; + description = lib.mdDoc '' + `lib.mkDerivation` attributes that will be passed to the top level system builder. + ''; + }; + assertions = mkOption { type = types.listOf types.unspecified; internal = true; @@ -70,7 +88,7 @@ in config = { - system.build.toplevel = throwAssertions (showWarnings (stdenvNoCC.mkDerivation { + system.build.toplevel = throwAssertions (showWarnings (stdenvNoCC.mkDerivation ({ name = "darwin-system-${cfg.darwinLabel}"; preferLocalBuild = true; @@ -113,8 +131,10 @@ in echo -n "$darwinLabel" > $out/darwin-version echo -n "$system" > $out/system + + ${cfg.systemBuilderCommands} ''; - })); + } // cfg.systemBuilderArgs))); }; } |
