Use nixos-facter
This commit is contained in:
parent
14872a2e6b
commit
a423fd024e
12 changed files with 14266 additions and 5 deletions
16
flake.lock
16
flake.lock
|
@ -289,6 +289,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-facter-modules": {
|
||||
"locked": {
|
||||
"lastModified": 1730026316,
|
||||
"narHash": "sha256-AzP+trH/ykBJGTx3twkpuwbkhFSmsY1PJDQtRmK4k4c=",
|
||||
"owner": "numtide",
|
||||
"repo": "nixos-facter-modules",
|
||||
"rev": "15b6531d44aa6f0bbd2fd8309cd2a6d7f183ba32",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "nixos-facter-modules",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1729742320,
|
||||
|
@ -411,6 +426,7 @@
|
|||
"kubenix": "kubenix",
|
||||
"nix-snapshotter": "nix-snapshotter",
|
||||
"nixng": "nixng",
|
||||
"nixos-facter-modules": "nixos-facter-modules",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
|
||||
|
||||
git-hooks = {
|
||||
url = "github:cachix/git-hooks.nix";
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
machines.atlas = {
|
||||
arch = "x86_64-linux";
|
||||
kubernetesNodeLabels.storageType = "slow";
|
||||
facterReportPath = ./facter.json;
|
||||
|
||||
nixosModule.lab = {
|
||||
storage.profile = "kubernetes";
|
3758
machines/atlas/facter.json
Normal file
3758
machines/atlas/facter.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -17,6 +17,14 @@ flake-utils.lib.eachDefaultSystem (system: let
|
|||
'';
|
||||
};
|
||||
|
||||
facterReportPath = lib.mkOption {
|
||||
default = null;
|
||||
type = with lib.types; nullOr path;
|
||||
description = ''
|
||||
Path to the nixos-facter report JSON for this machine.
|
||||
'';
|
||||
};
|
||||
|
||||
isRaspberryPi = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
|
@ -52,12 +60,11 @@ in {
|
|||
(lib.modules.evalModules {
|
||||
modules = [
|
||||
allOpts
|
||||
./warwick.nix
|
||||
./atlas.nix
|
||||
./jefke.nix
|
||||
./lewis.nix
|
||||
./warwick
|
||||
./atlas
|
||||
./jefke
|
||||
./lewis
|
||||
# ./talos.nix
|
||||
# ./pikvm.nix
|
||||
];
|
||||
})
|
||||
.config
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
machines.jefke = {
|
||||
arch = "x86_64-linux";
|
||||
kubernetesNodeLabels.storageType = "fast";
|
||||
facterReportPath = ./facter.json;
|
||||
|
||||
nixosModule.lab = {
|
||||
storage.profile = "kubernetes";
|
3593
machines/jefke/facter.json
Normal file
3593
machines/jefke/facter.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -5,6 +5,7 @@
|
|||
storageType = "fast";
|
||||
hasMedia = "true";
|
||||
};
|
||||
facterReportPath = ./facter.json;
|
||||
|
||||
nixosModule.lab = {
|
||||
storage.profile = "kubernetes";
|
5507
machines/lewis/facter.json
Normal file
5507
machines/lewis/facter.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -2,6 +2,7 @@
|
|||
machines.warwick = {
|
||||
arch = "aarch64-linux";
|
||||
isRaspberryPi = true;
|
||||
facterReportPath = ./facter.json;
|
||||
|
||||
nixosModule.lab = {
|
||||
storage.profile = "pi";
|
1372
machines/warwick/facter.json
Normal file
1372
machines/warwick/facter.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -20,6 +20,7 @@
|
|||
inputs.disko.nixosModules.disko
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.nix-snapshotter.nixosModules.nix-snapshotter
|
||||
inputs.nixos-facter-modules.nixosModules.facter
|
||||
]
|
||||
++ lib.lists.optional (machine.isRaspberryPi) inputs.nixos-hardware.nixosModules.raspberry-pi-4;
|
||||
|
||||
|
@ -162,5 +163,7 @@
|
|||
age.keyFile = "/root/.config/sops/age/keys.txt";
|
||||
defaultSopsFile = "${self}/secrets/nixos.yaml";
|
||||
};
|
||||
|
||||
facter.reportPath = machine.facterReportPath;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue