mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-12 19:27:17 +00:00
Fixes torrenting, updates to transmission 4
This commit is contained in:
parent
12004619d9
commit
c20c52c04a
1 changed files with 29 additions and 4 deletions
|
@ -4,7 +4,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
torrent_group_id = 987;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
../profiles/hyprland.nix
|
../profiles/hyprland.nix
|
||||||
|
@ -43,6 +45,8 @@
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
boot.zfs.extraPools = ["zpool"];
|
||||||
|
|
||||||
swapDevices = [{device = "/dev/disk/by-uuid/36bb51f0-f56d-4408-b61c-7905789a7304";}];
|
swapDevices = [{device = "/dev/disk/by-uuid/36bb51f0-f56d-4408-b61c-7905789a7304";}];
|
||||||
|
|
||||||
environment.systemPackages = [pkgs.zfs];
|
environment.systemPackages = [pkgs.zfs];
|
||||||
|
@ -51,16 +55,24 @@
|
||||||
|
|
||||||
services.jellyfin.enable = true;
|
services.jellyfin.enable = true;
|
||||||
|
|
||||||
|
users.groups.torrent.gid = torrent_group_id;
|
||||||
|
|
||||||
services.transmission = {
|
services.transmission = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
package = pkgs.transmission_4;
|
||||||
|
|
||||||
|
group = "torrent";
|
||||||
|
|
||||||
settings = rec {
|
settings = rec {
|
||||||
download-dir = "/zpool/media/torrents";
|
download-dir = "/zpool/media/torrents";
|
||||||
incomplete-dir = "/zpool/media/torrents/.incomplete";
|
incomplete-dir = "/zpool/media/torrents/.incomplete";
|
||||||
incomplete-dir-enabled = true;
|
incomplete-dir-enabled = true;
|
||||||
|
peer-port = 51413;
|
||||||
rpc-enabled = true;
|
rpc-enabled = true;
|
||||||
rpc-bind-address = "0.0.0.0";
|
rpc-bind-address = "0.0.0.0";
|
||||||
rpc-whitelist-enabled = false;
|
rpc-whitelist-enabled = false;
|
||||||
|
rpc-whitelist = "10.1.2.*,127.0.0.*";
|
||||||
rpc-host-whitelist-enabled = false;
|
rpc-host-whitelist-enabled = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -105,15 +117,27 @@
|
||||||
# ssh
|
# ssh
|
||||||
tcp dport 22 accept
|
tcp dport 22 accept
|
||||||
|
|
||||||
|
iifname "tun0" tcp dport 51413 accept
|
||||||
|
iifname "tun0" udp dport 51413 accept
|
||||||
|
|
||||||
|
iifname {lo, "zt*"} tcp dport 9091 accept
|
||||||
|
|
||||||
|
iifname "tun0" skgid ${toString torrent_group_id} accept
|
||||||
|
|
||||||
# drop all other packets
|
# drop all other packets
|
||||||
#counter drop
|
counter drop
|
||||||
accept
|
#accept
|
||||||
}
|
}
|
||||||
|
|
||||||
chain output {
|
chain output {
|
||||||
type filter hook output priority 0;
|
type filter hook output priority 0;
|
||||||
|
|
||||||
oifname != { "lo", "tun0", "zt*" } skgid 70 counter reject
|
tcp dport 53 accept
|
||||||
|
udp dport 53 accept
|
||||||
|
|
||||||
|
oifname {"lo", "zt*"} tcp sport 9091 accept
|
||||||
|
|
||||||
|
skgid ${toString torrent_group_id} oifname != "tun0" counter drop
|
||||||
|
|
||||||
# zerotier
|
# zerotier
|
||||||
oifname "zt*" accept
|
oifname "zt*" accept
|
||||||
|
@ -125,6 +149,7 @@
|
||||||
|
|
||||||
chain forward {
|
chain forward {
|
||||||
type filter hook forward priority 0;
|
type filter hook forward priority 0;
|
||||||
|
|
||||||
accept
|
accept
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue