nix-config/modules/cluster/deployment-options.nix

37 lines
820 B
Nix

{ lib, ... }:
# our custom options
{
options.deployment = with lib; {
vcpu = mkOption {
type = types.int;
default = 4;
};
mem = mkOption {
type = types.int;
default = 512;
};
networks = mkOption {
type = with types; listOf str;
default = [ "serv" ];
};
persistedShares = mkOption {
type = with types; listOf str;
default = [ "/etc" "/home" "/var" ];
};
storage = mkOption {
type = types.enum [ "fast" "big" ];
default = "fast";
description = ''
Which glusterfs volume to use for persistedShares
'';
};
needForSpeed = mkOption {
type = types.bool;
default = false;
description = ''
Prefer deployment on Nomad clients with a higher c3d2.cpuSpeed
'';
};
};
}