Skip to content

zellij: manage layouts with hm module #63

zellij: manage layouts with hm module

zellij: manage layouts with hm module #63

name: Build and Cache Dev Shells
permissions:
contents: read
on:
push:
branches: [main]
paths:
- "shells/**"
- "flake.nix"
- "flake.lock"
pull_request:
paths:
- "shells/**"
- "flake.nix"
- "flake.lock"
workflow_dispatch:
schedule:
# Run weekly to keep cache fresh
- cron: "0 2 * * 0"
jobs:
build-dev-shells:
name: Build dev shells on ${{ matrix.system }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- system: x86_64-linux
os: ubuntu-latest
- system: aarch64-darwin
os: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
auto-optimise-store = true
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
experimental-features = nix-command flakes
system = ${{ matrix.system }}
- name: Setup Cachix
uses: cachix/cachix-action@v16
with:
name: khanelinix
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Get dev shell list
id: shells
run: |
shells=$(nix flake show --json | jq -r '.devShells."${{ matrix.system }}" | keys[]' | tr '\n' ' ')
echo "shells=$shells" >> "$GITHUB_OUTPUT"
- name: Build and cache dev shells
run: |
for shell in ${{ steps.shells.outputs.shells }}; do
echo "Building dev shell: $shell"
nix develop .#$shell --command echo "Dev shell $shell built successfully"
done
- name: Build default dev shell
run: |-
echo "Building default dev shell"
nix develop --command echo "Default dev shell built successfully"