Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions nixos/modules/system/activation/top-level.nix
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,13 @@ in

{
imports = [
../build.nix
(mkRemovedOptionModule [ "nesting" "clone" ] "Use `specialisation.«name» = { inheritParentConfig = true; configuration = { ... }; }` instead.")
(mkRemovedOptionModule [ "nesting" "children" ] "Use `specialisation.«name».configuration = { ... }` instead.")
];

options = {

system.build = mkOption {
internal = true;
default = {};
type = types.lazyAttrsOf types.unspecified;
description = ''
Attribute set of derivations used to setup the system.
'';
};

specialisation = mkOption {
default = {};
example = lib.literalExpression "{ fewJobsManyCores.configuration = { nix.buildCores = 0; nix.maxJobs = 1; }; }";
Expand Down Expand Up @@ -301,6 +293,16 @@ in
'';
};

system.build.toplevel = mkOption {
type = types.package;
readOnly = true;
description = ''
This option contains the store path that typically represents a NixOS system.

You can read this path in a custom deployment tool for example.
'';
};

};


Expand Down
21 changes: 21 additions & 0 deletions nixos/modules/system/build.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{ lib, ... }:
let
inherit (lib) mkOption types;
in
{
options = {

system.build = mkOption {
default = {};
description = ''
Attribute set of derivations used to set up the system.
'';
type = types.submoduleWith {
modules = [{
freeformType = types.lazyAttrsOf types.unspecified;
}];
};
};

};
}