1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-11 12:29:47 +01:00
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

26 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
''
}
'';
};
}