This commit is contained in:
thiloho
2025-10-29 00:05:36 +01:00
parent 1b51a7cd99
commit 269aa59fdb
5 changed files with 83 additions and 40 deletions

View File

@@ -1,4 +1,9 @@
{ pkgs, config, ... }:
{
pkgs,
config,
lib,
...
}:
{
imports = [
./hardware-configuration.nix
@@ -53,6 +58,22 @@
proxyWebsockets = true;
};
};
"git.thilohohlt.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${toString config.services.gitea.settings.server.HTTP_PORT}";
proxyWebsockets = true;
};
};
"music.thilohohlt.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${toString config.services.navidrome.settings.Port}";
proxyWebsockets = true;
};
};
};
};
redlib = {
@@ -60,8 +81,53 @@
port = 2222;
address = "127.0.0.1";
};
gitea = {
enable = true;
database = {
type = "postgres";
host = "/run/postgresql";
port = 5432;
};
settings = {
server = {
HTTP_ADDR = "127.0.0.1";
HTTP_PORT = 3333;
};
service = {
DISABLE_REGISTRATION = true;
};
session = {
COOKIE_SECURE = true;
};
};
};
navidrome = {
enable = true;
settings = {
Port = 4444;
Address = "127.0.0.1";
MusicFolder = "/home/thohlt/Music";
};
};
postgresql = {
enable = true;
ensureDatabases = [ "gitea" ];
ensureUsers = [
{
name = "gitea";
ensureDBOwnership = true;
}
];
};
};
systemd.tmpfiles.rules = [
"a /home/thohlt - - - - u:navidrome:--x"
"A /home/thohlt/Music - - - - u:navidrome:r-X,d:u:navidrome:r-X"
];
systemd.services.navidrome.serviceConfig.ProtectHome = lib.mkForce false;
security = {
acme = {
acceptTerms = true;
@@ -80,5 +146,5 @@
];
};
system.stateVersion = "25.10";
system.stateVersion = "25.11";
}