diff --git a/config/nixos-generators/proxmox-chaosknoten.nix b/config/nixos-generators/proxmox-chaosknoten.nix new file mode 100644 index 0000000..3d98e6d --- /dev/null +++ b/config/nixos-generators/proxmox-chaosknoten.nix @@ -0,0 +1,20 @@ +{ config, pkgs, ... }: + +{ + proxmox = { + qemuConf = { + name = "Template-Chaosknoten-NixOS-${config.system.nixos.release}"; + boot = "order=virtio0"; + cores = 4; + memory = 1024; + virtio0 = "local-zfs:vm-9999-disk-0,discard=on"; + bios = "ovmf"; + net0 = "virtio=00:00:00:00:00:00,bridge=vmbr4,firewall=1"; + }; + qemuExtraConf = { + cpu = "cputype=host,flags=+aes"; + machine = "q35"; + template = 1; + }; + }; +} diff --git a/config/proxmox-chaosknoten-additional-initial-config.nix b/config/proxmox-chaosknoten-additional-initial-config.nix new file mode 100644 index 0000000..8d0b5f2 --- /dev/null +++ b/config/proxmox-chaosknoten-additional-initial-config.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: + +{ + networking.hostName = "chaosknoten-nixos-template"; + + networking.interfaces.enp6s18 = { + ipv4.addresses = [ + { + address = "172.31.17.200"; + prefixLength = 25; + } + ]; + }; + networking.defaultGateway = "172.31.17.129"; + networking.nameservers = [ "212.12.50.158" "192.76.134.90" ]; + networking.search = [ "hamburg.ccc.de" ]; +} diff --git a/flake.nix b/flake.nix index f8b4b7a..2e48af3 100644 --- a/flake.nix +++ b/flake.nix @@ -102,6 +102,17 @@ ]; format = "proxmox"; }; + + proxmox-chaosknoten-nixos-template = nixos-generators.nixosGenerate { + system = "x86_64-linux"; + modules = [ + ./config/nixos-generators/proxmox-chaosknoten.nix + ./config/proxmox-chaosknoten-additional-initial-config.nix + ./config/common + ./config/proxmox-vm + ]; + format = "proxmox"; + }; }; }; }