aboutsummaryrefslogtreecommitdiff
path: root/modules/home/editors
diff options
context:
space:
mode:
authorschererleander <leander@schererleander.de>2026-02-03 17:55:59 +0100
committerschererleander <leander@schererleander.de>2026-02-03 17:59:00 +0100
commita88204fbc9ddec3474186bc5a3f3c573ee787289 (patch)
tree71be63c1ebb33efcec2c65c3390ae7fadcf333db /modules/home/editors
parentfca85a013c9f0d209a4b524f1eaef3f36e7029e3 (diff)
refactor(module): simplify modules and integrate sops-nix
Diffstat (limited to 'modules/home/editors')
-rw-r--r--modules/home/editors/neovim/default.nix65
-rw-r--r--modules/home/editors/zed/default.nix70
2 files changed, 11 insertions, 124 deletions
diff --git a/modules/home/editors/neovim/default.nix b/modules/home/editors/neovim/default.nix
index c9d30db..cbfd261 100644
--- a/modules/home/editors/neovim/default.nix
+++ b/modules/home/editors/neovim/default.nix
@@ -6,59 +6,12 @@
}:
let
- inherit (lib)
- mkOption
- types
- mkIf
- optionals
- ;
+ inherit (lib) mkEnableOption mkIf optionals;
cfg = config.nx.editors.neovim;
in
{
options.nx.editors.neovim = {
- enable = mkOption {
- description = "Neovim editor";
- type = types.bool;
- default = true;
- };
-
- langs = {
- python = mkOption {
- description = "enable the python integration";
- type = types.bool;
- default = false;
- };
- go = mkOption {
- description = "enable go integration";
- type = types.bool;
- default = false;
- };
- ts = mkOption {
- description = "enable the js/ts integration";
- type = types.bool;
- default = false;
- };
- nix = mkOption {
- description = "enable the nix integration";
- type = types.bool;
- default = true;
- };
- lua = mkOption {
- description = "enable the lua integration";
- type = types.bool;
- default = true;
- };
- latex = mkOption {
- description = "enable latex integration";
- type = types.bool;
- default = false;
- };
- typst = mkOption {
- description = "enable typst integration";
- type = types.bool;
- default = false;
- };
- };
+ enable = mkEnableOption "Neovim editor";
};
config = mkIf cfg.enable {
@@ -75,16 +28,14 @@ in
fd
gcc
]
- ++ (optionals cfg.langs.ts [ pkgs.nodePackages.typescript-language-server ])
- ++ (optionals cfg.langs.python [ ])
- ++ (optionals cfg.langs.go [ pkgs.gopls ])
- ++ (optionals cfg.langs.nix [
+ ++ (optionals true [ pkgs.gopls ])
+ ++ (optionals true [
pkgs.nil
pkgs.nixfmt
])
- ++ (optionals cfg.langs.lua [ pkgs.lua-language-server ])
- ++ (optionals cfg.langs.latex [ pkgs.texlab ])
- ++ (optionals cfg.langs.typst [ pkgs.tinymist ]);
+ ++ (optionals true [ pkgs.lua-language-server ])
+ ++ (optionals true [ pkgs.texlab ])
+ ++ (optionals true [ pkgs.tinymist ]);
plugins = with pkgs.vimPlugins; [
gruvbox-nvim
@@ -111,4 +62,4 @@ in
'';
};
};
-}
+} \ No newline at end of file
diff --git a/modules/home/editors/zed/default.nix b/modules/home/editors/zed/default.nix
index 58835fb..5fe90ed 100644
--- a/modules/home/editors/zed/default.nix
+++ b/modules/home/editors/zed/default.nix
@@ -5,82 +5,18 @@
}:
let
- inherit (lib)
- mkEnableOption
- mkOption
- types
- mkIf
- optionals
- ;
+ inherit (lib) mkEnableOption mkIf;
cfg = config.nx.editors.zed-editor;
in
{
options.nx.editors.zed-editor = {
enable = mkEnableOption "zed editor";
-
- langs = {
- nix = mkOption {
- description = "enable nix integration";
- type = types.bool;
- default = true;
- };
- python = mkOption {
- description = "enable python integration";
- type = types.bool;
- default = false;
- };
- rust = mkOption {
- description = "enable rust integration";
- type = types.bool;
- default = false;
- };
- go = mkOption {
- description = "enable go integration";
- type = types.bool;
- default = false;
- };
- lua = mkOption {
- description = "enable lua integration";
- type = types.bool;
- default = false;
- };
- docker = mkOption {
- description = "enable docker integration";
- type = types.bool;
- default = false;
- };
- java = mkOption {
- description = "enable java integration";
- type = types.bool;
- default = false;
- };
- cmake = mkOption {
- description = "enable cmake integration";
- type = types.bool;
- default = false;
- };
- toml = mkOption {
- description = "enable toml integration";
- type = types.bool;
- default = false;
- };
- };
};
config = mkIf cfg.enable {
programs.zed-editor = {
enable = true;
- extensions =
- [ ]
- ++ (optionals cfg.langs.nix [ "nix" ])
- ++ (optionals cfg.langs.python [ "python" ])
- ++ (optionals cfg.langs.rust [ "rust" ])
- ++ (optionals cfg.langs.go [ "go" ])
- ++ (optionals cfg.langs.lua [ "lua" ])
- ++ (optionals cfg.langs.docker [ "dockerfile" ])
- ++ (optionals cfg.langs.java [ "java" ])
- ++ (optionals cfg.langs.cmake [ "cmake" ])
- ++ (optionals cfg.langs.toml [ "toml" ]);
+ extensions = [ "nix" ];
userSettings = {
telemetry = {
metrics = false;
@@ -113,4 +49,4 @@ in
};
};
};
-}
+} \ No newline at end of file