Homelab updates
- Change domain to opdavies.uk as this works with HTTPS/SSL. - Switch Nginx to Caddy.
This commit is contained in:
parent
f43069adac
commit
07fde36fb0
17 changed files with 98 additions and 64 deletions
|
@ -9,21 +9,17 @@ in
|
|||
options.features.homelab.audiobookshelf.enable = mkEnableOption "Enable audiobookshelf";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.audiobookshelf = {
|
||||
enable = true;
|
||||
services = {
|
||||
audiobookshelf = {
|
||||
enable = true;
|
||||
|
||||
host = "audiobookshelf.oliverdavies.uk";
|
||||
port = 4001;
|
||||
};
|
||||
port = 4001;
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
caddy.virtualHosts."audiobookshelf.opdavies.uk" = {
|
||||
useACMEHost = "opdavies.uk";
|
||||
|
||||
virtualHosts."audiobookshelf.oliverdavies.uk" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${toString config.services.audiobookshelf.port}/";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
extraConfig = "reverse_proxy localhost:${toString config.services.audiobookshelf.port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
|
||||
with lib;
|
||||
|
||||
let
|
||||
port = 2223;
|
||||
in
|
||||
{
|
||||
options.features.homelab.forgejo.enable = mkEnableOption "Enable forgejo";
|
||||
|
||||
|
@ -17,7 +14,8 @@ in
|
|||
|
||||
settings = {
|
||||
server = {
|
||||
HTTP_PORT = port;
|
||||
DOMAIN = "forgejo.opdavies.uk";
|
||||
HTTP_PORT = 2223;
|
||||
};
|
||||
|
||||
service = {
|
||||
|
@ -26,11 +24,10 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
nginx = {
|
||||
enable = true;
|
||||
caddy.virtualHosts."${config.services.forgejo.settings.server.DOMAIN}" = {
|
||||
useACMEHost = "opdavies.uk";
|
||||
|
||||
virtualHosts."forgejo.oliverdavies.uk".locations."/".proxyPass =
|
||||
"http://localhost:${toString port}/";
|
||||
extraConfig = "reverse_proxy localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -95,11 +95,10 @@ in
|
|||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
services.caddy.virtualHosts."freshrss.opdavies.uk" = {
|
||||
useACMEHost = "opdavies.uk";
|
||||
|
||||
virtualHosts."freshrss.oliverdavies.uk".locations."/".proxyPass =
|
||||
"http://localhost:${toString port}/";
|
||||
extraConfig = "reverse_proxy localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -26,10 +26,10 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
nginx = {
|
||||
enable = true;
|
||||
caddy.virtualHosts."gitea.opdavies.uk" = {
|
||||
useACMEHost = "opdavies.uk";
|
||||
|
||||
virtualHosts."gitea.oliverdavies.uk".locations."/".proxyPass = "http://localhost:${toString port}/";
|
||||
extraConfig = "reverse_proxy localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -19,11 +19,10 @@ with lib;
|
|||
|
||||
environment.systemPackages = [ pkgs.immich-cli ];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
services.caddy.virtualHosts."immich.opdavies.uk" = {
|
||||
useACMEHost = "opdavies.uk";
|
||||
|
||||
virtualHosts."immich.oliverdavies.uk".locations."/".proxyPass =
|
||||
"http://localhost:${toString config.services.immich.port}/";
|
||||
extraConfig = "reverse_proxy localhost:${toString config.services.immich.port}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -13,10 +13,10 @@ with lib;
|
|||
configDir = "/mnt/media/jellyfin";
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
services.caddy.virtualHosts."jellyfin.opdavies.uk" = {
|
||||
useACMEHost = "opdavies.uk";
|
||||
|
||||
virtualHosts."jellyfin.oliverdavies.uk".locations."/".proxyPass = "http://localhost:8096/";
|
||||
extraConfig = "reverse_proxy localhost:8096";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,8 +6,20 @@ with lib;
|
|||
options.features.homelab.paperless.enable = mkEnableOption "Enable paperless";
|
||||
|
||||
config = mkIf config.features.homelab.paperless.enable {
|
||||
services.paperless = {
|
||||
enable = true;
|
||||
services = {
|
||||
paperless = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
PAPERLESS_URL = "https://paperless.opdavies.uk";
|
||||
};
|
||||
};
|
||||
|
||||
caddy.virtualHosts."paperless.opdavies.uk" = {
|
||||
useACMEHost = "opdavies.uk";
|
||||
|
||||
extraConfig = "reverse_proxy localhost:28981";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -95,9 +95,5 @@ in
|
|||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."pihole.localhost" = {
|
||||
locations."/".proxyPass = "http://localhost:${toString port}/";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ with lib;
|
|||
let
|
||||
cfg = config.features.homelab.tubearchivist-container;
|
||||
|
||||
port = 8000;
|
||||
port = 8085;
|
||||
in
|
||||
{
|
||||
options.features.homelab.tubearchivist-container = {
|
||||
|
@ -286,11 +286,10 @@ in
|
|||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
services.caddy.virtualHosts."tubearchivist.opdavies.uk" = {
|
||||
useACMEHost = "opdavies.uk";
|
||||
|
||||
virtualHosts."tubearchivist.oliverdavies.uk".locations."/".proxyPass =
|
||||
"http://localhost:${toString port}/";
|
||||
extraConfig = "reverse_proxy localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue