Giter VIP home page Giter VIP logo

Comments (13)

nixos-discourse avatar nixos-discourse commented on June 16, 2024

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/disko-install-how-to-to-pass-flake-self-using-specialargs/43920/6

from disko.

Mic92 avatar Mic92 commented on June 16, 2024

Does it work if you replace self with ${./.}?

from disko.

bam80 avatar bam80 commented on June 16, 2024

@Mic92
The problem seem to be not with ${self}, but with the dependencies block:

  • if I avoid using self there, it works:
    dependencies = [
      pkgs.stdenv.drvPath
    ];
    
  • but only if I use self once, it doesn't:
    dependencies = [
      pkgs.stdenv.drvPath
      self.nixosConfigurations.i7.config.system.build.toplevel
    ];
    

Thoughts?

from disko.

nixos-discourse avatar nixos-discourse commented on June 16, 2024

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/infinite-recursion-encountered-by-making-module-configurable/23508/11

from disko.

bam80 avatar bam80 commented on June 16, 2024

Does it work if you replace self with ${./.}?

Where should I do that?

from disko.

bam80 avatar bam80 commented on June 16, 2024

So I tried to insert the Example module for a NixOS installer to the flake itself, so it got direct access to the self flake variable and no specialArgs = {inherit self;}; trick is needed.

Still, the same infinite recursion error.

@Mic92 how it worked on your side, did you test the code?

from disko.

bam80 avatar bam80 commented on June 16, 2024

So I debugged it even more and apparently I was wrong about the reason is related to "self".

The problem seems to be in this line instead:
self.nixosConfigurations.your-machine.config.system.build.toplevel
, if I remove it the error goes away.

At the same time, the next line is all OK:
self.nixosConfigurations.your-machine.config.system.build.diskoScript

Any ideas what can be wrong with the toplevel?

from disko.

Mic92 avatar Mic92 commented on June 16, 2024

Do you have a complete example that leads to the said infinite recursion?

from disko.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.