-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
34 lines (26 loc) · 850 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
set shell := ["nu", "-c"]
default:
just -l
show-profile:
nix profile history --profile /nix/var/nix/profiles/system
# switch build
local name mode="default":
use command.nu *; \
nixos-switch {{name}} {{mode}}
# test build
local-test host:
nom build ".#nixosConfigurations.{{host}}.config.system.build.toplevel" --show-trace --verbose
nixos-rebuild test --use-remote-sudo --flake .#{{host}} --show-trace --verbose
repl:
nix repl -f flake:nixpkgs
update:
nix flake update
# name := flake inputs
update-lock name:
nix flake lock --update-input {{name}}
# clean all/profile
nixgc:
sudo nix store gc --debug
sudo nix-collect-garbage --delete-old
nixos-clean-profiles:
sudo nh clean profile --keep-since 7d --keep 8 --nogc /nix/var/nix/profiles/system