Refactor local Nginx virtual hosts and update

...local hostnames
This commit is contained in:
Oliver Davies 2024-12-15 23:13:11 +00:00
parent 8e599c2ffd
commit db4cfbc518
7 changed files with 49 additions and 18 deletions
nix/modules/nixos/features/homelab

View file

@ -2,24 +2,35 @@
with lib;
let
port = 2222;
in
{
options.features.homelab.gitea.enable = mkEnableOption "Enable gitea";
config = mkIf config.features.homelab.gitea.enable {
services.gitea = {
enable = true;
group = "media";
stateDir = "/mnt/media/gitea";
services = {
gitea = {
enable = true;
group = "media";
stateDir = "/mnt/media/gitea";
settings = {
server = {
HTTP_PORT = 2222;
};
settings = {
server = {
HTTP_PORT = port;
};
service = {
DISABLE_REGISTRATION = true;
service = {
DISABLE_REGISTRATION = true;
};
};
};
nginx = {
enable = true;
virtualHosts."gitea.davies.home".locations."/".proxyPass = "http://localhost:${toString port}/";
};
};
};
}