servers module linting, removed unnecesary nesting

This commit is contained in:
Danilo Reyes 2025-04-16 22:38:02 -06:00
parent 556bce8282
commit bcbf047415
6 changed files with 74 additions and 86 deletions

View File

@ -5,8 +5,7 @@ let
in in
{ {
options.my.servers.drpp = setup.mkOptions "drpp" "drpp" 0; options.my.servers.drpp = setup.mkOptions "drpp" "drpp" 0;
config = { config.virtualisation.oci-containers.containers.drpp = lib.mkIf cfg.enable {
virtualisation.oci-containers.containers.drpp = lib.mkIf cfg.enable {
image = "ghcr.io/phin05/discord-rich-presence-plex:latest"; image = "ghcr.io/phin05/discord-rich-presence-plex:latest";
environment = { environment = {
DRPP_UID = toString config.users.users.jawz.uid; DRPP_UID = toString config.users.users.jawz.uid;
@ -17,5 +16,4 @@ in
"/run/user/${toString config.users.users.jawz.uid}:/run/app" "/run/user/${toString config.users.users.jawz.uid}:/run/app"
]; ];
}; };
};
} }

View File

@ -5,8 +5,7 @@ let
in in
{ {
options.my.servers.ombi = setup.mkOptions "ombi" "requests" 3425; options.my.servers.ombi = setup.mkOptions "ombi" "requests" 3425;
config = { config.services = {
services = {
ombi = lib.mkIf cfg.enable { ombi = lib.mkIf cfg.enable {
enable = true; enable = true;
inherit (cfg) port; inherit (cfg) port;
@ -14,5 +13,4 @@ in
}; };
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg); nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg);
}; };
};
} }

View File

@ -6,8 +6,7 @@ let
in in
{ {
options.my.servers.plex-discord-bot = setup.mkOptions name name 0; options.my.servers.plex-discord-bot = setup.mkOptions name name 0;
config = { config.virtualisation.oci-containers.containers.plex-discord-bot = lib.mkIf cfg.enable {
virtualisation.oci-containers.containers.plex-discord-bot = lib.mkIf cfg.enable {
image = "ghcr.io/phin05/discord-rich-presence-plex:latest"; image = "ghcr.io/phin05/discord-rich-presence-plex:latest";
environment = { environment = {
DRPP_UID = toString config.users.users.jawz.uid; DRPP_UID = toString config.users.users.jawz.uid;
@ -18,5 +17,4 @@ in
"/run/user/${toString config.users.users.jawz.uid}:/run/app" "/run/user/${toString config.users.users.jawz.uid}:/run/app"
]; ];
}; };
};
} }

View File

@ -9,8 +9,7 @@ let
in in
{ {
options.my.servers.plex = setup.mkOptions "plex" "plex" 32400; options.my.servers.plex = setup.mkOptions "plex" "plex" 32400;
config = { config.services = {
services = {
plex = lib.mkIf cfg.enable { plex = lib.mkIf cfg.enable {
enable = true; enable = true;
group = "piracy"; group = "piracy";
@ -49,5 +48,4 @@ in
}; };
}; };
}; };
};
} }

View File

@ -9,8 +9,7 @@ let
in in
{ {
options.my.websites.portfolio = setup.mkOptions "portfolio" "portfolio" 0; options.my.websites.portfolio = setup.mkOptions "portfolio" "portfolio" 0;
config = { config.services.nginx.virtualHosts."danilo-reyes.com" = lib.mkIf cfg.enableProxy {
services.nginx.virtualHosts."danilo-reyes.com" = lib.mkIf cfg.enableProxy {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
http2 = true; http2 = true;
@ -20,5 +19,4 @@ in
try_files $uri $uri/ =404; try_files $uri $uri/ =404;
''; '';
}; };
};
} }

View File

@ -5,8 +5,7 @@ let
in in
{ {
options.my.servers.sonarr = setup.mkOptions "sonarr" "series" 8989; options.my.servers.sonarr = setup.mkOptions "sonarr" "series" 8989;
config = { config.services = {
services = {
sonarr = lib.mkIf cfg.enable { sonarr = lib.mkIf cfg.enable {
enable = true; enable = true;
group = "piracy"; group = "piracy";
@ -14,5 +13,4 @@ in
}; };
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg); nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg);
}; };
};
} }