From 2510113d2bde322077ad172dddd32d69ed38524a Mon Sep 17 00:00:00 2001 From: Aditya Date: Thu, 11 Apr 2024 10:22:48 +0530 Subject: [PATCH] add editor --- hosts/default/configuration.nix | 5 ----- modules/nixos/default.nix | 1 + modules/nixos/editor/default.nix | 13 +++++++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 modules/nixos/editor/default.nix diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index 48bb15f..260f06c 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -92,11 +92,6 @@ }; }; - programs.neovim = { - enable = true; - defaultEditor = true; - }; - # Enable the OpenSSH daemon. services.openssh.enable = true; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 2659b2a..8d8ea4d 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -3,6 +3,7 @@ ./bluetooth ./bootloader ./display-manager + ./editor ./filesystem ./fonts ./hardware diff --git a/modules/nixos/editor/default.nix b/modules/nixos/editor/default.nix new file mode 100644 index 0000000..f481ebd --- /dev/null +++ b/modules/nixos/editor/default.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: { + options = {editor.enable = lib.mkEnableOption "enable editor";}; + config = lib.mkIf config.editor.enable { + programs.neovim = { + enable = true; + defaultEditor = true; + }; + }; +}