refactor(tewi): remove deluge

This commit is contained in:
arcnmx 2024-01-14 14:13:41 -08:00
parent 7c261c0112
commit d071b38d63
2 changed files with 0 additions and 34 deletions

View file

@ -1,32 +0,0 @@
{ config, utils, lib, ... }: let
inherit (lib) mkAfter;
cfg = config.services.deluge;
shadowDir = "/mnt/shadow";
mediaDir = "${shadowDir}/deluge";
in {
services.deluge = {
config = {
download_location = "${mediaDir}/download";
move_completed_path = "${mediaDir}/complete";
move_completed = true;
};
};
systemd.services = {
deluged = {
bindsTo = [
"${utils.escapeSystemdPath shadowDir}.mount"
];
unitConfig = {
RequiresMountsFor = [
shadowDir
];
};
};
};
systemd.tmpfiles.rules = mkAfter [
# work around https://github.com/NixOS/nixpkgs/blob/8f40f2f90b9c9032d1b824442cfbbe0dbabd0dbd/nixos/modules/services/torrent/deluge.nix#L205-L210
# (this is dumb, there's no guarantee the disk is even mounted)
"z '${cfg.config.move_completed_path}' 0775 ${cfg.user} ${cfg.group}"
"x '${mediaDir}/*'"
];
}

View file

@ -45,9 +45,7 @@ in {
nixos.tailscale
nixos.nginx
nixos.systemd2mqtt
nixos.deluge
./mediatomb.nix
./deluge.nix
];
boot.supportedFilesystems = ["nfs"];