diff options
| author | Franck Cuny <franck@fcuny.net> | 2026-01-26 18:57:39 -0800 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2026-01-26 18:57:39 -0800 |
| commit | 88d1bcd7863b0f4a10ca3cb873db0d8b3fb09a19 (patch) | |
| tree | 0a3597bc60ea35a4986e2a014a9b1b8df390b410 | |
| parent | add nas public key to ssh know hosts (diff) | |
| download | infra-88d1bcd7863b0f4a10ca3cb873db0d8b3fb09a19.tar.gz | |
run mpd on the framebox
| -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; + } + ]; + }; +} |
