nixcfg/modules/home/cli-apps/home-manager/default.nix
Harald Hoyer c3bbcd9baa feat(nix): enable Vim clipboard integration
- Added `set clipboard=unnamedplus` to Vim configuration in `default.nix`.
- Enables seamless clipboard access between Vim and the system for improved usability.
2026-01-27 10:57:17 +01:00

49 lines
1 KiB
Nix

{
lib,
config,
pkgs,
...
}:
let
inherit (lib) mkEnableOption mkIf;
inherit (lib.metacfg) enabled;
cfg = config.metacfg.cli-apps.home-manager;
in
{
options.metacfg.cli-apps.home-manager = {
enable = mkEnableOption "home-manager";
};
config = mkIf cfg.enable {
programs.home-manager = enabled;
home.sessionVariables = {
EDITOR = "${pkgs.vim}/bin/vim";
BATDIFF_USE_DELTA = "true";
};
home.shellAliases = {
man = "${pkgs.bat-extras.batman}/bin/batman";
};
programs.vim = {
enable = true;
extraConfig = ''
filetype indent off
set ts=4 sw=4 et sts=4
let spec_chglog_format = "%a %b %d %Y Harald Hoyer <harald@hoyer.xyz>"
set exrc
set secure
syntax on
set clipboard=unnamedplus
" Restore cursor to last edit position
autocmd BufReadPost *
\ if line("'\"") >= 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
'';
};
};
}