mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-02 19:49:18 +00:00
Allow the Google Chrome browser modules to manage Chrome Web Store extensions on Darwin while keeping Linux explicit via assertions, since Home Manager cannot write Chrome's system-managed extension directories there. Add focused regression tests for the Linux and Darwin branches, update the existing google-chrome coverage, and add a news entry.
32 lines
872 B
Nix
32 lines
872 B
Nix
{ config, ... }:
|
|
{
|
|
programs.google-chrome = {
|
|
enable = true;
|
|
package = config.lib.test.mkStubPackage {
|
|
name = "google-chrome";
|
|
};
|
|
extensions = [
|
|
{
|
|
id = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
|
}
|
|
];
|
|
};
|
|
|
|
programs.chromium = {
|
|
enable = true;
|
|
package = config.lib.test.mkStubPackage {
|
|
name = "google-chrome-dev";
|
|
};
|
|
extensions = [
|
|
{
|
|
id = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
|
|
}
|
|
];
|
|
};
|
|
|
|
test.asserts.assertions.expected = [
|
|
"Cannot set `extensions` for `google-chrome-dev` on Linux. Google Chrome only loads external extensions from system-managed directories, which Home Manager does not manage."
|
|
"Cannot set `extensions` for `google-chrome` on Linux. Google Chrome only loads external extensions from system-managed directories, which Home Manager does not manage."
|
|
];
|
|
}
|