mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
flake: move home-manager module to flake-parts root
This commit is contained in:
parent
bc0586b682
commit
54a6e28e18
2 changed files with 1 additions and 3 deletions
49
flake/modules/home-manager.nix
Normal file
49
flake/modules/home-manager.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
# Home Manager module
|
||||
packages: inputs: {
|
||||
pkgs,
|
||||
config,
|
||||
lib ? pkgs.lib,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.programs.neovim-flake;
|
||||
inherit (import ../../configuration.nix inputs) neovimConfiguration;
|
||||
set = neovimConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [cfg.settings];
|
||||
};
|
||||
in {
|
||||
meta.maintainers = with maintainers; [NotAShelf];
|
||||
|
||||
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.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [set.neovim];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue