Skip to content

Add NixOS module, container integration test, and restructure flake #533

Add NixOS module, container integration test, and restructure flake

Add NixOS module, container integration test, and restructure flake #533

Workflow file for this run

name: "Test Nix Flake"
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
nix-develop-shell:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
- macos-latest
name: Nix on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: wimpysworld/nothing-but-nix@main
if: runner.os == 'Linux'
with:
hatchet-protocol: 'rampage'
nix-permission-edict: true
- uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hackage-server.cachix.org-1:iw0iRh6+gsFIrxROFaAt5gKNgIHejKjIfyRdbpPYevY=
substituters = https://cache.nixos.org/ https://hackage-server.cachix.org/
- uses: cachix/cachix-action@v17
with:
# https://nix.dev/tutorials/continuous-integration-github-actions#setting-up-github-actions
name: hackage-server
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: "Check `nix develop` shell"
run: nix develop --check
- name: "Check `nix develop` shell can run command"
run: nix develop --command "echo"
nix-build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
- macos-latest
name: Nix on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: wimpysworld/nothing-but-nix@main
if: runner.os == 'Linux'
with:
hatchet-protocol: 'rampage'
nix-permission-edict: true
- uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hackage-server.cachix.org-1:iw0iRh6+gsFIrxROFaAt5gKNgIHejKjIfyRdbpPYevY=
substituters = https://cache.nixos.org/ https://hackage-server.cachix.org/
# The following settings just affect Linux, but are harmless on macOS.
extra-experimental-features = nix-command flakes auto-allocate-uids cgroups
extra-system-features = uid-range
auto-allocate-uids = true
use-cgroups = true
- uses: cachix/cachix-action@v17
with:
# https://nix.dev/tutorials/continuous-integration-github-actions#setting-up-github-actions
name: hackage-server
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build
- continue-on-error: false
run: nix flake check