mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 16:57:55 +00:00
66 lines
1.3 KiB
Nix
66 lines
1.3 KiB
Nix
|
{ config, options, lib, pkgs, ... }:
|
||
|
|
||
|
let
|
||
|
cfg = config.modules.editors;
|
||
|
in
|
||
|
{
|
||
|
options.modules.editors = {
|
||
|
neovim.enable = lib.mkEnableOption "Enable Neovim and its components";
|
||
|
emacs = {
|
||
|
enable = lib.mkEnableOption "Enable Emacs and all of its components";
|
||
|
doom.enable = lib.mkEnableOption "Enable Doom Emacs-related dependencies.";
|
||
|
};
|
||
|
vscode.enable = lib.mkEnableOption "Enable Visual Studio Code";
|
||
|
};
|
||
|
|
||
|
config = lib.mkMerge [
|
||
|
(lib.mkIf cfg.emacs.enable {
|
||
|
environment.systemPackages = with pkgs; [
|
||
|
emacs
|
||
|
] ++ (if cfg.emacs.doom.enable then [
|
||
|
# The required depdencies.
|
||
|
git
|
||
|
ripgrep
|
||
|
gnutls
|
||
|
|
||
|
# Optional dependencies.
|
||
|
fd
|
||
|
imagemagick
|
||
|
zstd
|
||
|
|
||
|
# Module dependencies
|
||
|
# :checkers spell
|
||
|
aspell
|
||
|
aspellDicts.en
|
||
|
aspellDicts.en-computer
|
||
|
|
||
|
# :tools lookup
|
||
|
wordnet
|
||
|
|
||
|
# :lang org +roam2
|
||
|
sqlite
|
||
|
] else []);
|
||
|
})
|
||
|
|
||
|
(lib.mkIf cfg.neovim.enable {
|
||
|
programs.neovim = {
|
||
|
enable = true;
|
||
|
defaultEditor = true;
|
||
|
withNodeJs = true;
|
||
|
withRuby = true;
|
||
|
};
|
||
|
|
||
|
environment.systemPackages = with pkgs; [
|
||
|
editorconfig-core-c
|
||
|
];
|
||
|
})
|
||
|
|
||
|
(lib.mkIf cfg.vscode.enable {
|
||
|
environment.systemPackages = with pkgs; [
|
||
|
vscode
|
||
|
editorconfig-core-c
|
||
|
];
|
||
|
})
|
||
|
];
|
||
|
}
|