nix3-store-repair(1)

🌸 nix3-store-repair(1) β€” bestie's guide to fixin' ur store 🌸

Warning πŸ’€ This program is experimental and its interface is subject to change. iykyk. don't get attached to the vibes, they might shift.

okay so before we even start β€” this whole page lives in the General Commands Manual, and the page is literally called nix3-store-repair(1). that's the name, that's the whole identity. slay.


✨ NAME ✨

nix store repair β€” repair store paths 🩹


✨ SYNOPSIS ✨

nix store repair [option…] installables…

✨ EXAMPLES ✨

so like, here's the moment. u clock that a store path is corrupt, and then u repair it. no cap:

# nix store verify /nix/store/fdhrijyv3670djsgprx596nn89iwlj2s-hello-2.10
path '/nix/store/fdhrijyv3670djsgprx596nn89iwlj2s-hello-2.10' was modified! expected hash 'sha256:1hd5vnh6xjk388gdk841vflicy8qv7qzj2hb7xlyh8lpb43j921l', got 'sha256:1a25lf78x5wi6pfkrxalf0n13kdaca0bqmjqnp7wfjza2qz5ssgl'

# nix store repair /nix/store/fdhrijyv3670djsgprx596nn89iwlj2s-hello-2.10

look at those hashes. one's the expected one, one's the one we actually got. the way they do NOT match?? πŸ’€ anyway then u hit repair and we move. 🫢


✨ DESCRIPTION ✨

k so this command attempts to β€œrepair” the store paths u hand it (those are the installables) by redownloading them using the available substituters. πŸ’–

and if there are no substitutes available? then repair is literally not possible. that's it, that's the whole story. πŸ™ˆ

Warning 🚨 listen bestie, listen. during repair there is a very small time window where the old path (if it even exists) gets moved out of the way and replaced with the new path. if repair gets interrupted in that lil gap, the system may be left in a broken state. like β€” the example they give is if that path contains a critical system component like the GNU C Library. so do NOT be cute and hit Ctrl+C mid-repair. main character energy only when it's safe. 😭

✨ OPTIONS ✨

  • --stdin β€” read the installables from standard input. no default installable gets applied. periodt.

🧠 Common evaluation options

  • --arg name expr β€” pass the value expr as the argument name to Nix functions.
  • --arg-from-file name path β€” pass the contents of file path as the argument name to Nix functions.
  • --arg-from-stdin name β€” pass the contents of stdin as the argument name to Nix functions.
  • --argstr name string β€” pass the string string as the argument name to Nix functions.
  • --debugger β€” start an interactive environment if evaluation fails. little rescue mission. 🧚
  • --eval-store store-url β€” the URL of the Nix store to use for evaluation, i.e. to store derivations (.drv files) and inputs referenced by them.
  • --impure β€” allow access to mutable paths and repositories. chaotic but permitted. 🌈
  • --include / -I path β€” add path to search path entries used to resolve lookup paths.

this option may be given multiple times.

paths added through -I take precedence over the nix-path configuration setting and the NIX_PATH environment variable. πŸ‘‘

  • --override-flake original-ref resolved-ref β€” override the flake registries, redirecting original-ref to resolved-ref.

  • --commit-lock-file β€” commit changes to the flake's lock file.
  • --inputs-from flake-url β€” use the inputs of the specified flake as registry entries.
  • --no-registries β€” don't allow lookups in the flake registries.
DEPRECATED πŸ’€ use --no-use-registries instead.
  • --no-update-lock-file β€” do not allow any updates to the flake's lock file.
  • --no-write-lock-file β€” do not write the flake's newly generated lock file.
  • --output-lock-file flake-lock-path β€” write the given lock file instead of flake.lock within the top-level flake.
  • --override-input input-path flake-url β€” override a specific flake input (e.g. dwarffs/nixpkgs). the input path must not be empty. this implies --no-write-lock-file.
  • --recreate-lock-file β€” recreate the flake's lock file from scratch.
DEPRECATED πŸ’€ use nix flake update instead.
  • --reference-lock-file flake-lock-path β€” read the given lock file instead of flake.lock within the top-level flake.
  • --update-input input-path β€” update a specific flake input (ignoring its previous entry in the lock file).
DEPRECATED πŸ’€ use nix flake update instead.

  • --debug β€” set the logging verbosity level to β€˜debug’.
  • --log-format format β€” set the format of log output; one of raw, internal-json, bar or bar-with-logs.
  • --print-build-logs / -L β€” print full build logs on standard error.
  • --quiet β€” decrease the logging verbosity level. shhh. 🀫
  • --verbose / -v β€” increase the logging verbosity level. tell me EVERYTHING. πŸ—£οΈ

πŸŽ€ Miscellaneous global options

  • --help β€” show usage information.
  • --offline β€” disable substituters and consider all previously downloaded files up-to-date.
  • --option name value β€” set the Nix configuration setting name to value (overriding nix.conf).
  • --refresh β€” consider all previously downloaded files out-of-date.
  • --repair β€” during evaluation, rewrite missing or corrupted files in the Nix store. during building, rebuild missing or corrupted store paths.
  • --version β€” show version information.

πŸ’… Options that change the interpretation of installables

  • --all β€” apply the operation to every store path.
  • --derivation β€” operate on the store derivation rather than its outputs.
  • --expr expr β€” interpret installables as attribute paths relative to the Nix expression expr.
  • --file / -f file β€” interpret installables as attribute paths relative to the Nix expression stored in file. if file is the character -, then a Nix expression is read from standard input. implies --impure.
  • --recursive / -r β€” apply operation to closure of the specified paths.
Note πŸ“Œ see man nix.conf for overriding configuration settings with command line flags.

okay that's the whole page bestie, we got there together, and ngl we ate. πŸ“ this was nix3-store-repair(1) from the General Commands Manual β€” go forth, repair responsibly, and don't interrupt it mid-swap. mwah. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from