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
;
17
18
cfg = config.easyHosts;
0
0
0
19
in
20
{
21
options = {
···
38
modules = mkOption {
39
# we really expect a list of paths but i want to accept lists of lists of lists and so on
40
# since they will be flattened in the final function that applies the settings
41
-
type = types.listOf types.anything;
42
default = [ ];
43
};
44
45
specialArgs = mkOption {
46
-
type = types.attrs;
47
default = { };
48
};
49
};
···
57
types.submodule {
58
options = {
59
modules = mkOption {
60
-
type = types.listOf types.anything;
61
default = [ ];
62
};
63
64
specialArgs = mkOption {
65
-
type = types.attrs;
66
default = { };
67
};
68
};
···
120
};
121
122
modules = mkOption {
123
-
type = types.listOf types.anything;
124
default = [ ];
125
};
126
127
specialArgs = mkOption {
128
-
type = types.attrs;
129
default = { };
130
};
131
};
···
16
;
17
18
cfg = config.easyHosts;
19
+
20
+
modulesType = types.listOf types.anything;
21
+
specialArgsType = types.lazyAttrsOf types.raw;
22
in
23
{
24
options = {
···
41
modules = mkOption {
42
# we really expect a list of paths but i want to accept lists of lists of lists and so on
43
# since they will be flattened in the final function that applies the settings
44
+
type = modulesType;
45
default = [ ];
46
};
47
48
specialArgs = mkOption {
49
+
type = specialArgsType;
50
default = { };
51
};
52
};
···
60
types.submodule {
61
options = {
62
modules = mkOption {
63
+
type = modulesType;
64
default = [ ];
65
};
66
67
specialArgs = mkOption {
68
+
type = specialArgsType;
69
default = { };
70
};
71
};
···
123
};
124
125
modules = mkOption {
126
+
type = modulesType;
127
default = [ ];
128
};
129
130
specialArgs = mkOption {
131
+
type = specialArgsType;
132
default = { };
133
};
134
};