os/hosts/cox/owntone.nix
Hendrik Sokolowski 6c7d9704bd
All checks were successful
continuous-integration/drone/push Build is passing
latest changes
2023-11-11 01:24:25 +01:00

38 lines
726 B
Nix

{ config, ... }:
let
owntoneConfigDir = "/opt/media/config/owntone";
owntoneMusicDir = "/opt/media/media";
in
{
networking.firewall.allowedTCPPorts = [
3688 # websocket
3689 # http
6600 # mpd
13988 # airplay
13989 # airplay
];
systemd.services."podman-owntone".unitConfig.RequiresMountsFor = [
owntoneConfigDir
owntoneMusicDir
];
virtualisation.oci-containers.containers."owntone" = {
image = "linuxserver/daapd";
autoStart = true;
extraOptions = ["--network=host"];
environment = {
PUID = "1000";
PGID = "1000";
TZ = "Europe/Berlin";
};
volumes = [
"${owntoneConfigDir}:/config"
"${owntoneMusicDir}:/music"
];
};
}