Compare commits

..

3 commits

Author SHA1 Message Date
harry123
d64d2bce9e
small changes 2025-03-26 13:13:53 +01:00
harry123
e9c0fef856
changed used nixos versio 2025-03-26 13:09:03 +01:00
harry123
5390d4a471
added config for vps 2025-03-26 12:54:21 +01:00
2 changed files with 23 additions and 30 deletions

View file

@ -0,0 +1,4 @@
#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,35 +1,24 @@
provider "proxmox" {
pm_api_url = "https://your-proxmox-server:8006/api2/json"
pm_tls_insecure = true
variable "hcloud_token" {
sensitive = true
}
resource "proxmox_vm_qemu" "nixos-services-vm" {
name = "nixos-services-vm"
target_node = "pve"
clone = "template-name"
os_type = "cloud-init"
cores = 2
memory = 2048
disk {
size = "10G"
}
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
}
provider "hcloud" {
token = var.hcloud_token
project = "homelab"
}
output "nixos_vm_ip" {
value = proxmox_vm_qemu.nixos_vm.network.0.ip
resource "hcloud_server" {
name = "athena"
type = "cx32"
image = "debian-12"
datacenter = "nbg1-dc3"
}
data "cloudinit_config" "athena" {
part {
filename = "cloud-config.yaml"
content_type = "text/cloud-config"
content = file("${path.module}/cloud-config.yaml")
}
}