mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-27 02:34:53 +00:00
26 lines
539 B
Nix
26 lines
539 B
Nix
{
|
|
lib,
|
|
emptyFile,
|
|
nixos,
|
|
}:
|
|
let
|
|
evalModuleStateRevisions =
|
|
cfg:
|
|
(nixos [
|
|
{ system.stateVersion = lib.trivial.release; }
|
|
cfg
|
|
]).config.system.moduleStateRevisions;
|
|
|
|
# For modules that follow the <module>.enable, <module>.stateRevision pattern:
|
|
testModule =
|
|
path:
|
|
evalModuleStateRevisions (lib.setAttrByPath path { enable = true; })
|
|
? "${builtins.concatStringsSep "." path}.stateRevision";
|
|
in
|
|
assert evalModuleStateRevisions { } == { };
|
|
assert testModule [
|
|
"services"
|
|
"seerr"
|
|
];
|
|
emptyFile
|