diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-09-28 14:47:48 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-09-28 14:47:48 +0200 |
commit | 64aed5e78f270ad775ec7ea763de4866c3f3c3cc (patch) | |
tree | 9d979021e1765e0a916705bb4985823eeab5a071 | |
parent | b3347287be60aebc723702b5b298f9738ce8481c (diff) |
Fix Nix database in generated images
This prevents seeing lots of warnings about missing hashes/sizes in the
database when running "nix-store --verify --check-contents" for the
first time.
-rw-r--r-- | nixos/lib/make-disk-image.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index 54090c95a569..79c5199cbec4 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -79,6 +79,10 @@ pkgs.vmTools.runInLinuxVM ( printRegistration=1 perl ${pkgs.pathsFromGraph} /tmp/xchg/closure | \ chroot /mnt ${config.nix.package}/bin/nix-store --load-db --option build-users-group "" + # Add missing size/hash fields to the database. FIXME: + # exportReferencesGraph should provide these directly. + chroot /mnt ${config.nix.package}/bin/nix-store --verify --check-contents + # Create the system profile to allow nixos-rebuild to work. chroot /mnt ${config.nix.package}/bin/nix-env --option build-users-group "" \ -p /nix/var/nix/profiles/system --set ${config.system.build.toplevel} |