Loading nixos/modules/services/networking/shairport-sync.nix +38 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,8 @@ with lib; let cfg = config.services.shairport-sync; configFormat = pkgs.formats.libconfig {}; configFile = configFormat.generate "shairport-sync.conf" cfg.settings; in { Loading @@ -29,6 +30,38 @@ in package = lib.options.mkPackageOption pkgs "shairport-sync" { }; settings = mkOption { type = configFormat.type; default = {}; example = { general = { name = "NixOS Shairport"; output_backend = "pw"; }; metadata = { enabled = "yes"; include_cover_art = "yes"; cover_art_cache_directory = "/tmp/shairport-sync/.cache/coverart"; pipe_name = "/tmp/shairport-sync-metadata"; pipe_timeout = 5000; }; mqtt = { enabled = "yes"; hostname = "mqtt.server.domain.example"; port = 1883; publish_parsed = "yes"; publish_cover = "yes"; }; }; description = '' Configuration options for Shairport-Sync. See the example [shairport-sync.conf][example-file] for possible options. [example-file]: https://github.com/mikebrady/shairport-sync/blob/master/scripts/shairport-sync.conf ''; }; arguments = mkOption { type = types.str; default = "-v -o pa"; Loading Loading @@ -108,8 +141,10 @@ in }; }; environment.systemPackages = [ cfg.package ]; environment = { systemPackages = [ cfg.package ]; etc."shairport-sync.conf".source = configFile; }; }; } Loading
nixos/modules/services/networking/shairport-sync.nix +38 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,8 @@ with lib; let cfg = config.services.shairport-sync; configFormat = pkgs.formats.libconfig {}; configFile = configFormat.generate "shairport-sync.conf" cfg.settings; in { Loading @@ -29,6 +30,38 @@ in package = lib.options.mkPackageOption pkgs "shairport-sync" { }; settings = mkOption { type = configFormat.type; default = {}; example = { general = { name = "NixOS Shairport"; output_backend = "pw"; }; metadata = { enabled = "yes"; include_cover_art = "yes"; cover_art_cache_directory = "/tmp/shairport-sync/.cache/coverart"; pipe_name = "/tmp/shairport-sync-metadata"; pipe_timeout = 5000; }; mqtt = { enabled = "yes"; hostname = "mqtt.server.domain.example"; port = 1883; publish_parsed = "yes"; publish_cover = "yes"; }; }; description = '' Configuration options for Shairport-Sync. See the example [shairport-sync.conf][example-file] for possible options. [example-file]: https://github.com/mikebrady/shairport-sync/blob/master/scripts/shairport-sync.conf ''; }; arguments = mkOption { type = types.str; default = "-v -o pa"; Loading Loading @@ -108,8 +141,10 @@ in }; }; environment.systemPackages = [ cfg.package ]; environment = { systemPackages = [ cfg.package ]; etc."shairport-sync.conf".source = configFile; }; }; }