mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-09 14:45:58 +01:00
adapt to flake-parts
This commit is contained in:
parent
0a172c02df
commit
114f6499e2
1 changed files with 42 additions and 40 deletions
|
@ -1,45 +1,47 @@
|
|||
# Home Manager module
|
||||
{
|
||||
self,
|
||||
config,
|
||||
pkgs,
|
||||
lib ? pkgs.lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.programs.neovim-flake;
|
||||
set = self.packages.maximal {mainConfig = cfg.settings;};
|
||||
in
|
||||
with lib; {
|
||||
meta.maintainers = [maintainers.notashelf];
|
||||
{inputs, ...}: {
|
||||
perSystem = {
|
||||
system,
|
||||
config,
|
||||
pkgs,
|
||||
lib ? pkgs.lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.programs.neovim-flake;
|
||||
set = self'.packages.maximal {mainConfig = cfg.settings;};
|
||||
in {
|
||||
meta.maintainers = [maintainers.notashelf];
|
||||
|
||||
options.programs.neovim-flake = {
|
||||
enable = mkEnableOption "A NeoVim IDE with a focus on configurability and extensibility.";
|
||||
options.programs.neovim-flake = {
|
||||
enable = mkEnableOption "A NeoVim IDE with a focus on configurability and extensibility.";
|
||||
|
||||
settings = mkOption {
|
||||
type = types.attrsOf types.anything;
|
||||
default = {};
|
||||
example = literalExpression ''
|
||||
{
|
||||
vim.viAlias = false;
|
||||
vim.vimAlias = true;
|
||||
vim.lsp = {
|
||||
enable = true;
|
||||
formatOnSave = true;
|
||||
lightbulb.enable = true;
|
||||
lspsaga.enable = false;
|
||||
nvimCodeActionMenu.enable = true;
|
||||
trouble.enable = true;
|
||||
lspSignature.enable = true;
|
||||
rust.enable = false;
|
||||
nix = true;
|
||||
};
|
||||
}
|
||||
'';
|
||||
description = "Attribute set of neoflake preferences.";
|
||||
settings = mkOption {
|
||||
type = types.attrsOf types.anything;
|
||||
default = {};
|
||||
example = literalExpression ''
|
||||
{
|
||||
vim.viAlias = false;
|
||||
vim.vimAlias = true;
|
||||
vim.lsp = {
|
||||
enable = true;
|
||||
formatOnSave = true;
|
||||
lightbulb.enable = true;
|
||||
lspsaga.enable = false;
|
||||
nvimCodeActionMenu.enable = true;
|
||||
trouble.enable = true;
|
||||
lspSignature.enable = true;
|
||||
rust.enable = false;
|
||||
nix = true;
|
||||
};
|
||||
}
|
||||
'';
|
||||
description = "Attribute set of neoflake preferences.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [set.neovim];
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [set.neovim];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue