Compare commits
2 Commits
4c3ff4e6ff
...
ad7dd42496
| Author | SHA1 | Date | |
|---|---|---|---|
|
ad7dd42496
|
|||
|
e1efe1ca79
|
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";
|
||||||
}
|
}
|
||||||
|
|||||||
32
flake.lock
generated
32
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": {
|
||||||
@@ -198,11 +198,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741792691,
|
"lastModified": 1742217307,
|
||||||
"narHash": "sha256-f0BVt1/cvA0DQ/q3rB+HY4g4tKksd03ZkzI4xehC2Ew=",
|
"narHash": "sha256-3fwpN7KN226ghLlpO9TR0/WpgQOmOj1e8bieUxpIYSk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "e1f12151258b12c567f456d8248e4694e9390613",
|
"rev": "4f4d97d7b7be387286cc9c988760a7ebaa5be1f1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -214,16 +214,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741862977,
|
"lastModified": 1742268799,
|
||||||
"narHash": "sha256-prZ0M8vE/ghRGGZcflvxCu40ObKaB+ikn74/xQoNrGQ=",
|
"narHash": "sha256-IhnK4LhkBlf14/F8THvUy3xi/TxSQkp9hikfDZRD4Ic=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "cdd2ef009676ac92b715ff26630164bb88fec4e0",
|
"rev": "da044451c6a70518db5b730fe277b70f494188f1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-24.11",
|
"ref": "nixos-24.11-small",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -320,11 +320,11 @@
|
|||||||
},
|
},
|
||||||
"vpn-confinement": {
|
"vpn-confinement": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740921534,
|
"lastModified": 1742138327,
|
||||||
"narHash": "sha256-orXe3m04DLTW3I19VVanClzpqeq7adnDTqKAD7aPbA8=",
|
"narHash": "sha256-Y71Mjej98CjaUKa1ecAIOo0eJ1B3ZVQl2ng6xl7/s9Y=",
|
||||||
"owner": "Maroka-chan",
|
"owner": "Maroka-chan",
|
||||||
"repo": "VPN-Confinement",
|
"repo": "VPN-Confinement",
|
||||||
"rev": "5eb7dc3e901f4dbb085eb37f5785473a9ae78bc4",
|
"rev": "38eeb3bc501900b48d1caf8c52a5b7f2fb7a52c5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
description = "Flake for server muffin";
|
description = "Flake for server muffin";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11-small";
|
||||||
|
|
||||||
lanzaboote = {
|
lanzaboote = {
|
||||||
url = "github:nix-community/lanzaboote";
|
url = "github:nix-community/lanzaboote";
|
||||||
@@ -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.
@@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
services.jellyfin = rec {
|
services.jellyfin = rec {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# used for local streaming
|
# used for local streaming
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
|
||||||
|
|||||||
@@ -51,8 +51,8 @@ in
|
|||||||
with pkgs;
|
with pkgs;
|
||||||
builtins.attrValues {
|
builtins.attrValues {
|
||||||
FabricApi = fetchurl {
|
FabricApi = fetchurl {
|
||||||
url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/IXeiAH6H/fabric-api-0.118.5%2B1.21.4.jar";
|
url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/HbTXYTBz/fabric-api-0.119.0%2B1.21.4.jar";
|
||||||
sha512 = "5ad7b91f3077fdd412d30b08cc93ddb625b281c3dc39b7ca24957901931807695fda045c040990e1bdd741c5bf384f21fb8c136a04ab1fb99a08b38d361fba6b";
|
sha512 = "f2e44507dcf7c34ac5104bf78c0f0f0ab99840272d0c1afc51236b7f8a56541bd5c2024953a83599034e1b55191e38b3e437b6b80736137e2ee4d7d571f42c82";
|
||||||
};
|
};
|
||||||
|
|
||||||
FerriteCore = fetchurl {
|
FerriteCore = fetchurl {
|
||||||
|
|||||||
@@ -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