home-manager/tests/modules/programs/bash/logout.nix
Robert Helgesson e9b7d12e06
bash: generate files using writeShellScript
This ensures that the generated file is syntactically valid.

Issue #2015
2021-05-18 00:46:04 +02:00

27 lines
417 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
programs.bash = {
enable = true;
logoutExtra = ''
clear-console
'';
};
nmt.script = ''
assertFileExists home-files/.bash_logout
assertFileContent \
home-files/.bash_logout \
${
pkgs.writeShellScript "logout-expected" ''
clear-console
''
}
'';
};
}