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"
|
"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": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729742320,
|
"lastModified": 1729742320,
|
||||||
|
@ -411,6 +426,7 @@
|
||||||
"kubenix": "kubenix",
|
"kubenix": "kubenix",
|
||||||
"nix-snapshotter": "nix-snapshotter",
|
"nix-snapshotter": "nix-snapshotter",
|
||||||
"nixng": "nixng",
|
"nixng": "nixng",
|
||||||
|
"nixos-facter-modules": "nixos-facter-modules",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||||
|
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
|
||||||
|
|
||||||
git-hooks = {
|
git-hooks = {
|
||||||
url = "github:cachix/git-hooks.nix";
|
url = "github:cachix/git-hooks.nix";
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
machines.atlas = {
|
machines.atlas = {
|
||||||
arch = "x86_64-linux";
|
arch = "x86_64-linux";
|
||||||
kubernetesNodeLabels.storageType = "slow";
|
kubernetesNodeLabels.storageType = "slow";
|
||||||
|
facterReportPath = ./facter.json;
|
||||||
|
|
||||||
nixosModule.lab = {
|
nixosModule.lab = {
|
||||||
storage.profile = "kubernetes";
|
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 {
|
isRaspberryPi = lib.mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
|
@ -52,12 +60,11 @@ in {
|
||||||
(lib.modules.evalModules {
|
(lib.modules.evalModules {
|
||||||
modules = [
|
modules = [
|
||||||
allOpts
|
allOpts
|
||||||
./warwick.nix
|
./warwick
|
||||||
./atlas.nix
|
./atlas
|
||||||
./jefke.nix
|
./jefke
|
||||||
./lewis.nix
|
./lewis
|
||||||
# ./talos.nix
|
# ./talos.nix
|
||||||
# ./pikvm.nix
|
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
.config
|
.config
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
machines.jefke = {
|
machines.jefke = {
|
||||||
arch = "x86_64-linux";
|
arch = "x86_64-linux";
|
||||||
kubernetesNodeLabels.storageType = "fast";
|
kubernetesNodeLabels.storageType = "fast";
|
||||||
|
facterReportPath = ./facter.json;
|
||||||
|
|
||||||
nixosModule.lab = {
|
nixosModule.lab = {
|
||||||
storage.profile = "kubernetes";
|
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";
|
storageType = "fast";
|
||||||
hasMedia = "true";
|
hasMedia = "true";
|
||||||
};
|
};
|
||||||
|
facterReportPath = ./facter.json;
|
||||||
|
|
||||||
nixosModule.lab = {
|
nixosModule.lab = {
|
||||||
storage.profile = "kubernetes";
|
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 = {
|
machines.warwick = {
|
||||||
arch = "aarch64-linux";
|
arch = "aarch64-linux";
|
||||||
isRaspberryPi = true;
|
isRaspberryPi = true;
|
||||||
|
facterReportPath = ./facter.json;
|
||||||
|
|
||||||
nixosModule.lab = {
|
nixosModule.lab = {
|
||||||
storage.profile = "pi";
|
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.disko.nixosModules.disko
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
inputs.nix-snapshotter.nixosModules.nix-snapshotter
|
inputs.nix-snapshotter.nixosModules.nix-snapshotter
|
||||||
|
inputs.nixos-facter-modules.nixosModules.facter
|
||||||
]
|
]
|
||||||
++ lib.lists.optional (machine.isRaspberryPi) inputs.nixos-hardware.nixosModules.raspberry-pi-4;
|
++ lib.lists.optional (machine.isRaspberryPi) inputs.nixos-hardware.nixosModules.raspberry-pi-4;
|
||||||
|
|
||||||
|
@ -162,5 +163,7 @@
|
||||||
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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue