-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(home-manager): add support for chromium and chromium-based brows…
…ers (#447) feat(home-manager): add support for chromium and chromium-based browsers
- Loading branch information
1 parent
2dafc41
commit c2818cb
Showing
4 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ catppuccinLib }: | ||
{ config, lib, ... }: | ||
let | ||
cfg = config.catppuccin; | ||
|
||
identifiers = { | ||
frappe = "olhelnoplefjdmncknfphenjclimckaf"; | ||
latte = "jhjnalhegpceacdhbplhnakmkdliaddd"; | ||
macchiato = "cmpdlhmnmjhihmcfnigoememnffkimlk"; | ||
mocha = "bkkmolkhemgaeaeggcmfbghljjjoofoh"; | ||
}; | ||
|
||
# Google Chrome is not supported since it does not support extensions | ||
# See nix-community/home-manager#1383 for more information. | ||
supportedBrowsers = [ | ||
"brave" | ||
"chromium" | ||
"vivaldi" | ||
]; | ||
|
||
generateConfig = | ||
browser: | ||
lib.mkIf cfg.${browser}.enable { | ||
programs.${browser}.extensions = [ { id = identifiers.${cfg.${browser}.flavor}; } ]; | ||
}; | ||
in | ||
{ | ||
options.catppuccin = lib.genAttrs supportedBrowsers ( | ||
name: catppuccinLib.mkCatppuccinOption { inherit name; } | ||
); | ||
|
||
config = lib.mkMerge (map generateConfig supportedBrowsers); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters