This commit is contained in:
commit
30ce0dafc2
195 changed files with 8902 additions and 0 deletions
42
.forgejo/workflows/ci.yml
Normal file
42
.forgejo/workflows/ci.yml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
name: Nix CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
|
||||
- name: Enable flakes
|
||||
run: |
|
||||
mkdir -p ~/.config/nix
|
||||
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
|
||||
|
||||
- name: Setup SOPS key
|
||||
if: env.SOPS_AGE_KEY != ''
|
||||
run: |
|
||||
echo "$SOPS_AGE_KEY" > /tmp/key.txt
|
||||
export SOPS_AGE_KEY_FILE=/tmp/key.txt
|
||||
env:
|
||||
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
|
||||
|
||||
- name: Flake check
|
||||
run: nix flake check
|
||||
|
||||
- name: Build all hosts
|
||||
run: |
|
||||
nix flake show --json | jq -r '
|
||||
.nixosConfigurations | keys[]' | while read host; do
|
||||
echo "Building $host"
|
||||
nix build .#nixosConfigurations.$host.config.system.build.toplevel
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue