From ef08ee830bb3c2b48239dd084ec33fc0b226c4d0 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sat, 7 Sep 2024 14:06:31 -0500 Subject: [PATCH] refactor(hm/price): extract firefox to its own conf directory --- users/price/conf/firefox/default.nix | 38 ++++++++++++++++++++++++++++ users/price/home.nix | 33 +----------------------- 2 files changed, 39 insertions(+), 32 deletions(-) create mode 100644 users/price/conf/firefox/default.nix diff --git a/users/price/conf/firefox/default.nix b/users/price/conf/firefox/default.nix new file mode 100644 index 00000000..38f7d617 --- /dev/null +++ b/users/price/conf/firefox/default.nix @@ -0,0 +1,38 @@ +{ + pkgs, + lib, + config, + ... +}: +{ + xdg.mimeApps = lib.mkIf (config.programs.firefox.enable) { + associations.added = { + "x-scheme-handler/http" = [ "firefox-developer-edition.desktop" ]; + "x-scheme-handler/https" = [ "firefox-developer-edition.desktop" ]; + "x-scheme-handler/chrome" = [ "firefox-developer-edition.desktop" ]; + "text/html" = [ "firefox-developer-edition.desktop" ]; + "application/x-extension-htm" = [ "firefox-developer-edition.desktop" ]; + "application/x-extension-html" = [ "firefox-developer-edition.desktop" ]; + "application/x-extension-shtml" = [ "firefox-developer-edition.desktop" ]; + "application/xhtml+xml" = [ "firefox-developer-edition.desktop" ]; + "application/x-extension-xhtml" = [ "firefox-developer-edition.desktop" ]; + "application/x-extension-xht" = [ "firefox-developer-edition.desktop" ]; + }; + defaultApplications = { + "x-scheme-handler/http" = [ "firefox-developer-edition.desktop" ]; + "x-scheme-handler/https" = [ "firefox-developer-edition.desktop" ]; + "x-scheme-handler/chrome" = [ "firefox-developer-edition.desktop" ]; + "text/html" = [ "firefox-developer-edition.desktop" ]; + "application/x-extension-htm" = [ "firefox-developer-edition.desktop" ]; + "application/x-extension-html" = [ "firefox-developer-edition.desktop" ]; + "application/x-extension-shtml" = [ "firefox-developer-edition.desktop" ]; + "application/xhtml+xml" = [ "firefox-developer-edition.desktop" ]; + "application/x-extension-xhtml" = [ "firefox-developer-edition.desktop" ]; + "application/x-extension-xht" = [ "firefox-developer-edition.desktop" ]; + }; + }; + programs.firefox = { + enable = true; + package = pkgs.firefox-devedition-bin; + }; +} diff --git a/users/price/home.nix b/users/price/home.nix index c9cb53bc..612f2fc9 100644 --- a/users/price/home.nix +++ b/users/price/home.nix @@ -177,34 +177,7 @@ in mime.enable = true; systemDirs.data = [ "${config.home.profileDirectory}/share/" ]; cacheHome = "${config.home.homeDirectory}/.local/cache"; - mimeApps = { - enable = true; - associations.added = { - "x-scheme-handler/http" = [ "firefox-devedition.desktop" ]; - "x-scheme-handler/https" = [ "firefox-devedition.desktop" ]; - "x-scheme-handler/chrome" = [ "firefox-devedition.desktop" ]; - "text/html" = [ "firefox-devedition.desktop" ]; - "application/x-extension-htm" = [ "firefox-devedition.desktop" ]; - "application/x-extension-html" = [ "firefox-devedition.desktop" ]; - "application/x-extension-shtml" = [ "firefox-devedition.desktop" ]; - "application/xhtml+xml" = [ "firefox-devedition.desktop" ]; - "application/x-extension-xhtml" = [ "firefox-devedition.desktop" ]; - "application/x-extension-xht" = [ "firefox-devedition.desktop" ]; - }; - defaultApplications = { - "application/pdf" = [ "org.pwmt.zathura.desktop" ]; - "x-scheme-handler/http" = [ "firefox-devedition.desktop" ]; - "x-scheme-handler/https" = [ "firefox-devedition.desktop" ]; - "x-scheme-handler/chrome" = [ "firefox-devedition.desktop" ]; - "text/html" = [ "firefox-devedition.desktop" ]; - "application/x-extension-htm" = [ "firefox-devedition.desktop" ]; - "application/x-extension-html" = [ "firefox-devedition.desktop" ]; - "application/x-extension-shtml" = [ "firefox-devedition.desktop" ]; - "application/xhtml+xml" = [ "firefox-devedition.desktop" ]; - "application/x-extension-xhtml" = [ "firefox-devedition.desktop" ]; - "application/x-extension-xht" = [ "firefox-devedition.desktop" ]; - }; - }; + mimeApps.enable = true; configFile = { "hypr/hyprland.conf".enable = false; }; @@ -212,10 +185,6 @@ in programs = { wofi.enable = true; - firefox = { - enable = true; - package = pkgs.firefox-devedition-bin; - }; waybar = { enable = true; systemd.enable = true;