35 lines
863 B
YAML
35 lines
863 B
YAML
name: Validate NixOS Config
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main # Adjust this to match your main branch name
|
|
pull_request:
|
|
branches:
|
|
- main # Adjust this to match your main branch name
|
|
|
|
|
|
jobs:
|
|
validate:
|
|
runs-on: nixos
|
|
steps:
|
|
- name: Debug environment
|
|
run: |
|
|
echo $PATH
|
|
which nix || echo "Nix not found"
|
|
which node || echo "node not found"
|
|
nix-shell -p nix nodejs-slim
|
|
which nix || echo "Nix not found"
|
|
which node || echo "node not found"
|
|
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Validate NixOS configuration
|
|
run: |
|
|
nix flake check
|
|
nix build .#nixosConfigurations.nixbox.config.system.build.toplevel --dry-run
|
|
env:
|
|
NIX_CONFIG: "experimental-features = nix-command flakes"
|