Re:Show HN: Flox 1.0 – Open-source dev env as code with Nix
by Cyph0n on Wednesday March 13, 2024 @05:45PM
(#39697939)
True, but with Flakes, as long as you didn’t upddate your lock file, you should always be able to rollback to your previous environment.
On NixOS, you can then configure background GC to clean up the Nix store periodically: https://search.nixos.org/options?channel=23.11&from=0&size=5...
Re:Show HN: Flox 1.0 – Open-source dev env as code with Nix
by OJFord on Thursday March 14, 2024 @05:19AM
(#39701815)
Can't you just pin pkgs to particular commit, so everything will have the version it did as of that commit?
Re:Show HN: Flox 1.0 – Open-source dev env as code with Nix
by aidenn0 on Friday March 15, 2024 @11:35AM
(#39716916)
Right, but traditional nix doesn't make that easy (which is why niv and flakes exist).
Re:Show HN: Flox 1.0 – Open-source dev env as code with Nix
by OJFord on Saturday March 16, 2024 @09:58AM
(#39725979)
I suppose you're just saying it's easier than this with flakes, but this isn't a flake is it? (Honestly so confused about it all, looking at trying out nix again after toying with it briefly years ago.)
https://nix.dev/guides/recipes/sharing-dependencies#complete...
Re:Show HN: Flox 1.0 – Open-source dev env as code with Nix
by aidenn0 on Sunday March 17, 2024 @11:12PM
(#39740223)
That is not with flakes, nor does it pin nixpkgs.
It tracks nixpkgs-23.11
Now at the bottom it links to an example of pinning without using flakes, but the page you linked directly does not pin nixpkgs.
Flakes pin by default, and defaults matter. Using flakes, anything that isn't explicitly listed with a hash to ensure it's unchanged must be explicitly listed as an input, and a lock file for the inputs is automatically generated.
It appears that Flox uses flakes and versions the flake.lock file, so it should be possible to readily reproduce anything that hasn't completely disappeared from the internet.