1
0

profiles/mercury-vm,profiles/cybercluster-vm: Add profiles for Proxmox VMs

This commit is contained in:
clerie 2025-03-16 12:19:08 +01:00
parent 97d826ef89
commit a0a298689e
18 changed files with 82 additions and 31 deletions
configuration/proxmox-vm
hosts
profiles
cybercluster-vm
default.nix
fem-net
mercury-vm

@ -1,5 +0,0 @@
{ ... }:
{
services.qemuGuest.enable = true;
}

@ -4,19 +4,19 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../configuration/proxmox-vm
./backup.nix ./backup.nix
./restic-server.nix ./restic-server.nix
]; ];
profiles.clerie.mercury-vm.enable = true;
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda"; boot.loader.grub.device = "/dev/vda";
networking.useDHCP = false; networking.useDHCP = false;
networking.interfaces.ens18.ipv6.addresses = [ { address = "2001:638:904:ffcb::c"; prefixLength = 64; } ]; networking.interfaces.ens18.ipv6.addresses = [ { address = "2001:638:904:ffcb::c"; prefixLength = 64; } ];
networking.defaultGateway6 = { address = "2001:638:904:ffcb::1"; interface = "ens18"; }; networking.defaultGateway6 = { address = "2001:638:904:ffcb::1"; interface = "ens18"; };
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
services.nginx.enable = true; services.nginx.enable = true;

@ -4,11 +4,12 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../configuration/proxmox-vm
./restic-server.nix ./restic-server.nix
]; ];
profiles.clerie.cybercluster-vm.enable = true;
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda"; boot.loader.grub.device = "/dev/vda";
@ -17,7 +18,6 @@
networking.useDHCP = false; networking.useDHCP = false;
networking.interfaces.ens18.ipv6.addresses = [ { address = "2001:638:904:ffc1::6"; prefixLength = 64; } ]; networking.interfaces.ens18.ipv6.addresses = [ { address = "2001:638:904:ffc1::6"; prefixLength = 64; } ];
networking.defaultGateway6 = { address = "2001:638:904:ffc1::1"; interface = "ens18"; }; networking.defaultGateway6 = { address = "2001:638:904:ffc1::1"; interface = "ens18"; };
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
services.nginx.enable = true; services.nginx.enable = true;

@ -4,10 +4,11 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../configuration/proxmox-vm
../../configuration/dn42 ../../configuration/dn42
]; ];
profiles.clerie.mercury-vm.enable = true;
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda"; boot.loader.grub.device = "/dev/vda";
@ -22,7 +23,6 @@
networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; }; networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; };
networking.defaultGateway6 = { address = "2001:638:904:ffc9::1"; interface = "ens20"; }; networking.defaultGateway6 = { address = "2001:638:904:ffc9::1"; interface = "ens20"; };
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
networking.wireguard.enable = true; networking.wireguard.enable = true;
networking.wireguard.interfaces = { networking.wireguard.interfaces = {

@ -4,10 +4,11 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../configuration/proxmox-vm
../../configuration/dn42 ../../configuration/dn42
]; ];
profiles.clerie.mercury-vm.enable = true;
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda"; boot.loader.grub.device = "/dev/vda";
@ -25,7 +26,6 @@
networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; }; networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; };
networking.defaultGateway6 = { address = "2001:638:904:ffc9::1"; interface = "ens21"; }; networking.defaultGateway6 = { address = "2001:638:904:ffc9::1"; interface = "ens21"; };
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
petabyte.policyrouting = { petabyte.policyrouting = {
enable = true; enable = true;

@ -4,10 +4,11 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../configuration/proxmox-vm
../../configuration/dn42 ../../configuration/dn42
]; ];
profiles.clerie.cybercluster-vm.enable = true;
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda"; boot.loader.grub.device = "/dev/vda";
@ -25,7 +26,6 @@
networking.defaultGateway = { address = "192.168.10.1"; interface = "ens20"; }; networking.defaultGateway = { address = "192.168.10.1"; interface = "ens20"; };
networking.defaultGateway6 = { address = "2001:638:904:ffc9::1"; interface = "ens18"; }; networking.defaultGateway6 = { address = "2001:638:904:ffc9::1"; interface = "ens18"; };
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
petabyte.policyrouting = { petabyte.policyrouting = {
enable = true; enable = true;

@ -4,9 +4,10 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../configuration/proxmox-vm
]; ];
profiles.clerie.mercury-vm.enable = true;
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda"; boot.loader.grub.device = "/dev/vda";
@ -23,7 +24,6 @@
networking.defaultGateway6 = { address = "2001:638:904:ffcb::1"; interface = "ens20"; }; networking.defaultGateway6 = { address = "2001:638:904:ffcb::1"; interface = "ens20"; };
networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; }; networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; };
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
# Open Firewall for BGP # Open Firewall for BGP
networking.firewall.allowedTCPPorts = [ 179 ]; networking.firewall.allowedTCPPorts = [ 179 ];

@ -4,11 +4,13 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../configuration/proxmox-vm
./bird.nix ./bird.nix
./fernglas.nix ./fernglas.nix
]; ];
profiles.clerie.mercury-vm.enable = true;
# Use the GRUB 2 boot loader. # Use the GRUB 2 boot loader.
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
# boot.loader.grub.efiSupport = true; # boot.loader.grub.efiSupport = true;
@ -31,7 +33,6 @@
networking.defaultGateway6 = { address = "2001:638:904:ffc9::1"; interface = "ens20"; }; networking.defaultGateway6 = { address = "2001:638:904:ffc9::1"; interface = "ens20"; };
networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; }; networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; };
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
services.nginx.enable = true; services.nginx.enable = true;

@ -4,7 +4,6 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../configuration/proxmox-vm
../../configuration/hydra-build-machine ../../configuration/hydra-build-machine
./build-machines.nix ./build-machines.nix
@ -12,6 +11,8 @@
./nix-cache.nix ./nix-cache.nix
]; ];
profiles.clerie.mercury-vm.enable = true;
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda"; boot.loader.grub.device = "/dev/vda";
@ -26,7 +27,6 @@
networking.interfaces.ens19.ipv4.addresses = [ { address = "192.168.10.36"; prefixLength = 24; } ]; networking.interfaces.ens19.ipv4.addresses = [ { address = "192.168.10.36"; prefixLength = 24; } ];
networking.defaultGateway6 = { address = "2001:638:904:ffcb::1"; interface = "ens18"; }; networking.defaultGateway6 = { address = "2001:638:904:ffcb::1"; interface = "ens18"; };
networking.defaultGateway = { address = "192.168.10.1"; interface = "ens19"; }; networking.defaultGateway = { address = "192.168.10.1"; interface = "ens19"; };
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
services.nginx.enable = true; services.nginx.enable = true;

@ -4,10 +4,11 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../configuration/proxmox-vm
../../configuration/hydra-build-machine ../../configuration/hydra-build-machine
]; ];
profiles.clerie.cybercluster-vm.enable = true;
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda"; boot.loader.grub.device = "/dev/vda";
@ -22,7 +23,6 @@
networking.interfaces.ens18.ipv4.addresses = [ { address = "141.24.50.112"; prefixLength = 24; } ]; networking.interfaces.ens18.ipv4.addresses = [ { address = "141.24.50.112"; prefixLength = 24; } ];
networking.defaultGateway6 = { address = "2001:638:904:ffc1::1"; interface = "ens18"; }; networking.defaultGateway6 = { address = "2001:638:904:ffc1::1"; interface = "ens18"; };
networking.defaultGateway = { address = "141.24.50.1"; interface = "ens18"; }; networking.defaultGateway = { address = "141.24.50.1"; interface = "ens18"; };
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
clerie.monitoring = { clerie.monitoring = {
enable = true; enable = true;

@ -4,7 +4,6 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../configuration/proxmox-vm
./alertmanager.nix ./alertmanager.nix
./berlinerbaeder-exporter.nix ./berlinerbaeder-exporter.nix
./blackbox.nix ./blackbox.nix
@ -14,6 +13,8 @@
./uptimestatus.nix ./uptimestatus.nix
]; ];
profiles.clerie.mercury-vm.enable = true;
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda"; boot.loader.grub.device = "/dev/sda";
@ -22,7 +23,6 @@
networking.interfaces.ens19.ipv6.addresses = [ { address = "2001:638:904:ffca::7"; prefixLength = 64; } ]; networking.interfaces.ens19.ipv6.addresses = [ { address = "2001:638:904:ffca::7"; prefixLength = 64; } ];
networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; }; networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; };
networking.defaultGateway6 = { address = "2001:638:904:ffca::1"; interface = "ens19"; }; networking.defaultGateway6 = { address = "2001:638:904:ffca::1"; interface = "ens19"; };
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
services.prometheus.exporters.node.enable = true; services.prometheus.exporters.node.enable = true;

@ -4,10 +4,11 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../configuration/proxmox-vm
../../configuration/router ../../configuration/router
]; ];
profiles.clerie.mercury-vm.enable = true;
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda"; boot.loader.grub.device = "/dev/vda";
@ -21,7 +22,6 @@
]; ];
networking.defaultGateway = { address = "141.24.46.1"; interface = "ens18"; }; networking.defaultGateway = { address = "141.24.46.1"; interface = "ens18"; };
networking.defaultGateway6 = { address = "2001:638:904:ffca::1"; interface = "ens18"; }; networking.defaultGateway6 = { address = "2001:638:904:ffca::1"; interface = "ens18"; };
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
networking.interfaces.ens19.ipv4.addresses = [ networking.interfaces.ens19.ipv4.addresses = [
{ address = "192.168.10.1"; prefixLength = 24; } { address = "192.168.10.1"; prefixLength = 24; }

@ -4,12 +4,13 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../configuration/proxmox-vm
./nixfiles-updated-inputs.nix ./nixfiles-updated-inputs.nix
./polkit-test.nix ./polkit-test.nix
]; ];
profiles.clerie.mercury-vm.enable = true;
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda"; boot.loader.grub.device = "/dev/vda";
@ -24,7 +25,6 @@
networking.interfaces.ens19.ipv6.addresses = [ { address = "2001:638:904:ffc7::6"; prefixLength = 64; } ]; networking.interfaces.ens19.ipv6.addresses = [ { address = "2001:638:904:ffc7::6"; prefixLength = 64; } ];
networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; }; networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; };
networking.defaultGateway6 = { address = "2001:638:904:ffc7::1"; interface = "ens19"; }; networking.defaultGateway6 = { address = "2001:638:904:ffc7::1"; interface = "ens19"; };
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
git git

@ -4,13 +4,14 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../configuration/proxmox-vm
./firmware.nix ./firmware.nix
./mixcloud.nix ./mixcloud.nix
./syncthing.nix ./syncthing.nix
./users.nix ./users.nix
]; ];
profiles.clerie.mercury-vm.enable = true;
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda"; boot.loader.grub.device = "/dev/vda";
@ -19,7 +20,6 @@
networking.interfaces.ens18.ipv6.addresses = [ { address = "2001:638:904:ffc0::4"; prefixLength = 64; } ]; networking.interfaces.ens18.ipv6.addresses = [ { address = "2001:638:904:ffc0::4"; prefixLength = 64; } ];
networking.defaultGateway = { address = "192.168.10.1"; interface = "ens19"; }; networking.defaultGateway = { address = "192.168.10.1"; interface = "ens19"; };
networking.defaultGateway6 = { address = "2001:638:904:ffc0::1"; interface = "ens18"; }; networking.defaultGateway6 = { address = "2001:638:904:ffc0::1"; interface = "ens18"; };
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
services.nginx.enable = true; services.nginx.enable = true;

@ -0,0 +1,18 @@
{ config, lib, ... }:
with lib;
{
options.profiles.clerie.cybercluster-vm = {
enable = mkEnableOption "Profile for cybercluster VMs";
};
config = mkIf config.profiles.clerie.cybercluster-vm.enable {
profiles.clerie.fem-net.enable = true;
services.qemuGuest.enable = true;
};
}

@ -3,7 +3,10 @@
{ {
imports = [ imports = [
./cybercluster-vm
./fem-net
./hetzner-cloud ./hetzner-cloud
./mercury-vm
./netcup ./netcup
]; ];

@ -0,0 +1,16 @@
{ config, lib, ... }:
with lib;
{
options.profiles.clerie.fem-net = {
enable = mkEnableOption "Profile for FeM-Net";
};
config = mkIf config.profiles.clerie.fem-net.enable {
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
};
}

@ -0,0 +1,18 @@
{ config, lib, ... }:
with lib;
{
options.profiles.clerie.mercury-vm = {
enable = mkEnableOption "Profile for mercury VMs";
};
config = mkIf config.profiles.clerie.mercury-vm.enable {
profiles.clerie.fem-net.enable = true;
services.qemuGuest.enable = true;
};
}