vim.nix (349B)
1 { config, lib, pkgs, ... }: 2 let 3 inherit (lib) mkEnableOption mkIf; 4 cfg = config.modules.editors.vim; 5 in 6 { 7 options.modules.editors.vim = { 8 enable = mkEnableOption "enable vim editor"; 9 }; 10 config = mkIf cfg.enable { 11 environment = { 12 systemPackages = [ pkgs.vim ]; 13 shellAliases = { 14 v = "vim"; 15 }; 16 }; 17 }; 18 }