Skip to content

Commit

Permalink
nixos: convert navidrome from docker to nixos service
Browse files Browse the repository at this point in the history
  • Loading branch information
claha committed Sep 20, 2024
1 parent a12d926 commit 1a2d59a
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions nixos/services/navidrome.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
{ config, pkgs, ... }:

let
navidromePort = 4533;
in
{
virtualisation.oci-containers.containers = {
navidrome = {
autoStart = true;
image = "docker.io/deluan/navidrome:0.52.5";
ports = [ "${toString navidromePort}:${toString navidromePort}" ];
environment = {
ND_SCANSCHEDULE = "1h";
};
volumes = [
"/etc/navidrome/data:/data"
"/media/music:/music:ro"
];
services.navidrome = {
enable = true;
package = pkgs.unstable.navidrome;
settings = {
Address = "0.0.0.0";
MusicFolder = "/media/music";
ScanSchedule = "@every 1h";
};
openFirewall = true;
};

systemd.timers."autorestic_backup_navidrome" = {
Expand All @@ -41,6 +34,4 @@ in
pkgs.curl
];
};

networking.firewall.allowedTCPPorts = [ navidromePort ];
}

0 comments on commit 1a2d59a

Please sign in to comment.