file cleanup, conditional motd
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
}: let
|
||||
service = "sonarr";
|
||||
cfg = config.homelab.${service};
|
||||
sec = config.sops.secrets;
|
||||
homelab = config.homelab;
|
||||
in {
|
||||
options.homelab.${service} = {
|
||||
@@ -40,7 +39,10 @@ in {
|
||||
};
|
||||
motd = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = service;
|
||||
default =
|
||||
if cfg.enable
|
||||
then service
|
||||
else null;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -79,12 +81,8 @@ in {
|
||||
UMask = lib.mkForce "0007";
|
||||
};
|
||||
|
||||
# # open firewall
|
||||
# networking.firewall.allowedTCPPorts = [ cfg.port ];
|
||||
|
||||
# add to caddy for reverse proxy
|
||||
services.caddy.virtualHosts."${cfg.url}" = {
|
||||
# tls ${sec."ssl_blakedheld_crt".path} ${sec."ssl_blakedheld_key".path}
|
||||
extraConfig = ''
|
||||
tls internal
|
||||
reverse_proxy 127.0.0.1:${toString cfg.port}
|
||||
|
||||
Reference in New Issue
Block a user