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,15 +1,18 @@
{ {
machines.atlas = { machines.atlas = {
kubernetesNodeLabels.storageType = "slow"; kubernetesNodeLabels.storageType = "slow";
facterReportPath = ./facter.json;
nixosModule.lab = { nixosModule = {
storage.profile = "kubernetes"; facter.reportPath = ./facter.json;
tailscale.enable = true;
k3s = { lab = {
enable = true; storage.profile = "kubernetes";
serverAddr = "https://jefke.dmz:6443"; tailscale.enable = true;
k3s = {
enable = true;
serverAddr = "https://jefke.dmz:6443";
};
}; };
}; };
}; };

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,15 +1,18 @@
{ {
machines.jefke = { machines.jefke = {
kubernetesNodeLabels.storageType = "fast"; kubernetesNodeLabels.storageType = "fast";
facterReportPath = ./facter.json;
nixosModule.lab = { nixosModule = {
storage.profile = "kubernetes"; facter.reportPath = ./facter.json;
tailscale.enable = true;
k3s = { lab = {
enable = true; storage.profile = "kubernetes";
clusterInit = true; tailscale.enable = true;
k3s = {
enable = true;
clusterInit = true;
};
}; };
}; };
}; };

View file

@ -4,17 +4,20 @@
storageType = "fast"; storageType = "fast";
hasMedia = "true"; hasMedia = "true";
}; };
facterReportPath = ./facter.json;
nixosModule.lab = { nixosModule = {
storage.profile = "kubernetes"; facter.reportPath = ./facter.json;
backups.enable = true;
data-sharing.enable = true;
tailscale.enable = true;
k3s = { lab = {
enable = true; storage.profile = "kubernetes";
serverAddr = "https://jefke.dmz:6443"; backups.enable = true;
data-sharing.enable = true;
tailscale.enable = true;
k3s = {
enable = true;
serverAddr = "https://jefke.dmz:6443";
};
}; };
}; };
}; };

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