{ 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" ]; }; }