From 8f302c8305c9a8e4d14a8741eaf684409341ccb8 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Mon, 20 May 2024 19:09:35 +0530 Subject: Refactor overlays + torrent module --- configuration.nix | 3 ++- modules/torrent.home.nix | 35 ----------------------------------- modules/torrent.nix | 35 +++++++++++++++++++++++++++++++++++ overlays-home.nix | 2 +- overlays-system.nix | 2 +- 5 files changed, 39 insertions(+), 38 deletions(-) delete mode 100644 modules/torrent.home.nix create mode 100644 modules/torrent.nix diff --git a/configuration.nix b/configuration.nix index 9f77b86..e89159a 100644 --- a/configuration.nix +++ b/configuration.nix @@ -14,7 +14,7 @@ in ./packages.nix ./overlays-system.nix ./modules/login.nix - ./modules/torrent.home.nix + ./modules/torrent.nix ./modules/work.nix ./modules/keyboard/default.nix ]; @@ -125,6 +125,7 @@ in i18n.defaultLocale = "en_US.UTF-8"; services.xserver.xkb.layout = "us"; + home-manager.useGlobalPkgs = true; # Home manager home-manager.users.imsohexy = { pkgs, ... }: { imports = [ ./home.nix ]; diff --git a/modules/torrent.home.nix b/modules/torrent.home.nix deleted file mode 100644 index 9266f44..0000000 --- a/modules/torrent.home.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, pkgs, ... }: -let - downloadsDir = "/home/imsohexy/Downloads/dl"; - incompleteDownloadsDir = "/home/imsohexy/Downloads/dl/incomplete"; - watchTorrentFilesOn = "/home/an/Downloads/qute"; -in -{ - services.transmission = { - enable = true; - settings = { - "download-dir" = downloadsDir; - "download-queue-enabled" = true; - "download-queue-size" = 5; - "incomplete-dir" = incompleteDownloadsDir; - "incomplete-dir-enabled" = true; - "peer-port" = 51413; - "peer-port-random-high" = 65535; - "peer-port-random-low" = 49152; - "prefetch-enabled" = true; - "rename-partial-files" = true; - "rpc-authentication-required" = false; - "rpc-bind-address" = "127.0.0.1"; - "rpc-enabled" = true; - "rpc-port" = 9091; - "rpc-whitelist-enabled" = true; - "script-torrent-done-enabled" = false; - "start-added-torrents" = true; - "trash-original-torrent-files" = false; - "umask" = 18; - "utp-enabled" = true; - "watch-dir" = watchTorrentFilesOn; - "watch-dir-enabled" = false; - }; - }; -} diff --git a/modules/torrent.nix b/modules/torrent.nix new file mode 100644 index 0000000..9266f44 --- /dev/null +++ b/modules/torrent.nix @@ -0,0 +1,35 @@ +{ config, pkgs, ... }: +let + downloadsDir = "/home/imsohexy/Downloads/dl"; + incompleteDownloadsDir = "/home/imsohexy/Downloads/dl/incomplete"; + watchTorrentFilesOn = "/home/an/Downloads/qute"; +in +{ + services.transmission = { + enable = true; + settings = { + "download-dir" = downloadsDir; + "download-queue-enabled" = true; + "download-queue-size" = 5; + "incomplete-dir" = incompleteDownloadsDir; + "incomplete-dir-enabled" = true; + "peer-port" = 51413; + "peer-port-random-high" = 65535; + "peer-port-random-low" = 49152; + "prefetch-enabled" = true; + "rename-partial-files" = true; + "rpc-authentication-required" = false; + "rpc-bind-address" = "127.0.0.1"; + "rpc-enabled" = true; + "rpc-port" = 9091; + "rpc-whitelist-enabled" = true; + "script-torrent-done-enabled" = false; + "start-added-torrents" = true; + "trash-original-torrent-files" = false; + "umask" = 18; + "utp-enabled" = true; + "watch-dir" = watchTorrentFilesOn; + "watch-dir-enabled" = false; + }; + }; +} diff --git a/overlays-home.nix b/overlays-home.nix index dbeb552..fc85510 100644 --- a/overlays-home.nix +++ b/overlays-home.nix @@ -4,7 +4,7 @@ let in { nixpkgs.overlays = with overlays; [ - pass-with-dmenu + # pass-with-dmenu # Home manager issue {https://discourse.nixos.org/t/error-when-upgrading-nixos-related-to-fcitx-engines/26940} (self: super: { diff --git a/overlays-system.nix b/overlays-system.nix index 5bbe607..4ae9609 100644 --- a/overlays-system.nix +++ b/overlays-system.nix @@ -4,7 +4,7 @@ let in { nixpkgs.overlays = with overlays; [ - # neovim-nightly + pass-with-dmenu qutebrowser j4-dmenu-desktop ]; -- cgit v1.3.1