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:
parent
b0c8727286
commit
c33b1777b6
|
@ -116,10 +116,10 @@ let
|
||||||
"${config.xdg.configHome}/${browser}";
|
"${config.xdg.configHome}/${browser}";
|
||||||
|
|
||||||
extensionJson = ext:
|
extensionJson = ext:
|
||||||
|
assert ext.crxPath != null -> ext.version != null;
|
||||||
with builtins; {
|
with builtins; {
|
||||||
name = "${configDir}/External Extensions/${ext.id}.json";
|
name = "${configDir}/External Extensions/${ext.id}.json";
|
||||||
value.text = toJSON
|
value.text = toJSON (if ext.crxPath != null then {
|
||||||
(if (isPath ext.crxPath && isString ext.version) then {
|
|
||||||
external_crx = ext.crxPath;
|
external_crx = ext.crxPath;
|
||||||
external_version = ext.version;
|
external_version = ext.version;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue