Recreated options
This commit is contained in:
parent
0b839e082a
commit
fc8178ed80
22 changed files with 325 additions and 205 deletions
18
system/server/lib/extractWebOptions.nix
Normal file
18
system/server/lib/extractWebOptions.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
config,
|
||||
name,
|
||||
}: let
|
||||
inherit (config.niksos) server;
|
||||
inherit (server) baseDomain;
|
||||
cfg = server.${name};
|
||||
|
||||
subDomain =
|
||||
if cfg.subDomain == ""
|
||||
then ""
|
||||
else "${cfg.subDomain}.";
|
||||
in
|
||||
{
|
||||
domain = "${subDomain}.${baseDomain}";
|
||||
inherit baseDomain;
|
||||
}
|
||||
// cfg
|
||||
16
system/server/lib/webOptions.nix
Normal file
16
system/server/lib/webOptions.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
name,
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkOption types;
|
||||
in {
|
||||
niksos.server.${name} = {
|
||||
enable = mkEnableOption name;
|
||||
subDomain = mkOption {
|
||||
type = types.lines;
|
||||
description = "What subdomain to use for ${name}";
|
||||
example = name;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue