mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-07 13:45:58 +01:00
flake.nix: split overlays
This commit is contained in:
parent
2f84ce13c4
commit
a946045a7c
2 changed files with 26 additions and 24 deletions
27
flake.nix
27
flake.nix
|
@ -4,22 +4,7 @@
|
|||
nixpkgs,
|
||||
flake-parts,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (import ./extra.nix inputs) neovimConfiguration mainConfig;
|
||||
|
||||
tidalConfig = {
|
||||
config.vim.tidal.enable = true;
|
||||
};
|
||||
|
||||
buildPkg = pkgs: modules:
|
||||
(neovimConfiguration {
|
||||
inherit pkgs modules;
|
||||
})
|
||||
.neovim;
|
||||
|
||||
nixConfig = mainConfig false;
|
||||
maximalConfig = mainConfig true;
|
||||
in
|
||||
} @ inputs:
|
||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
systems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
||||
|
||||
|
@ -28,13 +13,14 @@
|
|||
{_module.args = {inherit (nixpkgs) lib;};}
|
||||
./flake/apps.nix
|
||||
./flake/legacyPackages.nix
|
||||
./flake/overlays.nix
|
||||
./flake/packages.nix
|
||||
];
|
||||
|
||||
flake = {
|
||||
lib = {
|
||||
inherit (import ./lib/stdlib-extended.nix nixpkgs.lib) nvim;
|
||||
inherit neovimConfiguration;
|
||||
inherit (import ./extra.nix inputs) neovimConfiguration;
|
||||
};
|
||||
|
||||
nixosModules.default = {
|
||||
|
@ -44,13 +30,6 @@
|
|||
inputs.self.overlays.default
|
||||
];
|
||||
};
|
||||
|
||||
overlays.default = final: prev: {
|
||||
inherit neovimConfiguration;
|
||||
neovim-nix = buildPkg prev [nixConfig];
|
||||
neovim-maximal = buildPkg prev [maximalConfig];
|
||||
neovim-tidal = buildPkg prev [tidalConfig];
|
||||
};
|
||||
};
|
||||
|
||||
perSystem = {
|
||||
|
|
23
flake/overlays.nix
Normal file
23
flake/overlays.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{inputs, ...}: let
|
||||
inherit (import ../extra.nix inputs) neovimConfiguration mainConfig;
|
||||
|
||||
tidalConfig = {
|
||||
config.vim.tidal.enable = true;
|
||||
};
|
||||
|
||||
buildPkg = pkgs: modules:
|
||||
(neovimConfiguration {
|
||||
inherit pkgs modules;
|
||||
})
|
||||
.neovim;
|
||||
|
||||
nixConfig = mainConfig false;
|
||||
maximalConfig = mainConfig true;
|
||||
in {
|
||||
flake.overlays.default = final: prev: {
|
||||
inherit neovimConfiguration;
|
||||
neovim-nix = buildPkg prev [nixConfig];
|
||||
neovim-maximal = buildPkg prev [maximalConfig];
|
||||
neovim-tidal = buildPkg prev [tidalConfig];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue