diff options
Diffstat (limited to 'profiles/disableMedia.nix')
-rw-r--r-- | profiles/disableMedia.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/profiles/disableMedia.nix b/profiles/disableMedia.nix new file mode 100644 index 0000000..c09efa2 --- /dev/null +++ b/profiles/disableMedia.nix @@ -0,0 +1,30 @@ +{ config, lib, ff, ... }: with lib; { + options.features.disableMedia = mkOption { + type = types.bool; + default = false; + description = '' + This assumes a deployment where video consumption does not occur often. + It disables DRM and other encrypted media, as well as autoplay. + ''; + }; + + config.policies = lib.mkIf config.features.disableMedia { + Preferences = ff.flattenAttrs { + media = { + eme.enabled = false; + gmp-gmpopenh264 = { + enabled = false; + autoupdate = false; + }; + gmp-widevinecdm.enabled = false; + peerconnection.enabled = false; + + autoplay = { + default = 1; + enabled.user-gestures-needed = true; + allow-muted = false; + }; + }; + }; + }; +} |