Compare commits

..

No commits in common. "d64d2bce9e8f27cb0e2c7f64c5f9595d8bb84c10" and "4ca87186430321f67ffd12c9ec89b5ccfbb68bfc" have entirely different histories.

2 changed files with 31 additions and 24 deletions

View file

@ -1,4 +0,0 @@
#cloud-config
runcmd:
- curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | PROVIDER=hetznercloud NIX_CHANNEL=nixos-24.11 bash 2>&1 | tee /tmp/infect.log

View file

@ -1,24 +1,35 @@
variable "hcloud_token" { provider "proxmox" {
sensitive = true pm_api_url = "https://your-proxmox-server:8006/api2/json"
pm_tls_insecure = true
} }
provider "hcloud" { resource "proxmox_vm_qemu" "nixos-services-vm" {
token = var.hcloud_token name = "nixos-services-vm"
project = "homelab" target_node = "pve"
} clone = "template-name"
os_type = "cloud-init"
resource "hcloud_server" { cores = 2
name = "athena" memory = 2048
type = "cx32" disk {
image = "debian-12" size = "10G"
datacenter = "nbg1-dc3"
}
data "cloudinit_config" "athena" {
part {
filename = "cloud-config.yaml"
content_type = "text/cloud-config"
content = file("${path.module}/cloud-config.yaml")
} }
network {
model = "virtio"
bridge = "vmbr0"
}
sshkeys = file("~/.ssh/id_rsa.pub")
ipconfig0 = "ip=dhcp"
cloud_init {
user_data = <<EOF
#cloud-config
users:
- name: nixos
ssh-authorized-keys:
- ${file("~/.ssh/id_rsa.pub")}
EOF
}
}
output "nixos_vm_ip" {
value = proxmox_vm_qemu.nixos_vm.network.0.ip
} }