stages:
- generate
- packages
- cache

generate-flake-ci:
  stage: generate
  script:
  - nix run develop/#flake-to-gitlab-ci > flake-ci-x86_64-linux.yml
  artifacts:
    paths:
      - flake-ci-x86_64-linux.yml

x86_64-linux-ci:
  stage: packages
  trigger:
    include:
      - artifact: flake-ci-x86_64-linux.yml
        job: generate-flake-ci
    strategy: depend

cachix:
  stage: cache
  only:
    refs:
    - master
    - cachix
    - lts/*
  script:
  - nix run develop/#cachix-push-horizon-devour
