Drop flake parts

Use native nix functions to speed up and reduce complexity
This commit is contained in:
Primrose 2025-02-05 19:02:18 +01:00
parent 85e2bd6728
commit daefd1534f
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
15 changed files with 501 additions and 423 deletions

View file

@ -1,16 +1,46 @@
{
systems,
...
}@inputs:
perSystem =
{ pkgs, ... }:
let
inherit (inputs.nixpkgs) lib;
in
let
devShellOf =
system:
let
call = x: import x { inherit pkgs; };
pkgs = import inputs.nixpkgs { inherit system; };
in
{
devShells =
# devShells that I can't commit to repos themselves
call ./of-repos.nix
# Per language basic tooling
// call ./of-languages.nix;
};
default =
let
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
# nix
nixfmt-rfc-style.enable = true;
statix.enable = true;
deadnix.enable = true;
# lua
stylua.enable = true;
# toml
taplo.enable = true;
};
};
in
inputs.nixpkgs.legacyPackages.${system}.mkShell {
inherit (pre-commit-check) shellHook;
buildInputs = pre-commit-check.enabledPackages;
};
}
// import ./of-repos.nix { inherit pkgs; }
// import ./of-languages.nix { inherit pkgs; };
in
{
devShells = lib.genAttrs systems devShellOf;
}