2021-11-29 05:30:57 +00:00
|
|
|
# Your text editor war arsenal.
|
2021-11-25 11:55:30 +00:00
|
|
|
{ config, options, lib, pkgs, ... }:
|
|
|
|
|
2021-11-25 13:45:48 +00:00
|
|
|
let cfg = config.modules.editors;
|
|
|
|
in {
|
2021-11-25 11:55:30 +00:00
|
|
|
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 ];
|
2021-11-25 11:55:30 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
(lib.mkIf cfg.vscode.enable {
|
2021-11-25 13:45:48 +00:00
|
|
|
environment.systemPackages = with pkgs; [ vscode editorconfig-core-c ];
|
2021-11-25 11:55:30 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|