mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-01 06:31:04 +01:00
less: rename keys to config
This commit is contained in:
parent
9a132f2971
commit
dfcea0573d
4 changed files with 17 additions and 14 deletions
|
|
@ -10,13 +10,17 @@ in
|
|||
{
|
||||
meta.maintainers = [ lib.maintainers.pamplemousse ];
|
||||
|
||||
imports = [
|
||||
(lib.mkRenamedOptionModule [ "programs" "less" "keys" ] [ "programs" "less" "config" ])
|
||||
];
|
||||
|
||||
options = {
|
||||
programs.less = {
|
||||
enable = lib.mkEnableOption "less, opposite of more";
|
||||
|
||||
package = lib.mkPackageOption pkgs "less" { nullable = true; };
|
||||
|
||||
keys = lib.mkOption {
|
||||
config = lib.mkOption {
|
||||
type = lib.types.lines;
|
||||
default = "";
|
||||
example = ''
|
||||
|
|
@ -24,7 +28,7 @@ in
|
|||
t forw-line
|
||||
'';
|
||||
description = ''
|
||||
Extra configuration for {command}`less` written to
|
||||
Configuration for {command}`less`, written to
|
||||
{file}`$XDG_CONFIG_HOME/lesskey`.
|
||||
'';
|
||||
};
|
||||
|
|
@ -34,6 +38,6 @@ in
|
|||
config = lib.mkIf cfg.enable {
|
||||
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
||||
|
||||
xdg.configFile."lesskey" = lib.mkIf (cfg.keys != "") { text = cfg.keys; };
|
||||
xdg.configFile."lesskey" = lib.mkIf (cfg.config != "") { text = cfg.config; };
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue