refactor(hm): make sure nothing is added without setting enable

This commit is contained in:
matt1432 2025-01-04 22:48:39 -05:00
parent d2625fa290
commit d53b9f1e62
4 changed files with 17 additions and 4 deletions
homeManagerModules/firefox

View file

@ -1,16 +1,26 @@
self: {
config,
lib,
pkgs,
...
}: let
inherit (self.scopedPackages.${pkgs.system}) firefoxAddons;
inherit (lib) mkIf mkOption types;
cfg = config.programs.firefox;
rounding = (config.wayland.windowManager.hyprland.settings.decoration.rounding or 2) - 2;
firefox-gx = pkgs.callPackage ./firefox-gx {inherit self;};
custom-css = pkgs.callPackage ./custom-css {inherit rounding firefox-gx;};
in {
config = {
options.programs.firefox.enableCustomConf = mkOption {
type = types.bool;
default = false;
};
config = mkIf cfg.enableCustomConf {
home.file = {
".mozilla/firefox/matt/chrome/userContent.css".source = "${firefox-gx}/chrome/userContent.css";
".mozilla/firefox/matt/chrome/components".source = "${firefox-gx}/chrome/components";