ctucx.git: nixfiles

ctucx' nixfiles

commit 0f3ebfe9f765f3aadc92276f52914c18722543b7
parent 306895d81dcf51500aef7b4236e7edb119b0bcfe
Author: Leah (ctucx) <git@ctu.cx>
Date: Fri, 15 Nov 2024 17:47:13 +0100

configurations/linux/programs/firefox: remove own `ff2mpv` package, use `ff2mpv-rust`
1 file changed, 3 insertions(+), 27 deletions(-)
M
configurations/linux/programs/firefox.nix
|
30
+++---------------------------
diff --git a/configurations/linux/programs/firefox.nix b/configurations/linux/programs/firefox.nix
@@ -2,30 +2,6 @@
 
 let
   cfg    = config.ctucxConfig.programs.firefox;
-  ff2mpv = pkgs.stdenv.mkDerivation {
-    name = "ff2mpv";
-    src = pkgs.fetchFromGitHub{
-      owner  = "woodruffw";
-      repo   = "ff2mpv";
-      rev    = "refs/tags/v3.9.1";
-      sha256 = "0g18wf6dlnqhypmlpzn35jk3ya1vycxd6vv4nngvcx2s30fn6rcg";
-    };
-
-    buildInputs = with pkgs; [
-      python3
-    ];
-
-    installPhase = ''
-      mkdir -p $out/bin;
-      mkdir -p $out/lib/mozilla/native-messaging-hosts;
-
-      cp $src/ff2mpv.py   $out/bin/ff2mpv;
-
-      chmod +x $out/bin/ff2mpv;
-      substitute $src/ff2mpv.json $out/lib/mozilla/native-messaging-hosts/ff2mpv.json \
-        --replace "/home/william/scripts/ff2mpv" "$out/bin/ff2mpv" \
-    '';
-  };
 
 in {
 

@@ -38,9 +14,6 @@ in {
   config = lib.mkIf cfg.enable {
     home-manager.users.leah = {
       home = {
-        file = {
-          ".mozilla/native-messaging-hosts/ff2mpv.json".source = "${ff2mpv}/lib/mozilla/native-messaging-hosts/ff2mpv.json";
-        };
         sessionVariables = {
           BROWSER = "firefox";
         };

@@ -50,6 +23,9 @@ in {
         firefox = {
           enable = true;
           package = pkgs.firefox;
+          nativeMessagingHosts = with pkgs; [
+            ff2mpv-rust
+          ];
         };
       };