use forgejo in local system config
This commit is contained in:
parent
58348b3c83
commit
af6af71f5c
15 changed files with 65 additions and 317 deletions
|
|
@ -1,13 +1,9 @@
|
|||
{ inputs }:
|
||||
let
|
||||
common = inputs.common;
|
||||
in
|
||||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
common.nixosModules.containers.forgejo
|
||||
./forgejo.nix
|
||||
./opengist.nix
|
||||
./homarr.nix
|
||||
./zitadel.nix
|
||||
|
|
@ -55,14 +51,7 @@ in
|
|||
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
|
||||
security.acme.acceptTerms = true;
|
||||
security.acme.defaults.email = "admin@joshuabell.xyz";
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
virtualHosts = {
|
||||
"localhost" = {
|
||||
locations."/" = {
|
||||
|
|
@ -70,13 +59,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# forgejo http traffic
|
||||
"git.joshuabell.xyz" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.2:3000";
|
||||
};
|
||||
};
|
||||
|
||||
"_" = {
|
||||
default = true;
|
||||
locations."/" = {
|
||||
|
|
@ -84,16 +66,6 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
# STREAMS
|
||||
# Forgejo ssh
|
||||
streamConfig = ''
|
||||
server {
|
||||
listen 3032;
|
||||
proxy_pass 10.0.0.2:3032;
|
||||
}
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
|
|
|
|||
|
|
@ -65,6 +65,25 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
services.nginx = {
|
||||
virtualHosts = {
|
||||
# forgejo http traffic
|
||||
"git.joshuabell.xyz" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.2:3000";
|
||||
};
|
||||
};
|
||||
};
|
||||
# STREAMS
|
||||
# Forgejo ssh
|
||||
streamConfig = ''
|
||||
server {
|
||||
listen 3032;
|
||||
proxy_pass 10.0.0.2:3032;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
# Ensure users exists on host machine with same IDs as container
|
||||
inherit users;
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ in
|
|||
'';
|
||||
|
||||
services.nginx.virtualHosts."gist.joshuabell.xyz" = {
|
||||
# enableACME = true;
|
||||
# forceSSL = true;
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyWebsockets = true;
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@ in
|
|||
options = { };
|
||||
config = {
|
||||
services.nginx.virtualHosts."sso.joshuabell.xyz" = {
|
||||
# enableACME = true;
|
||||
# forceSSL = true;
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyWebsockets = true;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
./hardware-configuration.nix
|
||||
./mods
|
||||
./nginx.nix
|
||||
(import ./containers { inherit inputs; })
|
||||
./containers
|
||||
(
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
config = {
|
||||
services.nginx.virtualHosts = {
|
||||
"n8n.joshuabell.xyz" = {
|
||||
# enableACME = true;
|
||||
# forceSSL = true;
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyWebsockets = true;
|
||||
|
|
|
|||
|
|
@ -47,35 +47,39 @@
|
|||
services.nginx = {
|
||||
virtualHosts = {
|
||||
"jellyfin.joshuabell.xyz" = {
|
||||
enableACME = true;
|
||||
# forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "http://localhost:8096";
|
||||
};
|
||||
};
|
||||
"media.joshuabell.xyz" = {
|
||||
enableACME = true;
|
||||
# forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "http://localhost:5055";
|
||||
};
|
||||
};
|
||||
"10.12.14.10" = {
|
||||
locations."/" = {
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "http://localhost:8096";
|
||||
};
|
||||
};
|
||||
"jellyfin.h001.local.joshuabell.xyz" = {
|
||||
locations."/" = {
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "http://localhost:8096";
|
||||
};
|
||||
};
|
||||
"media.h001.local.joshuabell.xyz" = {
|
||||
locations."/" = {
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "http://localhost:5055";
|
||||
};
|
||||
};
|
||||
# "10.12.14.10" = {
|
||||
# locations."/" = {
|
||||
# proxyWebsockets = true;
|
||||
# proxyPass = "http://localhost:8096";
|
||||
# };
|
||||
# };
|
||||
# "jellyfin.h001.local.joshuabell.xyz" = {
|
||||
# locations."/" = {
|
||||
# proxyWebsockets = true;
|
||||
# proxyPass = "http://localhost:8096";
|
||||
# };
|
||||
# };
|
||||
# "media.h001.local.joshuabell.xyz" = {
|
||||
# locations."/" = {
|
||||
# proxyWebsockets = true;
|
||||
# proxyPass = "http://localhost:5055";
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -45,11 +45,15 @@ in
|
|||
};
|
||||
|
||||
services.nginx.virtualHosts."sso-proxy.joshuabell.xyz" = {
|
||||
# enableACME = true;
|
||||
# forceSSL = true;
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyWebsockets = true;
|
||||
recommendedProxySettings = true;
|
||||
proxyPass = "http://127.0.0.1:4180";
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ in
|
|||
options = { };
|
||||
config = {
|
||||
services.nginx.virtualHosts."chat.joshuabell.xyz" = {
|
||||
# enableACME = true;
|
||||
# forceSSL = true;
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyWebsockets = true;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
@ -45,6 +44,8 @@ in
|
|||
};
|
||||
services.nginx.virtualHosts = {
|
||||
"notes.joshuabell.xyz" = {
|
||||
# enableACME = true;
|
||||
# forceSSL = true;
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyWebsockets = true;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,14 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
security.acme.acceptTerms = true;
|
||||
security.acme.defaults.email = "admin@joshuabell.xyz";
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
clientMaxBodySize = "500m";
|
||||
virtualHosts = {
|
||||
"10.12.14.10" = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue