tangled
alpha
login
or
join now
tgirl.cloud
/
easy-hosts
7
fork
atom
a flake module to ease creating and managing multiple hosts in your nix flake.
7
fork
atom
overview
issues
pulls
pipelines
feat: use lazy types for specialArgs
isabelroses.com
1 year ago
7f1e63c1
0e6d4f90
+9
-6
1 changed file
expand all
collapse all
unified
split
flake-module.nix
+9
-6
flake-module.nix
···
16
16
;
17
17
18
18
cfg = config.easyHosts;
19
19
+
20
20
+
modulesType = types.listOf types.anything;
21
21
+
specialArgsType = types.lazyAttrsOf types.raw;
19
22
in
20
23
{
21
24
options = {
···
38
41
modules = mkOption {
39
42
# we really expect a list of paths but i want to accept lists of lists of lists and so on
40
43
# since they will be flattened in the final function that applies the settings
41
41
-
type = types.listOf types.anything;
44
44
+
type = modulesType;
42
45
default = [ ];
43
46
};
44
47
45
48
specialArgs = mkOption {
46
46
-
type = types.attrs;
49
49
+
type = specialArgsType;
47
50
default = { };
48
51
};
49
52
};
···
57
60
types.submodule {
58
61
options = {
59
62
modules = mkOption {
60
60
-
type = types.listOf types.anything;
63
63
+
type = modulesType;
61
64
default = [ ];
62
65
};
63
66
64
67
specialArgs = mkOption {
65
65
-
type = types.attrs;
68
68
+
type = specialArgsType;
66
69
default = { };
67
70
};
68
71
};
···
120
123
};
121
124
122
125
modules = mkOption {
123
123
-
type = types.listOf types.anything;
126
126
+
type = modulesType;
124
127
default = [ ];
125
128
};
126
129
127
130
specialArgs = mkOption {
128
128
-
type = types.attrs;
131
131
+
type = specialArgsType;
129
132
default = { };
130
133
};
131
134
};