refactor(hm): make sure nothing is added without setting enable
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
d2625fa290
commit
d53b9f1e62
4 changed files with 17 additions and 4 deletions
|
@ -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
|
||||
- [x] 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`
|
||||
- [] if there is non nix code, it will be in a `config` folder
|
||||
- [] redo docs
|
||||
- [] every module should not do anything if imported
|
||||
|
|
|
@ -87,6 +87,8 @@
|
|||
promptMainColor = "purple";
|
||||
};
|
||||
|
||||
firefox.enableCustomConf = true;
|
||||
|
||||
neovim = {
|
||||
enable = true;
|
||||
user = mainUser;
|
||||
|
|
|
@ -106,6 +106,8 @@
|
|||
promptMainColor = "purple";
|
||||
};
|
||||
|
||||
firefox.enableCustomConf = true;
|
||||
|
||||
neovim = {
|
||||
enable = true;
|
||||
user = mainUser;
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue