2024-08-25 12:44:14 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
secrets,
|
|
|
|
...
|
|
|
|
}:
|
2024-07-14 15:48:01 +02:00
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
2024-08-25 12:07:50 +02:00
|
|
|
cfg = config.downloads.music;
|
2024-07-14 15:48:01 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
2024-08-25 12:07:50 +02:00
|
|
|
downloads.music.directory = mkOption {
|
2024-07-15 16:27:23 +02:00
|
|
|
type = types.str;
|
2024-07-25 17:40:25 +02:00
|
|
|
default = "/srv/media/Music";
|
2024-07-15 16:27:23 +02:00
|
|
|
};
|
2024-07-14 15:48:01 +02:00
|
|
|
};
|
|
|
|
config = {
|
|
|
|
|
2024-08-12 16:13:25 +02:00
|
|
|
sops.secrets.slskd = {
|
2024-08-25 12:44:14 +02:00
|
|
|
sopsFile = "${secrets}/secrets/slskd.env";
|
2024-07-14 15:48:01 +02:00
|
|
|
format = "dotenv";
|
|
|
|
};
|
2024-07-15 16:27:23 +02:00
|
|
|
|
2024-07-14 15:48:01 +02:00
|
|
|
services.slskd = {
|
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
2024-08-12 16:13:25 +02:00
|
|
|
environmentFile = config.sops.secrets.slskd.path;
|
2024-07-14 15:48:01 +02:00
|
|
|
domain = null;
|
|
|
|
settings = {
|
2024-07-23 15:03:26 +02:00
|
|
|
shares.directories = [ "${cfg.directory}/clean" ];
|
2024-07-14 15:48:01 +02:00
|
|
|
soulseek.description = "i luv katz n mewsik";
|
2024-08-27 10:03:56 +02:00
|
|
|
directories.downloads = "${cfg.directory}/downloads";
|
|
|
|
directories.incomplete = "${cfg.directory}/incomplete";
|
2024-07-14 15:48:01 +02:00
|
|
|
};
|
|
|
|
};
|
2024-10-30 17:44:54 +01:00
|
|
|
|
|
|
|
services.caddy.virtualHosts."http://slskd.sisyphe.normandy.hypervirtual.world".extraConfig = ''
|
|
|
|
reverse_proxy :5030
|
|
|
|
'';
|
2024-07-14 15:48:01 +02:00
|
|
|
};
|
|
|
|
}
|