mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
less: store 'lesskey' under XDG_CONFIG_HOME
Less clutter in the $HOME.
This commit is contained in:
parent
736581f113
commit
829e89a16f
3 changed files with 14 additions and 4 deletions
|
@ -2280,6 +2280,16 @@ in
|
|||
modules.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2021-12-08T10:23:42+00:00";
|
||||
condition = config.programs.less.enable;
|
||||
message = ''
|
||||
The 'lesskey' configuration file is now stored under
|
||||
'$XDG_CONFIG_HOME/lesskey' since it is fully supported upstream
|
||||
starting from v596.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ in {
|
|||
'';
|
||||
description = ''
|
||||
Extra configuration for <command>less</command> written to
|
||||
<filename>$HOME/.lesskey</filename>.
|
||||
<filename>$XDG_CONFIG_HOME/lesskey</filename>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
@ -27,6 +27,6 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ pkgs.less ];
|
||||
home.file.".lesskey".text = cfg.keys;
|
||||
xdg.configFile."lesskey".text = cfg.keys;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@ with lib;
|
|||
test.stubs.less = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.lesskey
|
||||
assertFileContent home-files/.lesskey ${
|
||||
assertFileExists home-files/.config/lesskey
|
||||
assertFileContent home-files/.config/lesskey ${
|
||||
builtins.toFile "less.expected" ''
|
||||
s back-line
|
||||
t forw-line
|
||||
|
|
Loading…
Reference in a new issue