Skip to content

Commit

Permalink
feat: replace 'nix flake lock --update-input' with 'nix flake update'
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan4yin committed Jun 3, 2024
1 parent 9c6ff9b commit 8ca5f58
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/best-practices/simplify-nixos-related-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ up:
# Update specific input
# usage: make upp i=home-manager
upp:
nix flake lock --update-input $(i)
nix flake update $(i)

history:
nix profile history --profile /nix/var/nix/profiles/system
Expand Down
2 changes: 1 addition & 1 deletion docs/nixos-with-flakes/update-the-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ in `/etc/nixos` or any other location where you keep the configuration:
nix flake update

# Or replace only the specific input, such as home-manager:
nix flake lock --update-input home-manager
nix flake update home-manager

# Apply the updates
sudo nixos-rebuild switch --flake .
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/best-practices/simplify-nixos-related-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ up:
# Update specific input
# usage: make upp i=home-manager
upp:
nix flake lock --update-input $(i)
nix flake update $(i)

history:
nix profile history --profile /nix/var/nix/profiles/system
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/nixos-with-flakes/update-the-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
nix flake update

# 或者也可以只更新特定的依赖项,比如只更新 home-manager:
nix flake lock --update-input home-manager
nix flake update home-manager

# 部署系统
sudo nixos-rebuild switch --flake .
Expand Down

0 comments on commit 8ca5f58

Please sign in to comment.