2023-12-13 02:42:43 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
hostCfg = config.hosts.ni;
|
|
|
|
cfg = hostCfg.setups.music;
|
|
|
|
in
|
|
|
|
{
|
2023-12-15 05:27:12 +00:00
|
|
|
options.hosts.ni.setups.music.enable =
|
|
|
|
lib.mkEnableOption "music streaming and organizing setup";
|
2023-12-13 02:42:43 +00:00
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
# My portable music streaming server.
|
|
|
|
services.gonic = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
listen-addr = "localhost:4747";
|
|
|
|
cache-path = "/var/cache/gonic";
|
|
|
|
music-path = [
|
|
|
|
"/srv/music"
|
|
|
|
];
|
|
|
|
podcast-path = "/var/cache/gonic/podcasts";
|
|
|
|
|
|
|
|
jukebox-enabled = true;
|
|
|
|
|
|
|
|
scan-interval = 1;
|
|
|
|
scan-at-start-enabled = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|