36f866ea9c
* docs: add better comments * add deploy-rs * wip * hackz * chore: make gc daily * chore: add --fast for haxing * fix: re-did home-manager --------- Co-authored-by: Truxnell <9149206+truxnell@users.noreply.github.com>
84 lines
2 KiB
YAML
84 lines
2 KiB
YAML
---
|
|
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
|
version: "3"
|
|
|
|
vars:
|
|
host: $HOSTNAME
|
|
|
|
tasks:
|
|
switch:
|
|
desc: Build and apply nix configuration
|
|
silent: true
|
|
requires:
|
|
vars:
|
|
- host
|
|
cmds:
|
|
- echo "This will switch your config."
|
|
- task: .prompt_to_continue
|
|
- sudo nixos-rebuild switch --flake "{{.ROOT_DIR}}/#{{.host}}" --impure
|
|
preconditions:
|
|
- sh: which nix
|
|
msg: "nix not found"
|
|
- sh: which nixos-rebuild
|
|
msg: "nixos-rebuild not found"
|
|
|
|
test:
|
|
desc: Build and apply nix configuration
|
|
silent: true
|
|
requires:
|
|
vars:
|
|
- host
|
|
cmds:
|
|
- echo "This will test your config."
|
|
- task: .prompt_to_continue
|
|
- sudo nixos-rebuild test --flake "{{.ROOT_DIR}}/#{{.host}}" --impure
|
|
preconditions:
|
|
- sh: which nix
|
|
msg: "nix not found"
|
|
- sh: which nixos-rebuild
|
|
msg: "nixos-rebuild not found"
|
|
|
|
dry-run:
|
|
desc: Build and apply nix configuration
|
|
silent: true
|
|
requires:
|
|
vars:
|
|
- host
|
|
cmds:
|
|
- echo "This will dry-run your config and add your untracked git files."
|
|
- git add .
|
|
- nixos-rebuild dry-run --flake "{{.ROOT_DIR}}/#{{.host}}" --impure
|
|
preconditions:
|
|
- sh: which nix
|
|
msg: "nix not found"
|
|
- sh: which nixos-rebuild
|
|
msg: "nixos-rebuild not found"
|
|
|
|
|
|
build:
|
|
desc: Build nix configuration
|
|
silent: true
|
|
requires:
|
|
vars:
|
|
- host
|
|
cmds:
|
|
- git add .
|
|
- nixos-rebuild build --flake "{{.ROOT_DIR}}/#{{.host}}" --impure --fast
|
|
- nvd diff /run/current-system result
|
|
preconditions:
|
|
- sh: which nix
|
|
msg: "nix not found"
|
|
- sh: which nixos-rebuild
|
|
msg: "nixos-rebuild not found"
|
|
- sh: which nvd
|
|
msg: "nvd not found"
|
|
|
|
.prompt_to_continue:
|
|
internal: true
|
|
prompt: Do you want to continue applying this configuration?
|
|
|
|
build-image-rpi4:
|
|
desc: Build basic machine build-image
|
|
silent: true
|
|
cmds:
|
|
- nix build .#images.rpi4
|