diff --git a/README.md b/README.md index d68aa41..493a328 100644 --- a/README.md +++ b/README.md @@ -82,4 +82,5 @@ _Optional Dependencies: **zenity** (for GUI)_ - https://github.com/victort - https://github.com/Wrzlprnft - https://github.com/ananace +- https://github.com/LovingMelody - Runner Downloader inspired by https://github.com/richardtatum/sc-runner-updater diff --git a/lug-helper.sh b/lug-helper.sh index f920456..b260ef9 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -46,6 +46,7 @@ # Contributor: https://github.com/gort818 # Contributor: https://github.com/victort # Contributor: https://github.com/Wrzlprnft +# Contributor: https://github.com/LovingMelody # Runner Downloader inspired by: # https://github.com/richardtatum/sc-runner-updater # @@ -86,6 +87,12 @@ if [ ! -x "$(command -v xargs)" ]; then exit 1 fi +# Checks for NixOS for NixOS specific options +if (grep '^NAME=NixOS' /etc/os-release -q 2> /dev/null ); then + is_nixos=1 +else + is_nixos=0 +fi ######## Config ############################################################ @@ -222,6 +229,10 @@ repo="starcitizen-lug/lug-helper" releases_url="https://github.com/$repo/releases" current_version="v2.8" +# FIXME: Link +# NixOS section in Wiki +lug_wiki_nixos="https://github.com/starcitizen-lug/knowledge-base/wiki/Tips-and-Tricks" + ############################################################################ ############################################################################ ############################################################################ @@ -2497,6 +2508,15 @@ Usage: lug-helper fi fi +# Detect if NixOS is being used and direct user to wiki +if [ "$is_nixos" -eq 1 ]; then + # Detect if Zenity is being used and format the links + if [ "$use_zenity" -eq 1 ]; then + lug_wiki_nixos="$lug_wiki_nixos" + fi + message info "It looks like you're using NixOS\nPlease see our wiki for NixOS-specific configuration requirements:\n\n$lug_wiki_nixos" +fi + # Loop the main menu until the user selects quit while true; do # Configure the menu