hercules-ci / arion

Run docker-compose with help from Nix/NixOS
Apache License 2.0
622 stars 48 forks source link

Infinite recursion when importing from arionPath in configuration.nix #223

Closed protex closed 9 months ago

protex commented 9 months ago

Hello,

I'm probably just misunderstanding the documentation here: https://docs.hercules-ci.com/arion/deployment#_nixos_module

But when I add this to my configuration.nix imports like so:

{config, pkgs, arionPath, ...}:
{
  imports = [
    (arionPath + "/nixos-module.nix")
  ];
}

I get an infinite recursion error during build:

...while evaluating the module argument 'arionPath' in "/etc/nixos/configuration.nix:

error: infinite recursion encountered

Am I doing this incorrectly?

roberth commented 9 months ago

That was badly written documentation. No value was given for arionPath, so it wasn't a readily applicable example. Please remove arionPath and do something like this instead:

  imports = [
    (builtins.fetchTarball "https://github.com/hercules-ci/arion/archive/39030b95666e018230dc9b85d76dc6e5b617ab87.tar.gz") + "/nixos-module.nix")
  ];

The docs now also recommend this.

protex commented 9 months ago

Thank you, this resolved my issue. :)