modules/environment/session-init: add shellInit option to add custom shell code.

This commit is contained in:
Shelvacu 2024-07-14 23:54:16 -07:00
parent c00333ee42
commit 26287f0e32
2 changed files with 13 additions and 0 deletions

View file

@ -3,3 +3,4 @@ Tobias Happ <tobias.happ@gmx.de>
Bruno Bigras <bigras.bruno@gmail.com> Bruno Bigras <bigras.bruno@gmail.com>
Evgeny Kurnevsky <kurnevsky@gmail.com> Evgeny Kurnevsky <kurnevsky@gmail.com>
Zhong Jianxin <azuwis@gmail.com> Zhong Jianxin <azuwis@gmail.com>
Shelvacu <nix-on-droid-is-cool@shelvacu.com>

View file

@ -39,6 +39,8 @@ let
''} ''}
${exportAll cfg.sessionVariables} ${exportAll cfg.sessionVariables}
${cfg.shellInit}
''; '';
}; };
in in
@ -61,6 +63,16 @@ in
''; '';
}; };
shellInit = mkOption {
default = "";
type = types.lines;
description = ''
Shell script code called during shell initialization
This is useful to add custom aliases or functions, for example.
'';
};
sessionVariables = mkOption { sessionVariables = mkOption {
default = { }; default = { };
type = types.attrs; type = types.attrs;