snowflake/user/editors.nix
2025-05-30 22:59:38 +08:00

41 lines
731 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 = false;
type = types.bool;
};
neovim.enable = mkOption {
default = false;
type = types.bool;
};
zed.enable = mkOption {
default = false;
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;
};
}