From 02876ce7b3bd136f3281c19f9232be67970d17df Mon Sep 17 00:00:00 2001 From: Lillian-Violet Date: Thu, 4 Jan 2024 14:49:45 +0100 Subject: [PATCH] Small refactor and added prowlarr --- nixos/hosts/queen/configuration.nix | 24 ++++--- nixos/package-configs/ombi/configuration.nix | 25 ------- .../package-configs/radarr/configuration.nix | 25 ------- .../package-configs/sonarr/configuration.nix | 25 ------- .../package-configs/akkoma/configuration.nix | 0 .../package-configs/aria2/configuration.nix | 0 .../package-configs/forgejo/configuration.nix | 0 .../gotosocial/configuration.nix | 0 .../jellyfin/configuration.nix | 0 .../mail-server/configuration.nix | 0 .../nextcloud/configuration.nix | 0 .../package-configs/ombi/configuration.nix | 65 +++++++++++++++++++ .../postgres/configuration.nix | 0 .../package-configs/postgres/upgrade.nix | 0 .../roundcube/configuration.nix | 0 15 files changed, 76 insertions(+), 88 deletions(-) delete mode 100644 nixos/package-configs/ombi/configuration.nix delete mode 100644 nixos/package-configs/radarr/configuration.nix delete mode 100644 nixos/package-configs/sonarr/configuration.nix rename nixos/{ => server}/package-configs/akkoma/configuration.nix (100%) rename nixos/{ => server}/package-configs/aria2/configuration.nix (100%) rename nixos/{ => server}/package-configs/forgejo/configuration.nix (100%) rename nixos/{ => server}/package-configs/gotosocial/configuration.nix (100%) rename nixos/{ => server}/package-configs/jellyfin/configuration.nix (100%) rename nixos/{ => server}/package-configs/mail-server/configuration.nix (100%) rename nixos/{ => server}/package-configs/nextcloud/configuration.nix (100%) create mode 100644 nixos/server/package-configs/ombi/configuration.nix rename nixos/{ => server}/package-configs/postgres/configuration.nix (100%) rename nixos/{ => server}/package-configs/postgres/upgrade.nix (100%) rename nixos/{ => server}/package-configs/roundcube/configuration.nix (100%) diff --git a/nixos/hosts/queen/configuration.nix b/nixos/hosts/queen/configuration.nix index da90c5f..68c3694 100644 --- a/nixos/hosts/queen/configuration.nix +++ b/nixos/hosts/queen/configuration.nix @@ -16,19 +16,17 @@ # You can also split up your configuration and import pieces of it here: # ./nvim.nix ./hardware-configuration.nix - ../../package-configs/akkoma/configuration.nix - ../../package-configs/forgejo/configuration.nix - ../../package-configs/gotosocial/configuration.nix - ../../package-configs/mail-server/configuration.nix - ../../package-configs/nextcloud/configuration.nix - ../../package-configs/postgres/configuration.nix - ../../package-configs/postgres/upgrade.nix - ../../package-configs/roundcube/configuration.nix - ../../package-configs/jellyfin/configuration.nix - ../../package-configs/ombi/configuration.nix - ../../package-configs/radarr/configuration.nix - ../../package-configs/sonarr/configuration.nix - ../../package-configs/aria2/configuration.nix + ../../server/package-configs/akkoma/configuration.nix + ../../server/package-configs/forgejo/configuration.nix + ../../server/package-configs/gotosocial/configuration.nix + ../../server/package-configs/mail-server/configuration.nix + ../../server/package-configs/nextcloud/configuration.nix + ../../server/package-configs/postgres/configuration.nix + ../../server/package-configs/postgres/upgrade.nix + ../../server/package-configs/roundcube/configuration.nix + ../../server/package-configs/jellyfin/configuration.nix + ../../server/package-configs/ombi/configuration.nix + ../../server/package-configs/aria2/configuration.nix ]; boot.tmp.cleanOnBoot = true; diff --git a/nixos/package-configs/ombi/configuration.nix b/nixos/package-configs/ombi/configuration.nix deleted file mode 100644 index 8c79fdf..0000000 --- a/nixos/package-configs/ombi/configuration.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - config, - pkgs, - ... -}: { - users.users = { - ombi.extraGroups = ["radarr" "sonarr" "aria2"]; - }; - services.ombi = { - enable = true; - port = 2368; - }; - - services.nginx = { - virtualHosts = { - "ombi.gladtherescake.eu" = { - forceSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://localhost:2368"; - }; - }; - }; - }; -} diff --git a/nixos/package-configs/radarr/configuration.nix b/nixos/package-configs/radarr/configuration.nix deleted file mode 100644 index 45a13a5..0000000 --- a/nixos/package-configs/radarr/configuration.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - config, - pkgs, - ... -}: { - users.users = { - radarr.extraGroups = ["aria2"]; - }; - #uses port 7878 - services.radarr = { - enable = true; - }; - - services.nginx = { - virtualHosts = { - "radarr.gladtherescake.eu" = { - forceSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://localhost:7878"; - }; - }; - }; - }; -} diff --git a/nixos/package-configs/sonarr/configuration.nix b/nixos/package-configs/sonarr/configuration.nix deleted file mode 100644 index 884cd5a..0000000 --- a/nixos/package-configs/sonarr/configuration.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - config, - pkgs, - ... -}: { - users.users = { - sonarr.extraGroups = ["aria2"]; - }; - #uses port 8989 - services.sonarr = { - enable = true; - }; - - services.nginx = { - virtualHosts = { - "sonarr.gladtherescake.eu" = { - forceSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://localhost:8989"; - }; - }; - }; - }; -} diff --git a/nixos/package-configs/akkoma/configuration.nix b/nixos/server/package-configs/akkoma/configuration.nix similarity index 100% rename from nixos/package-configs/akkoma/configuration.nix rename to nixos/server/package-configs/akkoma/configuration.nix diff --git a/nixos/package-configs/aria2/configuration.nix b/nixos/server/package-configs/aria2/configuration.nix similarity index 100% rename from nixos/package-configs/aria2/configuration.nix rename to nixos/server/package-configs/aria2/configuration.nix diff --git a/nixos/package-configs/forgejo/configuration.nix b/nixos/server/package-configs/forgejo/configuration.nix similarity index 100% rename from nixos/package-configs/forgejo/configuration.nix rename to nixos/server/package-configs/forgejo/configuration.nix diff --git a/nixos/package-configs/gotosocial/configuration.nix b/nixos/server/package-configs/gotosocial/configuration.nix similarity index 100% rename from nixos/package-configs/gotosocial/configuration.nix rename to nixos/server/package-configs/gotosocial/configuration.nix diff --git a/nixos/package-configs/jellyfin/configuration.nix b/nixos/server/package-configs/jellyfin/configuration.nix similarity index 100% rename from nixos/package-configs/jellyfin/configuration.nix rename to nixos/server/package-configs/jellyfin/configuration.nix diff --git a/nixos/package-configs/mail-server/configuration.nix b/nixos/server/package-configs/mail-server/configuration.nix similarity index 100% rename from nixos/package-configs/mail-server/configuration.nix rename to nixos/server/package-configs/mail-server/configuration.nix diff --git a/nixos/package-configs/nextcloud/configuration.nix b/nixos/server/package-configs/nextcloud/configuration.nix similarity index 100% rename from nixos/package-configs/nextcloud/configuration.nix rename to nixos/server/package-configs/nextcloud/configuration.nix diff --git a/nixos/server/package-configs/ombi/configuration.nix b/nixos/server/package-configs/ombi/configuration.nix new file mode 100644 index 0000000..f99c67f --- /dev/null +++ b/nixos/server/package-configs/ombi/configuration.nix @@ -0,0 +1,65 @@ +{ + config, + pkgs, + ... +}: { + users.users = { + ombi.extraGroups = ["radarr" "sonarr" "aria2"]; + }; + services.ombi = { + enable = true; + port = 2368; + }; + + users.users = { + radarr.extraGroups = ["aria2"]; + sonarr.extraGroups = ["aria2"]; + prowlarr.extraGroups = ["aria2"]; + }; + #uses port 7878 + services.radarr = { + enable = true; + }; + + #uses port 8989 + services.sonarr = { + enable = true; + }; + + services.prowlarr = { + enable = true; + }; + + services.nginx = { + virtualHosts = { + "ombi.gladtherescake.eu" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:2368"; + }; + }; + "radarr.gladtherescake.eu" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:7878"; + }; + }; + "sonarr.gladtherescake.eu" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:8989"; + }; + }; + "prowlarr.gladtherescake.eu" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:9696"; + }; + }; + }; + }; +} diff --git a/nixos/package-configs/postgres/configuration.nix b/nixos/server/package-configs/postgres/configuration.nix similarity index 100% rename from nixos/package-configs/postgres/configuration.nix rename to nixos/server/package-configs/postgres/configuration.nix diff --git a/nixos/package-configs/postgres/upgrade.nix b/nixos/server/package-configs/postgres/upgrade.nix similarity index 100% rename from nixos/package-configs/postgres/upgrade.nix rename to nixos/server/package-configs/postgres/upgrade.nix diff --git a/nixos/package-configs/roundcube/configuration.nix b/nixos/server/package-configs/roundcube/configuration.nix similarity index 100% rename from nixos/package-configs/roundcube/configuration.nix rename to nixos/server/package-configs/roundcube/configuration.nix