File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ set -efu "${enable_debug:-}"
3
3
has () {
4
4
command -v " $1 " > /dev/null && echo " y" || echo " n"
5
5
}
6
- is_nixos=$( if test -f /etc/os-release && grep -q ID= nixos /etc/os-release; then echo " y" ; else echo " n" ; fi)
6
+ is_nixos=$( if test -f /etc/os-release && grep -Eq ' ID(_LIKE)?="? nixos"? ' /etc/os-release; then echo " y" ; else echo " n" ; fi)
7
7
cat << FACTS
8
8
is_os=$( uname)
9
9
is_arch=$( uname -m)
10
10
is_kexec=$( if test -f /etc/is_kexec; then echo " y" ; else echo " n" ; fi)
11
11
is_nixos=$is_nixos
12
- is_installer=$( if [ " $is_nixos " = " y" ] && grep -q VARIANT_ID=installer /etc/os-release; then echo " y" ; else echo " n" ; fi)
12
+ is_installer=$( if [ " $is_nixos " = " y" ] && grep -Eq ' VARIANT_ID="? installer"? ' /etc/os-release; then echo " y" ; else echo " n" ; fi)
13
13
is_container=$( if [ " $( has systemd-detect-virt) " = " y" ]; then systemd-detect-virt --container; else echo " none" ; fi)
14
14
has_ipv6_only=$( if [ " $( has ip) " = " n" ] || ip r g 1 > /dev/null 2> /dev/null || ! ip -6 r g :: > /dev/null 2> /dev/null; then echo " n" ; else echo " y" ; fi)
15
15
has_tar=$( has tar)
You can’t perform that action at this time.
0 commit comments