summaryrefslogtreecommitdiffstats
path: root/lass/2configs/downloading.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lass/2configs/downloading.nix')
-rw-r--r--lass/2configs/downloading.nix18
1 files changed, 14 insertions, 4 deletions
diff --git a/lass/2configs/downloading.nix b/lass/2configs/downloading.nix
index 5052da5c8..e80b74007 100644
--- a/lass/2configs/downloading.nix
+++ b/lass/2configs/downloading.nix
@@ -1,6 +1,10 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
-{
+with lib;
+
+let
+ rpc-password = import <secrets/transmission-pw.nix>;
+in {
imports = [
../3modules/folderPerms.nix
];
@@ -10,9 +14,13 @@
name = "download";
home = "/var/download";
createHome = true;
+ useDefaultShell = true;
extraGroups = [
"download"
];
+ openssh.authorizedKeys.keys = [
+ config.krebs.users.lass.pubkey
+ ];
};
transmission = {
@@ -41,8 +49,8 @@
rpc-authentication-required = true;
rpc-whitelist-enabled = false;
rpc-username = "download";
- #add rpc-password in secrets
- rpc-password = "test123";
+ inherit rpc-password;
+ peer-port = 51413;
};
};
@@ -50,6 +58,8 @@
enable = true;
tables.filter.INPUT.rules = [
{ predicate = "-p tcp --dport 9091"; target = "ACCEPT"; }
+ { predicate = "-p tcp --dport 51413"; target = "ACCEPT"; }
+ { predicate = "-p udp --dport 51413"; target = "ACCEPT"; }
];
};