[PR] dylanaraps/neofetch#2157 from Izorkin - Improve detect NixOS version
Upstream PR: https://github.com/dylanaraps/neofetch/pull/2157 Thanks to @Izorkin Co-authored-by: Izorkin <izorkin@elven.pw>
This commit is contained in:
commit
0b0eafbd07
1 changed files with 7 additions and 0 deletions
7
neofetch
7
neofetch
|
@ -999,6 +999,13 @@ get_distro() {
|
|||
*) distro="OS Elbrus $(< /etc/mcst_version)"
|
||||
esac
|
||||
|
||||
elif [[ -f /etc/NIXOS ]]; then
|
||||
case $distro_shorthand in
|
||||
on) distro="NixOS $(nixos-version | awk '{print substr($1,0,5),$2}')" ;;
|
||||
tiny) distro="NixOS" ;;
|
||||
*) distro="NixOS $(nixos-version)" ;;
|
||||
esac
|
||||
|
||||
elif type -p pveversion >/dev/null; then
|
||||
case $distro_shorthand in
|
||||
on|tiny) distro="Proxmox VE" ;;
|
||||
|
|
Loading…
Reference in a new issue