mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 16:57:55 +00:00
Gabriel Arazas
0760acb676
Now we're going beyond these structuring as we might have to accomodate non-system configurations like Nixvim.
31 lines
652 B
Nix
31 lines
652 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
hostCfg = config.hosts.ni;
|
|
cfg = hostCfg.setups.music;
|
|
in
|
|
{
|
|
options.hosts.ni.setups.music.enable =
|
|
lib.mkEnableOption "music streaming and organizing setup";
|
|
|
|
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;
|
|
};
|
|
};
|
|
};
|
|
}
|