diff --git a/hosts/blacksteel/default.nix b/hosts/blacksteel/default.nix index 485e376..bb40f25 100644 --- a/hosts/blacksteel/default.nix +++ b/hosts/blacksteel/default.nix @@ -18,8 +18,8 @@ ./services/mastodon.nix ./services/matrix.nix ./services/minecraft.nix - ./services/qbittorrent.nix ./services/samba.nix + ./services/transmission.nix ]; boot.loader.efi.canTouchEfiVariables = true; diff --git a/hosts/blacksteel/services/qbittorrent.nix b/hosts/blacksteel/services/qbittorrent.nix deleted file mode 100644 index 0be91f2..0000000 --- a/hosts/blacksteel/services/qbittorrent.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ pkgs, ... }: -{ - # TODO: https://github.com/NixOS/nixpkgs/pull/287923 - # currently running qbittorrent-nox with tmux :c - environment.systemPackages = with pkgs; [ - qbittorrent-nox - ]; -} diff --git a/hosts/blacksteel/services/samba.nix b/hosts/blacksteel/services/samba.nix index df41374..e7a53ad 100644 --- a/hosts/blacksteel/services/samba.nix +++ b/hosts/blacksteel/services/samba.nix @@ -1,3 +1,4 @@ +{ config, ... }: { services.samba = { enable = true; @@ -12,4 +13,12 @@ enable = true; openFirewall = true; }; + + users.users."guanranwang" = { + uid = 1000; + isNormalUser = true; + createHome = false; + useDefaultShell = false; + hashedPasswordFile = config.sops.secrets."hashed-passwd".path; + }; } diff --git a/hosts/blacksteel/services/transmission.nix b/hosts/blacksteel/services/transmission.nix new file mode 100644 index 0000000..48f418f --- /dev/null +++ b/hosts/blacksteel/services/transmission.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: +{ + services.transmission = { + enable = true; + openRPCPort = true; + webHome = pkgs.flood-for-transmission; + settings = { + rpc-bind-address = "0.0.0.0"; + rpc-port = 9080; + + # tailscale + rpc-whitelist = "100.*.*.*"; + rpc-host-whitelist = "blacksteel"; + + incomplete-dir = "/mnt/torrent/downloading"; + download-dir = "/mnt/torrent"; + + speed-limit-up-enabled = true; + speed-limit-up = 1000; + speed-limit-down-enabled = true; + speed-limit-down = 4000; + + ratio-limit-enabled = true; + ratio-limit = 2; + }; + }; +}