-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
51 lines (40 loc) · 1012 Bytes
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
z_session := "nix"
_default:
@clear -x; just --list
# Download and start a NixOS builder container
darwin-builder:
nix run nixpkgs#darwin.builder
# Update flake.lock
update:
nix flake update
alias rebuild := apply
# Runs the `just` target for the current host
apply target=`hostname`:
just {{target}}
# Start a Zellij session to make quick edits
edit: && _cleanup
@zellij \
--config-dir=$HOME/.config/zellij \
--layout=zellij-layout.kdl \
attach {{z_session}} \
--force-run-commands \
--create
_theme host=`hostname`:
@hx --vsplit \
./host/{{host}}/configuration.nix \
./host/{{host}}/theme.nix:3:14
# Runs the `just` target when file changes are detected
watch:
@echo "Watching for changes..."
@fd | entr -pc sh -c 'just apply && echo Done'
_cleanup:
zellij delete-session {{z_session}}
[private]
Armstrong:
darwin-rebuild switch --flake .#Armstrong
[private]
pigeon:
darwin-rebuild switch --flake .#pigeon
[private]
ghastly:
sudo nixos-rebuild switch --flake .#ghastly