my over complex system configurations dotfiles.isabelroses.com/
nixos nix flake dotfiles linux
12
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 82 lines 1.9 kB view raw
1{ 2 lib, 3 self, 4 config, 5 ... 6}: 7let 8 inherit (lib) mkIf; 9 inherit (self.lib) mkServiceOption mkSecret; 10 11 cfg = config.garden.services.qbittorrent; 12 inherit (config.garden.services) arr; 13in 14{ 15 options.garden.services.qbittorrent = mkServiceOption "qbittorrent" { 16 port = 3019; 17 host = "0.0.0.0"; 18 }; 19 20 config = mkIf cfg.enable { 21 networking.firewall.allowedTCPPorts = [ 22 cfg.port 23 config.services.qbittorrent.torrentingPort 24 ]; 25 26 sops.secrets.qui = mkSecret { 27 file = "qui"; 28 key = "qui"; 29 }; 30 31 services = { 32 qui = { 33 enable = true; 34 secretFile = config.sops.secrets.qui.path; 35 settings = { 36 inherit (cfg) host port; 37 checkForUpdates = false; 38 }; 39 }; 40 41 qbittorrent = { 42 enable = true; 43 group = arr.mediaGroup; 44 45 webuiPort = 4019; 46 torrentingPort = 43125; 47 48 serverConfig = { 49 LegalNotice.Accepted = true; 50 51 BitTorrent.Session = { 52 BTProtocol = "TCP"; 53 DHTEnabled = true; 54 LSDEnabled = false; 55 PeXEnabled = true; 56 QueueingSystemEnabled = false; 57 58 # sorting 59 DefaultSavePath = "/media/downloads"; 60 DisableAutoTMMByDefault = false; 61 DisableAutoTMMTriggers = { 62 CategorySavePathChanged = false; 63 DefaultSavePathChanged = false; 64 }; 65 }; 66 67 Core.AutoDeleteAddedTorrentFile = "IfAdded"; 68 69 # i will handle this myself lol 70 Network.PortForwardingEnabled = false; 71 72 Preferences.WebUI = { 73 LocalHostAuth = false; 74 75 # generate with <https://codeberg.org/feathecutie/qbittorrent_password> 76 Password_PBKDF2 = "@ByteArray(2PRai2N/GL+Lt+VDdda0kw==:X4+iM6WwTPXExbBwJGcrHqxVsEN0cBxrhACiTMbEeQ6RjTdbfnJSB+CyTn3r1iJzEMMa0/XZzq2U1cG4O6AZZg==)"; 77 }; 78 }; 79 }; 80 }; 81 }; 82}