{ self, ... }: let rev = builtins.replaceStrings ["-dirty"] ["*"] (toString (self.shortRev or self.dirtyShortRev or self.lastModified or "unknown")); in { programs.bash = { enable = true; shellAliases = { ssh-with-yubikey = "ssh_with_yubikey"; }; 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" $@; } case "$(sed -n 's|^NAME=||p' /etc/os-release)" in "Alpine Linux") DISTRO_SYMBOL="" ;; "Ubuntu") DISTRO_SYMBOL="" ;; "NixOS") DISTRO_SYMBOL="" ;; "Arch Linux") DISTRO_SYMBOL="" ;; "CentOS Linux") DISTRO_SYMBOL="" ;; "Fedora") DISTRO_SYMBOL="" ;; *) DISTRO_SYMBOL="" ;; esac export SYSTEM_GIT_REV="$DISTRO_SYMBOL ${rev}" ''; }; }