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