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