Files
nixbox-config/.gitea/workflows/validate-nixos-config.yml
T
mapclyps e7030b9c1a
Validate NixOS Config / validate (push) Failing after 12s
added connectivity test
2024-08-24 23:48:42 +00:00

36 lines
961 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 # This assumes you have a runner with the "flakes-action" label
container:
image: nixpkgs/nix-flakes
options: --network host
steps:
- name: Install Node.js
run: |
ping google.de -c10
nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
nix-channel --update
nix-env -i nodejs-slim
- name: Checkout repository
uses: actions/checkout@v3
- name: Validate NixOS configuration
run: |
node --version
nix flake check
nix build .#nixosConfigurations.nixbox.config.system.build.toplevel --dry-run
env:
NIX_CONFIG: "experimental-features = nix-command flakes"