mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 04:53:27 +00:00
nixos/rygel: add package option
This commit is contained in:
parent
5c6590d4e6
commit
0ba194b1a4
@ -1,6 +1,12 @@
|
|||||||
# rygel service.
|
# rygel service.
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.services.gnome.rygel;
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
meta = {
|
meta = {
|
||||||
maintainers = lib.teams.gnome.members;
|
maintainers = lib.teams.gnome.members;
|
||||||
@ -18,17 +24,19 @@
|
|||||||
'';
|
'';
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
package = lib.options.mkPackageOption pkgs "rygel" { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
config = lib.mkIf config.services.gnome.rygel.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = [ pkgs.rygel ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
|
||||||
services.dbus.packages = [ pkgs.rygel ];
|
services.dbus.packages = [ cfg.package ];
|
||||||
|
|
||||||
systemd.packages = [ pkgs.rygel ];
|
systemd.packages = [ cfg.package ];
|
||||||
|
|
||||||
environment.etc."rygel.conf".source = "${pkgs.rygel}/etc/rygel.conf";
|
environment.etc."rygel.conf".source = "${cfg.package}/etc/rygel.conf";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user