🚀 make arkenfox optional
This commit is contained in:
parent
4baf4307b8
commit
e427f3cd56
2 changed files with 56 additions and 50 deletions
|
|
@ -17,30 +17,33 @@ in
|
|||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
overrides = mkOption {
|
||||
default = { };
|
||||
type = with types; attrsOf (oneOf [ str bool int ]);
|
||||
apply = overrides: lib.concatStrings (
|
||||
lib.mapAttrsToList
|
||||
(
|
||||
name: value: ''
|
||||
user_pref("${name}", ${builtins.toJSON value});
|
||||
''
|
||||
)
|
||||
overrides
|
||||
);
|
||||
arkenfox = {
|
||||
enable = mkEnableOption "arkenfox";
|
||||
overrides = mkOption {
|
||||
default = { };
|
||||
type = with types; attrsOf (oneOf [ str bool int ]);
|
||||
apply = overrides: concatStrings (
|
||||
mapAttrsToList
|
||||
(
|
||||
name: value: ''
|
||||
user_pref("${name}", ${builtins.toJSON value});
|
||||
''
|
||||
)
|
||||
overrides
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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…
Add table
Add a link
Reference in a new issue