-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
37 lines (27 loc) · 898 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
default: help
# List all available tasks
help:
@echo "Available tasks:"
just --list
# Shell setting: Use bash and enable strict error checking
set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
# Define variables such as username
username := "mei"
darwinHost := "mei-darwin"
# 1) Task to update the flake only
update-flake:
@echo "Updating flake..."
nix flake update
# 2) Task to update Home Manager only
update-home:
@echo "Updating Home Manager config..."
nix run nixpkgs#home-manager -- switch --flake .#{{username}}
# 3) Task to update nix-darwin only
update-darwin:
@echo "Updating nix-darwin config..."
nix run nix-darwin -- switch --flake .#{{darwinHost}}
# 4) Update everything together (if needed) Specifying them as dependent tasks will run them in sequence
update-all: update-flake update-home update-darwin
gc:
@echo "Garbage collecting..."
nix store gc