about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/services/desktops/gnome3/rygel.nix
blob: 917a1d6541e06940071689516a1f915ead48bd5d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# rygel service.
{ config, lib, pkgs, ... }:

with lib;

{
  meta = {
    maintainers = teams.gnome.members;
  };

  ###### interface
  options = {
    services.gnome3.rygel = {
      enable = mkOption {
        default = false;
        description = ''
          Whether to enable Rygel UPnP Mediaserver.

          You will need to also allow UPnP connections in firewall, see the following <link xlink:href="https://github.com/NixOS/nixpkgs/pull/45045#issuecomment-416030795">comment</link>.
        '';
        type = types.bool;
      };
    };
  };

  ###### implementation
  config = mkIf config.services.gnome3.rygel.enable {
    environment.systemPackages = [ pkgs.gnome3.rygel ];

    services.dbus.packages = [ pkgs.gnome3.rygel ];

    systemd.packages = [ pkgs.gnome3.rygel ];

    environment.etc."rygel.conf".source = "${pkgs.gnome3.rygel}/etc/rygel.conf";
  };
}