# SPDX-FileCopyrightText: atproto-nix.org 2026 # SPDX-License-Identifier: CC0-1.0 OR Unlicense { description = "atproto-nix.org nix user repository for atproto projects"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs?rev=25.11"; git-hooks.url = "github:cachix/git-hooks.nix"; alejandra.url = "github:kamadorueda/alejandra/4.0.0"; alejandra.inputs.nixpkgs.follows = "nixpkgs"; statix.url = "git+https://tangled.org/oppi.li/statix"; deadnix.url = "github:astro/deadnix"; }; outputs = inputs @ { self, nixpkgs, alejandra, ... }: let outputSystems = nixpkgs.lib.systems.flakeExposed; forAllSystems = function: nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed ( system: function ( import nixpkgs { inherit system; config.allowUnfree = true; } ) ); in { packages = forAllSystems (pkgs: {}); formatter = forAllSystems ( pkgs: let config = self.checks.${pkgs.system}.pre-commit-check.config; inherit (config) package configFile; script = '' ${pkgs.lib.getExe package} run --all-files --config ${configFile} ''; in pkgs.writeShellScriptBin "pre-commit-run" script ); checks = forAllSystems (pkgs: { pre-commit-check = inputs.git-hooks.lib.${pkgs.system}.run { src = ./.; hooks = { alejandra.enable = true; reuse.enable = true; statix.enable = true; deadnix.enable = true; }; }; }); devShells = forAllSystems (pkgs: { default = let inherit (self.checks.${pkgs.system}.pre-commit-check) shellHook enabledPackages; in pkgs.mkShell { inherit shellHook; buildInputs = enabledPackages; }; }); }; }