add transmission module for downloads bt torrent
This commit is contained in:
parent
5611e67d44
commit
fd2fe39655
6 changed files with 92 additions and 0 deletions
|
|
@ -37,6 +37,7 @@
|
|||
unixName = "david";
|
||||
};
|
||||
open-webui.enable = true;
|
||||
transmission.enable = true;
|
||||
};
|
||||
gui.enabled = "cosmic";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
./kanata.nix
|
||||
./kvm.nix
|
||||
./open-webui.nix
|
||||
./transmission.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
|
|
|
|||
38
nixos/modules/transmission.nix
Normal file
38
nixos/modules/transmission.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
rootPath,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.programs.transmission;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.transmission = {
|
||||
enable = lib.mkEnableOption "transmission";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
users.groups."${config.services.transmission.group}".members = [
|
||||
config.youthlic.home-manager.unixName
|
||||
];
|
||||
sops.secrets."transmission-config" = {
|
||||
sopsFile = rootPath + "/secrets/transmission.yaml";
|
||||
};
|
||||
services.transmission = {
|
||||
enable = true;
|
||||
package = pkgs.transmission_4;
|
||||
settings = {
|
||||
utp-enabled = true;
|
||||
watch-dir-enabled = true;
|
||||
default-trackers = builtins.readFile "${inputs.bt-tracker}/all.txt";
|
||||
};
|
||||
openRPCPort = true;
|
||||
openPeerPorts = true;
|
||||
credentialsFile = "${config.sops.secrets.transmission-config.path}";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue