feat: choose interface for deluge

This commit is contained in:
Julien Malka 2024-05-25 19:07:53 +02:00
parent 4f6593a2a1
commit f3f3449329
Signed by: Luj
GPG key ID: 6FC74C847011FD83
2 changed files with 9 additions and 1 deletions

View file

@ -60,6 +60,7 @@
tv.enable = true; tv.enable = true;
music.enable = true; music.enable = true;
}; };
luj.deluge.interface = "wg0";
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }

View file

@ -21,6 +21,11 @@ in
description = "Group under which deluge runs."; description = "Group under which deluge runs.";
}; };
interface = mkOption {
type = types.str;
description = "Interface deluge will use.";
};
nginx.enable = mkEnableOption "activate nginx"; nginx.enable = mkEnableOption "activate nginx";
nginx.subdomain = mkOption { type = types.str; }; nginx.subdomain = mkOption { type = types.str; };
}; };
@ -41,8 +46,10 @@ in
authFile = "/run/agenix/deluge-webui-password"; authFile = "/run/agenix/deluge-webui-password";
web.enable = true; web.enable = true;
config = { config = {
download_location = "/home/mediaserver/downloads/complete/"; download_location = "${config.users.users.${cfg.user}.home}/downloads/";
allow_remote = true; allow_remote = true;
outgoing_interface = cfg.interface;
listen_interface = cfg.interface;
}; };
}; };
} }