1
0
Fork 0

remove dependency of deluge.nix on sops-nix

part of #24
This commit is contained in:
ibizaman 2024-02-07 23:10:41 -08:00 committed by Pierre Penninckx
parent f56f997307
commit 228f7e8b46

View file

@ -154,10 +154,9 @@ in
example = "https://authelia.example.com"; example = "https://authelia.example.com";
}; };
sopsFile = lib.mkOption { authFile = lib.mkOption {
type = lib.types.path; type = lib.types.path;
description = "Sops file location."; description = "File containing auth lines in the format expected by deluge. See https://dev.deluge-torrent.org/wiki/UserGuide/Authentication.";
example = "secrets/torrent.yaml";
}; };
enabledPlugins = lib.mkOption { enabledPlugins = lib.mkOption {
@ -230,7 +229,7 @@ in
new_release_check = false; new_release_check = false;
}; };
authFile = config.sops.secrets."deluge/auth".path; inherit (cfg) authFile;
web.enable = true; web.enable = true;
web.port = cfg.webPort; web.port = cfg.webPort;
@ -254,14 +253,6 @@ in
"L+ ${config.services.deluge.dataDir}/.config/deluge/plugins - - - - ${plugins}" "L+ ${config.services.deluge.dataDir}/.config/deluge/plugins - - - - ${plugins}"
]; ];
sops.secrets."deluge/auth" = {
inherit (cfg) sopsFile;
mode = "0440";
owner = config.services.deluge.user;
group = config.services.deluge.group;
restartUnits = [ "deluged.service" "delugeweb.service" ];
};
shb.nginx.autheliaProtect = lib.mkIf config.shb.authelia.enable [ shb.nginx.autheliaProtect = lib.mkIf config.shb.authelia.enable [
{ {
inherit (cfg) subdomain domain authEndpoint ssl; inherit (cfg) subdomain domain authEndpoint ssl;