Improve setting facter report path

This commit is contained in:
Pim Kunis 2024-11-04 22:56:26 +01:00
parent 6b80438243
commit ed550eafb1
6 changed files with 34 additions and 35 deletions

View file

@ -1,9 +1,11 @@
{ {
machines.atlas = { machines.atlas = {
kubernetesNodeLabels.storageType = "slow"; kubernetesNodeLabels.storageType = "slow";
facterReportPath = ./facter.json;
nixosModule.lab = { nixosModule = {
facter.reportPath = ./facter.json;
lab = {
storage.profile = "kubernetes"; storage.profile = "kubernetes";
tailscale.enable = true; tailscale.enable = true;
@ -13,4 +15,5 @@
}; };
}; };
}; };
};
} }

View file

@ -9,14 +9,6 @@ flake-utils.lib.eachDefaultSystem (system: let
machineOpts = {config, ...}: { machineOpts = {config, ...}: {
options = { options = {
facterReportPath = lib.mkOption {
default = null;
type = with lib.types; nullOr path;
description = ''
Path to the nixos-facter report JSON for this machine.
'';
};
nixosModule = lib.mkOption { nixosModule = lib.mkOption {
default = {...}: {}; default = {...}: {};
type = lib.types.anything; type = lib.types.anything;

View file

@ -1,9 +1,11 @@
{ {
machines.jefke = { machines.jefke = {
kubernetesNodeLabels.storageType = "fast"; kubernetesNodeLabels.storageType = "fast";
facterReportPath = ./facter.json;
nixosModule.lab = { nixosModule = {
facter.reportPath = ./facter.json;
lab = {
storage.profile = "kubernetes"; storage.profile = "kubernetes";
tailscale.enable = true; tailscale.enable = true;
@ -13,4 +15,5 @@
}; };
}; };
}; };
};
} }

View file

@ -4,9 +4,11 @@
storageType = "fast"; storageType = "fast";
hasMedia = "true"; hasMedia = "true";
}; };
facterReportPath = ./facter.json;
nixosModule.lab = { nixosModule = {
facter.reportPath = ./facter.json;
lab = {
storage.profile = "kubernetes"; storage.profile = "kubernetes";
backups.enable = true; backups.enable = true;
data-sharing.enable = true; data-sharing.enable = true;
@ -18,4 +20,5 @@
}; };
}; };
}; };
};
} }

View file

@ -1,11 +1,11 @@
{ {
machines.warwick = { machines.warwick = {
facterReportPath = ./facter.json;
nixosModule = {inputs, ...}: { nixosModule = {inputs, ...}: {
imports = [inputs.nixos-hardware.nixosModules.raspberry-pi-4]; imports = [inputs.nixos-hardware.nixosModules.raspberry-pi-4];
config = { config = {
facter.reportPath = ./facter.json;
lab = { lab = {
storage.profile = "pi"; storage.profile = "pi";
monitoring.server.enable = true; monitoring.server.enable = true;

View file

@ -141,7 +141,5 @@
age.keyFile = "/root/.config/sops/age/keys.txt"; age.keyFile = "/root/.config/sops/age/keys.txt";
defaultSopsFile = "${self}/secrets/nixos.yaml"; defaultSopsFile = "${self}/secrets/nixos.yaml";
}; };
facter.reportPath = machine.facterReportPath;
}; };
} }