orginase services

This commit is contained in:
Tristan 2024-02-17 15:50:18 +00:00
parent 7caa83908d
commit e5f9966329
7 changed files with 80 additions and 34 deletions

View file

@ -1,3 +1,7 @@
{config, ...}:
let
cfg = config.services.forgejo;
in
{
services.forgejo = {
enable = true;
@ -5,8 +9,7 @@
lfs.enable = true;
settings = {
server = {
DOMAIN = "git.tristans.cloud";
ROOT_URL = "https://git.tristans.cloud";
ROOT_URL = "https://${cfg.settings.server.DOMAIN}";
};
service = {
DISABLE_REGISTRATION = true;
@ -16,4 +19,9 @@
};
};
};
services.nginx.virtualHosts.${cfg.settings.server.DOMAIN} = {
forceSSL = true;
enableACME = true;
locations."~".proxyPass = "http://localhost:${toString cfg.settings.server.HTTP_PORT}";
};
}

View file

@ -0,0 +1,18 @@
{config, ...}:
let
cfg = config.services.grafana;
in
{
services.grafana = {
enable = true;
};
services.nginx.virtualHosts = {
${cfg.settings.server.domain} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${toString cfg.settings.server.http_port}";
};
};
};
}

View file

@ -2,4 +2,21 @@
services.jellyfin = {
enable = true;
};
services.nginx.virtualHosts."movies.tristans.cloud" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:8096";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host;
proxy_buffering off;
'';
};
};
}

View file

@ -0,0 +1,5 @@
{
services.prometheus = {
enable = true;
};
}

View file

@ -1,5 +1,15 @@
{config, ...}:
let
cfg = config.services.vaultwarden;
domain = "vault.tristans.cloud";
in
{
services.vaultwarden = {
enable = true;
};
services.nginx.virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
locations."~".proxyPass = "http://localhost:${toString cfg.config.ROCKET_PORT}";
};
}