diff --git a/systems/tewi/deluge.nix b/systems/tewi/deluge.nix deleted file mode 100644 index 1a94a6f5..00000000 --- a/systems/tewi/deluge.nix +++ /dev/null @@ -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}/*'" - ]; -} diff --git a/systems/tewi/nixos.nix b/systems/tewi/nixos.nix index 4fb3755c..54c403a4 100644 --- a/systems/tewi/nixos.nix +++ b/systems/tewi/nixos.nix @@ -45,9 +45,7 @@ in { nixos.tailscale nixos.nginx nixos.systemd2mqtt - nixos.deluge ./mediatomb.nix - ./deluge.nix ]; boot.supportedFilesystems = ["nfs"];