Use system architecture reported by nixos-facter
This commit is contained in:
parent
2a63bee83b
commit
6b80438243
9 changed files with 4 additions and 18 deletions
|
@ -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;
|
||||
};
|
||||
});
|
||||
};
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
machines.atlas = {
|
||||
arch = "x86_64-linux";
|
||||
kubernetesNodeLabels.storageType = "slow";
|
||||
facterReportPath = ./facter.json;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
machines.jefke = {
|
||||
arch = "x86_64-linux";
|
||||
kubernetesNodeLabels.storageType = "fast";
|
||||
facterReportPath = ./facter.json;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
machines.lewis = {
|
||||
arch = "x86_64-linux";
|
||||
kubernetesNodeLabels = {
|
||||
storageType = "fast";
|
||||
hasMedia = "true";
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
machines.talos = {
|
||||
arch = "x86_64-linux";
|
||||
|
||||
nixosModule = {lib, ...}: {
|
||||
lab.storage.profile = "normal";
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
machines.warwick = {
|
||||
arch = "aarch64-linux";
|
||||
facterReportPath = ./facter.json;
|
||||
|
||||
nixosModule = {inputs, ...}: {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
overlays = [
|
||||
(final: _prev: {
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
system = machine.arch;
|
||||
system = config.nixpkgs.hostPlatform.system;
|
||||
};
|
||||
})
|
||||
];
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
self,
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
|
|
Loading…
Reference in a new issue