bash: add logoutExtra option

This commit is contained in:
Tobias Happ 2019-07-23 23:55:41 +02:00 committed by Matthieu Coudron
parent 1499b85ac6
commit 8b759c24e6
4 changed files with 44 additions and 0 deletions

View file

@ -1,3 +1,4 @@
{
bash-logout = ./logout.nix;
bash-session-variables = ./session-variables.nix;
}

View file

@ -0,0 +1,4 @@
# -*- mode: sh -*-
clear-console

View file

@ -0,0 +1,22 @@
{ 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 \
${./logout-expected.txt}
'';
};
}