puter/system/abacus/navidrome.nix

29 lines
645 B
Nix
Raw Permalink Normal View History

2023-09-17 11:31:20 +00:00
{config, ...}: let
musicDir = "/srv/music";
in {
services.navidrome = {
enable = true;
settings = {
Address = "127.0.0.1";
Port = 8040;
MusicFolder = musicDir;
};
};
services.nginx.virtualHosts."music.defenestrated.systems" = {
enableACME = true;
forceSSL = true;
locations."/" = {
recommendedProxySettings = true;
proxyPass = "http://127.0.0.1:${builtins.toString config.services.navidrome.settings.Port}";
};
};
fileSystems.${musicDir} = {
device = "/dev/disk/by-label/storage";
fsType = "btrfs";
options = ["subvol=music" "compress=zstd" "noatime"];
};
}