refactor: complete overhaul
Complete overhaul of repo structure based on nvix. See https://github.com/niksingh710/nvix Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
parent
ff2c59724a
commit
61feed4086
75 changed files with 2916 additions and 2314 deletions
76
flake.nix
76
flake.nix
|
|
@ -1,75 +1,25 @@
|
|||
{
|
||||
description = "deCort.tech NeoVim configuration";
|
||||
description = "EscapeAngle NeoVim configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
};
|
||||
pre-commit-hooks = {
|
||||
url = "github:cachix/pre-commit-hooks.nix";
|
||||
};
|
||||
nixvim.url = "github:nix-community/nixvim";
|
||||
systems.url = "github:nix-systems/default";
|
||||
git-hooks.url = "github:cachix/git-hooks.nix";
|
||||
git-hooks.flake = false;
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
nixvim,
|
||||
flake-parts,
|
||||
pre-commit-hooks,
|
||||
...
|
||||
}@inputs:
|
||||
inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
"aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
systems = import inputs.systems;
|
||||
_module.args = { inherit inputs; };
|
||||
imports = [
|
||||
./modules/flake
|
||||
./overlays
|
||||
./plugins
|
||||
];
|
||||
|
||||
perSystem =
|
||||
{
|
||||
pkgs,
|
||||
system,
|
||||
self',
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
nixvimLib = nixvim.lib.${system};
|
||||
nixvim' = nixvim.legacyPackages.${system};
|
||||
nixvimModule = {
|
||||
inherit pkgs;
|
||||
module = import ./config; # import the module directly
|
||||
# You can use `extraSpecialArgs` to pass additional arguments to your module files
|
||||
extraSpecialArgs = {
|
||||
# inherit (inputs) foo;
|
||||
};
|
||||
};
|
||||
nvim = nixvim'.makeNixvimWithModule nixvimModule;
|
||||
in
|
||||
{
|
||||
checks = {
|
||||
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
|
||||
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; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue