nix/container/Download.nix

25 lines
560 B
Nix
Raw Normal View History

2024-06-09 23:35:53 +03:00
{ container, lib, ... } @args: let
cfg = container.config.download;
in {
systemd.tmpfiles.rules = container.mkContainerDir cfg [
"data"
];
containers.download = container.mkContainer cfg {
bindMounts = {
2024-06-13 17:00:05 +03:00
"/var/lib/deluge/.config/deluge" = {
2024-06-09 23:35:53 +03:00
hostPath = "${cfg.storage}/data";
isReadOnly = false;
};
2024-06-13 17:00:05 +03:00
} // container.attachMedia "download" cfg.download false;
2024-06-09 23:35:53 +03:00
config = { ... }: container.mkContainerConfig cfg {
services.deluge = {
enable = true;
dataDir = "/var/lib/deluge";
web.enable = true;
};
};
};
}