refactor(hm): make sure nothing is added without setting enable
All checks were successful
Discord / discord commits (push) Has been skipped

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

View file

@ -2,9 +2,8 @@
TODO: add directory structure info and enforce it
- [x] every root folder in the repo represents a flake output except inputs
- [] every root folder only has an optional `default.nix` and subfolders for each
of its attrs
- [] in a subfolder, there should always be a `default.nix`
- [x] every root folder only has an optional `default.nix` and subfolders for each
of its attrs
- [] if there is non nix code, it will be in a `config` folder
- [] redo docs
- [] every module should not do anything if imported

View file

@ -87,6 +87,8 @@
promptMainColor = "purple";
};
firefox.enableCustomConf = true;
neovim = {
enable = true;
user = mainUser;

View file

@ -106,6 +106,8 @@
promptMainColor = "purple";
};
firefox.enableCustomConf = true;
neovim = {
enable = true;
user = mainUser;

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";