last week I was trying to install some new software, after editing my config.nix (here the full config) and run sudo nixos-rebuild switch I got an error, at first I thought it was some problem with dependencies/some packaging and decided to wait a week for the next auto-update for it to be solved as it once happened.
however, upon today’s scheduled update, I noticed it didn’t updated, and so I decided to manually run the command again to check if the same error was ocurring, and it was.
this is what the terminal gives me:
building the system configuration...
evaluation warning: system.stateVersion is not set, defaulting to 25.11. Read why this matters on https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion.
evaluation warning: The option `services.xserver.desktopManager.gnome.enable' defined in `/etc/nixos/configuration.nix' has been renamed to `services.desktopManager.gnome.enable'.
evaluation warning: The option `services.xserver.displayManager.gdm.enable' defined in `/etc/nixos/configuration.nix' has been renamed to `services.displayManager.gdm.enable'.
evaluation warning: The option `hardware.pulseaudio' defined in `/etc/nixos/configuration.nix' has been renamed to `services.pulseaudio'.
error:
… while calling the 'head' builtin
at /nix/store/a0mnlgzx4jcfq2258iis9l3ggj9za0s7-nixos/nixos/lib/attrsets.nix:1696:13:
1695| if length values == 1 || pred here (elemAt values 1) (head values) then
1696| head values
| ^
1697| else
… while evaluating the attribute 'value'
at /nix/store/a0mnlgzx4jcfq2258iis9l3ggj9za0s7-nixos/nixos/lib/modules.nix:1118:7:
1117| // {
1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
1119| inherit (res.defsFinal') highestPrio;
… while evaluating the option `system.build.toplevel':
… while evaluating definitions from `/nix/store/a0mnlgzx4jcfq2258iis9l3ggj9za0s7-nixos/nixos/nixos/modules/system/activation/top-level.nix':
… while evaluating the option `system.systemBuilderArgs':
… while evaluating definitions from `/nix/store/a0mnlgzx4jcfq2258iis9l3ggj9za0s7-nixos/nixos/nixos/modules/system/activation/activatable-system.nix':
… while evaluating the option `system.activationScripts.etc.text':
… while evaluating definitions from `/nix/store/a0mnlgzx4jcfq2258iis9l3ggj9za0s7-nixos/nixos/nixos/modules/system/etc/etc-activation.nix':
… while evaluating definitions from `/nix/store/a0mnlgzx4jcfq2258iis9l3ggj9za0s7-nixos/nixos/nixos/modules/system/etc/etc.nix':
… while evaluating the option `environment.etc.dbus-1.source':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: Package ‘python3.13-ecdsa-0.19.1’ in /nix/store/a0mnlgzx4jcfq2258iis9l3ggj9za0s7-nixos/nixos/pkgs/development/python-modules/ecdsa/default.nix:43 is marked as insecure, refusing to evaluate.
Known issues:
- CVE-2024-23342
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: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
then pass `--impure` in order to allow use of environment variables.
b) for `nixos-rebuild` you can add ‘python3.13-ecdsa-0.19.1’ to
`nixpkgs.config.permittedInsecurePackages` in the configuration.nix,
like so:
{
nixpkgs.config.permittedInsecurePackages = [
"python3.13-ecdsa-0.19.1"
];
}
c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
‘python3.13-ecdsa-0.19.1’ to `permittedInsecurePackages` in
~/.config/nixpkgs/config.nix, like so:
{
permittedInsecurePackages = [
"python3.13-ecdsa-0.19.1"
];
}
Command 'nix-build '<nixpkgs/nixos>' --attr config.system.build.toplevel --no-out-link' returned non-zero exit status 1.
even after rereading it multiple times, I’m honestly clueless of what could possibly be causing this and how to proceed with this, any ideas?