forked from Fediversity/Fediversity
151 lines
4.8 KiB
HCL
151 lines
4.8 KiB
HCL
variable "kexec_tarball_url" {
|
|
type = string
|
|
description = "NixOS kexec installer tarball url"
|
|
default = null
|
|
}
|
|
|
|
# To make this re-usable we maybe should accept a store path here?
|
|
variable "nixos_partitioner_attr" {
|
|
type = string
|
|
description = "Nixos partitioner and mount script i.e. your-flake#nixosConfigurations.your-evaluated-nixos.config.system.build.diskoNoDeps or just your-evaluated.config.system.build.diskNoDeps. `config.system.build.diskNoDeps` is provided by the disko nixos module"
|
|
}
|
|
|
|
# To make this re-usable we maybe should accept a store path here?
|
|
variable "nixos_system_attr" {
|
|
type = string
|
|
description = "The nixos system to deploy i.e. your-flake#nixosConfigurations.your-evaluated-nixos.config.system.build.toplevel or just your-evaluated-nixos.config.system.build.toplevel if you are not using flakes"
|
|
}
|
|
|
|
variable "file" {
|
|
type = string
|
|
description = "Nix file containing the nixos_system_attr and nixos_partitioner_attr. Use this if you are not using flake"
|
|
default = null
|
|
}
|
|
|
|
variable "target_host" {
|
|
type = string
|
|
description = "DNS host to deploy to"
|
|
}
|
|
|
|
variable "install_user" {
|
|
type = string
|
|
description = "SSH user used to connect to the target_host, before installing NixOS. If null than the value of `target_host` is used"
|
|
default = null
|
|
}
|
|
|
|
variable "install_port" {
|
|
type = string
|
|
description = "SSH port used to connect to the target_host, before installing NixOS. If null than the value of `target_port` is used"
|
|
default = null
|
|
}
|
|
|
|
variable "target_user" {
|
|
type = string
|
|
description = "SSH user used to connect to the target_host after installing NixOS. If install_user is not set than this user is also used before installing."
|
|
default = "root"
|
|
}
|
|
|
|
variable "target_port" {
|
|
type = number
|
|
description = "SSH port used to connect to the target_host after installing NixOS. If install_port is not set than this port is also used before installing."
|
|
default = 22
|
|
}
|
|
|
|
variable "instance_id" {
|
|
type = string
|
|
description = "The instance id of the target_host, used to track when to reinstall the machine"
|
|
default = null
|
|
}
|
|
|
|
variable "install_ssh_key" {
|
|
type = string
|
|
description = "Content of private key used to connect to the target_host during initial installation"
|
|
default = null
|
|
}
|
|
|
|
variable "deployment_ssh_key" {
|
|
type = string
|
|
description = "Content of private key used to deploy to the target_host after initial installation. To ensure maximum security, it is advisable to connect to your host using ssh-agent instead of relying on this variable"
|
|
default = null
|
|
}
|
|
|
|
variable "debug_logging" {
|
|
type = bool
|
|
description = "Enable debug logging"
|
|
default = false
|
|
}
|
|
|
|
variable "stop_after_disko" {
|
|
type = bool
|
|
description = "DEPRECATED: Use `phases` instead. Exit after disko formatting"
|
|
default = false
|
|
}
|
|
|
|
variable "no_reboot" {
|
|
type = bool
|
|
description = "DEPRECATED: Use `phases` instead. Do not reboot after installation"
|
|
default = false
|
|
}
|
|
|
|
variable "phases" {
|
|
type = set(string)
|
|
description = "Phases to run. See `nixos-anywhere --help` for more information"
|
|
default = ["kexec", "disko", "install", "reboot"]
|
|
}
|
|
|
|
variable "extra_files_script" {
|
|
type = string
|
|
description = "A script that should place files in the current directory that will be copied to the targets / directory"
|
|
default = null
|
|
}
|
|
|
|
variable "disk_encryption_key_scripts" {
|
|
type = list(object({
|
|
path = string
|
|
script = string
|
|
}))
|
|
description = "Each script will be executed locally. Output of each will be created at the given path to disko during installation. The keys will be not copied to the final system"
|
|
default = []
|
|
}
|
|
|
|
variable "extra_environment" {
|
|
type = map(string)
|
|
description = "Extra environment variables to be set during installation. This can be useful to set extra variables for the extra_files_script or disk_encryption_key_scripts"
|
|
default = {}
|
|
}
|
|
|
|
variable "nix_options" {
|
|
type = map(string)
|
|
description = "the options of nix"
|
|
default = {}
|
|
}
|
|
|
|
variable "nixos_generate_config_path" {
|
|
type = string
|
|
description = "Path to which to write a `hardware-configuration.nix` generated by `nixos-generate-config`."
|
|
default = ""
|
|
}
|
|
|
|
variable "nixos_facter_path" {
|
|
type = string
|
|
description = "Path to which to write a `facter.json` generated by `nixos-facter`."
|
|
default = ""
|
|
}
|
|
|
|
variable "special_args" {
|
|
type = any
|
|
default = {}
|
|
description = "A map exposed as NixOS's `specialArgs` thru a file."
|
|
}
|
|
|
|
variable "build_on_remote" {
|
|
type = bool
|
|
description = "Build the closure on the remote machine instead of building it locally and copying it over"
|
|
default = false
|
|
}
|
|
|
|
variable "install_bootloader" {
|
|
type = bool
|
|
description = "Install/re-install the bootloader"
|
|
default = false
|
|
}
|