feat(darwin): Add machine platform config for darwin hosts

This commit is contained in:
Mohammad Rafiq 2025-07-14 08:48:38 +08:00
parent e5e365a1e0
commit 7866bc5bc7
No known key found for this signature in database
2 changed files with 13 additions and 5 deletions

View file

@ -12,9 +12,14 @@
nixpkgs.hostPlatform = "${arch}-linux";
};
flake.modules.darwin.default.nixpkgs = {
hostPlatform = "x86_64-darwin";
# config.allowUnsupportedSystem = true;
};
flake.modules.darwin.default =
{ hostName, ... }:
let
inherit (config.flake.manifest.hosts.darwin.${hostName}.machine) platform;
arch = if platform == "intel" then "x86_64" else "aarch64";
in
{
nixpkgs.hostPlatform = "${arch}-darwin";
};
}