mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-15 20:07:55 +08:00
Simplify justfile
This commit is contained in:
parent
862f6ee936
commit
4ebcb2b860
1 changed files with 20 additions and 30 deletions
50
justfile
50
justfile
|
|
@ -1,55 +1,45 @@
|
|||
default:
|
||||
@just --list
|
||||
|
||||
# Main commands
|
||||
# --------------------------------------------------------------------------------------------------
|
||||
|
||||
# Activate local configuration (home if exists, else system)
|
||||
[group('main')]
|
||||
activate:
|
||||
if [ -f ./configurations/home/$USER@$HOSTNAME.nix ]; then \
|
||||
set -x; nix run . $USER@$HOSTNAME; \
|
||||
@if [ -f ./configurations/home/$USER@$HOSTNAME.nix ]; then \
|
||||
just deploy $USER@$HOSTNAME; \
|
||||
else \
|
||||
set -x; nix run . $HOSTNAME; \
|
||||
just deploy $HOSTNAME; \
|
||||
fi
|
||||
|
||||
# Update primary flame inputs
|
||||
[group('main')]
|
||||
update:
|
||||
nix run .#update
|
||||
|
||||
# Deploy to Beelink
|
||||
[group('deploy')]
|
||||
pureintent:
|
||||
nix run . pureintent
|
||||
# Deploy to a given host
|
||||
[group('main')]
|
||||
deploy host:
|
||||
@echo "Deploying to {{host}} ..."
|
||||
@nix run . {{host}}
|
||||
|
||||
# Deploy to infinitude (mac)
|
||||
[group('deploy')]
|
||||
infinitude:
|
||||
nix run . infinitude
|
||||
# Run all pre-commit hooks on all files
|
||||
[group('main')]
|
||||
lint:
|
||||
pre-commit run --all-files
|
||||
|
||||
# Activate home config on stillness
|
||||
[group('deploy')]
|
||||
stillness:
|
||||
nix run . $USER@
|
||||
|
||||
# Deploy to orb nixos machine
|
||||
# [group('deploy')]
|
||||
# orb:
|
||||
# nix run . orb-nixos
|
||||
|
||||
# Deploy to tart VM
|
||||
[group('deploy')]
|
||||
tart:
|
||||
nix run . infinitude-nixos
|
||||
# Misc commands
|
||||
# --------------------------------------------------------------------------------------------------
|
||||
|
||||
# SSH to tart CM
|
||||
[group('ssh')]
|
||||
[group('misc')]
|
||||
tart-ssh:
|
||||
ssh $(tart ip nixos-vm)
|
||||
|
||||
# Run all pre-commit hooks on all files
|
||||
pca:
|
||||
pre-commit run --all-files
|
||||
|
||||
# https://discourse.nixos.org/t/why-doesnt-nix-collect-garbage-remove-old-generations-from-efi-menu/17592/4
|
||||
[group('misc')]
|
||||
fuckboot:
|
||||
sudo nix-collect-garbage -d
|
||||
sudo /run/current-system/bin/switch-to-configuration boot
|
||||
sudo /run/current-system/bin/switch-to-configuration boot
|
||||
Loading…
Add table
Add a link
Reference in a new issue