chaos-jetzt-nixfiles/modules/deployment.nix
Moritz 'e1mo' Fromm 047d73dc78
Add cj.deployment module
That way we can configure the depployment tags and everything in a
single location.
2023-08-04 16:39:10 +02:00

26 lines
520 B
Nix

{ config
, options
, lib
, ... }:
let
inherit (lib) mkOption types optionalString;
cfg = config.cj.deployment;
isDev = cfg.environment == "dev";
in
{
options.cj.deployment = {
environment = mkOption {
description = "Environment this host will be used for. Affects both colmena deploy groups and the baseDomain";
type = types.enum [ "dev" "prod" ];
};
};
config = {
_module.args = {
inherit isDev;
baseDomain = "${optionalString isDev "dev."}chaos.jetzt";
};
};
}