2020-12-23 14:19:53 +02:00
|
|
|
R""(
|
|
|
|
|
|
|
|
# Examples
|
|
|
|
|
|
|
|
* Recreate the lock file (i.e. update all inputs) and commit the new
|
|
|
|
lock file:
|
|
|
|
|
|
|
|
```console
|
2022-08-04 10:45:30 +03:00
|
|
|
# nix flake update --commit-lock-file
|
2021-02-26 15:55:54 +02:00
|
|
|
* Updated 'nix': 'github:NixOS/nix/9fab14adbc3810d5cc1f88672fde1eee4358405c' -> 'github:NixOS/nix/8927cba62f5afb33b01016d5c4f7f8b7d0adde3c'
|
|
|
|
* Updated 'nixpkgs': 'github:NixOS/nixpkgs/3d2d8f281a27d466fa54b469b5993f7dde198375' -> 'github:NixOS/nixpkgs/a3a3dda3bacf61e8a39258a0ed9c924eeca8e293'
|
2020-12-23 14:19:53 +02:00
|
|
|
…
|
|
|
|
warning: committed new revision '158bcbd9d6cc08ab859c0810186c1beebc982aad'
|
|
|
|
```
|
|
|
|
|
|
|
|
# Description
|
|
|
|
|
2021-02-26 15:55:54 +02:00
|
|
|
This command recreates the lock file of a flake (`flake.lock`), thus
|
2022-12-07 13:58:58 +02:00
|
|
|
updating the lock for every unlocked input (like `nixpkgs`) to its
|
2021-02-26 15:55:54 +02:00
|
|
|
current version. This is equivalent to passing `--recreate-lock-file`
|
|
|
|
to any command that operates on a flake. That is,
|
2020-12-23 14:19:53 +02:00
|
|
|
|
|
|
|
```console
|
2021-02-26 15:55:54 +02:00
|
|
|
# nix flake update
|
2020-12-23 14:19:53 +02:00
|
|
|
# nix build
|
|
|
|
```
|
|
|
|
|
|
|
|
is equivalent to:
|
|
|
|
|
|
|
|
```console
|
2021-02-26 15:55:54 +02:00
|
|
|
# nix build --recreate-lock-file
|
2020-12-23 14:19:53 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
)""
|