Add current git revision to i3bar and powerline-go prompt
This commit is contained in:
parent
da88d64ebe
commit
c615373955
4 changed files with 13 additions and 5 deletions
|
|
@ -1,4 +1,6 @@
|
|||
{ ... }: {
|
||||
{ self, ... }: let
|
||||
rev = builtins.replaceStrings ["-dirty"] ["*"] (toString (self.shortRev or self.dirtyShortRev or self.lastModified or "unknown"));
|
||||
in {
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
|
|
@ -6,6 +8,8 @@
|
|||
};
|
||||
bashrcExtra = ''
|
||||
ssh_with_yubikey () { AGENT_SOCKET=$(ssh $@ gpgconf --list-dirs agent-socket) && ssh -A -R "$AGENT_SOCKET:$(gpgconf --list-dirs agent-socket)" -o "StreamLocalBindUnlink=yes" $@; }
|
||||
|
||||
export SYSTEM_GIT_REV=${rev}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue