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
15
inherit default description;
16
16
type = lib.types.bool;
17
17
};
18
18
+
19
19
+
# Create a full service option definition
20
20
+
mkService =
21
21
+
name:
22
22
+
{
23
23
+
subdomain ? name,
24
24
+
sopsFile ? null,
25
25
+
sopsFormat ? "dotenv",
26
26
+
extraOptions ? { },
27
27
+
}:
28
28
+
{
29
29
+
enable = lib.mkEnableOption "${name} service.";
30
30
+
sopsFile = mkOpt (lib.types.nullOr lib.types.path) sopsFile "Sops secret file for ${name}.";
31
31
+
sopsFormat = mkOpt lib.types.str sopsFormat "Sops secret file format for ${name}.";
32
32
+
subdomain = mkOpt lib.types.str subdomain "Subdomain to expose ${name} on.";
33
33
+
}
34
34
+
// extraOptions;
18
35
in
19
36
{
20
20
-
options = { inherit mkOpt mkBool; };
37
37
+
options = { inherit mkOpt mkBool mkService; };
21
38
}