{ 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; extraConfig = '' set laststatus=0 set shiftwidth=4 smarttab expandtab ''; }; }; programs.nano.enable = false; }; }