mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
Drop flake parts
Use native nix functions to speed up and reduce complexity
This commit is contained in:
parent
85e2bd6728
commit
daefd1534f
15 changed files with 501 additions and 423 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue