2024-02-19 16:58:17 +00:00
|
|
|
{
|
2024-02-21 02:52:23 +00:00
|
|
|
description = "Guanran928's Neovim configuration";
|
2024-02-19 16:58:17 +00:00
|
|
|
|
|
|
|
inputs = {
|
2024-03-12 09:38:38 +00:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
2024-03-09 05:30:37 +00:00
|
|
|
|
|
|
|
flake-utils = {
|
|
|
|
url = "github:numtide/flake-utils";
|
|
|
|
inputs.systems.follows = "systems";
|
|
|
|
};
|
|
|
|
treefmt-nix = {
|
|
|
|
url = "github:numtide/treefmt-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
### De-dupe flake dependencies
|
|
|
|
systems.url = "github:nix-systems/default";
|
2024-02-19 16:58:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = inputs:
|
2024-02-21 02:52:23 +00:00
|
|
|
inputs.flake-utils.lib.eachDefaultSystem (system: let
|
|
|
|
inherit (inputs.nixpkgs) lib;
|
|
|
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
2024-03-09 05:30:37 +00:00
|
|
|
treefmtEval = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
2024-04-10 10:29:50 +00:00
|
|
|
|
|
|
|
runtimeDeps = with pkgs; [
|
|
|
|
# mason / tree-sitter
|
|
|
|
gcc
|
|
|
|
cargo
|
|
|
|
nodejs
|
|
|
|
|
|
|
|
# telescope
|
|
|
|
ripgrep
|
|
|
|
fd
|
|
|
|
];
|
|
|
|
src = lib.fileset.toSource {
|
|
|
|
fileset = lib.fileset.fileFilter (file: file.hasExt "lua") ./.;
|
|
|
|
root = ./.;
|
|
|
|
};
|
2024-02-21 02:52:23 +00:00
|
|
|
in {
|
2024-02-21 02:55:06 +00:00
|
|
|
### nix {run,shell,build}
|
2024-04-10 10:29:50 +00:00
|
|
|
packages.default = pkgs.callPackage ./package.nix {inherit runtimeDeps src;};
|
2024-02-19 16:58:17 +00:00
|
|
|
|
2024-02-21 02:55:06 +00:00
|
|
|
### nix fmt
|
2024-03-09 05:30:37 +00:00
|
|
|
formatter = treefmtEval.config.build.wrapper;
|
|
|
|
|
|
|
|
### nix flake check
|
|
|
|
checks = {formatting = treefmtEval.config.build.check inputs.self;};
|
2024-02-21 02:55:06 +00:00
|
|
|
|
|
|
|
### nix develop
|
2024-02-21 02:52:23 +00:00
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
stylua
|
|
|
|
];
|
|
|
|
};
|
|
|
|
});
|
2024-02-19 16:58:17 +00:00
|
|
|
}
|