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

Flake-Less compatibility #59

Closed
wants to merge 3 commits into from
Closed

Conversation

itzwam
Copy link

@itzwam itzwam commented Sep 27, 2024

This PR lets anybody to import this repository without flakes enabled

keeping the flakes-enabled behavior unchanged

npins example:

  imports = [
    (import (import ./npins).NixVirt {
      inherit pkgs;
      inherit (pkgs) OVMFFull; # Change to inherit from an unstable version of pkgs
    }).nixosModules.default
  ];

@itzwam itzwam marked this pull request as ready for review September 27, 2024 14:13
@AshleyYakeley
Copy link
Owner

Would prefer to keep NixVirt flakes-only, rather than having to support the legacy way of doing things. You can import the flake in any case by using builtins.getFlake.

@Rosuavio
Copy link

Rosuavio commented Sep 28, 2024

"Flake-less" is not generally considered legacy amongst the community, or even the core nix project or anything based on it.

I personally avoid flakes when it's easy enough too, and it's generally fairly easy to use niv or npins to avoid using flakes.

@Rosuavio
Copy link

This kind of change to simplify using a project without relying on flakes is fairly common amongst commonly used nix projects.

@itzwam
Copy link
Author

itzwam commented Sep 28, 2024

This change allows anyone not depending on flakes to import the repo

builtins.getFlake is not available in flake-less world 😉

@AshleyYakeley
Copy link
Owner

OK, it's probably not fair to call the old unstructured way of doing things legacy while flakes is still marked as an experimental feature. Nevertheless at some point flakes will become stable, the flakes extension flag will go away and builtins.getFlake will always be available. This is the nix world I am interested in developing for, on my own time.

I can understand not wanting to use flakes for one's own stuff and using getFlake to work with other people's flakes, but I'm not interested in the additional maintenance burden to support people who won't even switch on the flakes extension. Flakes are coming anyway.

@AshleyYakeley
Copy link
Owner

See #61.

@AshleyYakeley
Copy link
Owner

Closing in favour of #61.

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.

3 participants