-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for chromium browsers #447
Conversation
8439bbf
to
5f7a99e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't usually do this, but given that this still one port (though used across multiple programs) I think it would be better to combine these modules into just one "chrome.nix" that defines multiple options. This will let use reuse the extensions IDs across all of them
Could look something like this
{ catppuccinLib }:
{ config, lib, ... }:
let
cfg = config.catppuccin;
extensionIds = {
frappe = "olhelnoplefjdmncknfphenjclimckaf";
latte = "jhjnalhegpceacdhbplhnakmkdliaddd";
macchiato = "cmpdlhmnmjhihmcfnigoememnffkimlk";
mocha = "bkkmolkhemgaeaeggcmfbghljjjoofoh";
};
in
{
options.catppuccin = lib.genAttrs [ "brave" "chromium" "vivaldi" ] (
name: catppuccinLib.mkCatppuccinOption { inherit name; }
);
config = lib.mkMerge [
(lib.mkIf cfg.brave.enable {
programs.brave.extensions = [ { id = identifiers.${cfg.brave.flavor}; } ];
})
(lib.mkIf cfg.chromium.enable {
programs.chromium.extensions = [ { id = identifiers.${cfg.chromium.flavor}; } ];
})
(lib.mkIf cfg.vivaldi.enable {
programs.vivaldi.extensions = [ { id = identifiers.${cfg.vivaldi.flavor}; } ];
})
];
}
5f7a99e
to
7ecc239
Compare
7ecc239
to
e37da02
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Module LGTM
Last thing to do would be enabling Chromium in modules/tests/home.nix
to have this tested in CI, and then probably disabling it for macOS in modules/tests/darwin.nix
with lib.mkVMOverride false
(since IIRC Chromium in Nixpkgs doesn't support Mac)
e37da02
to
7f0119c
Compare
Enabled chromium, vivaldi and brave in tests. Brave also works on darwin, so just needed to disable vivaldi and chromium EDIT: Removed vivaldi since it is unfree, and unfree packages aren't allowed in the tests currently. |
7f0119c
to
7bb7c0e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
catppuccin/chrome