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 = {
kubernetesNodeLabels.storageType = "slow";
facterReportPath = ./facter.json;
nixosModule.lab = {
nixosModule = {
facter.reportPath = ./facter.json;
lab = {
storage.profile = "kubernetes";
tailscale.enable = true;
@ -13,4 +15,5 @@
};
};
};
};
}

View file

@ -9,14 +9,6 @@ flake-utils.lib.eachDefaultSystem (system: let
machineOpts = {config, ...}: {
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 {
default = {...}: {};
type = lib.types.anything;

View file

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

View file

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

View file

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

View file

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