Is any configuration.nix file _guaranteed_ to be reproducible, or is it not? Is there a best practice of testing this? Is trying to install it on VM sufficient to test this?
What do you mean by guaranteed to be reproducible? :smile:
Well what I meant is that it's going to be the same system on every device
...or is my understanding of the definition of said word incorrect?
If its only a configuration.nix
file, it might not be reproducible because the packages might be coming from different nixpkgs on each of those devices, based on whatever is set in nix-channel.
But if you use flake.nix
, it will be reproducible as you will be pinning the nixpkgs
revision in flake.lock
. See this tutorial to flakeify your existing configuration.nix
: https://nixos.asia/en/nixos-install-flake#flakeify
Last updated: Nov 15 2024 at 12:33 UTC