a linter for your flake.lock file
  • Rust 94.2%
  • Nix 5.8%
Find a file
2026-06-29 16:17:03 +01:00
.github/workflows ci: add tangled mirror 2025-08-12 17:03:08 +01:00
docs feat: treefmt support 2026-06-29 16:04:48 +01:00
src feat: treefmt support 2026-06-29 16:04:48 +01:00
test feat: treefmt support 2026-06-29 16:04:48 +01:00
tests feat: treefmt support 2026-06-29 16:04:48 +01:00
.envrc feat: init 2025-07-27 17:02:45 +01:00
.gitignore feat: init 2025-07-27 17:02:45 +01:00
Cargo.lock chore: 4.0.1 2026-06-29 16:17:03 +01:00
Cargo.toml chore: 4.0.1 2026-06-29 16:17:03 +01:00
default.nix fix: add test dir to src 2025-08-01 22:57:41 +01:00
flake.lock feat: add ignore flag 2026-06-29 15:01:46 +01:00
flake.nix chore: bump flake 2026-05-25 23:11:06 +01:00
LICENSE feat: init 2025-07-27 17:02:45 +01:00
shell.nix feat: init 2025-07-27 17:02:45 +01:00

Locker

Locker is a tool designed to lint your flake.lock file to find duplicate entries by their flake uri.

demo image

Usage

locker <flake-lock-file>

treefmt

locker can run as a treefmt formatter. It checks rather than rewrites files, so a non-zero exit reports the check as failed.

[formatter.locker]
command = "locker"
includes = ["flake.lock"]

treefmt passes every matched flake.lock as a positional argument; locker checks each one and fails the run if any contains duplicate inputs.

GitHub Action

name: Validate Flake Lock

on:
  workflow_dispatch:
  push:
    paths:
      - "**.lock"

jobs:
  check-flake:
    name: Check Lock
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install Nix
        uses: cachix/install-nix-action@v31

      - name: Check flake.lock
        run: nix run github:tgirlcloud/locker