From 8dfccff618c457e90aaca7050ef21dd080829477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 8 Jul 2025 08:43:14 +0200 Subject: [PATCH] vanadium: enforce firefox as default program for text/html --- nix/homeModules/common/firefox.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/nix/homeModules/common/firefox.nix b/nix/homeModules/common/firefox.nix index 81e7b1bf..03c7b8cd 100644 --- a/nix/homeModules/common/firefox.nix +++ b/nix/homeModules/common/firefox.nix @@ -1,5 +1,12 @@ -{pkgs, ...}: let +{ + pkgs, + config, + lib, + ... +}: let inherit (pkgs) nur; + + cfg = config.programs.firefox; in { programs.firefox = { # https://mozilla.github.io/policy-templates @@ -87,4 +94,14 @@ in { ]; }; }; + + xdg.mimeApps = lib.mkIf cfg.enable { + enable = true; + associations.added = { + "text/html" = ["firefox.desktop"]; + }; + defaultApplications = { + "text/html" = ["firefox.desktop"]; + }; + }; }