nix/modules/stuff/vim.nix
2024-09-14 20:36:43 +02:00

29 lines
639 B
Nix

{ 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;
settings = {
number = true;
};
extraConfig = ''
set laststatus=0
'';
};
};
programs.nano.enable = false;
};
}