aboutsummaryrefslogtreecommitdiff
path: root/snowfall/modules/nixos/apps/vim/default.nix
blob: 816aeda196a7abe843e49b6e493cf1e4389840a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ options, config, lib, pkgs, namespace, ... }:

with lib; with lib.${namespace}; let
  cfg = config.${namespace}.apps.vim;
in {
  options.${namespace}.apps.vim = with types; {
    enable = mkEnableOption "vim";
  };

  config = mkIf cfg.enable {
    environment.systemPackages = with pkgs; [
      vim
    ];
    
    environment.variables = {
      EDITOR = "${pkgs.vim}/bin/vim";
    };
  };
}