bash: add logoutExtra option
This commit is contained in:
parent
1499b85ac6
commit
8b759c24e6
4 changed files with 44 additions and 0 deletions
|
|
@ -123,6 +123,15 @@ in
|
|||
interactive shell.
|
||||
'';
|
||||
};
|
||||
|
||||
logoutExtra = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Extra commands that should be run when logging out of an
|
||||
interactive shell.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -195,6 +204,14 @@ in
|
|||
${cfg.bashrcExtra}
|
||||
'';
|
||||
|
||||
home.file.".bash_logout" = mkIf (cfg.logoutExtra != "") {
|
||||
text = ''
|
||||
# -*- mode: sh -*-
|
||||
|
||||
${cfg.logoutExtra}
|
||||
'';
|
||||
};
|
||||
|
||||
home.packages =
|
||||
optional (cfg.enableAutojump) pkgs.autojump;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue