nixos-config/modules/nixos/editors.nix

28 lines
693 B
Nix
Raw Normal View History

# Your text editor war arsenal.
{ config, options, lib, pkgs, ... }:
2021-11-25 13:45:48 +00:00
let cfg = config.modules.editors;
in {
options.modules.editors = {
neovim.enable = lib.mkEnableOption "Enable Neovim and its components";
vscode.enable = lib.mkEnableOption "Enable Visual Studio Code";
};
config = lib.mkMerge [
(lib.mkIf cfg.neovim.enable {
programs.neovim = {
enable = true;
defaultEditor = true;
withNodeJs = true;
withRuby = true;
};
2021-11-25 13:45:48 +00:00
environment.systemPackages = with pkgs; [ editorconfig-core-c ];
})
(lib.mkIf cfg.vscode.enable {
2021-11-25 13:45:48 +00:00
environment.systemPackages = with pkgs; [ vscode editorconfig-core-c ];
})
];
}