From a7002d6bfca54742d5fc9b485a1879953b4585b9 Mon Sep 17 00:00:00 2001 From: Kylie McClain Date: Mon, 26 Jun 2023 11:23:35 -0400 Subject: [PATCH] kakoune: add defaultEditor option --- modules/programs/kakoune.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/programs/kakoune.nix b/modules/programs/kakoune.nix index 32f718909..55db23bd1 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; }; }