From 871791d3087f5d37af9fd1fbc0adb9b5c2e1ea69 Mon Sep 17 00:00:00 2001 From: William Hsieh Date: Fri, 6 Sep 2024 09:41:46 +0800 Subject: [PATCH] fix: isDarwin --- flake.nix | 4 ++-- lib/default.nix | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 4da5bde4..1fea70ef 100644 --- a/flake.nix +++ b/flake.nix @@ -67,11 +67,11 @@ }; nixosConfigurations = mkSystem { - type = "nixos"; + isDarwin = false; }; darwinConfigurations = mkSystem { - type = "darwin"; + isDarwin = true; }; checks = foreachSystem (system: { diff --git a/lib/default.nix b/lib/default.nix index 7a77a33b..651afa8b 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -37,10 +37,8 @@ in ]; }; - mkSystem = { type }: + mkSystem = { isDarwin }: let - # TODO: assert type is either "darwin" or "nixos" - isDarwin = type == "darwin"; osConfig = ../system/${if isDarwin then "darwin" else "nixos" }; hmConfig = ../home;