loptland: I have no idea how nginx works, also need to read up on ACME and LetsEncrypt
This commit is contained in:
parent
231136e598
commit
2fc804dc9f
|
@ -8,6 +8,9 @@
|
||||||
let
|
let
|
||||||
inherit (lib.${namespace}) enabled;
|
inherit (lib.${namespace}) enabled;
|
||||||
|
|
||||||
|
domainName = "v2202411240203293899.ultrasrv.de";
|
||||||
|
forgejoPort = 3000;
|
||||||
|
|
||||||
sopsFile = lib.snowfall.fs.get-file "secrets/secrets-loptland.yaml";
|
sopsFile = lib.snowfall.fs.get-file "secrets/secrets-loptland.yaml";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -16,10 +19,6 @@ in
|
||||||
environment.systemPackages = [ pkgs.forgejo-cli ];
|
environment.systemPackages = [ pkgs.forgejo-cli ];
|
||||||
|
|
||||||
sops.secrets = {
|
sops.secrets = {
|
||||||
domain = {
|
|
||||||
inherit sopsFile;
|
|
||||||
};
|
|
||||||
|
|
||||||
forgejo_db_password = {
|
forgejo_db_password = {
|
||||||
inherit sopsFile;
|
inherit sopsFile;
|
||||||
};
|
};
|
||||||
|
@ -33,18 +32,41 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
virtualHosts = {
|
||||||
|
"git.${domainName}" = {
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:${toString forgejoPort}/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.forgejo = {
|
services.forgejo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
database.type = "postgres";
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
database = {
|
database = {
|
||||||
passwordFile = config.sops.secrets.forgejo_db_password.path;
|
passwordFile = config.sops.secrets.forgejo_db_password.path;
|
||||||
};
|
};
|
||||||
# settings = {
|
settings = {
|
||||||
# server.DOMAIN = config.sops.secrets.domain;
|
server = {
|
||||||
# };
|
DOMAIN = "git.${domainName}";
|
||||||
|
ROOT_URL = "http://git.${domainName}:${toString forgejoPort}";
|
||||||
|
HTTP_PORT = forgejoPort;
|
||||||
|
};
|
||||||
|
|
||||||
|
service.DISABLE_REGISTRATION = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
forgejoPort
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
|
|
||||||
${namespace} = {
|
${namespace} = {
|
||||||
submodules = {
|
submodules = {
|
||||||
basics = enabled;
|
basics = enabled;
|
||||||
|
|
Loading…
Reference in a new issue