diff --git a/modules/programs/kakoune.nix b/modules/programs/kakoune.nix index 32f71890..55db23bd 100644 --- a/modules/programs/kakoune.nix +++ b/modules/programs/kakoune.nix @@ -630,6 +630,15 @@ in { description = "kakoune configuration options."; }; + defaultEditor = mkOption { + type = types.bool; + default = false; + description = '' + Whether to configure kak as the default + editor using the EDITOR environment variable. + ''; + }; + extraConfig = mkOption { type = types.lines; default = ""; @@ -654,6 +663,7 @@ in { config = mkIf cfg.enable { home.packages = [ kakouneWithPlugins ]; + home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "kak"; }; xdg.configFile."kak/kakrc".source = configFile; }; }