From e80485018c07df195827347e7de0e5712d36775f Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 15 May 2021 21:28:10 +0200 Subject: [PATCH] home: firefox: add ff2mpv This allows watching videos using mpv via a simple button. --- home/firefox/default.nix | 9 +++++++++ home/firefox/firefox.nix | 12 ++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/home/firefox/default.nix b/home/firefox/default.nix index fd7d5ba..601644b 100644 --- a/home/firefox/default.nix +++ b/home/firefox/default.nix @@ -11,6 +11,15 @@ default = config.my.home.firefox.enable; }; }; + + ff2mpv = { + enable = mkOption { + type = types.bool; + description = "ff2mpv configuration"; + example = false; + default = config.my.home.mpv.enable; + }; + }; }; imports = [ diff --git a/home/firefox/firefox.nix b/home/firefox/firefox.nix index 68a8337..d5ecd53 100644 --- a/home/firefox/firefox.nix +++ b/home/firefox/firefox.nix @@ -10,6 +10,11 @@ in cfg = { enableTridactylNative = cfg.tridactyl.enable; }; + + extraNativeMessagingHosts = with pkgs; ([ ] + # Watch videos using mpv + ++ lib.optional cfg.ff2mpv.enable ambroisie.ff2mpv-go + ); }; profiles = { @@ -35,13 +40,16 @@ in }; }; - extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + extensions = with pkgs.nur.repos.rycee.firefox-addons; ([ bitwarden form-history-control https-everywhere i-dont-care-about-cookies reddit-enhancement-suite ublock-origin - ] ++ lib.optional (cfg.tridactyl.enable) tridactyl; + ] + ++ lib.optional (cfg.tridactyl.enable) tridactyl + ++ lib.optional (cfg.ff2mpv.enable) ff2mpv + ); }; }