From 12dfc62ae516ba4708759d126950ceed372ce857 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Sat, 22 Jul 2023 14:16:09 +0000 Subject: [PATCH] fix(lib): doom-system-distro-version: check nixos-version first Even if a NixOS machine has lsb_release in its PATH, lsb_release will be used instead of nixos-version to determine the distro version. --- lisp/lib/system.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/lib/system.el b/lisp/lib/system.el index c46d62dae..b81b1b4f2 100644 --- a/lisp/lib/system.el +++ b/lisp/lib/system.el @@ -31,10 +31,10 @@ (format "Windows %s" "Unknown")) ; TODO ((eq distro 'macos) (format "MacOS %s" (sh "sw_vers" "-productVersion"))) - ((executable-find "lsb_release") - (sh "lsb_release" "-s" "-d")) ((executable-find "nixos-version") (format "NixOS %s" (sh "nixos-version"))) + ((executable-find "lsb_release") + (sh "lsb_release" "-s" "-d")) ((ignore-errors (with-file-contents! "/etc/os-release" (when (re-search-forward "^PRETTY_NAME=\"?\\([^\"\n]+\\)\"?" nil t)