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

View file

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