Use system architecture reported by nixos-facter

This commit is contained in:
Pim Kunis 2024-11-04 22:44:26 +01:00
parent 2a63bee83b
commit 6b80438243
9 changed files with 4 additions and 18 deletions

View file

@ -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;
};
});
};

View file

@ -1,6 +1,5 @@
{
machines.atlas = {
arch = "x86_64-linux";
kubernetesNodeLabels.storageType = "slow";
facterReportPath = ./facter.json;

View file

@ -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;

View file

@ -1,6 +1,5 @@
{
machines.jefke = {
arch = "x86_64-linux";
kubernetesNodeLabels.storageType = "fast";
facterReportPath = ./facter.json;

View file

@ -1,6 +1,5 @@
{
machines.lewis = {
arch = "x86_64-linux";
kubernetesNodeLabels = {
storageType = "fast";
hasMedia = "true";

View file

@ -1,7 +1,5 @@
{
machines.talos = {
arch = "x86_64-linux";
nixosModule = {lib, ...}: {
lab.storage.profile = "normal";

View file

@ -1,6 +1,5 @@
{
machines.warwick = {
arch = "aarch64-linux";
facterReportPath = ./facter.json;
nixosModule = {inputs, ...}: {

View file

@ -29,7 +29,7 @@
overlays = [
(final: _prev: {
unstable = import inputs.nixpkgs-unstable {
system = machine.arch;
system = config.nixpkgs.hostPlatform.system;
};
})
];

View file

@ -1,5 +1,4 @@
{
self,
inputs,
pkgs,
lib,