nix/modules/stuff/vim.nix

31 lines
685 B
Nix
Raw Normal View History

2024-08-01 21:22:47 +02:00
{ lib, pkgs, config, ...}: let
inherit (lib) mkIf mkEnableOption mkOption;
cfg = config.chuj.stuff.vim;
user = config.chuj.system.user;
in {
options.chuj.stuff.vim = {
enable = mkEnableOption "vim";
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.vim ];
home-manager.users.${user} = {
home.sessionVariables = { "EDITOR" = "vim"; };
programs.vim = {
enable = true;
defaultEditor = true;
2024-09-14 20:36:43 +02:00
settings = {
2024-08-01 21:22:47 +02:00
number = true;
};
extraConfig = ''
2024-09-14 20:36:43 +02:00
set laststatus=0
2024-09-21 12:58:21 +02:00
set shiftwidth=4 smarttab expandtab
2024-08-01 21:22:47 +02:00
'';
};
};
programs.nano.enable = false;
};
2024-09-14 20:36:43 +02:00
}