add navidrome, nfs and slskd

This commit is contained in:
2026-07-23 01:24:08 +02:00
parent 497ca74787
commit 8cfe8b7c6f
7 changed files with 156 additions and 12 deletions
+13
View File
@@ -0,0 +1,13 @@
{
services.navidrome = {
enable = true;
settings = {
MusicFolder = "/media/music";
PlaylistsPath = "Playlists";
Address = "0.0.0.0";
ScanSchedule = "@every 24h";
EnableInsightsCollector = false;
Scanner.PurgeMissing = "always";
};
};
}
+15
View File
@@ -0,0 +1,15 @@
{
services.nfs.server = {
enable = true;
exports = {
"/media/music" = {
"192.168.132.0/24" = [
"rw"
"async"
"no_subtree_check"
"fsid=1"
];
};
};
};
}
+110
View File
@@ -0,0 +1,110 @@
{config, 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
'';
};
};
}