-
-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathjustfile
More file actions
31 lines (23 loc) · 869 Bytes
/
Copy pathjustfile
File metadata and controls
31 lines (23 loc) · 869 Bytes
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
default: switch
[linux]
switch *flags: git-add
sudo nixos-rebuild switch --flake $HOME/.dotfiles --impure {{flags}}
[macos]
switch *flags: git-add
nix run -- nix-darwin switch --flake $HOME/.dotfiles {{flags}}
trace: (switch "--show-trace")
home: git-add
nix run -- home-manager switch --flake $HOME/.dotfiles#$(hostname)
update: git-commit-flakes git-add
nix flake update --option access-tokens "github.com=$(gh auth token)"
update-private: git-add
nix flake update dotfiles-private
git-commit-flakes:
#!/usr/bin/env sh
if git -C $HOME/.dotfiles status --porcelain -- flake.lock | grep -q .; then
git -C $HOME/.dotfiles add flake.lock
git -C $HOME/.dotfiles commit -m "update flakes"
fi
git-add:
git -C $HOME/.dotfiles add --intent-to-add --all
git -C $HOME/.dotfiles-private add --intent-to-add --all