From de253afcf41bab441dc58d34cae654040cab7451 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Mon, 18 Jul 2022 19:39:24 +0300 Subject: [PATCH] Improve detect NixOS version --- neofetch | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/neofetch b/neofetch index 48b96d215..39192937e 100755 --- a/neofetch +++ b/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" ;;