Commit c18502bae724

Vincent Demeester <vincent@sbr.pm>
2025-03-05 13:11:43
systems: add a neovim editors entry
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 219cb1c
Changed files (3)
systems
systems/hosts/wakasu.nix
@@ -114,6 +114,7 @@ in
   modules = {
     core.binfmt.enable = true;
     editors.emacs.enable = true;
+    editors.neovim.enable = true;
     hardware = {
       yubikey = { enable = true; u2f = true; };
       laptop.enable = true;
@@ -177,7 +178,7 @@ in
     # clight = {
     #   enable = true;
     # };
-    envfs.enable = false;
+    # envfs.enable = false;
     # automatic login is "safe" as we ask for the encryption passphrase anyway..
     getty.autologinUser = "vincent";
     wireguard = {
systems/modules/editors/default.nix
@@ -4,7 +4,7 @@ let
   cfg = config.modules.editors;
 in
 {
-  imports = [ ./vim.nix ./emacs.nix ];
+  imports = [ ./vim.nix ./emacs.nix ./neovim.nix ];
   options.modules.editors = {
     default = mkOption {
       description = "default editor";
systems/modules/editors/neovim.nix
@@ -0,0 +1,15 @@
+{ config, lib, pkgs, ... }:
+let
+  inherit (lib) mkEnableOption mkIf;
+  cfg = config.modules.editors.neovim;
+in
+{
+  options.modules.editors.neovim = {
+    enable = mkEnableOption "enable neovim editor";
+  };
+  config = mkIf cfg.enable {
+    environment = {
+      systemPackages = [ pkgs.neovim ];
+    };
+  };
+}