This commit is contained in:
Leon Vatthauer 2024-06-17 17:21:30 +02:00
parent 1219865a7f
commit 240879c909
Signed by: leonv
SSH key fingerprint: SHA256:G4+ddwoZmhLPRB1agvXzZMXIzkVJ36dUYZXf5NxT+u8
3 changed files with 14 additions and 13 deletions

View file

@ -11,5 +11,8 @@
./nextcloud.nix ./nextcloud.nix
./domains.nix ./domains.nix
]; ];
services.domains.enable = true; services.domains = {
enable = true;
domain = "vatthauer.xyz";
};
} }

View file

@ -13,52 +13,50 @@ in
description = '' description = ''
Domain of the server. Domain of the server.
''; '';
type = types.nullOr types.str; type = types.str;
default = "";
}; };
git = mkOption { git = mkOption {
description = '' description = ''
Subdomain of the git instance. url of the git instance.
''; '';
type = types.nullOr types.str; type = types.nullOr types.str;
default = "git"; default = "git.${domain}";
}; };
vaultwarden = mkOption { vaultwarden = mkOption {
description = '' description = ''
Subdomain of the vaultwarden instance url of the vaultwarden instance
''; '';
default = "vaultwarden"; default = "vaultwarden";
type = types.nullOr types.str; type = types.nullOr types.str;
}; };
video = mkOption { video = mkOption {
description = '' description = ''
Subdomain of the video instance url of the video instance
''; '';
default = "video"; default = "video";
type = types.nullOr types.str; type = types.nullOr types.str;
}; };
www = mkOption { www = mkOption {
description = '' description = ''
Subdomain of the www instance url of the www instance
''; '';
default = "www"; default = "www";
type = types.nullOr types.str; type = types.nullOr types.str;
}; };
files = mkOption { files = mkOption {
description = '' description = ''
Subdomain of the files instance url of the files instance
''; '';
default = "files"; default = "files";
type = types.nullOr types.str; type = types.nullOr types.str;
}; };
cloud = mkOption { cloud = mkOption {
description = '' description = ''
Subdomain of the cloud instance url of the cloud instance
''; '';
default = "cloud"; default = "cloud";
type = types.nullOr types.str; type = types.nullOr types.str;
}; };
}; };
config = mkIf cfg.enable {
gitURL = "${cfg.git}.${cfg.domain}";
};
} }

View file

@ -10,7 +10,7 @@
services.nginx.virtualHosts = let domain = "vatthauer.xyz"; in services.nginx.virtualHosts = let domain = "vatthauer.xyz"; in
{ {
"config.domains.gitURL" = { "config.domains.git" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {