Skip to content

Commit 0b0eafb

Browse files
hykilpikonnaIzorkin
andcommitted
[PR] dylanaraps/neofetch#2157 from Izorkin - Improve detect NixOS version
Upstream PR: dylanaraps/neofetch#2157 Thanks to @Izorkin Co-authored-by: Izorkin <izorkin@elven.pw>
2 parents 7a7e710 + de253af commit 0b0eafb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

neofetch

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,13 @@ get_distro() {
999999
*) distro="OS Elbrus $(< /etc/mcst_version)"
10001000
esac
10011001

1002+
elif [[ -f /etc/NIXOS ]]; then
1003+
case $distro_shorthand in
1004+
on) distro="NixOS $(nixos-version | awk '{print substr($1,0,5),$2}')" ;;
1005+
tiny) distro="NixOS" ;;
1006+
*) distro="NixOS $(nixos-version)" ;;
1007+
esac
1008+
10021009
elif type -p pveversion >/dev/null; then
10031010
case $distro_shorthand in
10041011
on|tiny) distro="Proxmox VE" ;;

0 commit comments

Comments
 (0)