merge music-server and desktop repo

This commit is contained in:
2026-07-30 00:30:09 +02:00
17 changed files with 0 additions and 708 deletions
-8
View File
@@ -1,8 +0,0 @@
# ---> Nix
# Ignore build outputs from performing a nix-build or `nix build` command
result
result-*
# Ignore automatically generated direnv output
.direnv
-3
View File
@@ -1,3 +0,0 @@
# music-server
nixos config for my music homeserver
-87
View File
@@ -1,87 +0,0 @@
{
pkgs,
...
}:
{
imports = [
./hardware-configuration.nix
./packages.nix
./modules
];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
fileSystems."/media/music" = {
device = "/dev/disk/by-uuid/8e6ae06e-a4b5-4ac8-ad15-cb288b14715f";
fsType = "ext4";
};
fileSystems."/home/user/backup" = {
device = "/dev/disk/by-uuid/db7d96f1-5c72-42dc-abc1-00de9b73f017";
fsType = "ext4";
};
networking.hostId = "6054e036";
networking.hostName = "nixos-music";
networking.networkmanager.enable = true;
networking.firewall.enable = false;
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "de";
};
programs.fish.enable = true;
users.users.user = {
isNormalUser = true;
description = "user";
uid = 1000;
extraGroups = [
"networkmanager"
"wheel"
"docker"
];
shell = pkgs.fish;
};
services.tailscale.enable = true;
services.rsync.enable = true;
programs.nix-ld.enable = true;
programs.nh.enable = true;
programs.neovim.enable = true;
programs.tmux.enable = true;
programs.bat.enable = true;
programs.git = {
enable = true;
config = {
user = {
name = "KeksNino";
email = "KeksNino@proton.me";
};
init = {
defaultBranch = "main";
};
push = {
autoSetupRemote = true;
};
};
};
services.openssh = {
enable = true;
openFirewall = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
};
system.stateVersion = "26.05";
}
Generated
-81
View File
@@ -1,81 +0,0 @@
{
"nodes": {
"bcdl-free": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1785350661,
"narHash": "sha256-IEFWX9+OQkvYry8ODdVmRZkD8K0WiPVLRAo/GItzBJs=",
"ref": "refs/heads/main",
"rev": "8b9fa0ef8047861ca1b8959afdf8079b39a64d53",
"revCount": 74,
"type": "git",
"url": "https://git.pizzasucht.net/KeksNino/free-bandcamp-downloader"
},
"original": {
"type": "git",
"url": "https://git.pizzasucht.net/KeksNino/free-bandcamp-downloader"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1785261905,
"narHash": "sha256-SnFtgFiAhlwOlaEuFZoVYjOxqfYoiLtHJoFGuyEgHUE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "10174c0fe02099dbdee2bf918f1a92659fc9217f",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1785350628,
"narHash": "sha256-cKsVksg+g/496l5KI+tRqHlSqBPDYjmb/eXp6KOTx8Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "539c035b9f05682bd9a92c960b1ea31144886d71",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1785263066,
"narHash": "sha256-2/9cWGQ9EvI3XVaN6VeJMJogUhujWI/sM5gruSSjqnc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "818edbf5865fc34ace892ea72b2abeed4d2fc2fa",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"bcdl-free": "bcdl-free",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2"
}
}
},
"root": "root",
"version": 7
}
-42
View File
@@ -1,42 +0,0 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
bcdl-free.url = "git+https://git.pizzasucht.net/KeksNino/free-bandcamp-downloader";
};
outputs =
{
self,
nixpkgs,
home-manager,
bcdl-free,
}@inputs:
let
system = "x86_64-linux";
in
{
nixosConfigurations.nixos-music = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = inputs;
modules = [
./configuration.nix
./hardware-configuration.nix
home-manager.nixosModules.home-manager
{
environment.systemPackages = [ bcdl-free.packages.${system}.default ];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.user = import ./home-manager/home.nix;
home-manager.backupFileExtension = "backup";
}
];
};
};
}
-61
View File
@@ -1,61 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"uas"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "zpool/root";
fsType = "zfs";
};
fileSystems."/var" = {
device = "zpool/var";
fsType = "zfs";
};
fileSystems."/nix" = {
device = "zpool/nix";
fsType = "zfs";
};
fileSystems."/home" = {
device = "zpool/home";
fsType = "zfs";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/FCFD-4472";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
-52
View File
@@ -1,52 +0,0 @@
{
programs.beets.enable = true;
# programs.beets.package = pkgs.beets.override {
# pluginOverrides = {
# filetote = {
# enable = true;
# };
# };
# };
programs.beets.settings = {
directory = "/home/user/Music/Tracks";
plugins = [
"fetchart"
"badfiles"
"edit"
"fish"
"hook"
];
import = {
copy = false;
move = true;
autotag = false;
write = true;
};
paths = {
default = "$albumartist/$album/$track. $artist - $title";
};
fetchart = {
auto = true;
sources = [ "filesystem" ];
};
badfiles = {
check_on_import = true;
};
hook = {
hooks = [
{
event = "item_imported";
command = "echo test";
}
];
};
};
}
-61
View File
@@ -1,61 +0,0 @@
{ pkgs, config, ... }:
{
imports = [
./beets.nix
];
home.username = "user";
home.homeDirectory = "/home/user";
programs.yazi.enable = true;
programs.yazi.enableFishIntegration = true;
programs.fzf.enable = true;
programs.fzf.enableFishIntegration = true;
programs.zoxide.enable = true;
programs.zoxide.enableFishIntegration = true;
programs.gcc.enable = true;
programs.eza = {
enable = true;
enableFishIntegration = true;
git = true;
icons = "always";
extraOptions = [
"-1"
];
};
programs.btop.enable = true;
programs.fastfetch.enable = true;
programs.fd.enable = true;
home.sessionVariables = {
EDITOR = "nvim";
};
programs.fish = {
enable = true;
interactiveShellInit = ''
set -g fish_key_bindings fish_hybrid_key_bindings
set fish_greeting
'';
shellAliases = {
ls = "eza -al --no-time --no-user --no-permissions --no-filesize";
ll = "eza -la";
cat = "bat";
cd = "z";
cp = "cp -v";
ff = "fastfetch";
grep = "grep -i";
mv = "mv -v";
n = "nvim";
r = "rsync -avh --info=progress2";
rm = "gomi";
};
};
home.stateVersion = "26.05";
}
-11
View File
@@ -1,11 +0,0 @@
{
imports = [
./slskd.nix
./navidrome.nix
./nfs.nix
./scripts.nix
./services.nix
./smb.nix
./zfs.nix
];
}
-20
View File
@@ -1,20 +0,0 @@
{ lib, ... }:
{
services.navidrome = {
enable = true;
user = "user";
settings = {
MusicFolder = "/home/user/Music";
PlaylistsPath = "Playlists";
Address = "0.0.0.0";
ScanSchedule = "@every 24h";
EnableInsightsCollector = false;
Scanner.PurgeMissing = "always";
};
};
systemd.services.navidrome.serviceConfig = {
ProtectHome = lib.mkForce false;
};
}
-15
View File
@@ -1,15 +0,0 @@
{
services.nfs.server = {
enable = true;
exports = {
"/media/music" = {
"192.168.132.0/24" = [
"rw"
"async"
"no_subtree_check"
"fsid=1"
];
};
};
};
}
-25
View File
@@ -1,25 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = [
(pkgs.writeShellScriptBin "scan" ''
find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.ogg" -o -iname "*.wav" -o -iname "*.aiff" \) -print0 |
xargs -0 -P"$(nproc)" -I{} bash -c '
if ffprobe -v quiet -show_entries format_tags \
-of default=nw=1:nk=1 "$1" 2>/dev/null |
grep -q -E "Visit https?://[^ ]+"; then
echo "Match found in: $1"
fi
' _ {} | sort
'')
(pkgs.writeShellScriptBin "2scan" ''
find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.ogg" -o -iname "*.wav" -o -iname "*.aiff" \) -print0 |
xargs -0 -P"$(nproc)" -I{} sh -c '
if ! ffprobe -v quiet -show_entries format_tags \
-of default=nw=1:nk=1 "$1" 2>/dev/null |
grep -q -E "Visit https?://[^ ]+"; then
echo "Match found in: $1"
fi
' _ {}
'')
];
}
-31
View File
@@ -1,31 +0,0 @@
{ pkgs, ... }:
{
systemd.timers."bc-wishlist-scraper" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "daily";
Unit = "bc-wishlist-scraper.service";
};
};
systemd.services."bc-wishlist-scraper" = {
script = ''
${pkgs.bash}/bin/bash /home/user/bc-wishlist-scraper/run.sh
'';
};
systemd.user.timers."scdl" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "daily";
Unit = "scdl.service";
};
};
systemd.user.services."scdl" = {
script = ''
cd ~/Music/scdl && ${pkgs.scdl}/bin/scdl me -f -c --download-archive archive.txt
'';
};
}
-118
View File
@@ -1,118 +0,0 @@
{ 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;
};
feature = {
swagger = true;
};
integrations = {
webhooks = {
discord_relay = {
call = {
url = "http://localhost:5001/slskd_webhook";
};
on = [ "UploadFileComplete" ];
timeout = 5000;
retry = {
attempts = 3;
};
};
};
};
retention = {
files = {
incomplete = 20160;
};
};
};
};
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
'';
};
};
}
-24
View File
@@ -1,24 +0,0 @@
{
services.samba = {
enable = true;
openFirewall = true;
settings = {
global = {
"workgroup" = "WORKGROUP";
"server string" = "smbnix";
"security" = "user";
"interfaces" = "lo eno1 tailscale0";
"hosts allow" = "192.168.132.0/24 100.64.0.0/10 127.0.0.1 localhost";
"hosts deny" = "0.0.0.0/0";
"guest account" = "nobody";
};
"Music" = {
"path" = "/media/music";
"browseable" = "yes";
"read only" = "no";
"guest ok" = "no";
"valid users" = "user";
};
};
};
}
-39
View File
@@ -1,39 +0,0 @@
{
boot.loader.grub = {
enable = true;
zfsSupport = true;
efiSupport = true;
efiInstallAsRemovable = true;
mirroredBoots = [
{
devices = [ "nodev" ];
path = "/boot";
}
];
};
fileSystems."/" = {
device = "zpool/root";
fsType = "zfs";
};
fileSystems."/nix" = {
device = "zpool/nix";
fsType = "zfs";
};
fileSystems."/var" = {
device = "zpool/var";
fsType = "zfs";
};
fileSystems."/home" = {
device = "zpool/home";
fsType = "zfs";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/FCFD-4472";
fsType = "vfat";
};
boot.zfs.forceImportRoot = false;
services.zfs.autoScrub.enable = true;
swapDevices = [ ];
}
-30
View File
@@ -1,30 +0,0 @@
{ pkgs, ... }: {
environment.systemPackages = (
with pkgs;
[
wget
nixfmt
tree-sitter
lsof
exiftool
trash-cli
ffmpeg
unzip
scdl
aria2
nodejs
gomi
bun
croc
mp3val
flac
(python314.withPackages (
ps: with ps; [
requests
python-dotenv
]
))
]
);
}