aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-07-03 11:21:21 +0530
committerAkshay Nair <phenax5@gmail.com>2025-07-03 11:21:21 +0530
commit55770604dbecdcb765189553e010aa18f9828f14 (patch)
treef663af2a18b7dbf065d2f1d14153282e93986317 /modules
parent7b4f6f9da8c2261cb615095284f9a773ae92e338 (diff)
downloadnixos-config-55770604dbecdcb765189553e010aa18f9828f14.tar.gz
nixos-config-55770604dbecdcb765189553e010aa18f9828f14.zip
Remove service router
Diffstat (limited to 'modules')
-rw-r--r--modules/service-router.module.nix34
-rw-r--r--modules/torrent.nix57
2 files changed, 2 insertions, 89 deletions
diff --git a/modules/service-router.module.nix b/modules/service-router.module.nix
deleted file mode 100644
index e1da4fb..0000000
--- a/modules/service-router.module.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ config, lib, ... }:
-with lib;
-let
- cfg = config.services.service-router;
- hostname = name: "${name}.local";
-in {
- options.services.service-router = {
- enable = mkEnableOption "enable router";
- routes = mkOption {
- type = types.attrsOf (types.submodule { options = {
- port = mkOption { type = types.int; };
- host = mkOption { type = types.str; default = "127.0.0.1"; };
- protocol = mkOption { type = types.str; default = "http"; };
- }; });
- default = {};
- };
- };
-
- config = lib.mkIf cfg.enable {
- services.nginx = {
- enable = true;
- virtualHosts = lib.mapAttrs' (name: val: {
- name = hostname name;
- value = {
- locations."/" = {
- proxyPass = "${val.protocol}://${val.host}:${toString val.port}";
- };
- };
- }) cfg.routes;
- };
-
- networking.hosts."127.0.0.1" = lib.mapAttrsToList (name: _: hostname name) cfg.routes;
- };
-}
diff --git a/modules/torrent.nix b/modules/torrent.nix
index 3753f2b..0a52973 100644
--- a/modules/torrent.nix
+++ b/modules/torrent.nix
@@ -1,15 +1,7 @@
-{ pkgs, ... }:
+{ ... }:
let
- downloadsDir = "/media/_downloads";
+ downloadsDir = "/home/imsohexy/Downloads/_downloads";
incompleteDownloadsDir = "${downloadsDir}/_incomplete";
- tvDownloads = "/media/tv";
- moviesDownloads = "/media/movies";
- watchTorrentFilesOn = "/home/imsohexy/Downloads/qute";
-
- radarrPort = 7878;
- sonarrPort = 8989;
- prowlarrPort = 9696;
- jellyfinPort = 8096;
group = "multimedia";
in
@@ -17,54 +9,10 @@ in
systemd.tmpfiles.rules = [
"d ${downloadsDir} 0770 - ${group} - -"
"d ${incompleteDownloadsDir} 0770 - ${group} - -"
- "d ${tvDownloads} 0770 - ${group} - -"
- "d ${moviesDownloads} 0770 - ${group} - -"
];
users.groups."${group}" = { };
users.users.imsohexy.extraGroups = [ group ];
- environment.systemPackages = with pkgs; [ managarr jellytui ];
-
- services.service-router.routes = {
- sonarr.port = sonarrPort;
- radarr.port = radarrPort;
- prowlarr.port = prowlarrPort;
- jellyfin.port = jellyfinPort;
- };
-
- services.sonarr = {
- enable = true;
- # openFirewall = true;
- group = group;
- settings = {
- server.port = sonarrPort;
- auth.enabled = false;
- };
- };
-
- services.radarr = {
- enable = true;
- # openFirewall = true;
- group = group;
- settings = {
- server.port = radarrPort;
- auth.enabled = false;
- };
- };
-
- services.prowlarr = {
- enable = true;
- settings = {
- server.port = prowlarrPort;
- };
- };
-
- services.jellyfin = {
- enable = true;
- group = group;
- openFirewall = true;
- };
-
services.transmission = {
enable = true;
group = group;
@@ -89,7 +37,6 @@ in
"trash-original-torrent-files" = false;
"umask" = 18;
"utp-enabled" = true;
- "watch-dir" = watchTorrentFilesOn;
"watch-dir-enabled" = false;
};
};