20 current 2025-10-07 00:49:35 25.05.20251001.5b5be50 6.12.49 *
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
services = {
|
services = {
|
||||||
jellyfin.enable = true;
|
jellyfin.enable = true;
|
||||||
sonarr.enable = true;
|
sonarr.enable = true;
|
||||||
|
sonarr.port = 7105;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
let
|
let
|
||||||
cfg = config.modules.services.sonarr;
|
cfg = config.modules.services.sonarr;
|
||||||
ids = lib.mkForce 2005;
|
ids = lib.mkForce 2005;
|
||||||
|
default_port = 8989;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.services.sonarr = {
|
options.modules.services.sonarr = {
|
||||||
@@ -10,8 +11,8 @@ in
|
|||||||
|
|
||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
type = lib.types.int;
|
type = lib.types.int;
|
||||||
default = 7105;
|
default = 8989;
|
||||||
description = "set port for sonarr";
|
description = "set port for sonarr (${toString default_port})";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -48,7 +49,7 @@ in
|
|||||||
systemd.services.sonarr.serviceConfig = { UMask = lib.mkForce "0007"; };
|
systemd.services.sonarr.serviceConfig = { UMask = lib.mkForce "0007"; };
|
||||||
|
|
||||||
# open firewall
|
# open firewall
|
||||||
#networking.firewall.allowedTCPPorts = [ 7105 ];
|
#networking.firewall.allowedTCPPorts = [ cfg.port ];
|
||||||
|
|
||||||
# reverse proxy entryo
|
# reverse proxy entryo
|
||||||
services.nginx.virtualHosts."sonarr.snowbelle.lan" = {
|
services.nginx.virtualHosts."sonarr.snowbelle.lan" = {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
let
|
let
|
||||||
cfg = config.modules.services.<service_name>;
|
cfg = config.modules.services.<service_name>;
|
||||||
ids = <gid_and_uid_number>;
|
ids = <gid_and_uid_number>;
|
||||||
|
default_port = <port_number>;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.services.<service_name> = {
|
options.modules.services.<service_name> = {
|
||||||
@@ -11,8 +12,8 @@ in
|
|||||||
# set port options
|
# set port options
|
||||||
# port = lib.mkOption {
|
# port = lib.mkOption {
|
||||||
# type = lib.types.int;
|
# type = lib.types.int;
|
||||||
# default = <port_number>;
|
# default = cfg.default_port;
|
||||||
# description = "set port for <service_name> (default: <port_number>";
|
# description = "set port for <service_name> (default: ${toString default_port}";
|
||||||
# };
|
# };
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -50,7 +51,7 @@ in
|
|||||||
systemd.services.<service_name>.serviceConfig = { UMask = lib.mkForce "0007"; };
|
systemd.services.<service_name>.serviceConfig = { UMask = lib.mkForce "0007"; };
|
||||||
|
|
||||||
# open firewall
|
# open firewall
|
||||||
#networking.firewall.allowedTCPPorts = [ <port_number> ];
|
#networking.firewall.allowedTCPPorts = [ port ];
|
||||||
|
|
||||||
# reverse proxy entryo
|
# reverse proxy entryo
|
||||||
services.nginx.virtualHosts."<service_name>.snowbelle.lan" = {
|
services.nginx.virtualHosts."<service_name>.snowbelle.lan" = {
|
||||||
@@ -59,7 +60,7 @@ in
|
|||||||
sslCertificate = config.sops.secrets."ssl_blakedheld_crt".path;
|
sslCertificate = config.sops.secrets."ssl_blakedheld_crt".path;
|
||||||
sslCertificateKey = config.sops.secrets."ssl_blakedheld_key".path;
|
sslCertificateKey = config.sops.secrets."ssl_blakedheld_key".path;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:<port_number>";
|
proxyPass = "http://127.0.0.1:${toString port}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user