1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-01 00:39:45 +01:00

chromium: fix preinstallation of crx files

We currently check `isPath` and `isString` on crxPath and version
respectively, which is

1. pointless because the module system already does such checks, and
2. wrong because isPath means path literal; a derivation therefore is
   not a path.
This commit is contained in:
jD91mZM2 2021-01-18 23:15:34 +01:00 committed by Robert Helgesson
parent b0c8727286
commit c33b1777b6
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -116,15 +116,15 @@ let
"${config.xdg.configHome}/${browser}";
extensionJson = ext:
assert ext.crxPath != null -> ext.version != null;
with builtins; {
name = "${configDir}/External Extensions/${ext.id}.json";
value.text = toJSON
(if (isPath ext.crxPath && isString ext.version) then {
external_crx = ext.crxPath;
external_version = ext.version;
} else {
external_update_url = ext.updateUrl;
});
value.text = toJSON (if ext.crxPath != null then {
external_crx = ext.crxPath;
external_version = ext.version;
} else {
external_update_url = ext.updateUrl;
});
};
in mkIf cfg.enable {