nixos-servers/nix/machines/default.nix

42 lines
812 B
Nix
Raw Normal View History

2024-02-28 23:28:38 +00:00
{ lib, ... }:
let
machineOpts = { config, ... }: {
2024-02-28 23:28:38 +00:00
options = {
arch = lib.mkOption {
default = null;
type = with lib.types; nullOr str;
description = ''
CPU architecture of this machine.
'';
};
isRaspberryPi = lib.mkOption {
default = false;
type = lib.types.bool;
};
2024-02-28 23:28:38 +00:00
nixosModule = lib.mkOption {
default = { ... }: { };
type = lib.types.anything;
description = ''
Customized configuration for this machine in the form of a NixOS module.
'';
};
};
};
2024-02-28 23:28:38 +00:00
in
{
imports = [
./warwick.nix
./atlas.nix
./jefke.nix
./lewis.nix
];
2024-02-28 23:28:38 +00:00
options = {
machines = lib.mkOption {
type = with lib.types; attrsOf (submodule machineOpts);
};
};
}