tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos/portable/test.nix: Fix test
Robert Hensing
7 months ago
8a7e4f58
90162e81
+17
-9
1 changed file
expand all
collapse all
unified
split
nixos
modules
system
service
portable
test.nix
+17
-9
nixos/modules/system/service/portable/test.nix
···
7
7
8
8
portable-lib = import ./lib.nix { inherit lib; };
9
9
10
10
+
configured = portable-lib.configure {
11
11
+
serviceManagerPkgs = throw "do not use pkgs in this test";
12
12
+
extraRootModules = [ ];
13
13
+
extraRootSpecialArgs = { };
14
14
+
};
15
15
+
10
16
dummyPkg =
11
17
name:
12
18
derivation {
···
79
85
modules = [
80
86
{
81
87
options.services = mkOption {
82
82
-
type = types.attrsOf (
83
83
-
types.submoduleWith {
84
84
-
class = "service";
85
85
-
modules = [
86
86
-
./service.nix
87
87
-
];
88
88
-
}
89
89
-
);
88
88
+
type = types.attrsOf configured.serviceSubmodule;
90
89
};
91
90
}
92
91
exampleConfig
93
92
];
94
93
};
95
94
95
95
+
filterEval =
96
96
+
config:
97
97
+
lib.optionalAttrs (config ? process) {
98
98
+
inherit (config) assertions warnings process;
99
99
+
}
100
100
+
// {
101
101
+
services = lib.mapAttrs (k: filterEval) config.services;
102
102
+
};
103
103
+
96
104
test =
97
105
assert
98
98
-
exampleEval.config == {
106
106
+
filterEval exampleEval.config == {
99
107
services = {
100
108
service1 = {
101
109
process = {