nix

configuration files that power my machines
Log | Files | Refs | README | LICENSE

commit 0b03524be1ad708ced268496a7e69941b8ad9437
parent 912ef7fbc4e535ba833d2375c25d9c4d415c5b58
Author: mtmn <miro@haravara.org>
Date:   Fri, 10 Apr 2026 05:56:09 +0200

hosts/void/overlays/bin/amen-or-not

Diffstat:
Ahosts/void/overlays/bin/amen-or-not | 22++++++++++++++++++++++
1 file changed, 22 insertions(+), 0 deletions(-)

diff --git a/hosts/void/overlays/bin/amen-or-not b/hosts/void/overlays/bin/amen-or-not @@ -0,0 +1,22 @@ +#!/bin/bash + +MODE="remote" + +case "$MODE" in +remote) + export MPD_PASS="$(pass show saturn/mpd-pass)" + export MPD_HOST="$MPD_PASS@$(pass show saturn/mpd-url)" + export MPD_PORT="$(pass show saturn/mpd-port)" + ;; +local) + export MPD_HOST=127.0.0.1 + export MPD_PORT=6695 + ;; +*) + echo "Unknown MPD_MODE: $MODE (use local or remote)" >&2 + exit 1 + ;; +esac + +echo "MPD_HOST=$MPD_HOST" +echo "MPD_PORT=$MPD_PORT"