tangled
alpha
login
or
join now
thevoid.cafe
/
puzzlevision
0
fork
atom
Non stop entertainment! The wackiest NixOS configuration to-date.
thevoid.cafe/projects/puzzlevision
nixos
flake
flake-parts
dotfiles
home-manager
nix
0
fork
atom
overview
issues
pulls
pipelines
✨🚧 Add mkService helper
thevoid.cafe
2 weeks ago
5dc4ddb4
3818dd25
verified
This commit was signed with the committer's
known signature
.
thevoid.cafe
SSH Key Fingerprint:
SHA256:6LamuiiF+oLDOqy13Locb95HiqZGy8CIaFHI8miR6hE=
+18
-1
1 changed file
expand all
collapse all
unified
split
lib
options
default.nix
+18
-1
lib/options/default.nix
···
15
inherit default description;
16
type = lib.types.bool;
17
};
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
18
in
19
{
20
-
options = { inherit mkOpt mkBool; };
21
}
···
15
inherit default description;
16
type = lib.types.bool;
17
};
18
+
19
+
# Create a full service option definition
20
+
mkService =
21
+
name:
22
+
{
23
+
subdomain ? name,
24
+
sopsFile ? null,
25
+
sopsFormat ? "dotenv",
26
+
extraOptions ? { },
27
+
}:
28
+
{
29
+
enable = lib.mkEnableOption "${name} service.";
30
+
sopsFile = mkOpt (lib.types.nullOr lib.types.path) sopsFile "Sops secret file for ${name}.";
31
+
sopsFormat = mkOpt lib.types.str sopsFormat "Sops secret file format for ${name}.";
32
+
subdomain = mkOpt lib.types.str subdomain "Subdomain to expose ${name} on.";
33
+
}
34
+
// extraOptions;
35
in
36
{
37
+
options = { inherit mkOpt mkBool mkService; };
38
}