Create prompt module

This commit is contained in:
2024-07-23 20:53:57 -07:00
parent 4a21cf05d2
commit eade86cef6
3 changed files with 14 additions and 13 deletions

10
modules/prompt.nix Normal file
View File

@@ -0,0 +1,10 @@
{ options, lib, config, ... }:
{
options.promptEmoji = lib.mkOption {
type = lib.types.str;
};
config.programs.bash.promptInit = ''
PS1="\[\e]0;\u@\h: \w\a\]\n${config.promptEmoji} \[\033[1;$((UID ? 32 : 31))m\]\w \\$\[\033[0m\] "
'';
}