2020-04-24 23:36:52 +00:00
|
|
|
# rygel service.
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
meta = {
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
imports = [
|
|
|
|
# Added 2021-05-07
|
|
|
|
(mkRenamedOptionModule
|
|
|
|
[ "services" "gnome3" "rygel" "enable" ]
|
|
|
|
[ "services" "gnome" "rygel" "enable" ]
|
|
|
|
)
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
###### interface
|
|
|
|
options = {
|
2021-05-20 23:08:51 +00:00
|
|
|
services.gnome.rygel = {
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
2021-05-20 23:08:51 +00:00
|
|
|
config = mkIf config.services.gnome.rygel.enable {
|
|
|
|
environment.systemPackages = [ pkgs.gnome.rygel ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
services.dbus.packages = [ pkgs.gnome.rygel ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
systemd.packages = [ pkgs.gnome.rygel ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
environment.etc."rygel.conf".source = "${pkgs.gnome.rygel}/etc/rygel.conf";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|