forked from CCCHH/nix-infra
Add configuration for Chaosknoten NixOS Proxmox image
This commit is contained in:
parent
58d529d0ba
commit
95ac75c355
20
config/nixos-generators/proxmox-chaosknoten.nix
Normal file
20
config/nixos-generators/proxmox-chaosknoten.nix
Normal file
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
17
config/proxmox-chaosknoten-additional-initial-config.nix
Normal file
17
config/proxmox-chaosknoten-additional-initial-config.nix
Normal file
|
@ -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" ];
|
||||
}
|
11
flake.nix
11
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue