hostname := "$HOSTNAME" # default action: list actions default: @just --list # Rebuild the system switch hostname=hostname: #!/usr/bin/env sh if [[ "$OSTYPE" == "darwin"* ]]; then \ sudo darwin-rebuild switch --flake .#{{ hostname }}; \ else \ sudo nixos-rebuild switch --flake .#{{ hostname }} --impure; \ fi; # Build a new configuration boot hostname=hostname: #!/usr/bin/env sh if [[ "$OSTYPE" == "darwin"* ]]; then \ @echo "This is not possible to do it on MacOS." else \ sudo nixos-rebuild boot --flake .#{{ hostname }} --impure; \ fi; # Format code format: nix fmt # Update dependencies update: nix flake update # Cleanup all unused packages and generations clean: nix-store --optimize nix-collect-garbage -d sudo nix-collect-garbage -d # Print size of the nix store size: du -sh /nix/store