diff options
| -rw-r--r-- | layers/nix.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/layers/nix.nix b/layers/nix.nix index f4dc07f..68ee2c5 100644 --- a/layers/nix.nix +++ b/layers/nix.nix @@ -110,14 +110,17 @@ in serviceConfig.Type = "oneshot"; serviceConfig.RemainAfterExit = true; # With a persistent store, paths from an earlier image or host - # store may be gone; --verify removes them from the database. + # store may be gone; --verify removes them from the database. Not + # those that other valid paths refer to, which it reports, and then + # fails, but that's no reason to leave the guest without nix: a build + # needing one of them fails, and says why. script = '' for arg in $(cat /proc/cmdline); do case $arg in fc.registration=*) ${config.nix.package.out}/bin/nix-store --load-db < "''${arg#*=}" esac done - ${config.nix.package.out}/bin/nix-store --verify + ${config.nix.package.out}/bin/nix-store --verify || echo "nix-load-db: nix-store --verify left errors (above)" >&2 ''; }; # The host's nixpkgs, wherever it is (see the run script): no copy |
