mirror of
https://github.com/nix-community/home-manager
synced 2024-11-18 00:59:44 +01:00
96e2f1bdf0
The kakoune editor has a plugin mechanism and several plugins are already packaged under `pkgs.kakounePlugins`. However, adding these packages to `home.packages` is not enough: the `kakoune` package needs to be configured with the list of plugins to include, so that they get sourced on start-up. We add a `programs.kakoune.plugins` option, analogous to `programs.vim.plugins`. The change is backwards compatible since `pkgs.kakoune` is defined as wrapKakoune kakoune-unwrapped { }; and `wrapKakoune` defaults the list of plugins to empty. PR #1356
18 lines
391 B
Nix
18 lines
391 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
config = {
|
|
programs.kakoune = {
|
|
enable = true;
|
|
plugins = [ pkgs.kakounePlugins.kak-powerline ];
|
|
};
|
|
|
|
nmt.script = let plugins_kak = "home-path/share/kak/plugins.kak";
|
|
in ''
|
|
assertFileRegex ${plugins_kak} \
|
|
'^source "/nix/store/.*-kak-powerline/share/kak/autoload/plugins/powerline/.*.kak"$'
|
|
'';
|
|
};
|
|
}
|