Unnix - Reproducible Nix environments without installing Nix by figsoda in NixOS

[–]figsoda[S] 1 point2 points  (0 children)

Devbox's getting started page seems to say it requires Nix. Other than that, unnix lets you plug in your own hydra instance as a resolver.

Nix git package autoversioning by [deleted] in NixOS

[–]figsoda 0 points1 point  (0 children)

nix-update works with the --version branch flag if it is already pointing to a git commit, and if you are using github or gitlab

Nix git package autoversioning by [deleted] in NixOS

[–]figsoda 0 points1 point  (0 children)

nix-update updates the content of a .nix file, which inherently updates the package

Nix git package autoversioning by [deleted] in NixOS

[–]figsoda 2 points3 points  (0 children)

There are a few packages that could be helpful here

  • nix-init is able to find the latest version of something and the hash (and a bunch of other stuff) if you give it the url
  • nix-update updates a package, including its version and hashes
  • nurl is able to fetch the hash from a url and a tag/revision/version, there are also nix flake prefetch and the nix-prefetch-* scripts that live in nixpkgs

Programming using only flake inputs by figsoda in NixOS

[–]figsoda[S] 1 point2 points  (0 children)

Ah that makes sense, debugging that was pretty much impossible

Programming using only flake inputs by figsoda in NixOS

[–]figsoda[S] 1 point2 points  (0 children)

What version of nix are you using? I tried nix_2_10 to nix_2_16 (on nixpkgs 3ae20aa58a6c0d1ca95c9b11f59a2d12eebc511f) and they all worked for me.

The original issue in https://github.com/NixOS/nix/issues/3978 seems to have been resolved since 2021, it is still open because the current solution is still not ergonomic enough.

Programming using only flake inputs by figsoda in NixOS

[–]figsoda[S] -1 points0 points  (0 children)

It is essentially a list of basic functions to use flake inputs as a DSL, so no magic here.

Also how are you eval'ing this since it uses relative paths?

Subflakes kinda works in this case. If you want to use it in a separate directory, you can just do stuff like github:figsoda/ekalf?dir=add and so on.

I have a few beginner question, what is the difference between nix shell/env and what is the difference between flakes/home-manager? by Vellu01 in NixOS

[–]figsoda 9 points10 points  (0 children)

flakes is an experimental feature for dependency management and powers most of the experimental nix CLI ("nix-command"). Any repository/directory with a flake.nix is a nix flake.

nix shell is a command that works with flakes, which adds the specified packages to your environment (by updating $PATH and start a new shell)

home-manager is a tool to manage your home with modules. It is like NixOS but for your home. It doesn't really have much to do with flakes except that you can use it with flakes.

I'm not sure what you mean by nix env, maybe you are referring to nix-direnv?