nixos-config/modules/home-manager/vim.nix

32 lines
609 B
Nix
Raw Normal View History

2024-08-25 09:45:58 +00:00
{
config,
pkgs,
lib,
...
}:
2023-12-17 05:59:09 +00:00
let
2024-08-20 13:04:46 +00:00
inherit (lib) mkIf mkEnableOption getExe;
2023-12-17 05:59:09 +00:00
cfg = config.custom-hm.neovim;
2024-08-20 13:04:46 +00:00
tomlFormat = pkgs.formats.toml { };
neovideConfig = {
neovim-bin = getExe pkgs.nixvim;
fork = true;
2024-11-12 13:27:57 +00:00
frame = "none";
2024-08-20 13:04:46 +00:00
};
2023-12-17 05:59:09 +00:00
in
{
options.custom-hm.neovim = {
2023-12-17 05:59:09 +00:00
enable = mkEnableOption "neovim configurations";
};
config = mkIf cfg.enable {
2024-08-25 09:45:58 +00:00
home.packages = with pkgs; [
nixvim
neovide
];
2024-08-20 13:04:46 +00:00
programs.neovim.enable = false;
home.file.".config/neovide/config.toml" = {
source = tomlFormat.generate "neovide-config" neovideConfig;
2023-12-17 05:59:09 +00:00
};
};
}