-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.toml
57 lines (45 loc) · 1.2 KB
/
Makefile.toml
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
52
53
54
55
56
57
[env]
HOST = { script = ["hostname"] }
[tasks.apply]
linux_alias = "nixos:apply"
mac_alias = "darwin:apply"
[tasks."xps15:apply"]
description = "Run nixos-rebuild switch"
extend = "nixos:apply"
env = { HOST = "xps15" }
[tasks."nixos:apply"]
script = '''
sudo nixos-rebuild switch --flake ".#${HOST}" --show-trace
'''
[tasks."prox86:apply"]
extend = "darwin:apply"
env = { HOST = "prox86" }
[tasks."fraim:apply"]
extend = "darwin:apply"
env = { HOST = "fraim" }
[tasks."darwin:apply"]
script = '''
nix build .#darwinConfigurations.${HOST}.system --extra-experimental-features 'nix-command flakes'
sudo ./result/sw/bin/darwin-rebuild switch --flake ".#${HOST}"
'''
[tasks.format]
description = "Run formatter"
command = "nix"
args = ["fmt"]
# Should we use nix flake update ?
[tasks.update]
command = "nix"
args = ["flake", "lock", "--update-input", "nixpkgs"]
[tasks.check]
command = "nix"
args = ["flake", "check"]
[tasks.gc]
script = '''
sudo nix profile wipe-history --extra-experimental-features 'nix-command flakes' --profile /nix/var/nix/profiles/system --older-than 7d
sudo nix store gc --debug --extra-experimental-features 'nix-command flakes'
'''
[tasks.clean]
clear = true
script = '''
rm -rf result
'''