Add minimal 'nixCats' flake template
parent
6e48621275
commit
a54e745190
|
|
@ -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
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue