fix: build custom caddy

This commit is contained in:
= 2025-01-19 17:56:26 +01:00
parent 9812a631fc
commit e754d926eb
4 changed files with 18 additions and 31 deletions

View file

@ -96,7 +96,7 @@ in
version = "7c818ab3fc3485a72a346f85c77810725f19f9cf"; version = "7c818ab3fc3485a72a346f85c77810725f19f9cf";
} }
]; ];
vendorHash = "sha256-AWKokxGG2iCouhet5cPiKTuL9g9RQihkBRReU1nw9jc="; vendorHash = "sha256-vkJw/92zXt5S2eUxRSjtwn1nqU/f+WHPEG8AD4Z342I=";
}; };
globalConfig = globalConfig =

View file

@ -32,7 +32,7 @@ in
}; };
subdomain = lib.mkOption { subdomain = lib.mkOption {
default = "nextcloud"; default = "cloud";
type = lib.types.str; type = lib.types.str;
description = '' description = ''
The subdomain where Nextcloud is reachable The subdomain where Nextcloud is reachable
@ -51,7 +51,7 @@ in
default = "localhost"; default = "localhost";
type = lib.types.str; type = lib.types.str;
description = '' description = ''
host name where the download manager stack is running host name where nextcloud is running
''; '';
}; };
@ -74,10 +74,7 @@ in
overwriteProtocol = "https"; overwriteProtocol = "https";
defaultPhoneRegion = "IT"; defaultPhoneRegion = "IT";
trusted_proxies = [ "192.168.1.150" ]; trusted_proxies = [ "192.168.1.150" ];
trusted_domains = [ trusted_domains = [ "cloud.${cfg.proxy.domain}" ];
"cloud.${cfg.proxy.domain}"
"nextcloud.internal"
];
maintenance_window_start = 1; maintenance_window_start = 1;
enabledPreviewProviders = [ enabledPreviewProviders = [
"OC\\Preview\\BMP" "OC\\Preview\\BMP"
@ -152,13 +149,6 @@ in
# hostname = "office.${cfg.proxy.domain}"; # hostname = "office.${cfg.proxy.domain}";
}; };
nginx.virtualHosts = {
${config.services.nextcloud.hostName} = {
forceSSL = false;
enableACME = false;
};
};
}; };
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [

View file

@ -67,7 +67,6 @@ buildGoModule rec {
]; ];
modBuildPhase = '' modBuildPhase = ''
export GOPROXY=https://proxy.golang.org,direct
for module in ${builtins.toString (attrsToModules externalPlugins)}; do for module in ${builtins.toString (attrsToModules externalPlugins)}; do
sed -i "/standard/a _ \"$module\"" ./cmd/caddy/main.go sed -i "/standard/a _ \"$module\"" ./cmd/caddy/main.go
done done
@ -75,7 +74,7 @@ buildGoModule rec {
go get $plugin go get $plugin
done done
go mod tidy go generate
go mod vendor go mod vendor
''; '';
@ -85,11 +84,9 @@ buildGoModule rec {
''; '';
preBuild = '' preBuild = ''
export GOPROXY=https://proxy.golang.org,direct
chmod -R u+w vendor chmod -R u+w vendor
[ -f vendor/go.mod ] && mv -t . vendor/go.{mod,sum} [ -f vendor/go.mod ] && mv -t . vendor/go.{mod,sum}
go mod tidy go generate
go mod vendor
for module in ${builtins.toString (attrsToModules externalPlugins)}; do for module in ${builtins.toString (attrsToModules externalPlugins)}; do
sed -i "/standard/a _ \"$module\"" ./cmd/caddy/main.go sed -i "/standard/a _ \"$module\"" ./cmd/caddy/main.go

View file

@ -1,13 +1,13 @@
age-encryption.org/v1 age-encryption.org/v1
-> ssh-ed25519 BFt3Fg ALkuyiPqJ5kebeMcFEZtdw9k/fbiHCun0lVsPavM1EA -> ssh-ed25519 BFt3Fg 4pJuaN/lGfNnwIuDpW0qkiBpwlRs0OADsCLt5MHY33U
z+4m3P0Gg8dMGIX1Kg5sJZasDEo2zRWtHTyAyXBSnv4 GYMcfn66J16evqzkG19liK+BlGBksgR2VReTFE7nLkU
-> ssh-ed25519 Si3UKw vAYzJ4Ev8KqkdZRuOvoaY9duuOapDXosuiIq7FVmUCI -> ssh-ed25519 Si3UKw T7vqqi7QZNoYF0QqmCnw/B2WJ49TxpRtA2sGACIPSRE
dvy/TaSkkTzTdSYxAbjaPXzdg8Y3NguVwn1FOJ8CyCg dqxx0WPDkqnnSJDNrXu06aY6ono7K31NIwJfIYhc1ks
-> ssh-ed25519 3UG3uw TZZAgl+pm8AjLUHWbkVvv/g/82NgdXZf5plqu6M7Qgo -> ssh-ed25519 3UG3uw mqwNTQ+sQojeYM3F4709xUB8Z6g4ysmvVUaA0OglpA4
N+Prh0DkpCH4z8MG1A/9XsgdwDCv3Qw5e9lgQ70NjXQ /KYCk7G0Js/4/K7B4WyMaRVWFwPGhVAVZ7nrtbpK3Fk
-> ssh-ed25519 JEhtoQ CWTwB5xqxa/g91G1S1Zb9I+MjG8ABfmYYdGaUD2vWSw -> ssh-ed25519 JEhtoQ F2TBWq66Uo45IRXfb9MS/nGJVGdNeE6DEOF7QNE8ulk
q6T1TKRXpOhaiON+jlc9frsKOTf+y+beFioUhACS6sY cq/bbQKA+zxiZlndtPh4wWriDclIM4DnkhCq8O7DfLk
-> ssh-ed25519 uqg2jw nN9W3c+YdyQY27k3WnvvPeoot969m7HcEvifNSaQn00 -> ssh-ed25519 uqg2jw l06HBpXeLwo2Y+9zAFTbhNgPLujKTvatBnA8inGH6UQ
Wjff3/g/HIh+AN8MkEXolQUNnaumUXwVslSb1qGYgRc zckhZwGU638l24yqpGq+JH7BkEjghbWFq47yNo0U/V8
--- I4XkNColHk83ecj+RRdiae+VUsKhoWUhQE7xpLOEkfg --- e6COa661YMoYV1rS+TxL5qaNeIjuwexesr1SOY+y+SA
ÅÝHyH[%p%h9ôD#!°ˆ[M]Ïlێű³í8Í*”RÄÐ%Lño·ä^þi†xûÜO+&M+º´Lï•ÀárÒö+ŸöHI* ”‰]…tçxÞxrÔ•õéâ“ÃS Ї¢ ØŒâ¢à'зÉw"¹§Oÿ†œnåÒ”à—Ÿ”ÿ•éΚêç™1xÊ$À¼öÊ˘kN¦ºE~:<3A>JF&ßIgæ{ø;6­@ã´ä t¤”@m6§F…á§