mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
nixos/shairport-sync: add package option
This commit is contained in:
parent
5c6590d4e6
commit
697fa78c9a
@ -27,6 +27,8 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = lib.options.mkPackageOption pkgs "shairport-sync" { };
|
||||
|
||||
arguments = mkOption {
|
||||
type = types.str;
|
||||
default = "-v -o pa";
|
||||
@ -100,12 +102,12 @@ in
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
ExecStart = "${pkgs.shairport-sync}/bin/shairport-sync ${cfg.arguments}";
|
||||
ExecStart = "${lib.getExe cfg.package} ${cfg.arguments}";
|
||||
RuntimeDirectory = "shairport-sync";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.shairport-sync ];
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user