50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
|
{ lib, config, ... }:
|
||
|
let
|
||
|
inherit (lib) mkEnableOption mkIf tf genList;
|
||
|
cfg = config.bagel.dnsimple;
|
||
|
in
|
||
|
{
|
||
|
options.bagel.dnsimple = {
|
||
|
enable = mkEnableOption "the DNSimple configuration";
|
||
|
};
|
||
|
|
||
|
config = mkIf cfg.enable {
|
||
|
terraform.required_providers.dnsimple = {
|
||
|
version = "~> 1.7.0";
|
||
|
source = "dnsimple/dnsimple";
|
||
|
};
|
||
|
|
||
|
resource.secret_resource.dnsimple_token.lifecycle.prevent_destroy = true;
|
||
|
resource.secret_resource.dnsimple_account.lifecycle.prevent_destroy = true;
|
||
|
|
||
|
provider.dnsimple = {
|
||
|
token = tf.ref "resource.secret_resource.dnsimple_token.value";
|
||
|
account = tf.ref "resource.secret_resource.dnsimple_account.value";
|
||
|
};
|
||
|
|
||
|
resource.dnsimple_zone.forkos_org = {
|
||
|
name = "forkos.org";
|
||
|
};
|
||
|
|
||
|
resource.dnsimple_zone.fleurixos_org = {
|
||
|
name = "fleurixos.org";
|
||
|
};
|
||
|
|
||
|
resource.dnsimple_zone.floral_systems = {
|
||
|
name = "floral.systems";
|
||
|
};
|
||
|
|
||
|
resource.dnsimple_zone.flowery_systems = {
|
||
|
name = "flowery.systems";
|
||
|
};
|
||
|
|
||
|
resource.dnsimple_zone.petalpkgs_org = {
|
||
|
name = "petalpkgs.org";
|
||
|
};
|
||
|
|
||
|
resource.dnsimple_zone.vzfdfp_de = {
|
||
|
name = "vzfdfp.de";
|
||
|
};
|
||
|
};
|
||
|
}
|