at master 929 B view raw
1# rygel service. 2{ 3 config, 4 lib, 5 pkgs, 6 ... 7}: 8 9let 10 11 cfg = config.services.gnome.rygel; 12 13in 14 15{ 16 meta = { 17 maintainers = lib.teams.gnome.members; 18 }; 19 20 ###### interface 21 options = { 22 services.gnome.rygel = { 23 enable = lib.mkOption { 24 default = false; 25 description = '' 26 Whether to enable Rygel UPnP Mediaserver. 27 28 You will need to also allow UPnP connections in firewall, see the following [comment](https://github.com/NixOS/nixpkgs/pull/45045#issuecomment-416030795). 29 ''; 30 type = lib.types.bool; 31 }; 32 33 package = lib.options.mkPackageOption pkgs "rygel" { }; 34 }; 35 }; 36 37 ###### implementation 38 config = lib.mkIf cfg.enable { 39 environment.systemPackages = [ cfg.package ]; 40 41 services.dbus.packages = [ cfg.package ]; 42 43 systemd.packages = [ cfg.package ]; 44 45 environment.etc."rygel.conf".source = "${cfg.package}/etc/rygel.conf"; 46 }; 47}