2024-10-28 13:12:06 +00:00
|
|
|
{
|
|
|
|
nixpkgs,
|
|
|
|
flake-utils,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
flake-utils.lib.eachDefaultSystem (system: let
|
2024-09-07 10:39:30 +00:00
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
lib = pkgs.lib;
|
|
|
|
|
2024-10-28 13:12:06 +00:00
|
|
|
machineOpts = {config, ...}: {
|
2024-09-07 10:39:30 +00:00
|
|
|
options = {
|
|
|
|
nixosModule = lib.mkOption {
|
2024-10-28 13:12:06 +00:00
|
|
|
default = {...}: {};
|
2024-09-07 10:39:30 +00:00
|
|
|
type = lib.types.anything;
|
|
|
|
description = ''
|
|
|
|
Customized configuration for this machine in the form of a NixOS module.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
allOpts = {
|
|
|
|
options = {
|
|
|
|
machines = lib.mkOption {
|
|
|
|
type = with lib.types; attrsOf (submodule machineOpts);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-10-28 13:12:06 +00:00
|
|
|
in {
|
|
|
|
machines =
|
|
|
|
(lib.modules.evalModules {
|
|
|
|
modules = [
|
|
|
|
allOpts
|
2024-11-02 22:55:25 +00:00
|
|
|
./warwick
|
|
|
|
./atlas
|
|
|
|
./jefke
|
|
|
|
./lewis
|
2024-10-28 13:12:06 +00:00
|
|
|
# ./talos.nix
|
|
|
|
];
|
|
|
|
})
|
|
|
|
.config
|
|
|
|
.machines;
|
2024-09-07 10:39:30 +00:00
|
|
|
})
|