---
on: [push]
jobs:
  check:
    runs-on: cache.kaareskovgaard.net
    steps:
      - uses: actions/checkout@v4
      - run: |
          nix flake check
  dev-shell:
    runs-on: cache.kaareskovgaard.net
    steps:
      - uses: actions/checkout@v4
      - run: |
          nix build --no-link '.#devShells.x86_64-linux.default'
  rust-packages:
    runs-on: cache.kaareskovgaard.net
    steps:
      - uses: actions/checkout@v4
      - run: |
          nix build --no-link '.#packages.x86_64-linux.hetzner-static-ip'
          nix build --no-link '.#packages.x86_64-linux.openbao-helper'
  terraform-providers:
    runs-on: cache.kaareskovgaard.net
    steps:
      - uses: actions/checkout@v4
      - run: |
          nix build --no-link '.#packages.x86_64-linux.terraform-provider-cloudflare'
          nix build --no-link '.#packages.x86_64-linux.terraform-provider-hcloud'
          nix build --no-link '.#packages.x86_64-linux.terraform-provider-openstack'
          nix build --no-link '.#packages.x86_64-linux.terraform-provider-unifi'
          nix build --no-link '.#packages.x86_64-linux.terraform-provider-vault'
  systems:
    runs-on: cache.kaareskovgaard.net
    steps:
      - uses: actions/checkout@v4
      - run: |
          nix build --no-link '.#nixosConfigurations."desktop.kaareskovgaard.net".config.system.build.toplevel'
          nix build --no-link '.#nixosConfigurations."desktop.kaareskovgaard.net".config.system.build.vm'
          nix build --no-link '.#nixosConfigurations."test.kaareskovgaard.net".config.system.build.toplevel'
