🚀 make arkenfox optional
This commit is contained in:
parent
4baf4307b8
commit
e427f3cd56
2 changed files with 56 additions and 50 deletions
|
@ -24,6 +24,8 @@ with lib; {
|
|||
code.enable = true;
|
||||
emacs.enable = true;
|
||||
firefox = {
|
||||
enable = true;
|
||||
arkenfox = {
|
||||
enable = true;
|
||||
overrides = {
|
||||
## arkenfox overrides
|
||||
|
@ -70,6 +72,7 @@ with lib; {
|
|||
"toolkit.scrollbox.verticalScrollDistance" = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
git.signing = true;
|
||||
gpg.enable = true;
|
||||
hub.enable = true;
|
||||
|
|
|
@ -17,11 +17,13 @@ in
|
|||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
arkenfox = {
|
||||
enable = mkEnableOption "arkenfox";
|
||||
overrides = mkOption {
|
||||
default = { };
|
||||
type = with types; attrsOf (oneOf [ str bool int ]);
|
||||
apply = overrides: lib.concatStrings (
|
||||
lib.mapAttrsToList
|
||||
apply = overrides: concatStrings (
|
||||
mapAttrsToList
|
||||
(
|
||||
name: value: ''
|
||||
user_pref("${name}", ${builtins.toJSON value});
|
||||
|
@ -31,16 +33,17 @@ in
|
|||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz.programs.firefox = {
|
||||
enable = true;
|
||||
profiles."default".extraConfig = ''
|
||||
profiles."default".extraConfig = mkIf cfg.arkenfox.enable ''
|
||||
// Arkenfox user.js
|
||||
${arkenfox}
|
||||
|
||||
// Overrides
|
||||
${cfg.overrides}
|
||||
${cfg.arkenfox.overrides}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue