generated from ryantm/home-manager-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
46 lines (35 loc) · 1.11 KB
/
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
# Inspired from: https://github.com/eh8/chenglab/blob/main/justfile
default:
just --list
deploy machine ip='':
#!/usr/bin/env sh
if [ {{machine}} = "macos" ]; then
darwin-rebuild switch --flake .
elif [ -z "{{ip}}" ]; then
sudo nixos-rebuild switch --fast --flake ".#{{machine}}"
else
nixos-rebuild switch --fast --flake ".#{{machine}}" --use-remote-sudo --target-host "eh8@{{ip}}" --build-host "eh8@{{ip}}"
fi
home conf:
#!/usr/bin/env sh
home-manager switch --flake .#{{conf}} --impure
up:
nix flake update
lint:
statix check .
gc:
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d && sudo nix store gc
gc-hm:
nix-collect-garbage --delete-older-than 7d
repair:
sudo nix-store --verify --check-contents --repair
sopsedit:
sops secrets/secrets.yaml
sopsrotate:
for file in secrets/*; do sops --rotate --in-place "$file"; done
sopsupdate:
for file in secrets/*; do sops updatekeys "$file"; done
build-iso:
nix build .#nixosConfigurations.iso1chng.config.system.build.isoImage
update-keys:
ls secrets/*.yaml | xargs -I {} sops updatekeys -y {}