2024-07-15 16:46:14 +02:00
|
|
|
{ config, lib, ... }:
|
2024-07-14 15:48:01 +02:00
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.slskd;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
2024-07-15 16:27:23 +02:00
|
|
|
slskd.directory = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
default = "/srv/Multimedia/Music";
|
|
|
|
};
|
2024-07-14 15:48:01 +02:00
|
|
|
};
|
|
|
|
config = {
|
|
|
|
|
|
|
|
sops.secrets."slskd" = {
|
2024-07-15 18:12:03 +02:00
|
|
|
sopsFile = ../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;
|
|
|
|
environmentFile = config.sops.secrets."slskd".path;
|
|
|
|
domain = null;
|
|
|
|
settings = {
|
2024-07-15 16:27:23 +02:00
|
|
|
shares.directories = [ "${cfg.slskd.directory}" ];
|
2024-07-14 15:48:01 +02:00
|
|
|
soulseek.description = "i luv katz n mewsik";
|
2024-07-15 16:27:23 +02:00
|
|
|
directories.files.downloads = "${cfg.slskd.directory}/clean";
|
|
|
|
directories.files.incomplete = "${cfg.slskd.directory}/incomplete";
|
2024-07-14 15:48:01 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|