mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
refactor(tewi): remove deluge
This commit is contained in:
parent
7c261c0112
commit
d071b38d63
2 changed files with 0 additions and 34 deletions
|
|
@ -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}/*'"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -45,9 +45,7 @@ in {
|
||||||
nixos.tailscale
|
nixos.tailscale
|
||||||
nixos.nginx
|
nixos.nginx
|
||||||
nixos.systemd2mqtt
|
nixos.systemd2mqtt
|
||||||
nixos.deluge
|
|
||||||
./mediatomb.nix
|
./mediatomb.nix
|
||||||
./deluge.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.supportedFilesystems = ["nfs"];
|
boot.supportedFilesystems = ["nfs"];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue