Stream: nixos

Topic: Is there a way to test how reproducible my system is?


view this post on Zulip Muhammad Rizqi Ardiansyah (May 24 2024 at 07:43):

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?

view this post on Zulip Andreas (May 24 2024 at 08:23):

What do you mean by guaranteed to be reproducible? :smile:

view this post on Zulip Muhammad Rizqi Ardiansyah (May 24 2024 at 08:33):

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?

view this post on Zulip Shivaraj B H (May 24 2024 at 08:47):

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