nix/taskfile.yaml

48 lines
901 B
YAML

---
version: "3"
set: [errexit, pipefail, nounset]
shopt: [globstar]
tasks:
check:sh:
cmds:
- shellcheck **/*.sh
sources:
- "**/*.sh"
check:typos:
cmds:
- typos .
check:flake:
cmds:
- nix flake check
sources:
- "**/*.nix"
nixos:build:*:
vars:
TARGET: "{{index .MATCH 0}}"
cmds:
- nixos-rebuild --flake .#{{.TARGET}} build
nixos:switch:*:
vars:
TARGET: "{{index .MATCH 0}}"
cmds:
- doas nixos-rebuild --flake .#{{.TARGET}} switch
nixos:test:*:
vars:
TARGET: "{{index .MATCH 0}}"
cmds:
- doas nixos-rebuild --flake .#{{.TARGET}} test
home:build:*:
vars:
TARGET: "{{index .MATCH 0}}"
cmds:
- home-manager build --flake .#{{.TARGET}}
home:switch:*:
vars:
TARGET: "{{index .MATCH 0}}"
cmds:
- home-manager switch --flake .#{{.TARGET}}