Add minimal 'nixCats' flake template

feat/flakify-neovim
Hektor Misplon 2025-10-13 21:54:07 +02:00
parent b25fc9a2b8
commit 7c36539033
2 changed files with 181 additions and 0 deletions

View File

@ -0,0 +1,43 @@
{
"nodes": {
"nixCats": {
"locked": {
"lastModified": 1759730664,
"narHash": "sha256-boRlBQ/c4CaHsK/z04QL6+t81mcar37Io94HBX2GflY=",
"owner": "BirdeeHub",
"repo": "nixCats-nvim",
"rev": "77dffad8235eb77684fcb7599487c8e9f23d5b8f",
"type": "github"
},
"original": {
"owner": "BirdeeHub",
"repo": "nixCats-nvim",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1760256791,
"narHash": "sha256-uTpzDHRASEDeFUuToWSQ46Re8beXyG9dx4W36FQa0/c=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "832e3b6db48508ae436c2c7bfc0cf914eac6938e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixCats": "nixCats",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

138
dots/.config/nvim/flake.nix Normal file
View File

@ -0,0 +1,138 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixCats.url = "github:BirdeeHub/nixCats-nvim";
};
outputs =
{
self,
nixpkgs,
nixCats,
...
}@inputs:
let
inherit (nixCats) utils;
luaPath = ./.;
forEachSystem = utils.eachSystem nixpkgs.lib.platforms.all;
extra_pkg_config = { };
dependencyOverlays = [
(utils.standardPluginOverlay inputs)
];
categoryDefinitions =
{
pkgs,
...
}:
{
lspsAndRuntimeDeps = {
general = [ ];
};
startupPlugins = {
general = [ ];
};
optionalPlugins = {
general = with pkgs.vimPlugins; [
nvim-lspconfig
];
};
sharedLibraries = {
general = [ ];
};
environmentVariables = { };
};
packageDefinitions = {
nvim =
{ ... }:
{
settings = {
suffix-path = true;
suffix-LD = true;
wrapRc = true;
aliases = [ "vim" ];
};
categories = {
general = true;
};
};
};
defaultPackageName = "nvim";
in
forEachSystem (
system:
let
nixCatsBuilder = utils.baseBuilder luaPath {
inherit
nixpkgs
system
dependencyOverlays
extra_pkg_config
;
} categoryDefinitions packageDefinitions;
defaultPackage = nixCatsBuilder defaultPackageName;
pkgs = import nixpkgs { inherit system; };
in
{
packages = utils.mkAllWithDefault defaultPackage;
devShells = {
default = pkgs.mkShell {
name = defaultPackageName;
packages = [ defaultPackage ];
inputsFrom = [ ];
shellHook = '''';
};
};
}
)
// (
let
nixosModule = utils.mkNixosModules {
moduleNamespace = [ defaultPackageName ];
inherit
defaultPackageName
dependencyOverlays
luaPath
categoryDefinitions
packageDefinitions
extra_pkg_config
nixpkgs
;
};
homeModule = utils.mkHomeModules {
moduleNamespace = [ defaultPackageName ];
inherit
defaultPackageName
dependencyOverlays
luaPath
categoryDefinitions
packageDefinitions
extra_pkg_config
nixpkgs
;
};
in
{
overlays = utils.makeOverlays luaPath {
inherit nixpkgs dependencyOverlays extra_pkg_config;
} categoryDefinitions packageDefinitions defaultPackageName;
nixosModules.default = nixosModule;
homeModules.default = homeModule;
inherit utils nixosModule homeModule;
inherit (utils) templates;
}
);
}