--- # yaml-language-server: $schema=https://taskfile.dev/schema.json version: '3' tasks: arch: desc: Set up Arch Linux tools cmd: '{{.PKGMGR}} -Syu --needed --noconfirm --noprogressbar $(cat {{.ROOT_DIR}}/.taskfiles/workstation/Archfile | xargs)' vars: PKGMGR: sh: command -v paru || command -v yay preconditions: - msg: Missing paru or yay sh: command -v paru &>/dev/null || command -v yay &>/dev/null - msg: Missing Archfile sh: test -f {{.ROOT_DIR}}/.taskfiles/workstation/Archfile brew: desc: Set up Homebrew tools cmds: - brew bundle --file {{.ROOT_DIR}}/.taskfiles/workstation/Brewfile sources: - '{{.ROOT_DIR}}/.taskfiles/workstation/Brewfile' generates: - '{{.ROOT_DIR}}/.taskfiles/workstation/Brewfile.lock.json' preconditions: - msg: Missing brew sh: command -v brew &>/dev/null - msg: Missing Brewfile sh: test -f {{.ROOT_DIR}}/.taskfiles/workstation/Brewfile direnv: desc: Run direnv hooks cmd: direnv allow . status: - '[[ $(direnv status --json | jq ".state.foundRC.allowed") == 0 ]]' - '[[ $(direnv status --json | jq ".state.loadedRC.allowed") == 0 ]]' preconditions: - msg: Missing direnv sh: command -v direnv &>/dev/null generic-linux: desc: Setup CLI tools into the projects .bin directory dir: '{{.ROOT_DIR}}/.bin' platforms: ['linux/amd64', 'linux/arm64'] cmds: - for: - budimanjojo/talhelper?as=talhelper - cloudflare/cloudflared?as=cloudflared - FiloSottile/age?as=age - fluxcd/flux2?as=flux - helmfile/helmfile?as=helmfile - jqlang/jq?as=jq - kubernetes-sigs/kustomize?as=kustomize - mikefarah/yq?as=yq - siderolabs/talos?as=talosctl - yannh/kubeconform?as=kubeconform cmd: curl -fsSL "https://i.jpillora.com/{{.ITEM}}&type=script" | bash - cmd: | curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"; curl -sSfL -o sops https://github.com/getsops/sops/releases/latest/download/sops-v3.9.1.linux.amd64 platforms: ['linux/amd64'] - cmd: | curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl"; curl -sSfL -o sops https://github.com/getsops/sops/releases/latest/download/sops-v3.9.1.linux.arm64 platforms: ['linux/arm64'] - cmd: chmod +x kubectl sops - cmd: curl -sSfL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash - cmd: curl -sSfL https://github.com/mitsuhiko/minijinja/releases/latest/download/minijinja-cli-installer.sh | bash env: MINIJINJA_CLI_INSTALL_DIR: '.' HELM_INSTALL_DIR: '.' USE_SUDO: 'false' venv: desc: Set up virtual environment cmds: - python3 -m venv {{.VIRTUAL_ENV}} - '{{.VIRTUAL_ENV}}/bin/python3 -m pip install --upgrade pip setuptools wheel' - '{{.VIRTUAL_ENV}}/bin/python3 -m pip install --upgrade --requirement "{{.ROOT_DIR}}/requirements.txt"' sources: - '{{.ROOT_DIR}}/requirements.txt' generates: - '{{.VIRTUAL_ENV}}/pyvenv.cfg' preconditions: - msg: Missing python3 sh: command -v python3 &>/dev/null - msg: Missing Pip requirements file sh: test -f {{.ROOT_DIR}}/requirements.txt