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

View file

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

View file

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

View file

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