fix(forgejo): use domain instead of full url
This commit is contained in:
parent
117c5d6ef9
commit
d1ef7bc3ea
@ -6,7 +6,8 @@
|
||||
with lib; let
|
||||
cfg = config.my.services.forgejo;
|
||||
inherit (config.my.server) domain proxyIP firewallInterface;
|
||||
url = "https://git.${domain}";
|
||||
forgejoDomain = "git.${domain}";
|
||||
forgejoUrl = "https://${forgejoDomain}";
|
||||
in {
|
||||
options.my.services.forgejo = {
|
||||
enable = mkEnableOption "Forgejo";
|
||||
@ -30,8 +31,8 @@ in {
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
settings.server = {
|
||||
DOMAIN = "git.${domain}";
|
||||
ROOT_URL = url;
|
||||
DOMAIN = forgejoDomain;
|
||||
ROOT_URL = forgejoUrl;
|
||||
DISABLE_SSH = true;
|
||||
HTTP_PORT = cfg.port;
|
||||
};
|
||||
@ -64,7 +65,7 @@ in {
|
||||
];
|
||||
})
|
||||
(mkIf cfg.proxy {
|
||||
services.caddy.virtualHosts."${url}".extraConfig = ''
|
||||
services.caddy.virtualHosts."${forgejoDomain}".extraConfig = ''
|
||||
reverse_proxy http://${proxyIP}:${toString cfg.port}
|
||||
'';
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user