421b9a7cd6
format all files with nixfmt
111 lines
2.6 KiB
Nix
111 lines
2.6 KiB
Nix
{pkgs, ...}:
|
|
|
|
{
|
|
services.slskd = {
|
|
enable = true;
|
|
environmentFile = /home/user/slskd_secrets;
|
|
user = "user";
|
|
settings = {
|
|
remote_configuration = true;
|
|
remote_file_management = true;
|
|
directories = {
|
|
downloads = "/media/music/Soulseek";
|
|
};
|
|
shares = {
|
|
directories = [
|
|
"/media/music/Tracks"
|
|
"/media/music/Tracks2"
|
|
"/media/music/samples"
|
|
];
|
|
};
|
|
rooms = [
|
|
"Rare Music"
|
|
"nicotine"
|
|
"! ! LGBTQ+ ! !"
|
|
"lossless"
|
|
"Linux"
|
|
"Breakcore"
|
|
"Jungle"
|
|
];
|
|
transfers = {
|
|
upload = {
|
|
speed_limit = 3700;
|
|
};
|
|
groups = {
|
|
blacklisted = {
|
|
members = [
|
|
"relay"
|
|
"smbd"
|
|
];
|
|
};
|
|
user_defined = {
|
|
my_buddies = {
|
|
upload = {
|
|
priority = 1;
|
|
strategy = "firstinfirstout";
|
|
slots = 1000;
|
|
};
|
|
members = [
|
|
"noamifur"
|
|
"mesityl"
|
|
"diphenhydramine"
|
|
"monfi"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
soulseek = {
|
|
description = ''
|
|
Fuck DRM. Fuck Spotify
|
|
Discord: keksnino
|
|
https://www.last.fm/user/KeksNino
|
|
'';
|
|
listen_port = 32895;
|
|
};
|
|
integrations = {
|
|
webhooks = {
|
|
discord_relay = {
|
|
call = {
|
|
url = "http://127.0.0.1:5001/slskd_webhook";
|
|
};
|
|
on = [ "UploadFileComplete" ];
|
|
timeout = 5000;
|
|
retry = {
|
|
attempts = 3;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
systemd.user.services.slskd-speed = {
|
|
enable = true;
|
|
description = "Soulseek True Speed Shower";
|
|
after = [ "network-online.target" ];
|
|
wants = [ "network-online.target" ];
|
|
wantedBy = [ "multi-user.target" ];
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
Environment = "PYTHONUNBUFFERED=1";
|
|
Restart = "on-failure";
|
|
RestartSec = 30;
|
|
StandardOutput = "journal";
|
|
StandardError = "journal";
|
|
EnvironmentFile = "/home/user/slskd_secrets";
|
|
ExecStart = ''
|
|
${pkgs.python3}/bin/python3 /home/user/slskd-speed.py \
|
|
-u "$SLSKD_SLSK_USERNAME" \
|
|
-p "$SLSKD_SLSK_PASSWORD" \
|
|
-s 30mbit/s \
|
|
--slskd-url http://localhost:5030 \
|
|
--slskd-key "$SLSKD_API_KEY" \
|
|
--loop \
|
|
--poll-interval 30 \
|
|
--interval 900
|
|
'';
|
|
};
|
|
};
|
|
}
|