nixos-config/modules/home-manager/vim.nix
2024-11-12 21:27:57 +08:00

31 lines
609 B
Nix

{
config,
pkgs,
lib,
...
}:
let
inherit (lib) mkIf mkEnableOption getExe;
cfg = config.custom-hm.neovim;
tomlFormat = pkgs.formats.toml { };
neovideConfig = {
neovim-bin = getExe pkgs.nixvim;
fork = true;
frame = "none";
};
in
{
options.custom-hm.neovim = {
enable = mkEnableOption "neovim configurations";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
nixvim
neovide
];
programs.neovim.enable = false;
home.file.".config/neovide/config.toml" = {
source = tomlFormat.generate "neovide-config" neovideConfig;
};
};
}