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:
parent
47c2adc6b3
commit
a7002d6bfc
1 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue