1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-08 18:11:05 +01:00

kakoune: implement a final package option (#7275)

This commit is contained in:
MaeIsBad 2025-06-16 00:23:27 +02:00 committed by GitHub
parent 04672588c6
commit 30b6daf872
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -688,6 +688,12 @@ in
package = lib.mkPackageOption pkgs "kakoune-unwrapped" { nullable = true; }; package = lib.mkPackageOption pkgs "kakoune-unwrapped" { nullable = true; };
finalPackage = mkOption {
type = types.nullOr types.package;
readOnly = true;
description = "Resulting customized kakoune package.";
};
config = mkOption { config = mkOption {
type = types.nullOr configModule; type = types.nullOr configModule;
default = { }; default = { };
@ -746,7 +752,9 @@ in
The listed plugins will not be installed. The listed plugins will not be installed.
''; '';
home.packages = lib.mkIf (cfg.package != null) [ kakouneWithPlugins ]; programs.kakoune.finalPackage = lib.mkIf (cfg.package != null) kakouneWithPlugins;
home.packages = lib.mkIf (cfg.finalPackage != null) [ cfg.finalPackage ];
home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "kak"; }; home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "kak"; };
xdg.configFile = lib.mkMerge [ xdg.configFile = lib.mkMerge [
{ "kak/kakrc".source = configFile; } { "kak/kakrc".source = configFile; }