justfiles
This commit is contained in:
parent
d93dd1e643
commit
93d9761e03
28
Makefile
28
Makefile
@ -2,28 +2,6 @@
|
||||
.PHONY: rebuild-macos
|
||||
|
||||
## Management
|
||||
|
||||
git-add:
|
||||
git add .
|
||||
|
||||
update: update-neovim
|
||||
|
||||
update-os:
|
||||
sudo nixos-rebuild switch
|
||||
|
||||
update-neovim:
|
||||
nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
|
||||
|
||||
sync:
|
||||
sudo nix-channel --update
|
||||
nix-channel --update
|
||||
|
||||
clean:
|
||||
sudo nix-collect-garbage --delete-older-than 7d
|
||||
home-manager expire-generations "-7 days"
|
||||
|
||||
rebuild-macos: git-add
|
||||
./rebuild-macos.sh
|
||||
|
||||
rebuild-ubuntu: git-add
|
||||
./rebuild-ubuntu.sh
|
||||
install-just:
|
||||
curl --proto '=https' --tlsv1.3 -sSf https://just.systems/install.sh | bash -s -- --to ~/
|
||||
sudo cp ~/just /usr/local/bin
|
||||
|
35
justfile
Normal file
35
justfile
Normal file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env -S just --justfile
|
||||
|
||||
# Naive check if /Users or /home for home.
|
||||
OS := if "${HOME}" =~ '/U.*' { "macos" } else { "ubuntu" }
|
||||
HOSTNAME := `hostname| sed 's/.local//'`
|
||||
|
||||
git-add:
|
||||
git add .
|
||||
|
||||
update: update-neovim
|
||||
|
||||
update-os:
|
||||
sudo nixos-rebuild switch
|
||||
|
||||
update-neovim:
|
||||
nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
|
||||
|
||||
sync:
|
||||
sudo nix-channel --update
|
||||
nix-channel --update
|
||||
|
||||
clean:
|
||||
sudo nix-collect-garbage --delete-older-than 7d
|
||||
home-manager expire-generations "-7 days"
|
||||
|
||||
rebuild: git-add clean
|
||||
just rebuild-{{OS}}
|
||||
|
||||
rebuild-macos:
|
||||
./result/sw/bin/darwin-rebuild switch --flake ./hosts/{{HOSTNAME}}
|
||||
|
||||
rebuild-ubuntu:
|
||||
NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/tyrel/channels/nixpkgs:/nix/var/nix/profiles/per-user/tyrel/channels
|
||||
nix run ./hosts/{{HOSTNAME}} switch -vv
|
||||
home-manager switch --flake ./hosts/{{HOSTNAME}}
|
Loading…
Reference in New Issue
Block a user