nix/container/Download.nix

27 lines
581 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 {
2024-06-14 06:06:05 +03:00
enableTun = true;
2024-06-09 23:35:53 +03:00
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;
};
};
};
}