mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-31 17:20:53 +02:00
chore: sunset transmission module
This commit is contained in:
parent
8ee88f922c
commit
2c645aa0af
1 changed files with 0 additions and 59 deletions
|
@ -1,59 +0,0 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.luj.transmission;
|
|
||||||
port = 9091;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
|
|
||||||
options.luj.transmission = {
|
|
||||||
enable = mkEnableOption "activate transmission service";
|
|
||||||
|
|
||||||
user = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "transmission";
|
|
||||||
description = "User account under which transmission runs.";
|
|
||||||
};
|
|
||||||
|
|
||||||
group = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "transmission";
|
|
||||||
description = "Group under which Transmission runs.";
|
|
||||||
};
|
|
||||||
|
|
||||||
nginx.enable = mkEnableOption "activate nginx";
|
|
||||||
nginx.subdomain = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable (
|
|
||||||
mkMerge [{
|
|
||||||
|
|
||||||
sops.secrets.transmission = {
|
|
||||||
owner = cfg.user;
|
|
||||||
format = "binary";
|
|
||||||
sopsFile = ../../secrets/transmission-login;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.transmission = {
|
|
||||||
enable = true;
|
|
||||||
inherit (cfg) user group;
|
|
||||||
credentialsFile = "/run/secrets/transmission";
|
|
||||||
downloadDirPermissions = "770";
|
|
||||||
settings = {
|
|
||||||
rpc-port = 9091;
|
|
||||||
download-dir = "/home/mediaserver/downloads/complete/";
|
|
||||||
incomplete-dir = "/home/mediaserver/downloads/incomplete/";
|
|
||||||
incomplete-dir-enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
(mkIf cfg.nginx.enable (mkSubdomain cfg.nginx.subdomain port))]);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue