mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +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 {
|
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