41 lines
728 B
Nix
41 lines
728 B
Nix
{ config, lib, ... }:
|
|
|
|
let
|
|
inherit (lib) mkOption types;
|
|
|
|
cfg = config.editors;
|
|
in
|
|
{
|
|
imports = [
|
|
./subs/zed.nix
|
|
./subs/neovim.nix
|
|
./subs/emacs.nix
|
|
];
|
|
|
|
options.editors = {
|
|
emacs.enable = mkOption {
|
|
default = true;
|
|
type = types.bool;
|
|
};
|
|
neovim.enable = mkOption {
|
|
default = true;
|
|
type = types.bool;
|
|
};
|
|
zed.enable = mkOption {
|
|
default = true;
|
|
type = types.bool;
|
|
};
|
|
vscode.enable = mkOption {
|
|
default = false;
|
|
type = types.bool;
|
|
};
|
|
};
|
|
|
|
config = {
|
|
subs.zed.enable = cfg.zed.enable;
|
|
subs.neovim.enable = cfg.neovim.enable;
|
|
subs.emacs.enable = cfg.emacs.enable;
|
|
programs.vscode.enable = cfg.vscode.enable;
|
|
};
|
|
}
|