mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
less: generate lesskey only when non-empty
This commit is contained in:
parent
18ea6d7a8f
commit
9a132f2971
4 changed files with 12 additions and 2 deletions
|
|
@ -34,6 +34,6 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
||||||
|
|
||||||
xdg.configFile."lesskey".text = cfg.keys;
|
xdg.configFile."lesskey" = lib.mkIf (cfg.keys != "") { text = cfg.keys; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1,4 @@
|
||||||
{ less-with-custom-keys = ./less-with-custom-keys.nix; }
|
{
|
||||||
|
less-custom-keys = ./custom-keys.nix;
|
||||||
|
less-no-keys = ./no-keys.nix;
|
||||||
|
}
|
||||||
|
|
|
||||||
7
tests/modules/programs/less/no-keys.nix
Normal file
7
tests/modules/programs/less/no-keys.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
programs.less.enable = true;
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertPathNotExists home-files/.config/lesskey
|
||||||
|
'';
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue