Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set type of flake option to string, correctly evaluate it when provided #149

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

b-m-f
Copy link

@b-m-f b-m-f commented Oct 5, 2023

Possible fix for #148

@astro
Copy link
Owner

astro commented Oct 5, 2023

The primary use-case for this option was to pass a flake that is self or a flake input, not a string. Can we support both?

@astro
Copy link
Owner

astro commented Oct 5, 2023

When testing this with a flakeref string as flake, which is your use-case, I get error: cannot call 'getFlake' on unlocked flake reference 'git+https://gitea.dev/user/nix-config.git', at «none»:0 (use --impure to override)

With --impure I get error: infinite recursion encountered ☹️

@b-m-f
Copy link
Author

b-m-f commented Oct 6, 2023

Thanks for giving it a try.

For the "impurity" I found NixOS/nix#6124 (comment) .

Now for the recursion.

In my setup I currently have 2 gitrepos:

and I can successfully deploy that way - the impurity error happens as well.

Have you maybe tried to reference flake in the same way as self?

Since the usage does not seem clear, maybe a new option could be added? How about remoteRef/remoteFlake?

Edit: Some more context:

Using flake: self with deploy-rs I get

error: attribute 'self' missing

       at /nix/store/sg8d2aslxnyr4krwynnh2aszdrcnz3sq-source/lib/modules.nix:512:28:

          511|         builtins.addErrorContext (context name)
          512|           (args.${name} or config._module.args.${name})
             |                            ^
          513|       ) (lib.functionArgs f);
(use '--show-trace' to show detailed location information)
🚀 ❌ [deploy] [ERROR] Failed to check deployment: Nix checking command resulted in a bad exit code: Some(1)

@b-m-f
Copy link
Author

b-m-f commented Oct 23, 2023

@astro should I close this as 'feature not desired'?

@astro
Copy link
Owner

astro commented Oct 24, 2023

I haven't yet taken more time to investigate this myself.

@b-m-f
Copy link
Author

b-m-f commented Oct 24, 2023

@astro Alright. There is absolutely no urgency on my side.
I won't have free time for a while, but maybe I can get back to this with a reducible project at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants