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; + }; + }; +}