Compare commits

..

No commits in common. "e50b259a701213835dbe5a530601cee9bd865a49" and "05973b93ffcacf864793b53ac0b4c143dd8c8769" have entirely different histories.

2 changed files with 4 additions and 22 deletions

View file

@ -50,7 +50,7 @@ in
services.gitea =
let
inherit (config.networking) domain;
giteaDomain = "git.${domain}";
giteaDomain = "gitea.${domain}";
in
{
enable = true;
@ -112,16 +112,11 @@ in
};
users.groups.git = { };
# Proxy to Gitea
my.services.nginx.virtualHosts = [
# Proxy to Gitea
{
subdomain = "git";
inherit (cfg) port;
}
# Redirect `gitea.` to actual forge subdomain
{
subdomain = "gitea";
redirect = config.services.gitea.rootUrl;
inherit (cfg) port;
}
];

View file

@ -26,15 +26,6 @@ let
'';
};
redirect = mkOption {
type = with types; nullOr str;
default = null;
example = "https://example.com";
description = ''
Which domain to redirect to (301 response), for this virtual host.
'';
};
root = mkOption {
type = with types; nullOr path;
default = null;
@ -185,7 +176,7 @@ in
assertions = [ ]
++ (lib.flip builtins.map cfg.virtualHosts ({ subdomain, ... } @ args:
let
conflicts = [ "port" "root" "redirect" ];
conflicts = [ "port" "root" ];
optionsNotNull = builtins.map (v: args.${v} != null) conflicts;
optionsSet = lib.filter lib.id optionsNotNull;
in
@ -258,10 +249,6 @@ in
(lib.optionalAttrs (args.root != null) {
inherit (args) root;
})
# Redirect to a different domain
(lib.optionalAttrs (args.redirect != null) {
locations."/".return = "301 ${args.redirect}$request_uri";
})
# VHost specific configuration
args.extraConfig
# SSO configuration