diff --git a/deploy.nix b/deploy.nix index e8886c7..dcfa2a2 100644 --- a/deploy.nix +++ b/deploy.nix @@ -15,11 +15,12 @@ in { nodes = mkDeployNodes (name: machine: let nixosConfiguration = self.nixosConfigurations.${name}; + machineArch = nixosConfiguration.config.facter.report.system; in { hostname = nixosConfiguration.config.networking.fqdn; profiles.system = { - remoteBuild = machine.arch != deployArch; - path = deploy-rs.lib.${machine.arch}.activate.nixos nixosConfiguration; + remoteBuild = machineArch != deployArch; + path = deploy-rs.lib.${machineArch}.activate.nixos nixosConfiguration; }; }); }; diff --git a/machines/atlas/default.nix b/machines/atlas/default.nix index a0845e0..aae82bc 100644 --- a/machines/atlas/default.nix +++ b/machines/atlas/default.nix @@ -1,6 +1,5 @@ { machines.atlas = { - arch = "x86_64-linux"; kubernetesNodeLabels.storageType = "slow"; facterReportPath = ./facter.json; diff --git a/machines/default.nix b/machines/default.nix index c32a0b4..5aab827 100644 --- a/machines/default.nix +++ b/machines/default.nix @@ -9,14 +9,6 @@ flake-utils.lib.eachDefaultSystem (system: let machineOpts = {config, ...}: { options = { - arch = lib.mkOption { - default = null; - type = with lib.types; nullOr str; - description = '' - CPU architecture of this machine. - ''; - }; - facterReportPath = lib.mkOption { default = null; type = with lib.types; nullOr path; diff --git a/machines/jefke/default.nix b/machines/jefke/default.nix index f423c08..ffab64b 100644 --- a/machines/jefke/default.nix +++ b/machines/jefke/default.nix @@ -1,6 +1,5 @@ { machines.jefke = { - arch = "x86_64-linux"; kubernetesNodeLabels.storageType = "fast"; facterReportPath = ./facter.json; diff --git a/machines/lewis/default.nix b/machines/lewis/default.nix index 5b6f580..2dcf470 100644 --- a/machines/lewis/default.nix +++ b/machines/lewis/default.nix @@ -1,6 +1,5 @@ { machines.lewis = { - arch = "x86_64-linux"; kubernetesNodeLabels = { storageType = "fast"; hasMedia = "true"; diff --git a/machines/talos.nix b/machines/talos.nix index 56ada95..cbcc0b1 100644 --- a/machines/talos.nix +++ b/machines/talos.nix @@ -1,7 +1,5 @@ { machines.talos = { - arch = "x86_64-linux"; - nixosModule = {lib, ...}: { lab.storage.profile = "normal"; diff --git a/machines/warwick/default.nix b/machines/warwick/default.nix index 0035e27..a9e740b 100644 --- a/machines/warwick/default.nix +++ b/machines/warwick/default.nix @@ -1,6 +1,5 @@ { machines.warwick = { - arch = "aarch64-linux"; facterReportPath = ./facter.json; nixosModule = {inputs, ...}: { diff --git a/modules/default.nix b/modules/default.nix index 99e0605..ef7de1c 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -29,7 +29,7 @@ overlays = [ (final: _prev: { unstable = import inputs.nixpkgs-unstable { - system = machine.arch; + system = config.nixpkgs.hostPlatform.system; }; }) ]; diff --git a/modules/k3s/default.nix b/modules/k3s/default.nix index 9b00024..e193271 100644 --- a/modules/k3s/default.nix +++ b/modules/k3s/default.nix @@ -1,5 +1,4 @@ { - self, inputs, pkgs, lib,