64 lines
1.5 KiB
Nix
64 lines
1.5 KiB
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
with lib;
|
||
|
let
|
||
|
cfg = config.domains;
|
||
|
in
|
||
|
{
|
||
|
domains = {
|
||
|
enable = mkOption {
|
||
|
default = false;
|
||
|
type = types.nullOr types.bool;
|
||
|
};
|
||
|
domain = mkOption {
|
||
|
description = ''
|
||
|
Domain of the server.
|
||
|
'';
|
||
|
type = types.nullOr types.str;
|
||
|
};
|
||
|
git = mkOption {
|
||
|
description = ''
|
||
|
Subdomain of the git instance.
|
||
|
'';
|
||
|
type = types.nullOr types.str;
|
||
|
default = "git";
|
||
|
};
|
||
|
vaultwarden = mkOption {
|
||
|
description = ''
|
||
|
Subdomain of the vaultwarden instance
|
||
|
'';
|
||
|
default = "vaultwarden";
|
||
|
type = types.nullOr types.str;
|
||
|
};
|
||
|
video = mkOption {
|
||
|
description = ''
|
||
|
Subdomain of the video instance
|
||
|
'';
|
||
|
default = "video";
|
||
|
type = types.nullOr types.str;
|
||
|
};
|
||
|
www = mkOption {
|
||
|
description = ''
|
||
|
Subdomain of the www instance
|
||
|
'';
|
||
|
default = "www";
|
||
|
type = types.nullOr types.str;
|
||
|
};
|
||
|
files = mkOption {
|
||
|
description = ''
|
||
|
Subdomain of the files instance
|
||
|
'';
|
||
|
default = "files";
|
||
|
type = types.nullOr types.str;
|
||
|
};
|
||
|
cloud = mkOption {
|
||
|
description = ''
|
||
|
Subdomain of the cloud instance
|
||
|
'';
|
||
|
default = "cloud";
|
||
|
type = types.nullOr types.str;
|
||
|
};
|
||
|
};
|
||
|
config = mkIf cfg.enable {
|
||
|
gitURL = "${cfg.git}.${cfg.domain}";
|
||
|
};
|
||
|
}
|