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

23 lines
565 B
Nix
Raw Normal View History

2024-08-20 13:04:46 +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;
};
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-20 13:04:46 +00:00
home.packages = with pkgs; [ nixvim neovide ];
programs.neovim.enable = false;
home.file.".config/neovide/config.toml" = {
source = tomlFormat.generate "neovide-config" neovideConfig;
2023-12-17 05:59:09 +00:00
};
};
}