diff --git a/nix/manifest.nix b/nix/manifest.nix index 6d4698d..a4574b3 100644 --- a/nix/manifest.nix +++ b/nix/manifest.nix @@ -7,7 +7,10 @@ shell = "fish"; pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n rafiq"; }; - hosts.darwin.venus.graphical = true; + hosts.darwin.venus = { + graphical = true; + machine.platform = "intel"; + }; hosts.nixos = { nemesis = { graphical = true; diff --git a/nix/modules/machine/platform.nix b/nix/modules/machine/platform.nix index e60d4bf..08e60d4 100644 --- a/nix/modules/machine/platform.nix +++ b/nix/modules/machine/platform.nix @@ -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"; + }; }