Add NixOS ZFS EC2 AMI builder
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
variable "aws_region" {
|
||||
type = string
|
||||
default = "us-west-2"
|
||||
description = "AWS region."
|
||||
}
|
||||
|
||||
variable "name" {
|
||||
type = string
|
||||
default = "nixos-zfs-ec2"
|
||||
description = "Name prefix for the published AMI."
|
||||
}
|
||||
|
||||
variable "architecture" {
|
||||
type = string
|
||||
description = "AMI architecture, such as arm64 or x86_64."
|
||||
}
|
||||
|
||||
variable "root_snapshot_id" {
|
||||
type = string
|
||||
description = "Snapshot ID for the bootable NixOS root volume."
|
||||
}
|
||||
|
||||
variable "nix_snapshot_id" {
|
||||
type = string
|
||||
description = "Snapshot ID for the preseeded ZFS /nix volume."
|
||||
}
|
||||
|
||||
variable "input_hash" {
|
||||
type = string
|
||||
description = "Stable hash of the AMI builder inputs."
|
||||
}
|
||||
|
||||
variable "builder_git_rev" {
|
||||
type = string
|
||||
description = "Git revision of this AMI builder."
|
||||
}
|
||||
|
||||
variable "flake_lock_rev" {
|
||||
type = string
|
||||
description = "Revision or hash representing flake.lock inputs."
|
||||
}
|
||||
|
||||
variable "nixos_system_closure" {
|
||||
type = string
|
||||
default = ""
|
||||
description = "NixOS system closure path used to build the root image."
|
||||
}
|
||||
|
||||
variable "root_device_name" {
|
||||
type = string
|
||||
default = "/dev/xvda"
|
||||
description = "Root block device name used for AMI registration."
|
||||
}
|
||||
|
||||
variable "nix_device_name" {
|
||||
type = string
|
||||
default = "/dev/sdf"
|
||||
description = "AMI block device name for the /nix EBS snapshot. Runtime imports by ZFS pool identity, not this device name."
|
||||
}
|
||||
|
||||
variable "root_volume_size_gb" {
|
||||
type = number
|
||||
default = 30
|
||||
description = "Root EBS volume size."
|
||||
}
|
||||
|
||||
variable "nix_volume_size_gb" {
|
||||
type = number
|
||||
default = 50
|
||||
description = "/nix EBS volume size."
|
||||
}
|
||||
Reference in New Issue
Block a user