1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-02 07:59:46 +01:00

less: store 'lesskey' under XDG_CONFIG_HOME

Less clutter in the $HOME.
This commit is contained in:
Bruno BELANYI 2021-12-06 21:48:59 +01:00 committed by Robert Helgesson
parent 736581f113
commit 829e89a16f
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
3 changed files with 14 additions and 4 deletions

View file

@ -2280,6 +2280,16 @@ in
modules. 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.
'';
}
]; ];
}; };
} }

View file

@ -19,7 +19,7 @@ in {
''; '';
description = '' description = ''
Extra configuration for <command>less</command> written to 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 { config = mkIf cfg.enable {
home.packages = [ pkgs.less ]; home.packages = [ pkgs.less ];
home.file.".lesskey".text = cfg.keys; xdg.configFile."lesskey".text = cfg.keys;
}; };
} }

View file

@ -15,8 +15,8 @@ with lib;
test.stubs.less = { }; test.stubs.less = { };
nmt.script = '' nmt.script = ''
assertFileExists home-files/.lesskey assertFileExists home-files/.config/lesskey
assertFileContent home-files/.lesskey ${ assertFileContent home-files/.config/lesskey ${
builtins.toFile "less.expected" '' builtins.toFile "less.expected" ''
s back-line s back-line
t forw-line t forw-line