summary refs log tree commit diff
path: root/lib/systems/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/systems/default.nix')
-rw-r--r--lib/systems/default.nix15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/systems/default.nix b/lib/systems/default.nix
index 6c6ce5c6ef62..8f5ef44ae72f 100644
--- a/lib/systems/default.nix
+++ b/lib/systems/default.nix
@@ -50,13 +50,14 @@ rec {
       # Output from uname
       uname = {
         # uname -s
-        system = if final.isLinux then "Linux"
-                 else if final.isDarwin then "Darwin"
-                 else if final.isWindows then "Windows"
-                 else if final.isFreeBSD then "FreeBSD"
-                 else if final.isNetBSD then "NetBSD"
-                 else if final.isOpenBSD then "OpenBSD"
-                 else null;
+        system = {
+          "linux" = "Linux";
+          "windows" = "Windows";
+          "darwin" = "Darwin";
+          "netbsd" = "NetBSD";
+          "freebsd" = "FreeBSD";
+          "openbsd" = "OpenBSD";
+        }.${final.parsed.kernel.name} or null;
 
          # uname -p
          processor = final.parsed.cpu.name;