17 dataDir = "/var/lib/squeezelite";
18 cfg = config.services.squeezelite;
19 pkg = if cfg.pulseAudio then pkgs.squeezelite-pulse else pkgs.squeezelite;
20 bin = "${pkg}/bin/${pkg.pname}";
27 options.services.squeezelite = {
28 enable = mkEnableOption "Squeezelite, a software Squeezebox emulator";
30 pulseAudio = mkEnableOption "pulseaudio support";
32 extraArguments = mkOption {
36 Additional command line arguments to pass to Squeezelite.
43 config = mkIf cfg.enable {
44 systemd.services.squeezelite = {
45 wantedBy = [ "multi-user.target" ];
50 description = "Software Squeezebox emulator";
53 ExecStart = "${bin} -N ${dataDir}/player-name ${cfg.extraArguments}";
54 StateDirectory = builtins.baseNameOf dataDir;
55 SupplementaryGroups = "audio";