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

@ -7,7 +7,10 @@
shell = "fish"; shell = "fish";
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n rafiq"; pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n rafiq";
}; };
hosts.darwin.venus.graphical = true; hosts.darwin.venus = {
graphical = true;
machine.platform = "intel";
};
hosts.nixos = { hosts.nixos = {
nemesis = { nemesis = {
graphical = true; graphical = true;

View file

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