feat: nix: CI without depending on flakehub.com

This commit is contained in:
Igor Ramazanov 2025-03-12 23:59:03 +00:00 committed by Igor Ramazanov
parent e958813ccb
commit 95316ced46
3 changed files with 34 additions and 8 deletions

19
.github/workflows/nix-update-lock.yaml vendored Normal file
View File

@ -0,0 +1,19 @@
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
jobs:
update-flake-inputs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/update-flake-lock@main
with:
pr-title: "Update flake.lock"
pr-labels: |
dependencies
automated
- uses: DeterminateSystems/flake-checker-action@main
- run: nix flake check --all-systems

View File

@ -4,17 +4,20 @@ on:
push: push:
branches: branches:
- main - main
- nix
tags: tags:
- v?[0-9]+.[0-9]+.[0-9]+* - v?[0-9]+.[0-9]+.[0-9]+*
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
nix-ci: nix-ci:
uses: DeterminateSystems/ci/.github/workflows/workflow.yml@main runs-on: ubuntu-latest
permissions: steps:
id-token: write - uses: actions/checkout@v4
contents: read - uses: DeterminateSystems/nix-installer-action@main
with:
determinate: true
- uses: DeterminateSystems/flake-checker-action@main
- run: nix flake check --all-systems

View File

@ -26,13 +26,17 @@ rec {
inherit system; inherit system;
overlays = [devshell.overlays.default]; overlays = [devshell.overlays.default];
}; };
in { in rec {
formatter = pkgs.alejandra; formatter = pkgs.alejandra;
packages = { packages = {
headplane = pkgs.callPackage ./nix/package.nix {}; headplane = pkgs.callPackage ./nix/package.nix {};
headplane-agent = pkgs.callPackage ./nix/agent.nix {}; headplane-agent = pkgs.callPackage ./nix/agent.nix {};
}; };
devShell = pkgs.devshell.mkShell rec { checks.default = pkgs.symlinkJoin {
name = "headplane-with-agent";
paths = [packages.headplane packages.headplane-agent];
};
devShells.default = pkgs.devshell.mkShell rec {
name = description; name = description;
motd = let motd = let
providedPackages = pkgs.lib.concatStringsSep "\n" ( providedPackages = pkgs.lib.concatStringsSep "\n" (