1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-18 17:19:45 +01:00

kakoune: add defaultEditor option

This commit is contained in:
Kylie McClain 2023-06-26 11:23:35 -04:00 committed by Robert Helgesson
parent 47c2adc6b3
commit a7002d6bfc
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -630,6 +630,15 @@ in {
description = "kakoune configuration options.";
};
defaultEditor = mkOption {
type = types.bool;
default = false;
description = ''
Whether to configure <command>kak</command> as the default
editor using the <envar>EDITOR</envar> 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;
};
}