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
|
|
@ -115,13 +115,13 @@
|
||||||
"lauren_lagarde" = home-manager.lib.homeManagerConfiguration {
|
"lauren_lagarde" = home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = self.homeManagerModules."lauren_lagarde";
|
modules = self.homeManagerModules."lauren_lagarde";
|
||||||
extraSpecialArgs = { inherit inputs pkgs-unstable; };
|
extraSpecialArgs = { inherit self inputs pkgs-unstable; };
|
||||||
};
|
};
|
||||||
|
|
||||||
"lauren_lagarde@ll-latitude-e5591" = home-manager.lib.homeManagerConfiguration {
|
"lauren_lagarde@ll-latitude-e5591" = home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = self.homeManagerModules."lauren_lagarde@ll-latitude-e5591";
|
modules = self.homeManagerModules."lauren_lagarde@ll-latitude-e5591";
|
||||||
extraSpecialArgs = { inherit inputs pkgs-unstable; };
|
extraSpecialArgs = { inherit self inputs pkgs-unstable; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{ ... }: {
|
{ self, ... }: let
|
||||||
|
rev = builtins.replaceStrings ["-dirty"] ["*"] (toString (self.shortRev or self.dirtyShortRev or self.lastModified or "unknown"));
|
||||||
|
in {
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
|
|
@ -6,6 +8,8 @@
|
||||||
};
|
};
|
||||||
bashrcExtra = ''
|
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" $@; }
|
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}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{ pkgs, home-manager, ... }: {
|
{ self, pkgs, home-manager, ... }: let
|
||||||
|
rev = builtins.replaceStrings ["-dirty"] ["*"] (toString (self.shortRev or self.dirtyShortRev or self.lastModified or "unknown"));
|
||||||
|
in {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# TODO: Why no work?
|
# TODO: Why no work?
|
||||||
#nerdfonts
|
#nerdfonts
|
||||||
|
|
@ -217,7 +219,7 @@
|
||||||
|
|
||||||
"module/hostname" = {
|
"module/hostname" = {
|
||||||
type = "custom/script";
|
type = "custom/script";
|
||||||
exec = "echo $(uname -n)";
|
exec = "echo $(uname -n)#${rev}";
|
||||||
interval = 256;
|
interval = 256;
|
||||||
|
|
||||||
format = "<label>";
|
format = "<label>";
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
"venv"
|
"venv"
|
||||||
"user"
|
"user"
|
||||||
"host"
|
"host"
|
||||||
|
"shell-var"
|
||||||
"ssh"
|
"ssh"
|
||||||
"cwd"
|
"cwd"
|
||||||
"perms"
|
"perms"
|
||||||
|
|
@ -24,6 +25,7 @@
|
||||||
cwd-mode = "plain";
|
cwd-mode = "plain";
|
||||||
git-mode = "fancy";
|
git-mode = "fancy";
|
||||||
colorize-hostname = true;
|
colorize-hostname = true;
|
||||||
|
shell-var = "SYSTEM_GIT_REV";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue