add required nixConfig options to flake #15

Closed
jopejoe1 wants to merge 1 commit from nixOptions into main
Member

When evaluating the flake, it fails if allow-import-from-derivation is not enabled, so let's just set it in the flakes nixConfig.

cc @djerun, does this resolve your issue?

When evaluating the flake, it fails if `allow-import-from-derivation` is not enabled, so let's just set it in the flakes nixConfig. cc @djerun, does this resolve your issue?
jopejoe1 added 1 commit 2024-11-12 22:43:50 +01:00
Owner

I did

cd nix-infra
git pull
nix flake update --commit-lock-file
git checkout nixOptions
git rebase main
nix shell 'git+https://git.hamburg.ccc.de/CCCHH/infra-rebuild#infra-rebuild'
infra-rebuild reboot $(nix flake show --json . | jq -r '.nixosConfigurations | keys[]' | tr '\n' ' ')

and got

error:
       … while calling the 'head' builtin
         at /nix/store/yjixhx1vd0q5bxhg8x7rw6mmj79knsfg-source/lib/attrsets.nix:1575:11:
         1574|         || pred here (elemAt values 1) (head values) then
         1575|           head values
             |           ^
         1576|         elsewhile evaluating the attribute 'value'
         at /nix/store/yjixhx1vd0q5bxhg8x7rw6mmj79knsfg-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;

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/yjixhx1vd0q5bxhg8x7rw6mmj79knsfg-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `assertions':

       … while evaluating definitions from `/nix/store/yjixhx1vd0q5bxhg8x7rw6mmj79knsfg-source/nixos/modules/system/boot/systemd.nix':

       … while evaluating the option `systemd.services':

       … while evaluating definitions from `/nix/store/yjixhx1vd0q5bxhg8x7rw6mmj79knsfg-source/nixos/modules/config/resolvconf.nix':

       … while evaluating the option `networking.resolvconf.enable':

       … while evaluating the option `environment.etc':

       … while evaluating definitions from `/nix/store/yjixhx1vd0q5bxhg8x7rw6mmj79knsfg-source/nixos/modules/services/networking/ssh/sshd.nix':

       … while evaluating the option `users.users.chaos.openssh.authorizedKeys.keys':

       … while evaluating definitions from `/nix/store/1jirvwsjhklc1v3yh4r3ajpa5qijbjjn-source/config/common/users.nix':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: cannot build '/nix/store/g1pa4dwyza0qf0lbqd21x8mz9iqvl3x3-infrastructure-authorized-keys-686a6af.drv^out' during evaluation because the option 'allow-import-from-derivation' is disabled

git show head shows this commit

I did ```bash cd nix-infra git pull nix flake update --commit-lock-file git checkout nixOptions git rebase main nix shell 'git+https://git.hamburg.ccc.de/CCCHH/infra-rebuild#infra-rebuild' infra-rebuild reboot $(nix flake show --json . | jq -r '.nixosConfigurations | keys[]' | tr '\n' ' ') ``` and got ```shell error: … while calling the 'head' builtin at /nix/store/yjixhx1vd0q5bxhg8x7rw6mmj79knsfg-source/lib/attrsets.nix:1575:11: 1574| || pred here (elemAt values 1) (head values) then 1575| head values | ^ 1576| else … while evaluating the attribute 'value' at /nix/store/yjixhx1vd0q5bxhg8x7rw6mmj79knsfg-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; … while evaluating the option `system.build.toplevel': … while evaluating definitions from `/nix/store/yjixhx1vd0q5bxhg8x7rw6mmj79knsfg-source/nixos/modules/system/activation/top-level.nix': … while evaluating the option `assertions': … while evaluating definitions from `/nix/store/yjixhx1vd0q5bxhg8x7rw6mmj79knsfg-source/nixos/modules/system/boot/systemd.nix': … while evaluating the option `systemd.services': … while evaluating definitions from `/nix/store/yjixhx1vd0q5bxhg8x7rw6mmj79knsfg-source/nixos/modules/config/resolvconf.nix': … while evaluating the option `networking.resolvconf.enable': … while evaluating the option `environment.etc': … while evaluating definitions from `/nix/store/yjixhx1vd0q5bxhg8x7rw6mmj79knsfg-source/nixos/modules/services/networking/ssh/sshd.nix': … while evaluating the option `users.users.chaos.openssh.authorizedKeys.keys': … while evaluating definitions from `/nix/store/1jirvwsjhklc1v3yh4r3ajpa5qijbjjn-source/config/common/users.nix': (stack trace truncated; use '--show-trace' to show the full, detailed trace) error: cannot build '/nix/store/g1pa4dwyza0qf0lbqd21x8mz9iqvl3x3-infrastructure-authorized-keys-686a6af.drv^out' during evaluation because the option 'allow-import-from-derivation' is disabled ``` `git show head` shows this commit
Author
Member

Looks like infra-rebuild does not pass the config prompt back, could you try running nix flake check before running infra-rebuild?

Looks like `infra-rebuild` does not pass the config prompt back, could you try running `nix flake check` before running `infra-rebuild`?
Owner

made obsoleten by #16

made obsoleten by #16
c6ristian closed this pull request 2024-11-17 19:28:10 +01:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: CCCHH/nix-infra#15
No description provided.