comments and soulseek work?
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -7,3 +7,4 @@ secrets/matrix_reg_token filter=git-crypt diff=git-crypt
|
|||||||
secrets/owntracks_caddy_auth filter=git-crypt diff=git-crypt
|
secrets/owntracks_caddy_auth filter=git-crypt diff=git-crypt
|
||||||
secrets/secureboot.tar filter=git-crypt diff=git-crypt
|
secrets/secureboot.tar filter=git-crypt diff=git-crypt
|
||||||
secrets/zfs-key filter=git-crypt diff=git-crypt
|
secrets/zfs-key filter=git-crypt diff=git-crypt
|
||||||
|
secrets/slskd_env filter=git-crypt diff=git-crypt
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./zfs.nix
|
./zfs.nix
|
||||||
|
|
||||||
./services/postgresql.nix
|
./services/postgresql.nix
|
||||||
./services/jellyfin.nix
|
./services/jellyfin.nix
|
||||||
./services/caddy.nix
|
./services/caddy.nix
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
./services/bitmagnet.nix
|
./services/bitmagnet.nix
|
||||||
./services/matrix.nix
|
./services/matrix.nix
|
||||||
./services/owntracks.nix
|
./services/owntracks.nix
|
||||||
|
./services/soulseek.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.targets = {
|
systemd.targets = {
|
||||||
@@ -337,9 +339,9 @@
|
|||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
# systemd.tmpfiles.rules = [
|
||||||
"d /tank/music 775 ${username} users"
|
# "d /tank/music 775 ${username} users"
|
||||||
];
|
# ];
|
||||||
|
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
}
|
}
|
||||||
|
|||||||
18
flake.lock
generated
18
flake.lock
generated
@@ -135,11 +135,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739757849,
|
"lastModified": 1742234739,
|
||||||
"narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=",
|
"narHash": "sha256-zFL6zsf/5OztR1NSNQF33dvS1fL/BzVUjabZq4qrtY4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe",
|
"rev": "f6af7280a3390e65c2ad8fd059cdc303426cbd59",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -183,11 +183,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742003385,
|
"lastModified": 1742262784,
|
||||||
"narHash": "sha256-c9gUL+HaIth47YUZTiXgG3NDhaxriJxHM7a0TEXAuBQ=",
|
"narHash": "sha256-a/Knvms22n1Co7TR5uXW+gvpIZcmNWxzm7oUM+Unyok=",
|
||||||
"owner": "Infinidoge",
|
"owner": "Infinidoge",
|
||||||
"repo": "nix-minecraft",
|
"repo": "nix-minecraft",
|
||||||
"rev": "9f51cce843d03d7456b535aeabca87db1012da2c",
|
"rev": "b72f0bc3698833e2d079fce2edf5bda04d411287",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -214,11 +214,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742139335,
|
"lastModified": 1742268799,
|
||||||
"narHash": "sha256-r8MlAuCJxIYb0fvNLYdVr78f4saYtGyWKj47sEv9chM=",
|
"narHash": "sha256-IhnK4LhkBlf14/F8THvUy3xi/TxSQkp9hikfDZRD4Ic=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e1361b38d11a95b86a3663a32201dcd3d6392b7e",
|
"rev": "da044451c6a70518db5b730fe277b70f494188f1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
zpool_hdds = "hdds";
|
zpool_hdds = "hdds";
|
||||||
torrents_path = "/torrents";
|
torrents_path = "/torrents";
|
||||||
services_dir = "/${zpool_ssds}/services";
|
services_dir = "/${zpool_ssds}/services";
|
||||||
|
music_dir = "/${zpool_ssds}/music";
|
||||||
torrent_group = "media";
|
torrent_group = "media";
|
||||||
|
|
||||||
# TODO: add checks to make sure none of these collide
|
# TODO: add checks to make sure none of these collide
|
||||||
@@ -65,10 +66,13 @@
|
|||||||
owntracks = 3825;
|
owntracks = 3825;
|
||||||
gitea = 2283;
|
gitea = 2283;
|
||||||
immich = 2284;
|
immich = 2284;
|
||||||
|
soulseek_web = 5030;
|
||||||
|
soulseek_listen = 50300;
|
||||||
};
|
};
|
||||||
|
|
||||||
https = {
|
https = {
|
||||||
certs = services_dir + "/http_certs";
|
certs = services_dir + "/http_certs";
|
||||||
|
# TODO! generate website from repo directly using hugo
|
||||||
data_dir = services_dir + "/http";
|
data_dir = services_dir + "/http";
|
||||||
domain = "gardling.com";
|
domain = "gardling.com";
|
||||||
wg_ip = "192.168.15.1";
|
wg_ip = "192.168.15.1";
|
||||||
|
|||||||
BIN
secrets/slskd_env
Normal file
BIN
secrets/slskd_env
Normal file
Binary file not shown.
@@ -78,6 +78,21 @@
|
|||||||
"udp://p4p.arenabg.com:1337/announce"
|
"udp://p4p.arenabg.com:1337/announce"
|
||||||
"udp://tracker.dler.com:6969/announce"
|
"udp://tracker.dler.com:6969/announce"
|
||||||
"udp://inferno.demonoid.is:3391/announce"
|
"udp://inferno.demonoid.is:3391/announce"
|
||||||
|
|
||||||
|
"udp://tracker.torrent.eu.org:451/announce"
|
||||||
|
"udp://tracker.ololosh.space:6969/announce"
|
||||||
|
"udp://ns-1.x-fins.com:6969/announce"
|
||||||
|
"udp://leet-tracker.moe:1337/announce"
|
||||||
|
"http://tracker.vanitycore.co:6969/announce"
|
||||||
|
"http://tracker.sbsub.com:2710/announce"
|
||||||
|
"http://tracker.moxing.party:6969/announce"
|
||||||
|
"http://tracker.ipv6tracker.org:80/announce"
|
||||||
|
"http://tracker.corpscorp.online:80/announce"
|
||||||
|
"http://shubt.net:2710/announce"
|
||||||
|
"http://share.hkg-fansub.info:80/announce.php"
|
||||||
|
"http://servandroidkino.ru:80/announce"
|
||||||
|
"http://bt.poletracker.org:2710/announce"
|
||||||
|
"http://0d.kebhana.mx:443/announce"
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
56
services/soulseek.nix
Normal file
56
services/soulseek.nix
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
service_configs,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
users.groups."music" = { };
|
||||||
|
|
||||||
|
services.slskd = {
|
||||||
|
enable = true;
|
||||||
|
domain = null; # null so we don't use nginx reverse proxy
|
||||||
|
environmentFile = ../secrets/slskd_env;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
web = {
|
||||||
|
port = service_configs.ports.soulseek_web;
|
||||||
|
};
|
||||||
|
soulseek = {
|
||||||
|
# description = "smth idk";
|
||||||
|
listen_port = service_configs.ports.soulseek_listen;
|
||||||
|
};
|
||||||
|
|
||||||
|
shares = {
|
||||||
|
directories = [ service_configs.music_dir ];
|
||||||
|
};
|
||||||
|
|
||||||
|
global = {
|
||||||
|
download = {
|
||||||
|
slots = 10;
|
||||||
|
speed_limit = 1000;
|
||||||
|
};
|
||||||
|
upload = {
|
||||||
|
slots = 10;
|
||||||
|
speed_limit = 1000;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.${config.services.slskd.user}.extraGroups = [ "music" ];
|
||||||
|
users.users.${config.services.jellyfin.user}.extraGroups = [ "music" ];
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d ${service_configs.music_dir} 0750 ${username} music"
|
||||||
|
"d ${service_configs.music_dir} 0750 ${username} music"
|
||||||
|
];
|
||||||
|
|
||||||
|
services.caddy.virtualHosts."soulseek.${service_configs.https.domain}".extraConfig = ''
|
||||||
|
# tls internal
|
||||||
|
${builtins.readFile ../secrets/caddy_auth}
|
||||||
|
reverse_proxy :${builtins.toString config.services.slskd.settings.web.port}
|
||||||
|
'';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user