This commit is contained in:
parent
f70d9c51e3
commit
92ded26806
12 changed files with 20 additions and 20 deletions
|
@ -6,7 +6,7 @@
|
||||||
features.homelab = {
|
features.homelab = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
baseDomain = "oliverdavies.uk";
|
domain = "oliverdavies.uk";
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
audiobookshelf.enable = true;
|
audiobookshelf.enable = true;
|
||||||
|
|
|
@ -12,7 +12,7 @@ in
|
||||||
enable = mkEnableOption "Enable ${service}";
|
enable = mkEnableOption "Enable ${service}";
|
||||||
|
|
||||||
url = mkOption {
|
url = mkOption {
|
||||||
default = "audiobookshelf.${homelab.baseDomain}";
|
default = "audiobookshelf.${homelab.domain}";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ in
|
||||||
|
|
||||||
nginx.virtualHosts.${cfg.url} = {
|
nginx.virtualHosts.${cfg.url} = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = homelab.baseDomain;
|
useACMEHost = homelab.domain;
|
||||||
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:${toString config.services.${service}.port}";
|
proxyPass = "http://localhost:${toString config.services.${service}.port}";
|
||||||
|
|
|
@ -22,7 +22,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
url = mkOption {
|
url = mkOption {
|
||||||
default = "${service}.${homelab.baseDomain}";
|
default = "${service}.${homelab.domain}";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -318,7 +318,7 @@ in
|
||||||
|
|
||||||
services.nginx.virtualHosts."${cfg.url}" = {
|
services.nginx.virtualHosts."${cfg.url}" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = homelab.baseDomain;
|
useACMEHost = homelab.domain;
|
||||||
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:${toString cfg.port}";
|
proxyPass = "http://localhost:${toString cfg.port}";
|
||||||
|
|
|
@ -6,7 +6,7 @@ with lib;
|
||||||
options.features.homelab = {
|
options.features.homelab = {
|
||||||
enable = mkEnableOption "Enable homelab services and configuration";
|
enable = mkEnableOption "Enable homelab services and configuration";
|
||||||
|
|
||||||
baseDomain = mkOption {
|
domain = mkOption {
|
||||||
description = "The base domain to use for this homelab.";
|
description = "The base domain to use for this homelab.";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,7 +12,7 @@ in
|
||||||
enable = mkEnableOption "Enable ${service}";
|
enable = mkEnableOption "Enable ${service}";
|
||||||
|
|
||||||
url = mkOption {
|
url = mkOption {
|
||||||
default = "code.${homelab.baseDomain}";
|
default = "code.${homelab.domain}";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ in
|
||||||
enable = mkEnableOption "Enable ${service}";
|
enable = mkEnableOption "Enable ${service}";
|
||||||
|
|
||||||
url = mkOption {
|
url = mkOption {
|
||||||
default = "photos.${homelab.baseDomain}";
|
default = "photos.${homelab.domain}";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ in
|
||||||
|
|
||||||
nginx.virtualHosts."${cfg.url}" = {
|
nginx.virtualHosts."${cfg.url}" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = homelab.baseDomain;
|
useACMEHost = homelab.domain;
|
||||||
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:${toString config.services.immich.port}";
|
proxyPass = "http://localhost:${toString config.services.immich.port}";
|
||||||
|
|
|
@ -12,7 +12,7 @@ in
|
||||||
enable = mkEnableOption "Enable ${service}";
|
enable = mkEnableOption "Enable ${service}";
|
||||||
|
|
||||||
url = mkOption {
|
url = mkOption {
|
||||||
default = "${service}.${homelab.baseDomain}";
|
default = "${service}.${homelab.domain}";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ in
|
||||||
|
|
||||||
nginx.virtualHosts."${cfg.url}" = {
|
nginx.virtualHosts."${cfg.url}" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = homelab.baseDomain;
|
useACMEHost = homelab.domain;
|
||||||
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:8096";
|
proxyPass = "http://localhost:8096";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
let
|
||||||
baseDomain = "oliverdavies.uk";
|
domain = "oliverdavies.uk";
|
||||||
|
|
||||||
ports = import ./ports.nix;
|
ports = import ./ports.nix;
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ let
|
||||||
inherit root;
|
inherit root;
|
||||||
|
|
||||||
port = ports.${name};
|
port = ports.${name};
|
||||||
url = "${name}.${baseDomain}";
|
url = "${name}.${domain}";
|
||||||
}
|
}
|
||||||
// overrides;
|
// overrides;
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ in
|
||||||
enable = mkEnableOption "Enable ${service}";
|
enable = mkEnableOption "Enable ${service}";
|
||||||
|
|
||||||
url = mkOption {
|
url = mkOption {
|
||||||
default = "${service}.${homelab.baseDomain}";
|
default = "${service}.${homelab.domain}";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ in
|
||||||
|
|
||||||
nginx.virtualHosts."${cfg.url}" = {
|
nginx.virtualHosts."${cfg.url}" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = homelab.baseDomain;
|
useACMEHost = homelab.domain;
|
||||||
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:${toString config.services.${service}.port}";
|
proxyPass = "http://localhost:${toString config.services.${service}.port}";
|
||||||
|
|
|
@ -23,7 +23,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
url = mkOption {
|
url = mkOption {
|
||||||
default = "${config.networking.hostName}.${homelab.baseDomain}";
|
default = "${config.networking.hostName}.${homelab.domain}";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -64,7 +64,7 @@ in
|
||||||
|
|
||||||
nginx.virtualHosts.${cfg.url} = {
|
nginx.virtualHosts.${cfg.url} = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = homelab.baseDomain;
|
useACMEHost = homelab.domain;
|
||||||
|
|
||||||
locations."/".proxyPass =
|
locations."/".proxyPass =
|
||||||
"http://localhost:${toString config.services.homepage-dashboard.listenPort}";
|
"http://localhost:${toString config.services.homepage-dashboard.listenPort}";
|
||||||
|
|
|
@ -12,7 +12,7 @@ in
|
||||||
enable = mkEnableOption "Enable ${service}";
|
enable = mkEnableOption "Enable ${service}";
|
||||||
|
|
||||||
url = mkOption {
|
url = mkOption {
|
||||||
default = "uptime.${homelab.baseDomain}";
|
default = "uptime.${homelab.domain}";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ in
|
||||||
|
|
||||||
nginx.virtualHosts.${cfg.url} = {
|
nginx.virtualHosts.${cfg.url} = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = homelab.baseDomain;
|
useACMEHost = homelab.domain;
|
||||||
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:${toString config.services.${service}.settings.PORT}";
|
proxyPass = "http://localhost:${toString config.services.${service}.settings.PORT}";
|
||||||
|
|
|
@ -17,7 +17,7 @@ in
|
||||||
enable = mkEnableOption "Enable ${service}";
|
enable = mkEnableOption "Enable ${service}";
|
||||||
|
|
||||||
url = mkOption {
|
url = mkOption {
|
||||||
default = "${service}.${homelab.baseDomain}";
|
default = "${service}.${homelab.domain}";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue