Skip to content

Commit

Permalink
nixos/top-level.nix: Add system.checks
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Dec 9, 2021
1 parent eb3fc9a commit 6adab4c
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions nixos/modules/system/activation/top-level.nix
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,19 @@ in
default = [];
description = ''
A list of packages that should be included in the system
closure but not otherwise made available to users. This is
primarily used by the installation tests.
closure but not otherwise made available to users.
'';
};

system.checks = mkOption {
type = types.listOf types.package;
default = [];
description = ''
A list of packages that are added as dependencies of the activation
script build, for the purpose of validating the configuration.
Unlike <literal>system.extraDependencies</literal>, these paths do not
become part of the runtime closure of the system.
'';
};

Expand Down Expand Up @@ -173,6 +184,8 @@ in
"$out/configuration.nix"
'';

system.systemBuilderAttrs.passedTests = concatStringsSep " " config.system.checks;

system.build.toplevel = system;

# Traditionally, the option default contained the logic for taking this from
Expand Down

0 comments on commit 6adab4c

Please sign in to comment.