Refactor local Nginx virtual hosts and update
...local hostnames
This commit is contained in:
parent
8e599c2ffd
commit
db4cfbc518
7 changed files with 49 additions and 18 deletions
nix/modules/nixos/features/homelab
|
@ -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}/";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue