nix-config/justfile
Gabe Venberg 380b92d50b justfile defaults to building current machines config.
I think just is still a good fit for this. Much more and a nushell
script might be more appropriate.
2024-03-27 18:05:32 -05:00

22 lines
657 B
Makefile

default:
just --list
nixos target=`hostname`:
sudo nixos-rebuild --flake .#{{target}} switch
home-manager target=(`whoami`+"@"+`hostname`):
home-manager --flake .#{{target}} switch
check-home-manager target=(`whoami`+"@"+`hostname`):
home-manager build --no-out-link --flake .#{{target}}
bootstrap-home-manager target=(`whoami`+"@"+`hostname`):
nix run --extra-experimental-features "nix-command flakes" --no-write-lock-file github:nix-community/home-manager/ -- --extra-experimental-features "nix-command flakes" --flake .#{{target}} switch
format:
nix fmt
home-gc:
home-manager expire-generations -7days
nix store gc