treewide: format all files (#57)

Run `nix fmt` at the root of the repository to format all files. I've
done this on my fork and this will help me merge your changes later
without having to deal with un-formatted files.
This commit is contained in:
Wael Nasreddine 2024-11-26 00:47:49 -08:00 committed by GitHub
parent 70f8b2360f
commit 0f42b0eebb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 369 additions and 164 deletions

View file

@ -12,51 +12,59 @@
};
};
outputs = {
nixpkgs,
nixvim,
flake-parts,
pre-commit-hooks,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin"];
outputs =
{
nixpkgs,
nixvim,
flake-parts,
pre-commit-hooks,
...
}@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"aarch64-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
perSystem = {
system,
pkgs,
self',
lib,
...
}: let
nixvim' = nixvim.legacyPackages.${system};
nvim = nixvim'.makeNixvimWithModule {
inherit pkgs;
module = ./config;
};
in {
checks = {
default = pkgs.nixvimLib.check.mkTestDerivationFromNvim {
inherit nvim;
name = "A nixvim configuration";
perSystem =
{
system,
pkgs,
self',
lib,
...
}:
let
nixvim' = nixvim.legacyPackages.${system};
nvim = nixvim'.makeNixvimWithModule {
inherit pkgs;
module = ./config;
};
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
statix.enable = true;
nixfmt-rfc-style.enable = true;
in
{
checks = {
default = pkgs.nixvimLib.check.mkTestDerivationFromNvim {
inherit nvim;
name = "A nixvim configuration";
};
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
statix.enable = true;
nixfmt-rfc-style.enable = true;
};
};
};
formatter = pkgs.nixfmt-rfc-style;
packages.default = nvim;
devShells = {
default = with pkgs; mkShell { inherit (self'.checks.pre-commit-check) shellHook; };
};
};
formatter = pkgs.nixfmt-rfc-style;
packages.default = nvim;
devShells = {
default = with pkgs;
mkShell {inherit (self'.checks.pre-commit-check) shellHook;};
};
};
};
}