-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
53 lines (36 loc) · 1.51 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
47
48
49
50
51
52
53
set shell := ["bash", "-c"]
switch:
if [[ -n "$DISPLAY" ]]; then time nix run .#home-manager -- switch --flake .#gui --impure -b backup; fi
if [[ -z "$DISPLAY" ]]; then time nix run .#home-manager -- switch --flake .#cli --impure -b backup; fi
switch-gui:
time nix run .#home-manager -- switch --flake .#gui --impure -b backup
switch-cli:
time nix run .#home-manager -- switch --flake .#cli --impure -b backup
format:
time nix run nixpkgs#nixfmt-rfc-style -- --strict .
update:
time nix flake update
clean:
time nix-collect-garbage -d
update-bashrc:
podman run --rm docker://rockylinux:9 bash -c "cat /etc/skel/.bashrc" > .bashrc
podman run --rm docker://rockylinux:9 bash -c "cat /etc/skel/.bash_profile" > .bash_profile
clear-nvim:
rm -rf ~/.cache/nvim ~/.local/share/nvim ~/.local/state/nvim
remove-lazy-lock:
rm .config/nvim/lazy-lock.json || true
add-lazy-lock:
cp ~/.config/nvim/lazy-lock.json .config/nvim/
git add .config/nvim/lazy-lock.json
update-flathub-list:
flatpak list --columns "origin,application" --app | grep flathub > flatpak.flathub.txt
install-flathub-flatpaks:
cat flatpak.flathub.txt | tr '\n' '\0' | xargs -0 -r -I{} bash -c 'flatpak install -y {}'
gh-login:
gh auth login -s user
bw-config:
bw config server https://passwords.home.ohmymndy.com
bw-login:
bw login --raw "$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /user/emails | jq -r ".[0].email")"
bw-unlock:
bw unlock --raw