diff --git a/.gitea/workflows/nix-checks.yml b/.gitea/workflows/nix-checks.yml new file mode 100644 index 0000000..3fbce35 --- /dev/null +++ b/.gitea/workflows/nix-checks.yml @@ -0,0 +1,43 @@ +name: nixos flake checks + +# Lives under .gitea/workflows/ because the only remote of this repo is +# gitea@git.zeroq.su (no GitHub remote), and Gitea Actions reads +# .gitea/workflows/ in preference to .github/workflows/. The copy that used +# to sit under .github/workflows/ therefore never ran a single step. +# See .agent/tasks/manifest.md T39. + +on: + push: + branches: [main, dev, master] + pull_request: + branches: [main, dev, master] + +jobs: + invariant-checks: + runs-on: ubuntu-latest + # The evaluation steps below walk every host configuration; a hung + # evaluation must not hold the runner forever. + timeout-minutes: 45 + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v27 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: install sops + run: nix profile install nixpkgs#sops + - name: run invariant checks + run: bash .ci/checks.sh + # Every step below must be able to fail the job. The previous + # revision ended each line with `|| true` and used `--dry-run`, + # so the job could never go red. `--dry-run` is kept because the + # point of this step is evaluation, not building; `--no-link` keeps + # the workspace clean of `result` symlinks. + - name: evaluate every host configuration + run: | + nix build --no-link --dry-run .#nixosConfigurations.default.config.system.build.toplevel + nix build --no-link --dry-run .#nixosConfigurations.atoridu.config.system.build.toplevel + nix build --no-link --dry-run .#nixosConfigurations.rydiwo.config.system.build.toplevel + nix build --no-link --dry-run .#nixosConfigurations.otreca.config.system.build.toplevel + nix build --no-link --dry-run .#nixosConfigurations.sapphira.config.system.build.toplevel + nix build --no-link --dry-run .#nixosConfigurations.wsl.config.system.build.toplevel + nix eval --raw .#nixOnDroidConfigurations.epral.config.system.stateVersion diff --git a/.github/workflows/nix-checks.yml b/.github/workflows/nix-checks.yml deleted file mode 100644 index d17a3cb..0000000 --- a/.github/workflows/nix-checks.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: nixos flake checks - -on: - push: - branches: [main, dev, master] - pull_request: - branches: [main, dev, master] - -jobs: - invariant-checks: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v27 - with: - nix_path: nixpkgs=channel:nixos-unstable - - name: install sops - run: nix-env -iA nixpkgs.sops - - name: run invariant checks - run: .ci/checks.sh - - name: build all NixOS configurations - run: | - nix build .#nixosConfigurations.atoridu.config.system.build.toplevel --dry-run || true - nix build .#nixosConfigurations.rydiwo.config.system.build.toplevel --dry-run || true - nix build .#nixosConfigurations.otreca.config.system.build.toplevel --dry-run || true - nix build .#nixosConfigurations.sapphira.config.system.build.toplevel --dry-run || true - nix build .#nixosConfigurations.wsl.config.system.build.toplevel --dry-run || true - nix eval .#nixOnDroidConfigurations.epral.config.system.stateVersion || true