I converted my config to a flake and am getting errors that should be fixed in 23.11 i.e. electron 25.9.0 being EOL.
error: Package ‘electron-25.9.0’ in /nix/store/dg2g5qwvs36dhfqj9khx4sfv0klwl9f0-source/pkgs/development/tools/electron/binary/generic.nix:35 is marked as insecure, refusing to evaluate.
Is there somewhere else that the pkgs are being referenced from?
did you try running, nix flake update? nix flakes have a flake.lock which needs to be updated for the system to get a new version. If you did that something in nixpkgs is pinned to electron-25.9.0 and has to be fixed upstream.
I did update my lock file. Shouldn’t another package pinning not effect obsidian on nix? Apologies but I’m still working hard to understand everything. How would I investigate this other than just peruse the GitHub and read the pkg files for my packages?
Thank you, that’s very helpful to know I am not messing something up. When I take a look at the pkg in nixpkgs it only seems to ask for electron. When I use the nix package search it seems it would resolve to a newer version on every channel and 28.0.0 on unstable. It does seem that some packages reference a electron_25 but not obsidian. Do you know where this pinning could be happening?
Same issue here after updating my flake.lock. Here’s the full error:
building the system configuration...
error:
… while calling the 'head' builtin
at /nix/store/4fgs7yzsy2dqnjw8j42qlp9i1vgarzy0-source/lib/attrsets.nix:936:11:
935| || pred here (elemAt values 1) (head values) then
936| head values
| ^
937| else
… while evaluating the attribute 'value'
at /nix/store/4fgs7yzsy2dqnjw8j42qlp9i1vgarzy0-source/lib/modules.nix:809:9:
808| in warnDeprecation opt //
809| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
810| inherit (res.defsFinal') highestPrio;
(stack trace truncated; use '--show-trace' to show the full trace)
error: Package ‘electron-25.9.0’ in /nix/store/4fgs7yzsy2dqnjw8j42qlp9i1vgarzy0-source/pkgs/development/tools/electron/binary/generic.nix:35 is marked as insecure, refusing to evaluate.
packages are added to any package-set by using the callPackage function. which allows you to override default functions. In the case of obsidian there is a entry in the all-packages.nix saying:
obsidian = callPackage ../applications/misc/obsidian {
electron = electron_25;
};
you could open a issue, or (which would be really cool) try doing a pr updating that version requirement or removing it if possible. Feel free to ping me for review/merges (@Janik-Haag on github)
Edit:
In the meantime you might be able to resolve your problem by doing something like
Ok, I found the reference in all-packages.nix and learned something new. It seems according to this forum Electron 25 is now EOL, please upgrade to a newer version - #4 by WhiteNoise - Feature requests - Obsidian Forum, the pinned version is required for the application to function properly and won’t be revved until the next major release. Another user has had no luck overriding the version with the application failing to function. It seems the only real solution is to follow the suggestions of nix to set nixpkgs.config.permittedInsecurePackages to electron-25.9 or just quit using the package until a new obsidian release that uses a more current version of electron. Thanks so much Janik.