diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9dd7cea..7f3e77d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,3 +12,8 @@ repos: - id: ruff-format - id: ruff args: [ --fix ] + - repo: https://github.com/kamadorueda/alejandra + rev: 3.0.0 + hooks: + # Requires Alejandra to be previously installed in the system + - id: alejandra-system diff --git a/flake.lock b/flake.lock index 0c55fa2..770a058 100644 --- a/flake.lock +++ b/flake.lock @@ -1,80 +1,6 @@ { "nodes": { - "alejandra": { - "inputs": { - "fenix": "fenix", - "flakeCompat": "flakeCompat", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1694541876, - "narHash": "sha256-lStDIPizbJipd1JpNKX1olBKzyIosyC2U/mVFwJPcZE=", - "owner": "kamadorueda", - "repo": "alejandra", - "rev": "e53c2c6c6c103dc3f848dbd9fbd93ee7c69c109f", - "type": "github" - }, - "original": { - "owner": "kamadorueda", - "repo": "alejandra", - "type": "github" - } - }, - "fenix": { - "inputs": { - "nixpkgs": [ - "alejandra", - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1668234453, - "narHash": "sha256-FmuZThToBvRsqCauYJ3l8HJoGLAY5cMULeYEKIaGrRw=", - "owner": "nix-community", - "repo": "fenix", - "rev": "8f219f6b36e8d0d56afa7f67e6e3df63ef013cdb", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, - "flakeCompat": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "nixpkgs": { - "locked": { - "lastModified": 1668226844, - "narHash": "sha256-G/S4FBWDAqHeBS/hfXwUCJbnaKnrQFoeeKwzvZEOgxM=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "dd4767bf613bf9553eee6ff37c0996b9c876e7d8", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable-small", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1706371002, "narHash": "sha256-dwuorKimqSYgyu8Cw6ncKhyQjUDOyuXoxDTVmAXq88s=", @@ -92,28 +18,10 @@ }, "root": { "inputs": { - "alejandra": "alejandra", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "systems": "systems" } }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1668182250, - "narHash": "sha256-PYGaOCiFvnJdVz+ZCaKF8geGdffXjJUNcMwaBHv0FT4=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "45ec315e01dc8dd1146dfeb65f0ef6e5c2efed78", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 8bb9eef..f6cd00a 100644 --- a/flake.nix +++ b/flake.nix @@ -4,14 +4,12 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; systems.url = "github:nix-systems/default"; - alejandra.url = "github:kamadorueda/alejandra"; }; outputs = { self, nixpkgs, systems, - alejandra, }: let inherit (nixpkgs) lib; eachSystem = fn: @@ -56,7 +54,5 @@ packages = with pkgs; [fontforge python3 pre-commit]; }; }); - - formatter = eachSystem (system: _: alejandra.packages.${system}.default); }; }