mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +00:00
use config.packages
This commit is contained in:
parent
1ba910f8de
commit
c818cc108e
1 changed files with 39 additions and 42 deletions
|
@ -1,47 +1,44 @@
|
||||||
# Home Manager module
|
# Home Manager module
|
||||||
{inputs, ...}: {
|
{
|
||||||
perSystem = {
|
pkgs,
|
||||||
system,
|
config,
|
||||||
config,
|
lib ? pkgs.lib,
|
||||||
pkgs,
|
...
|
||||||
lib ? pkgs.lib,
|
}:
|
||||||
...
|
with lib; let
|
||||||
}:
|
cfg = config.programs.neovim-flake;
|
||||||
with lib; let
|
set = config.packages.maximal {mainConfig = cfg.settings;};
|
||||||
cfg = config.programs.neovim-flake;
|
in {
|
||||||
set = self'.packages.maximal {mainConfig = cfg.settings;};
|
meta.maintainers = [maintainers.notashelf];
|
||||||
in {
|
|
||||||
meta.maintainers = [maintainers.notashelf];
|
|
||||||
|
|
||||||
options.programs.neovim-flake = {
|
options.programs.neovim-flake = {
|
||||||
enable = mkEnableOption "A NeoVim IDE with a focus on configurability and extensibility.";
|
enable = mkEnableOption "A NeoVim IDE with a focus on configurability and extensibility.";
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = types.attrsOf types.anything;
|
type = types.attrsOf types.anything;
|
||||||
default = {};
|
default = {};
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
{
|
{
|
||||||
vim.viAlias = false;
|
vim.viAlias = false;
|
||||||
vim.vimAlias = true;
|
vim.vimAlias = true;
|
||||||
vim.lsp = {
|
vim.lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
formatOnSave = true;
|
formatOnSave = true;
|
||||||
lightbulb.enable = true;
|
lightbulb.enable = true;
|
||||||
lspsaga.enable = false;
|
lspsaga.enable = false;
|
||||||
nvimCodeActionMenu.enable = true;
|
nvimCodeActionMenu.enable = true;
|
||||||
trouble.enable = true;
|
trouble.enable = true;
|
||||||
lspSignature.enable = true;
|
lspSignature.enable = true;
|
||||||
rust.enable = false;
|
rust.enable = false;
|
||||||
nix = true;
|
nix = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
description = "Attribute set of neoflake preferences.";
|
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