diff options
Diffstat (limited to '')
| -rw-r--r-- | machines/framebox.nix | 1 | ||||
| -rw-r--r-- | profiles/media.nix | 40 |
2 files changed, 41 insertions, 0 deletions
diff --git a/machines/framebox.nix b/machines/framebox.nix index 57b9c3b..62995be 100644 --- a/machines/framebox.nix +++ b/machines/framebox.nix @@ -44,6 +44,7 @@ ../profiles/git-server.nix ../profiles/hardware/framework-desktop.nix ../profiles/home-manager.nix + ../profiles/media.nix ../profiles/miniflux.nix ../profiles/monitoring.nix ../profiles/postgresql.nix diff --git a/profiles/media.nix b/profiles/media.nix new file mode 100644 index 0000000..598eaa2 --- /dev/null +++ b/profiles/media.nix @@ -0,0 +1,40 @@ +{ config, ... }: +{ + services.mpd = { + enable = true; + network = { + listenAddress = "0.0.0.0"; + port = 6600; + }; + musicDirectory = "/data/media/music"; + extraConfig = '' + auto_update "yes" + auto_update_depth "3" + audio_output { + type "httpd" + name "HTTP Stream" + encoder "opus" + port "8000" + bitrate "128000" + format "48000:16:2" + always_on "yes" + tags "yes" + } + ''; + }; + + networking.firewall.allowedTCPPorts = [ + 6600 + 8000 + ]; + + environment.persistence."/persist/save" = { + directories = [ + { + directory = config.services.mpd.dataDir; + user = config.services.mpd.user; + group = config.services.mpd.group; + } + ]; + }; +} |
