Christoph Heiss
67581b24f0
All checks were successful
flake / build (push) Successful in 3m44s
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
39 lines
995 B
YAML
39 lines
995 B
YAML
---
|
|
name: flake
|
|
|
|
on:
|
|
push:
|
|
|
|
env:
|
|
NIX_CONFIG: 'experimental-features = nix-command flakes'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: nixos-unstable
|
|
steps:
|
|
- name: prepare nix container
|
|
run: |
|
|
nix-env -iA nixpkgs.nodejs nixpkgs.gnused nixpkgs.curl nixpkgs.gnupg
|
|
|
|
- name: checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: prepare flake and secrets
|
|
run: |
|
|
set -x
|
|
for f in $(find secrets/ -type f -name '*.nix'); do
|
|
echo '{ }' > "$f";
|
|
done
|
|
# do not try to evaluate partly stubbed-out machine configs
|
|
regex='nixosConfigurations = \(.*\);$'
|
|
replacement='nixosConfigurations =\n builtins.trace (\1) { };'
|
|
sed -i "s/$regex/$replacement/" flake.nix
|
|
|
|
- name: check git history
|
|
run: |
|
|
curl -L -o - 'https://c8h4.io/gpg.asc' | gpg --import
|
|
nix run .#check-git-history
|
|
|
|
- name: run flake check
|
|
run: nix flake check -L
|