-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
39 lines (32 loc) · 1.55 KB
/
Copy pathjustfile
File metadata and controls
39 lines (32 loc) · 1.55 KB
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
set shell := ["fish", "-c"]
export NIX_CONFIG := "warn-dirty = false"
export NH_OS_FLAKE := "."
niri-cfg hostname=`hostname`:
nix eval --override-input niri /home/sodiboo/niri-flake --raw --show-trace .#nixosConfigurations.{{hostname}}.config.home-manager.users.sodiboo --apply 'cfg: cfg.programs.niri.finalConfig'
niri-cfg-validate hostname=`hostname`:
just niri-cfg {{hostname}} > config.kdl
cat config.kdl; echo
nix run --quiet --quiet --override-input niri /home/sodiboo/niri-flake .#nixosConfigurations.{{hostname}}.config.programs.niri.package -- validate --config config.kdl
niri-cfg-watch hostname=`hostname`:
begin fd .nix ~/niri-flake; fd .nix .; end | entr -cr just niri-cfg-validate {{hostname}}
niri-cfg-reload:
just niri-cfg > config.kdl
cat config.kdl | rg gestures -A 15 || true
env /proc/$(echo $NIRI_SOCKET | rg '\.(\d+)\.sock$' -or '$1')/exe validate --config config.kdl
cp config.kdl active-config.kdl
ln -sf $PWD/active-config.kdl ~/.config/niri/config.kdl
niri-cfg-hot-reload:
begin fd .nix ~/niri-flake; fd '(^justfile|\.(nix|glsl))$' .; end | entr -cr just niri-cfg-reload
niri-rebuild:
nixos-rebuild --quiet --quiet --override-input niri /home/sodiboo/niri-flake build
build hostname=`hostname`:
nom build .#nixosConfigurations.{{hostname}}.config.system.build.toplevel
nixfmt := `if command -v nixfmt >/dev/null; echo nixfmt; else; echo nix fmt --; end`
fmt:
@[ ! -L result ] || rm result
{{ nixfmt }} --quiet **.nix
prep: fmt
nix flake update
git add .
sys *ARGS: prep
nh os {{ARGS}}