feat(darwin): Add machine platform config for darwin hosts
This commit is contained in:
parent
e5e365a1e0
commit
7866bc5bc7
2 changed files with 13 additions and 5 deletions
|
@ -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";
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue