repositories

NixDaemon

NixOS pentest workstation as one flake — IceBreaker's successor

clonegit clone https://git.daemon-sec.xyz/NixDaemon.git
MUSIC.mdMarkdown64 lines2.9 KiBrendered raw download
# Music: MPD + rmpc + cava

Terminal music player setup, Rosé Pine themed. Launch with `rmpc` in any
terminal (album art needs sixel — foot has it). MPD and mpd-mpris run as
enabled user services, so playback and media keys work without rmpc open.
Repo payload: `music/` — restore with `scripts/install-music.sh`, push live
tweaks back with `install-music.sh sync`, inspect drift with `install-music.sh diff`.

## Architecture

```
~/Music (FLAC)                        ┌─> PipeWire output — native rate,
  └─> MPD (user service) ────────────┤    no forced format, no resampling
        unix socket + 127.0.0.1:6600 └─> FIFO /run/user/1000/mpd/fifo
        (NEVER mpd.socket: binds          (44100:16:2, feeds cava in rmpc,
         *:6600 on the LAN)                independent of playback quality)
```

- `~/.config/mpd/mpd.conf` — library `~/Music`, data `~/.local/share/mpd/`,
  `auto_update` on (SpotiFLAC drops keep appearing without manual updates).
- systemd drop-in sets `RuntimeDirectory=mpd` for the socket + FIFO.
- `~/.config/pipewire/pipewire.conf.d/10-sample-rates.conf` — allowed-rates
  44.1k–192k so 44.1 kHz FLAC is not resampled to the 48 kHz default.
- MPD volume is software-mixed: below 100% there is one gain stage; keep 100%
  for bit-perfect and attenuate downstream.

## Lyrics

- `lyrics_dir: ~/.local/share/rmpc/lyrics`, matched by `[ar:]`/`[ti:]` tags,
  **not** filename (SpotiFLAC puts `.lrc` sidecars in different dirs than the
  `.flac`). Existing sidecars live in `lyrics/imported/`.
- `~/.config/rmpc/scripts/fetch-lyrics` runs on every song change: queries
  LRCLIB for synced lyrics, writes tagged UTF-8 `.lrc`, hot-indexes it via
  `rmpc remote indexlrc`, negative-caches misses for 14 days in
  `~/.cache/rmpc-lyrics/` (log: `fetch.log` there).

## Key bindings (rmpc)

| Binding | Action |
|---|---|
| `1`–`9`, `0` | Tabs: Queue, Now Playing, Directories, Artists, Album Artists, Albums, Genre, Playlists, Search, Lyrics |
| `L` | Lyrics tab |
| `p` | Play/pause · `s` stop |
| `>` / `<` | Next / previous track |
| `f` / `b` | Seek forward / back |
| `.` / `,` | Volume up / down |
| `j/k/h/l` | Navigate (vim) · `Enter` play/confirm |
| `/` | Search · `n`/`N` next/prev result |
| `a` / `A` | Add song / add all |
| `z x c v` | Repeat · random · consume · single |
| `X` | Shuffle queue · `C` jump to current |
| `C-u` | Update MPD library (also automatic) |
| `?` | Help · `q` quit |

## Maintenance

| Task | Command |
|---|---|
| Launch | `rmpc` |
| Update library | `rmpc update` or `C-u` (auto_update usually beats you to it) |
| MPD logs | `journalctl --user -u mpd` |
| Lyrics index debug | `rmpc lyricsindex` |
| Re-import SpotiFLAC `.lrc` sidecars | copy into `~/.local/share/rmpc/lyrics/imported/` (any filename — tags do the matching) |
| Theme | `theme:` in `~/.config/rmpc/config.ron` (`rose-pine`, or `daemon` navy) |