TERRANIX-MODULES(5)
πΈ terranix-modules(5) πΈ
okay so this page is from the terranix reference pages, and honestly? it's the whole entire menu of modules terranix gives you out of the box. π
β¨ NAME β¨
terranix-modules β terranix configuration options π
π DESCRIPTION π
These are the modules you can literally use in your config.nix β terranix ships them by default, no cap. π«Ά
π OPTIONS π
bestie, here's everything you can drop into config.nix:
_module.argsβ extra arguments passed to every module, on top of the usual suspects likelib,config,pkgsandmodulesPath. This option is also available to all submodules. β¨ But heads up: submodules do not inherit args from their parent module, and they don't hand args up to their parent module or over to sibling submodules. The one sole exception? The argumentname, which parent modules give to a submodule β it holds the attribute name the submodule is bound to, or a unique generated name if it's not bound to an attribute at all. Some arguments are already passed by default, and the following ones cannot be changed with this option:lib: the nixpkgs library πconfig: the results of all options after merging the values from all modules togetheroptions: the options declared in all modulesspecialArgs: thespecialArgsargument passed toevalModules- all attributes of
specialArgs
So like, option values can generally depend on other option values thanks to laziness β but that does not apply to imports, which must be computed statically before anything else. Because of that, callers of the module system can provide specialArgs which are available during import resolution. π¦ For NixOS, specialArgs includes modulesPath, which lets you import extra modules from the nixpkgs package tree without having to somehow make the module aware of where the nixpkgs or NixOS directories live. Obsessed:
{ modulesPath, ... }: {
imports = [ (modulesPath + "/profiles/minimal.nix") ];
}
And for NixOS, the default value for this option includes at least this argument:
pkgs: the nixpkgs package set according to thenixpkgs.pkgsoption.- Type: lazy attribute set of raw value
- Default:
{ } - Declared by:
<terranix/lib/modules.nix>
backend.etcdβ the etcd backend, periodt.https://www.terraform.io/docs/backends/types/etcd.html- Type:
null or (submodule) - Default:
null - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
backend.etcd.endpointsβ a space-separated list of the etcd endpoints πΈ- Type:
string - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
backend.etcd.passwordβ the password π- Type:
null or string - Default:
null - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
backend.etcd.pathβ the path where to store the state ποΈ- Type:
string - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
backend.etcd.usernameβ the username- Type:
null or string - Default:
null - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
backend.localβ the local backend, right there on your machine.https://www.terraform.io/docs/backends/types/local.html- Type:
null or (submodule) - Default:
null - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
backend.local.pathβ path to the state file πΎ- Type:
string - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
backend.s3β the s3 backend, cloud girlie behaviour.https://www.terraform.io/docs/backends/types/s3.html- Type:
null or (submodule) - Default:
null - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
backend.s3.bucketβ bucket name πͺ£- Type:
string - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
backend.s3.keyβ path to the state file in the bucket- Type:
string - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
backend.s3.regionβ region of the bucket π- Type:
string - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
dataβ Data objects! These are queries you use on resources that already exist, as if they were created by theresourceoption. More deets here:https://www.terraform.io/docs/configuration/data-sources.htmlπ- Type:
bool,int,floatorstr - Default:
{ } - Example:
{ }
- Type:
ephemeralβ Ephemeral objects are a temporary resource β they are not stored, so don't get attached lol. More deets:https://developer.hashicorp.com/terraform/language/resources/ephemeralπ- Type:
bool,int,floatorstr - Default:
{ } - Example:
{ }
- Type:
importβ define a terraform import, iconic. More deets:https://developer.hashicorp.com/terraform/language/importπ₯- Type:
bool,int,floatorstr - Default:
{ } - Example:
- Type:
{
import = [
{
id = "i-abcd1234";
to = "aws_instance.example";
}
];
}
localsβ define terraform variables with file scope. Like modules, this is terraform-intern and terranix has better ways, ngl. More deets:https://www.terraform.io/docs/configuration/locals.htmlπ§- Type:
bool,int,floatorstr - Default:
{ } - Example:
- Type:
{
locals = {
owner = "Community Team";
service_name = "forum";
};
}
moduleβ a terraform module, for defining multiple resources so you can share or duplicate them. This is the terraform module system and it has nothing to do with the module system of terranix or nixos, okay bestie don't mix them up π. More deets:https://www.terraform.io/docs/configuration/modules.html- Type:
bool,int,floatorstr - Default:
{ } - Example:
- Type:
{
module = {
consul = {
source = "github.com/hashicorp/example";
};
};
}
movedβ move a resource from one address to another, lowkey magic. More deets:https://developer.hashicorp.com/terraform/language/block/movedπ- Type:
bool,int,floatorstr - Default:
{ } - Example:
- Type:
{
moved = [
{
from = "aws_instance.example";
to = "aws_instance.other_example";
}
];
}
outputβ super useful in combination withterraform_remote_state. More deets:https://www.terraform.io/docs/configuration/outputs.htmlπ€- Type:
bool,int,floatorstr - Default:
{ } - Example:
- Type:
{
output = {
instance_ip_addr = {
value = "aws_instance.server.private_ip";
};
};
}
providerβ define your API connection, main character energy. π¨ Don't use secrets in here β they'll be visible in the nix-store and in the resultingconfig.tf.json. Use terraform variables instead, fr fr. More deets:https://www.terraform.io/docs/configuration/providers.htmlorhttps://www.terraform.io/docs/providers/index.html- Type:
bool,int,floatorstr - Default:
{ } - Example:
- Type:
{
provider = {
google = {
project = "acme-app";
region = "us-central1";
};
};
}
provisioner.privateKeyFileβ the PrivateKey for provisioning via ssh access, seehttps://www.terraform.io/docs/provisioners/connection.html. This one's an agnostic option β option-authors should use it to implement server provisioning. π- Type:
string - Example:
"~/.ssh/id_rsa" - Declared by:
<terranix/modules/provisioner.nix>
- Type:
remote_state.etcdβ etcd remote state, slay.https://www.terraform.io/docs/backends/types/etcd.html- Type: attribute set of (submodule)
- Default:
{ } - Declared by:
<terranix/modules/terraform/backends.nix>
remote_state.etcd.<name>.endpointsβ a space-separated list of the etcd endpoints πΈ- Type:
string - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
remote_state.etcd.<name>.passwordβ the password π- Type:
null or string - Default:
null - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
remote_state.etcd.<name>.pathβ the path where to store the state ποΈ- Type:
string - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
remote_state.etcd.<name>.usernameβ the username- Type:
null or string - Default:
null - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
remote_state.localβ local remote state (yes, the naming is a vibe, just go with it).https://www.terraform.io/docs/backends/types/local.html- Type: attribute set of (submodule)
- Default:
{ } - Declared by:
<terranix/modules/terraform/backends.nix>
remote_state.local.<name>.pathβ path to the state file πΎ- Type:
string - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
remote_state.s3β s3 remote state, cloud storage bestie.https://www.terraform.io/docs/backends/types/s3.html- Type: attribute set of (submodule)
- Default:
{ } - Declared by:
<terranix/modules/terraform/backends.nix>
remote_state.s3.<name>.bucketβ bucket name πͺ£- Type:
string - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
remote_state.s3.<name>.keyβ path to the state file in the bucket- Type:
string - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
remote_state.s3.<name>.regionβ region of the bucket π- Type:
string - Declared by:
<terranix/modules/terraform/backends.nix>
- Type:
removedβ bestie, this is how you define aremovedresource. More deets right here:https://developer.hashicorp.com/terraform/language/state/remove
Type: bool, int, float or str
Default: { }
Example:
{
removed = [
{
from = "aws_instance.example";
lifecycle = {
destroy = false;
};
}
];
}
resourceβ the absolute backbone of terraform and terranix for changing and creating state. Peep the full lore here:https://www.terraform.io/docs/configuration/resources.html
Type: bool, int, float or str
Default: { }
Example:
{
resource = {
aws_instance = {
web = {
ami = "ami-a1b2c3d4";
instance_type = "t2.micro";
};
};
};
}
terraformβ terraform configuration lives here. But for backends, go look at the terranix optionsbackend.etcd,backend.localandbackend.s3. More deets:https://www.terraform.io/docs/configuration/terraform.html
Type: bool, int, float or str
Default: { }
Example:
{
terraform = {
backend = {
s3 = {
bucket = "mybucket";
key = "path/to/my/key";
region = "us-east-1";
};
};
};
}
usersβ user management central. The path isusers.group.username. All members in theadminsgroup should be able to ssh to servers. This is an agnostic option, so option-authors should use this options to implement server provisioning. π
Type: attribute set of attribute set of (submodule)
Default: { }
Example:
{
admins = {
lassuls = {
publicKey = "ssh-rsa ABKAB3NzaC1yc2EAAAA..";
};
mrVanDalo = {
publicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAA..";
};
};
}
Declared by: <terranix/modules/users.nix>
users.<name>.<name>.publicKeyβ the ssh public key of the user, no cap. π
Type: null or string
Default: null
Example: "\${ file( ~/.ssh/id_rsa.pub ) }"
Declared by: <terranix/modules/users.nix>
variableβ input variables, which can be set by--var=nameor by environment variables prefixt withTF_VAR_. Usually used in terraform modules or to ask for API tokens. Full details:https://www.terraform.io/docs/configuration/variables.html
Type: bool, int, float or str
Default: { }
Example:
{
variable = {
image_id = {
description = "The id of the machine image (AMI) to use for the server.";
type = "string";
};
};
}
π SEE ALSO
βοΈ AUTHOR
- Ingolf Wagner β Author.
Β©οΈ COPYRIGHT
Copyright Β© 2019β2022 Ingolf Wagner
and that's the page, bestie π
β¨ β source/version terranix module documentation, date 01/01/1980, section TERRANIX-MODULES(5). periodt π«Ά
π¦ where this page comes from
- nixpkgs unstable: terranix 2.9.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms