cc22cf662b
When computing a lock file, we now respect the lock files of flake inputs. This is important for usability / reproducibility. For example, the 'nixops' flake depends on the 'nixops-aws' and 'nixops-hetzner' repositories. So when the 'nixops' flake is used in another flake, we want the versions of 'nixops-aws' and 'nixops-hetzner' locked by the the 'nixops' flake because those presumably have been tested. This can lead to a proliferation of versions of flakes like 'nixpkgs' (since every flake's lock file could depend on a different version of 'nixpkgs'). This is not a major issue when using Nixpkgs overlays or NixOS modules, since then the top-level flake composes those overlays/modules into *its* version of Nixpkgs and all other versions are ignored. Lock file computation has been made a bit more lazy so it won't try to fetch all those versions of 'nixpkgs'. However, in case it's necessary to minimize flake versions, there now are two input attributes that allow this. First, you can copy an input from another flake, as follows: inputs.nixpkgs.follows = "dwarffs/nixpkgs"; This states that the calling flake's 'nixpkgs' input shall be the same as the 'nixpkgs' input of the 'dwarffs' input. Second, you can override inputs of inputs: inputs.nixpkgs.url = github:edolstra/nixpkgs/<hash>; inputs.nixops.inputs.nixpkgs.url = github:edolstra/nixpkgs/<hash>; or equivalently, using 'follows': inputs.nixpkgs.url = github:edolstra/nixpkgs/<hash>; inputs.nixops.inputs.nixpkgs.follows = "nixpkgs"; This states that the 'nixpkgs' input of the 'nixops' input shall be the same as the calling flake's 'nixpkgs' input. Finally, at '-v' Nix now prints the changes to the lock file, e.g. $ nix flake update ~/Misc/eelco-configurations/hagbard inputs of flake 'git+file:///home/eelco/Misc/eelco-configurations?subdir=hagbard' changed: updated 'nixpkgs': 'github:edolstra/nixpkgs/7845bf5f4b3013df1cf036e9c9c3a55a30331db9' -> 'github:edolstra/nixpkgs/03f3def66a104a221aac8b751eeb7075374848fd' removed 'nixops' removed 'nixops/nixops-aws' removed 'nixops/nixops-hetzner' removed 'nixops/nixpkgs' |
||
---|---|---|
.. | ||
lang | ||
plugins | ||
add.sh | ||
bad.tar.xz | ||
binary-cache.sh | ||
brotli.sh | ||
build-dry.sh | ||
build-hook.nix | ||
build-remote.sh | ||
case-hack.sh | ||
case.nar | ||
check-refs.nix | ||
check-refs.sh | ||
check-reqs.nix | ||
check-reqs.sh | ||
check.nix | ||
check.sh | ||
common.sh.in | ||
config.nix.in | ||
dependencies.builder0.sh | ||
dependencies.builder1.sh | ||
dependencies.builder2.sh | ||
dependencies.nix | ||
dependencies.sh | ||
dump-db.sh | ||
export-graph.nix | ||
export-graph.sh | ||
export.sh | ||
fetchGit.sh | ||
fetchMercurial.sh | ||
fetchurl.sh | ||
filter-source.nix | ||
filter-source.sh | ||
fixed.builder1.sh | ||
fixed.builder2.sh | ||
fixed.nix | ||
fixed.sh | ||
flakes.sh | ||
function-trace.sh | ||
gc-auto.sh | ||
gc-concurrent.builder.sh | ||
gc-concurrent.nix | ||
gc-concurrent.sh | ||
gc-concurrent2.builder.sh | ||
gc-runtime.nix | ||
gc-runtime.sh | ||
gc.sh | ||
github-flakes.nix | ||
hash-check.nix | ||
hash.sh | ||
import-derivation.nix | ||
import-derivation.sh | ||
init.sh | ||
install-darwin.sh | ||
lang.sh | ||
linux-sandbox.sh | ||
local.mk | ||
logging.sh | ||
misc.sh | ||
multiple-outputs.nix | ||
multiple-outputs.sh | ||
nar-access.nix | ||
nar-access.sh | ||
nix-build.sh | ||
nix-channel.sh | ||
nix-copy-closure.nix | ||
nix-copy-ssh.sh | ||
nix-profile.sh | ||
nix-shell.sh | ||
optimise-store.sh | ||
parallel.builder.sh | ||
parallel.nix | ||
parallel.sh | ||
pass-as-file.sh | ||
placeholders.sh | ||
plugins.sh | ||
post-hook.sh | ||
pure-eval.nix | ||
pure-eval.sh | ||
push-to-store.sh | ||
recursive.sh | ||
referrers.sh | ||
remote-builds.nix | ||
remote-store.sh | ||
repair.sh | ||
restricted.nix | ||
restricted.sh | ||
run.nix | ||
run.sh | ||
search.nix | ||
search.sh | ||
secure-drv-outputs.nix | ||
secure-drv-outputs.sh | ||
setuid.nix | ||
shell.nix | ||
shell.shebang.rb | ||
shell.shebang.sh | ||
signing.sh | ||
simple.builder.sh | ||
simple.nix | ||
simple.sh | ||
structured-attrs.nix | ||
structured-attrs.sh | ||
tarball.sh | ||
timeout.nix | ||
timeout.sh | ||
user-envs.builder.sh | ||
user-envs.nix | ||
user-envs.sh |