nix-config/containers/navidrome/default.nix

32 lines
716 B
Nix
Raw Normal View History

2024-11-26 21:43:36 -05:00
{ lib, ... }:
2024-11-10 17:54:08 -05:00
let
2024-11-26 21:43:36 -05:00
directory = "/opt/navidrome";
2024-11-10 17:54:08 -05:00
in
{
2024-11-26 21:43:36 -05:00
systemd.tmpfiles.rules =
map (x: "d ${x} 0755 share share - -") (lib.lists.singleton directory);
2024-11-10 17:54:08 -05:00
virtualisation.oci-containers.containers.navidrome = {
image = "deluan/navidrome:latest";
autoStart = true;
ports = [
"4533:4533"
];
volumes = [
2024-11-26 21:43:36 -05:00
"${directory}/data:/data"
2024-11-10 17:54:08 -05:00
"/lagoon/media/music:/music:ro"
];
environment = {
ND_SCANSCHEDULE = "1h";
ND_LOGLEVEL = "info";
ND_SESSIONTIMEOUT = "24h";
ND_ENABLEUSEREDITING = "false";
};
};
2024-11-26 21:43:36 -05:00
services.caddy.virtualHosts."radioactive.brownbread.net".extraConfig = ''
2024-11-10 17:54:08 -05:00
encode zstd gzip
reverse_proxy http://localhost:4533
'';
}