-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Description
Implement a pre-commit hook to validate Nix flakes using nix flake check.
Requirements
- Check for
nixcommand availability with flakes enabled - Run
nix flake checkon flake.nix files - Support both local and remote flakes
- Provide clear error messages for validation failures
- Handle cases where experimental features might not be enabled
Implementation Details
- Location:
hooks/nix/nix-flake-check.sh - Language: bash script
- File pattern:
flake.nix
Testing
- Test with valid flake.nix
- Test with invalid flake.nix
- Test with missing inputs
- Test with evaluation errors
Configuration in .pre-commit-hooks.yaml
- id: nix-flake-check
name: Check Nix flakes
description: Validates Nix flakes using 'nix flake check'
entry: hooks/nix/nix-flake-check.sh
language: script
files: flake\.nix$Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request