Files
Nix-Vibe/home-manager/modules/tools/justfile
T
petere eb08cd4282 Nix-Vibe public snapshot (squashed history)
Current state of main at 0240060 feat(hp-laptop): install TeleportFling from its flake. History intentionally
collapsed to a single commit; this repo mirrors only the latest state.
2026-09-19 13:53:39 +01:00

54 lines
1.4 KiB
Makefile

nix_flake := "/home/petere/Nix-Vibe"
hostname := `hostname`
# list available recipes
default:
@just --list --justfile {{justfile()}} 2>/dev/null || echo "Run: just -g --list"
# rebuild current system
[group('NixOS')]
update:
cd {{nix_flake}} && sudo nixos-rebuild switch --flake .#{{hostname}}
# remote deploy: just deploy x470
[group('NixOS')]
deploy target:
cd {{nix_flake}} && nixos-rebuild switch --target-host petere@{{target}} --flake .#{{target}} --sudo
# update flake.lock
[group('NixOS')]
flake-lock:
cd {{nix_flake}} && nix flake update
# update flake + rebuild
[group('NixOS')]
upgrade:
cd {{nix_flake}} && nix flake update && sudo nixos-rebuild switch --flake .#{{hostname}}
# build without switching (test config)
[group('NixOS')]
build:
cd {{nix_flake}} && nixos-rebuild build --flake .#{{hostname}}
# dry activation (check if config is valid)
[group('NixOS')]
check:
cd {{nix_flake}} && nixos-rebuild dry-activate --flake .#{{hostname}}
# switch home-manager config only
[group('NixOS')]
hm-switch:
cd {{nix_flake}} && home-manager switch --flake .#{{hostname}}
# garbage collect nix store
[group('System')]
gc:
nix-collect-garbage -d
sudo nix-collect-garbage -d
# remove old generations
[group('System')]
clean:
sudo nix-env --delete-generations old -p /nix/var/nix/profiles/system
sudo nix-collect-garbage -d