I just tried a home-manager switch -- flake . but I got an error about Electron being EOL’ed. The problem is that I don’t explicitly install it, and I don’t know what is requiring it.
How can I solve this problem?
Here is the error output:
error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'home-manager-generation'
whose name attribute is located at /nix/store/z1nvpjx9vd4151vx2krxzmx2p1a36pf9-source/pkgs/stdenv/generic/make-derivation.nix:300:7
… while evaluating attribute 'buildCommand' of derivation 'home-manager-generation'
at /nix/store/z1nvpjx9vd4151vx2krxzmx2p1a36pf9-source/pkgs/build-support/trivial-builders/default.nix:87:14:
86| enableParallelBuilding = true;
87| inherit buildCommand name;
| ^
88| passAsFile = [ "buildCommand" ]
(stack trace truncated; use '--show-trace' to show the full trace)
error: Package ‘electron-22.3.27’ in /nix/store/z1nvpjx9vd4151vx2krxzmx2p1a36pf9-source/pkgs/development/tools/electron/binary/generic.nix:35 is marked as insecure, refusing to evaluate.
Known issues:
- Electron version 22.3.27 is EOL
You can install it anyway by allowing this package, using the
following methods:
a) To temporarily allow all insecure packages, you can use an environment
variable for a single invocation of the nix tools:
$ export NIXPKGS_ALLOW_INSECURE=1
Note: For `nix shell`, `nix build`, `nix develop` or any other Nix 2.4+
(Flake) command, `--impure` must be passed in order to read this
environment variable.
b) for `nixos-rebuild` you can add ‘electron-22.3.27’ to
`nixpkgs.config.permittedInsecurePackages` in the configuration.nix,
like so:
{
nixpkgs.config.permittedInsecurePackages = [
"electron-22.3.27"
];
}
c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
‘electron-22.3.27’ to `permittedInsecurePackages` in
~/.config/nixpkgs/config.nix, like so:
{
permittedInsecurePackages = [
"electron-22.3.27"
];
}
~
As mentioned in the error message, --show-trace will show a longer stack trace, and you should be able to find the name of the derivation which depends on electron in there.
I have the same problem. For me it is obsidian notes that requires electron. Will this be resolved by the maintainer in a few days or should I do something myself long-term?
While not ideal, remove any app using electron update and then re-add them to your config.
Basically, in your older derivation, one of the apps is depending on the old version of the dependency and bails before pulling the new dependency.
Unfortunately this did not solve the problem for me. I still get
error: Package ‘electron-24.8.6’ in /nix/store/z707kdjl26j97153sc62szg61sz5ki34-nixos-23.05/nixos/pkgs/develo
pment/tools/electron/binary/generic.nix:27 is marked as insecure, refusing to evaluate.
What I did was
remove obsidian from environment.systemPackages
nixos-rebuild --switch
nix-channel --update
nixos-rebuild --switch
add obsidian to environment.systemPackages
nixos-rebuild --switch (this failed with above error)
The issue here is that the version in stable (23.05) uses the old and unsupported electron version, whereas unstable has the updated version.
There are a few options:
run obsidian from unstable but keep your system on stable
update the system to unstable
wait for 23.11
get one of the maintainers to backport the change to 23.05. I don’t know what the impact of that is (I don’t have any experience with electron applications).
Despite its name, it’s not unsafe to use. Unstable refers to major package versions and NixOS options API changes; they may change at any time rather than at fixed times. Like Arch vs. Fedora.
You may sometimes get breaking changes that actually break your setup for a few days but that’s honestly not a big issue with NixOS.
Running stuff from different releases usually breaks when running GUI apps as those often rely one of the last remaining impurities in Nixpkgs: The graphics driver.
It should not be recommended to users without mentioning that major caveat.
I would be very curious of what other systems apps are installed.
Obsidian probably isn’t the only app that has the dependency.
Some other examples that might no come to mind immediately:
Slack/Discord/VScode/Bitwardon/1Password … I’m sure there are more
but these are some that I can think of off the top of my head.
Would be interested to learn how to trace what the is using the version as a dependacy.
I added obsidian from unstable and this resolved the issue. Took me some time to get all the expressions correctly and on switch it looked like around 100 new packages were installed (dependencies from unstable?) but it works now. Will probably remove it again after 23.11 is out.
It’s a bummer though that stuff just breaks (electron is declared unsafe and dependent packages are not fixed) although you stay on stable.
We try to keep breakage like this as minimal as possible by removing things that will stop being maintained before release but the real world isn’t always plannable like that. Sometimes security issues crop up during a release and aren’t fixed. We can’t do much against that.
If you don’t care about the security issue, you could have just allowed the package like the first error message told you.
Flake system here, having the same issue due to Heroic launcher.
For some reason, following b) and adding the right electron version to nixpkgs.config.permittedInsecurePackages is having no effect, although it worked previously for installing balena etcher.
Do note that a) will only work with --impure. nixos-rebuild is supposed to forward that to nix build & co. Flake-based nix commands by default do not allow anything to touch env vars, so there would be no way for the nixpkgs eval to read that variable without impure.
Are you using the same pkgs as the one from your module args? nixpkgs.config only applies to that one, things passed in through flake inputs or other alternate ways will not have those options applied.
[chococandy@nixpie:~]$ sudo nixos-rebuild switch --upgrade --show-trace
[sudo] password for chococandy:
unpacking channels...
building Nix...
building the system configuration...
error:
… while evaluating the attribute 'activationScript' of the derivation 'nixos-system-nixpie-23.05.4860.9fb122519e9c'
at /nix/store/0dqd3hsxn8fryqy96al9mc8wm8qw6l08-nixos-23.05/nixos/pkgs/stdenv/generic/make-derivation.nix:303:7:
302| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
303| name =
| ^
304| let
… while evaluating the attribute 'system.activationScripts.script'
at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:137:9:
136| apply = set: set // {
137| script = systemActivationScript set false;
| ^
138| };
… while evaluating call site
at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:137:18:
136| apply = set: set // {
137| script = systemActivationScript set false;
| ^
138| };
… while calling 'systemActivationScript'
at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:20:33:
19|
20| systemActivationScript = set: onlyDry: let
| ^
21| set' = mapAttrs (_: v: if isString v then (noDepEntry v) // { supportsDryActivation = false; } else v) set;
… while evaluating call site
at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:49:9:
48|
49| ${textClosureMap id (withDrySnippets) (attrNames withDrySnippets)}
| ^
50|
… while calling 'textClosureMap'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings-with-deps.nix:75:35:
74|
75| textClosureMap = f: predefined: names:
| ^
76| concatStringsSep "\n" (map f (textClosureList predefined names));
… while evaluating call site
at «none»:0: (source not available)
… while calling 'id'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:14:5:
13| # The value to return
14| x: x;
| ^
15|
… while evaluating the attribute 'text'
at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:9:5:
8| addAttributeName = mapAttrs (a: v: v // {
9| text = ''
| ^
10| #### Activation script snippet ${a}:
… while evaluating call site
at «none»:0: (source not available)
… while calling 'g'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:595:19:
594| g =
595| name: value:
| ^
596| if isAttrs value && cond value
… while evaluating call site
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:598:20:
597| then recurse (path ++ [name]) value
598| else f (path ++ [name]) value;
| ^
599| in mapAttrs g;
… while calling anonymous lambda
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:248:72:
247| # For definitions that have an associated option
248| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
249|
… while evaluating the attribute 'value'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:759:9:
758| in warnDeprecation opt //
759| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
760| inherit (res.defsFinal') highestPrio;
… while evaluating the option `system.activationScripts.etc.text':
… while evaluating the attribute 'mergedValue'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:794:5:
793| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
794| mergedValue =
| ^
795| if isDefined then
… while evaluating the attribute 'values'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:788:9:
787| in {
788| values = defs''';
| ^
789| inherit (defs'') highestPrio;
… while evaluating the attribute 'values'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:887:7:
886| in {
887| values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
| ^
888| inherit highestPrio;
… while evaluating call site
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:774:17:
773| # Process mkMerge and mkIf properties.
774| defs' = concatMap (m:
| ^
775| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while calling anonymous lambda
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:774:28:
773| # Process mkMerge and mkIf properties.
774| defs' = concatMap (m:
| ^
775| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc-activation.nix':
… while evaluating call site
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:775:137:
774| defs' = concatMap (m:
775| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
776| ) defs;
… while calling 'dischargeProperties'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:846:25:
845| */
846| dischargeProperties = def:
| ^
847| if def._type or "" == "merge" then
… while evaluating the attribute 'value'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:599:44:
598| defnsByName' = byName "config" (module: value:
599| [{ inherit (module) file; inherit value; }]
| ^
600| ) configs;
… while evaluating call site
at «none»:0: (source not available)
… while calling anonymous lambda
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:812:24:
811| let f = attrPath:
812| zipAttrsWith (n: values:
| ^
813| let here = attrPath ++ [n]; in
… while evaluating call site
at «none»:0: (source not available)
… while calling anonymous lambda
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:563:29:
562| merge = loc: defs:
563| zipAttrsWith (name: defs:
| ^
564| let merged = mergeDefinitions (loc ++ [name]) elemType defs;
… while evaluating the attribute 'optionalValue.value'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:806:5:
805|
806| optionalValue =
| ^
807| if isDefined then { value = mergedValue; }
… while evaluating the attribute 'values'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:788:9:
787| in {
788| values = defs''';
| ^
789| inherit (defs'') highestPrio;
… while evaluating the attribute 'values'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:887:7:
886| in {
887| values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
| ^
888| inherit highestPrio;
… while evaluating call site
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:774:17:
773| # Process mkMerge and mkIf properties.
774| defs' = concatMap (m:
| ^
775| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while calling anonymous lambda
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:774:28:
773| # Process mkMerge and mkIf properties.
774| defs' = concatMap (m:
| ^
775| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix':
… while evaluating call site
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:775:137:
774| defs' = concatMap (m:
775| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
776| ) defs;
… while calling 'dischargeProperties'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:846:25:
845| */
846| dischargeProperties = def:
| ^
847| if def._type or "" == "merge" then
… while evaluating the attribute 'value'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:569:58:
568| # Push down position info.
569| (map (def: mapAttrs (n: v: { inherit (def) file; value = v; }) def.value) defs);
| ^
570| emptyValue = { value = {}; };
… while evaluating call site
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:88:39:
87| then value
88| else { ${elemAt attrPath n} = atDepth (n + 1); };
| ^
89| in atDepth 0;
… while calling 'atDepth'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:85:17:
84| len = length attrPath;
85| atDepth = n:
| ^
86| if n == len
… while evaluating the attribute 'value'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:599:44:
598| defnsByName' = byName "config" (module: value:
599| [{ inherit (module) file; inherit value; }]
| ^
600| ) configs;
… while evaluating the attribute 'buildCommand' of the derivation 'etc'
at /nix/store/0dqd3hsxn8fryqy96al9mc8wm8qw6l08-nixos-23.05/nixos/pkgs/stdenv/generic/make-derivation.nix:303:7:
302| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
303| name =
| ^
304| let
… while evaluating call site
at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:54:7:
53| mkdir -p "$out/etc"
54| ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
| ^
55| "makeEtcEntry"
… while calling 'concatMapStringsSep'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings.nix:116:5:
115| # List of input strings
116| list: concatStringsSep sep (map f list);
| ^
117|
… while evaluating call site
at «none»:0: (source not available)
… while calling anonymous lambda
at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:54:33:
53| mkdir -p "$out/etc"
54| ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
| ^
55| "makeEtcEntry"
… while evaluating call site
at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:54:43:
53| mkdir -p "$out/etc"
54| ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
| ^
55| "makeEtcEntry"
… while calling 'concatMapStringsSep'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings.nix:116:5:
115| # List of input strings
116| list: concatStringsSep sep (map f list);
| ^
117|
… while evaluating call site
at «none»:0: (source not available)
… while calling 'escapeShellArg'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings.nix:427:20:
426| */
427| escapeShellArg = arg: "'${replaceStrings ["'"] ["'\\''"] (toString arg)}'";
| ^
428|
… while evaluating call site
at «none»:0: (source not available)
… while calling 'g'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:595:19:
594| g =
595| name: value:
| ^
596| if isAttrs value && cond value
… while evaluating call site
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:598:20:
597| then recurse (path ++ [name]) value
598| else f (path ++ [name]) value;
| ^
599| in mapAttrs g;
… while calling anonymous lambda
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:248:72:
247| # For definitions that have an associated option
248| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
249|
… while evaluating the attribute 'value'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:759:9:
758| in warnDeprecation opt //
759| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
760| inherit (res.defsFinal') highestPrio;
… while evaluating the option `environment.etc.dbus-1.source':
… while evaluating the attribute 'mergedValue'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:794:5:
793| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
794| mergedValue =
| ^
795| if isDefined then
… while evaluating call site
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:796:12:
795| if isDefined then
796| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
797| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while calling anonymous lambda
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:796:17:
795| if isDefined then
796| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
797| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while evaluating call site
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:796:22:
795| if isDefined then
796| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
797| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while calling 'check'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:491:15:
490| descriptionClass = "noun";
491| check = x: isStringLike x && builtins.substring 0 1 (toString x) == "/";
| ^
492| merge = mergeEqualOption;
… while evaluating the attribute 'serviceDirectories' of the derivation 'dbus-1'
at /nix/store/0dqd3hsxn8fryqy96al9mc8wm8qw6l08-nixos-23.05/nixos/pkgs/stdenv/generic/make-derivation.nix:303:7:
302| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
303| name =
| ^
304| let
… while evaluating call site
at «none»:0: (source not available)
… while calling anonymous lambda
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:509:14:
508| merge = loc: defs:
509| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
| ^
510| imap1 (m: def':
… while evaluating the attribute 'value'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:807:27:
806| optionalValue =
807| if isDefined then { value = mergedValue; }
| ^
808| else {};
… while evaluating call site
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:796:12:
795| if isDefined then
796| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
797| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while calling anonymous lambda
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:796:17:
795| if isDefined then
796| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
797| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while evaluating call site
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:796:22:
795| if isDefined then
796| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
797| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while calling 'check'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:491:15:
490| descriptionClass = "noun";
491| check = x: isStringLike x && builtins.substring 0 1 (toString x) == "/";
| ^
492| merge = mergeEqualOption;
… while evaluating the attribute 'passAsFile' of the derivation 'system-path'
at /nix/store/0dqd3hsxn8fryqy96al9mc8wm8qw6l08-nixos-23.05/nixos/pkgs/stdenv/generic/make-derivation.nix:303:7:
302| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
303| name =
| ^
304| let
… while evaluating the attribute 'passAsFile'
at /nix/store/0dqd3hsxn8fryqy96al9mc8wm8qw6l08-nixos-23.05/nixos/pkgs/build-support/buildenv/default.nix:77:5:
76| # XXX: The size is somewhat arbitrary
77| passAsFile = if builtins.stringLength pkgs >= 128*1024 then [ "pkgs" ] else [ ];
| ^
78| }
… while evaluating the attribute 'installPhase' of the derivation 'obsidian-1.2.8'
at /nix/store/0dqd3hsxn8fryqy96al9mc8wm8qw6l08-nixos-23.05/nixos/pkgs/stdenv/generic/make-derivation.nix:303:7:
302| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
303| name =
| ^
304| let
… while evaluating the attribute 'handled'
at /nix/store/0dqd3hsxn8fryqy96al9mc8wm8qw6l08-nixos-23.05/nixos/pkgs/stdenv/generic/check-meta.nix:447:7:
446| # or, alternatively, just output a warning message.
447| handled =
| ^
448| {
… while evaluating the attribute 'no'
at /nix/store/0dqd3hsxn8fryqy96al9mc8wm8qw6l08-nixos-23.05/nixos/pkgs/stdenv/generic/check-meta.nix:449:11:
448| {
449| no = handleEvalIssue { inherit meta attrs; } { inherit (validity) reason errormsg; };
| ^
450| warn = handleEvalWarning { inherit meta attrs; } { inherit (validity) reason errormsg; };
… while evaluating call site
at /nix/store/0dqd3hsxn8fryqy96al9mc8wm8qw6l08-nixos-23.05/nixos/pkgs/stdenv/generic/check-meta.nix:449:16:
448| {
449| no = handleEvalIssue { inherit meta attrs; } { inherit (validity) reason errormsg; };
| ^
450| warn = handleEvalWarning { inherit meta attrs; } { inherit (validity) reason errormsg; };
… while calling 'handleEvalIssue'
at /nix/store/0dqd3hsxn8fryqy96al9mc8wm8qw6l08-nixos-23.05/nixos/pkgs/stdenv/generic/check-meta.nix:226:38:
225|
226| handleEvalIssue = { meta, attrs }: { reason , errormsg ? "" }:
| ^
227| let
error: Package ‘electron-24.8.6’ in /nix/store/0dqd3hsxn8fryqy96al9mc8wm8qw6l08-nixos-23.05/nixos/pkgs/development/tools/electron/binary/generic.nix:27 is marked as insecure, refusing to evaluate.
Known issues:
- Electron version 24.8.6 is EOL
You can install it anyway by allowing this package, using the
following methods:
a) To temporarily allow all insecure packages, you can use an environment
variable for a single invocation of the nix tools:
$ export NIXPKGS_ALLOW_INSECURE=1
Note: For `nix shell`, `nix build`, `nix develop` or any other Nix 2.4+
(Flake) command, `--impure` must be passed in order to read this
environment variable.
b) for `nixos-rebuild` you can add ‘electron-24.8.6’ to
`nixpkgs.config.permittedInsecurePackages` in the configuration.nix,
like so:
{
nixpkgs.config.permittedInsecurePackages = [
"electron-24.8.6"
];
}
c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
‘electron-24.8.6’ to `permittedInsecurePackages` in
~/.config/nixpkgs/config.nix, like so:
{
permittedInsecurePackages = [
"electron-24.8.6"
];
}
Solution b) to add nixpkgs.config.permittedInsecurePackages in the configuration.nix worked !!