Stream: jenkins-nix-ci

Topic: cannot get working in my setup


view this post on Zulip shaun smiley (Feb 14 2024 at 17:51):

I'm trying to figure out how to use this within my own NixOS setup, but I'm having difficulties. I am not using nix-parts or any of the other stuff. I have a fairly simple flake and have added the inputs.jenkins-nix-ci.nixosModules.default block to imports. However, I'm getting errors.

view this post on Zulip shaun smiley (Feb 14 2024 at 17:52):

       … while calling the 'seq' builtin

         at /nix/store/l6ymqz1y4fiy57xh6f3y23zwp0i9lr4f-source/lib/modules.nix:320:18:

          319|         options = checked options;
          320|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          321|         _module = checked (config._module);

       … while evaluating a branch condition

         at /nix/store/l6ymqz1y4fiy57xh6f3y23zwp0i9lr4f-source/lib/modules.nix:261:9:

          260|       checkUnmatched =
          261|         if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
             |         ^
          262|           let

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

       error: infinite recursion encountered

       at /nix/store/l6ymqz1y4fiy57xh6f3y23zwp0i9lr4f-source/lib/modules.nix:506:28:

          505|         builtins.addErrorContext (context name)
          506|           (args.${name} or config._module.args.${name})
             |                            ^
          507|       ) (lib.functionArgs f);

view this post on Zulip shaun smiley (Feb 14 2024 at 18:05):

Ah, I need to remove the inputs. within the imports block since I already pass that above. That was likely giving me the recursion error.

view this post on Zulip Shivaraj B H (Feb 14 2024 at 20:36):

Was it though?

view this post on Zulip shaun smiley (Feb 14 2024 at 20:49):

I also had to add sops as that seems to be a hard requirement.
But, I am still getting strange errors.

view this post on Zulip shaun smiley (Feb 14 2024 at 20:50):

error: attribute 'flake' missing

view this post on Zulip Srid (Feb 15 2024 at 11:08):

flake is passed by the nixos-flake module, so as to make the caller flake available to all modules.

https://github.com/srid/nixos-flake/blob/3891b2030114f8661402991eac9be0ed59f786ae/flake-module.nix#L9

If you are not using flake-parts (thus not using nixos-flake), you will have to manually pass these (via specialArgs or _module.args.flake).


Last updated: Nov 15 2024 at 12:33 UTC