loptland: nginx maybe this helps?

This commit is contained in:
Christoph Hollizeck 2024-11-06 20:11:50 +01:00
parent 8d6c10ccdf
commit 32f138f927
Signed by: Daholli
GPG key ID: 1763BB530F50279E

View file

@ -16,8 +16,6 @@ in
{ {
imports = [ ./hardware.nix ]; imports = [ ./hardware.nix ];
environment.systemPackages = [ pkgs.forgejo-cli ];
sops.secrets = { sops.secrets = {
forgejo_db_password = { forgejo_db_password = {
inherit sopsFile; inherit sopsFile;
@ -34,14 +32,23 @@ in
services.nginx = { services.nginx = {
enable = true; enable = true;
recommendedProxySettings = true;
virtualHosts = { virtualHosts = {
"git.${domainName}" = { "git.${domainName}" = {
locations."/" = { locations."/" = {
proxyPass = "http://localhost:${toString forgejoPort}/"; proxyPass = "http://localhost:${toString forgejoPort}/";
}; };
}; };
"${domainName}" = {
locations."/" = {
return = "404 This Site does not exist yet";
}; };
}; };
};
};
services.forgejo = { services.forgejo = {
enable = true; enable = true;