aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/nix.yml
blob: 03fa711d4cac0e94886f1c10460cdedab3eb89e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Nix

on:
  pull_request:
    types: [opened, synchronize, reopened]
  push:
    branches: [master]
    paths-ignore:
      - "website/**"

permissions:
  contents: read

concurrency:
  group: nix-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  flake-check:
    name: flake check
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6
        with:
          persist-credentials: false

      - name: Run Nix flake check
        run: |
          docker run --rm \
            -v "$PWD:/work" \
            -w /work \
            docker.io/nixos/nix:2.31.2 \
            sh -c 'git config --global --add safe.directory /work && nix --extra-experimental-features "nix-command flakes" flake check --print-build-logs && nix --extra-experimental-features "nix-command flakes" flake check --all-systems --no-build --print-build-logs'