diff --git a/hosts/ni/default.nix b/hosts/ni/default.nix index 7063d49e..b37c3ca8 100644 --- a/hosts/ni/default.nix +++ b/hosts/ni/default.nix @@ -25,8 +25,8 @@ enable = true; shell.enable = true; virtualization.enable = true; + neovim.enable = true; }; - editors.neovim.enable = true; users.users.foo-dogsquared = {}; themes = { disableLimit = true; diff --git a/modules/nixos/dev.nix b/modules/nixos/dev.nix index 37389652..0ccc0a30 100644 --- a/modules/nixos/dev.nix +++ b/modules/nixos/dev.nix @@ -1,5 +1,4 @@ # The module for anything dev-related. -# If you want to see editor-specific modules, see `modules/editors.nix`. { config, options, lib, pkgs, ... }: let cfg = config.modules.dev; @@ -11,6 +10,7 @@ in { "installation of the shell utilities foo-dogsquared rely on"; virtualization.enable = lib.mkEnableOption "virtualization-related stuff for development"; + neovim.enable = lib.mkEnableOption "Neovim"; }; config = lib.mkIf cfg.enable (lib.mkMerge [ @@ -82,5 +82,19 @@ in { qemu.ovmf.enable = true; }; }) + + (lib.mkIf cfg.neovim.enable { + programs.neovim = { + enable = true; + defaultEditor = true; + withNodeJs = true; + withRuby = true; + + # I want the BLEEDING EDGE! + package = pkgs.neovim-nightly; + }; + + environment.systemPackages = with pkgs; [ editorconfig-core-c ]; + }) ]); } diff --git a/modules/nixos/editors.nix b/modules/nixos/editors.nix deleted file mode 100644 index a19dbe4f..00000000 --- a/modules/nixos/editors.nix +++ /dev/null @@ -1,30 +0,0 @@ -# Your text editor war arsenal. -{ config, options, lib, pkgs, ... }: - -let cfg = config.modules.editors; -in { - options.modules.editors = { - neovim.enable = lib.mkEnableOption "Neovim and its components"; - vscode.enable = lib.mkEnableOption "Visual Studio Code"; - }; - - config = lib.mkMerge [ - (lib.mkIf cfg.neovim.enable { - programs.neovim = { - enable = true; - defaultEditor = true; - withNodeJs = true; - withRuby = true; - - # I want the BLEEDING EDGE! - package = pkgs.neovim-nightly; - }; - - environment.systemPackages = with pkgs; [ editorconfig-core-c ]; - }) - - (lib.mkIf cfg.vscode.enable { - environment.systemPackages = with pkgs; [ vscode editorconfig-core-c ]; - }) - ]; -}