readline: optionally place config file in XDG dir

Based on PR #4189
This commit is contained in:
Shaw Vrana 2024-03-27 16:03:27 -07:00 committed by Robert Helgesson
parent 179f6acaf7
commit 3142bdcc47
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
4 changed files with 49 additions and 4 deletions

View file

@ -1 +1,4 @@
{ readline-using-all-options = ./using-all-options.nix; }
{
readline-using-all-options = ./using-all-options.nix;
readline-prefer-xdg-dirs = ./prefer-xdg-dirs.nix;
}

View file

@ -0,0 +1,28 @@
{ ... }:
{
home.preferXdgDirectories = true;
programs.readline = {
enable = true;
variables.bell-style = "audible";
};
nmt.script = ''
assertFileContent \
home-files/.config/inputrc \
${
builtins.toFile "readline-expected" ''
# Generated by Home Manager.
$include /etc/inputrc
set bell-style audible
''
}
assertFileContains \
home-path/etc/profile.d/hm-session-vars.sh \
'export INPUTRC="/home/hm-user/.config/inputrc"'
'';
}