Add slskd

This commit is contained in:
Paul-Henri Froidmont 2025-12-26 16:45:55 +01:00
parent af6158289c
commit e058173c39
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
3 changed files with 49 additions and 2 deletions

View file

@ -20,6 +20,9 @@ in
transmissionRpcCredentials = {
key = "transmission/rpc_config.json";
};
slskdEnvFile = {
key = "slskd.env";
};
};
containers.torrents = {
@ -38,6 +41,9 @@ in
"${config.sops.secrets.transmissionRpcCredentials.path}" = {
hostPath = config.sops.secrets.transmissionRpcCredentials.path;
};
"${config.sops.secrets.slskdEnvFile.path}" = {
hostPath = config.sops.secrets.slskdEnvFile.path;
};
"/nix/var/data/media" = {
hostPath = "/nix/var/data/media";
isReadOnly = false;
@ -62,6 +68,10 @@ in
hostPath = "/nix/var/data/transmission";
isReadOnly = false;
};
"/nix/var/data/slskd/downloads" = {
hostPath = "/nix/var/data/slskd/downloads";
isReadOnly = false;
};
};
config = {
@ -104,6 +114,20 @@ in
RootDirectory = lib.mkForce "";
};
services.slskd = {
enable = true;
openFirewall = true;
user = config.users.users.www-data.name;
group = config.users.groups.www-data.name;
environmentFile = config.sops.secrets.slskdEnvFile.path;
settings = {
web.ip_address = "0.0.0.0";
directories.downloads = "/nix/var/data/slskd/downloads";
shares.directories = [ "/nix/var/data/media/Music" ];
};
domain = null;
};
services.jackett = {
enable = true;
package = pkgs-unstable.jackett;
@ -134,6 +158,12 @@ in
dataDir = "/nix/var/data/lidarr";
};
networking = {
firewall.allowedTCPPorts = [
config.services.slskd.settings.web.port
];
};
system.stateVersion = "21.11";
};
};
@ -184,6 +214,14 @@ in
proxyPass = "http://192.168.1.2:8686";
};
};
"slskd.${config.networking.domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://192.168.1.2:5030";
proxyWebsockets = true;
};
};
};
};
}