diff options
| -rw-r--r-- | core/env.nix | 4 | ||||
| -rw-r--r-- | core/packages.nix | 1 | ||||
| -rw-r--r-- | snowfall/modules/nixos/apps/vim/default.nix | 19 | ||||
| -rw-r--r-- | snowfall/modules/nixos/suites/common/default.nix | 1 |
4 files changed, 20 insertions, 5 deletions
diff --git a/core/env.nix b/core/env.nix index e67c555..5d8679e 100644 --- a/core/env.nix +++ b/core/env.nix @@ -3,9 +3,5 @@ { environment = { localBinInPath = true; - - variables = { - EDITOR = "${pkgs.vim}/bin/vim"; - }; }; } diff --git a/core/packages.nix b/core/packages.nix index b0fffb8..fc8f8eb 100644 --- a/core/packages.nix +++ b/core/packages.nix @@ -7,7 +7,6 @@ moreutils git - vim wget killall jq diff --git a/snowfall/modules/nixos/apps/vim/default.nix b/snowfall/modules/nixos/apps/vim/default.nix new file mode 100644 index 0000000..816aeda --- /dev/null +++ b/snowfall/modules/nixos/apps/vim/default.nix @@ -0,0 +1,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"; + }; + }; +} diff --git a/snowfall/modules/nixos/suites/common/default.nix b/snowfall/modules/nixos/suites/common/default.nix index e7656d1..cbd4ba3 100644 --- a/snowfall/modules/nixos/suites/common/default.nix +++ b/snowfall/modules/nixos/suites/common/default.nix @@ -15,6 +15,7 @@ in { apps = { bash.enable = true; + vim.enable = true; }; }; }; |