Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 925 Bytes

useful-commands.md

File metadata and controls

45 lines (30 loc) · 925 Bytes

Useful commands

Update dependencies

Update all dependencies of this flake and recreate the lock file.

nix flake update --commit-lock-file

Don't forget to commit the changes every time you update the flakes this repository depends on:

git add .
git commit -m 'nix flake update'
git push

Format nix code

Format all nix code with alejandra (keep in mind that the kamadorueda.alejandra VS Code extension formats a nix file on save):

alejandra .

Nix store optimization and cleanup

Perform garbage collection on the Nix store:

nix store gc --debug

Optimize the Nix store (this takes some time):

nix-store --optimise

Remove Home-Manager generations older than a given date:

home-manager expire-generations "2023-12-31 23:59"