diff --git a/configuration/proxmox-vm/default.nix b/configuration/proxmox-vm/default.nix deleted file mode 100644 index 6195642..0000000 --- a/configuration/proxmox-vm/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ ... }: - -{ - services.qemuGuest.enable = true; -} diff --git a/hosts/backup-4/configuration.nix b/hosts/backup-4/configuration.nix index 8f6dc42..abcc0f1 100644 --- a/hosts/backup-4/configuration.nix +++ b/hosts/backup-4/configuration.nix @@ -4,19 +4,19 @@ imports = [ ./hardware-configuration.nix - ../../configuration/proxmox-vm ./backup.nix ./restic-server.nix ]; + profiles.clerie.mercury-vm.enable = true; + boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; networking.useDHCP = false; networking.interfaces.ens18.ipv6.addresses = [ { address = "2001:638:904:ffcb::c"; prefixLength = 64; } ]; 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; diff --git a/hosts/clerie-backup/configuration.nix b/hosts/clerie-backup/configuration.nix index 9a18baa..28802e4 100644 --- a/hosts/clerie-backup/configuration.nix +++ b/hosts/clerie-backup/configuration.nix @@ -4,11 +4,12 @@ imports = [ ./hardware-configuration.nix - ../../configuration/proxmox-vm ./restic-server.nix ]; + profiles.clerie.cybercluster-vm.enable = true; + boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; @@ -17,7 +18,6 @@ networking.useDHCP = false; networking.interfaces.ens18.ipv6.addresses = [ { address = "2001:638:904:ffc1::6"; prefixLength = 64; } ]; 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; diff --git a/hosts/dn42-il-gw1/configuration.nix b/hosts/dn42-il-gw1/configuration.nix index 962dc65..47da03f 100644 --- a/hosts/dn42-il-gw1/configuration.nix +++ b/hosts/dn42-il-gw1/configuration.nix @@ -4,10 +4,11 @@ imports = [ ./hardware-configuration.nix - ../../configuration/proxmox-vm ../../configuration/dn42 ]; + profiles.clerie.mercury-vm.enable = true; + boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; @@ -22,7 +23,6 @@ networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; }; 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.interfaces = { diff --git a/hosts/dn42-il-gw5/configuration.nix b/hosts/dn42-il-gw5/configuration.nix index 1e38648..7bad687 100644 --- a/hosts/dn42-il-gw5/configuration.nix +++ b/hosts/dn42-il-gw5/configuration.nix @@ -4,10 +4,11 @@ imports = [ ./hardware-configuration.nix - ../../configuration/proxmox-vm ../../configuration/dn42 ]; + profiles.clerie.mercury-vm.enable = true; + boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; @@ -25,7 +26,6 @@ networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; }; 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 = { enable = true; diff --git a/hosts/dn42-il-gw6/configuration.nix b/hosts/dn42-il-gw6/configuration.nix index 69acba4..1eb5193 100644 --- a/hosts/dn42-il-gw6/configuration.nix +++ b/hosts/dn42-il-gw6/configuration.nix @@ -4,10 +4,11 @@ imports = [ ./hardware-configuration.nix - ../../configuration/proxmox-vm ../../configuration/dn42 ]; + profiles.clerie.cybercluster-vm.enable = true; + boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; @@ -25,7 +26,6 @@ networking.defaultGateway = { address = "192.168.10.1"; interface = "ens20"; }; 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 = { enable = true; diff --git a/hosts/dn42-ildix-clerie/configuration.nix b/hosts/dn42-ildix-clerie/configuration.nix index e8f4f36..ff718c0 100644 --- a/hosts/dn42-ildix-clerie/configuration.nix +++ b/hosts/dn42-ildix-clerie/configuration.nix @@ -4,9 +4,10 @@ imports = [ ./hardware-configuration.nix - ../../configuration/proxmox-vm ]; + profiles.clerie.mercury-vm.enable = true; + boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; @@ -23,7 +24,6 @@ networking.defaultGateway6 = { address = "2001:638:904:ffcb::1"; interface = "ens20"; }; 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 networking.firewall.allowedTCPPorts = [ 179 ]; diff --git a/hosts/dn42-ildix-service/configuration.nix b/hosts/dn42-ildix-service/configuration.nix index b9093de..344fef9 100644 --- a/hosts/dn42-ildix-service/configuration.nix +++ b/hosts/dn42-ildix-service/configuration.nix @@ -4,11 +4,13 @@ imports = [ ./hardware-configuration.nix - ../../configuration/proxmox-vm + ./bird.nix ./fernglas.nix ]; + profiles.clerie.mercury-vm.enable = true; + # Use the GRUB 2 boot loader. boot.loader.grub.enable = true; # boot.loader.grub.efiSupport = true; @@ -31,7 +33,6 @@ networking.defaultGateway6 = { address = "2001:638:904:ffc9::1"; interface = "ens20"; }; 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; diff --git a/hosts/hydra-1/configuration.nix b/hosts/hydra-1/configuration.nix index 89c7d50..94dcb5d 100644 --- a/hosts/hydra-1/configuration.nix +++ b/hosts/hydra-1/configuration.nix @@ -4,7 +4,6 @@ imports = [ ./hardware-configuration.nix - ../../configuration/proxmox-vm ../../configuration/hydra-build-machine ./build-machines.nix @@ -12,6 +11,8 @@ ./nix-cache.nix ]; + profiles.clerie.mercury-vm.enable = true; + boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; @@ -26,7 +27,6 @@ networking.interfaces.ens19.ipv4.addresses = [ { address = "192.168.10.36"; prefixLength = 24; } ]; networking.defaultGateway6 = { address = "2001:638:904:ffcb::1"; interface = "ens18"; }; 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; diff --git a/hosts/hydra-2/configuration.nix b/hosts/hydra-2/configuration.nix index 88abe46..0081606 100644 --- a/hosts/hydra-2/configuration.nix +++ b/hosts/hydra-2/configuration.nix @@ -4,10 +4,11 @@ imports = [ ./hardware-configuration.nix - ../../configuration/proxmox-vm ../../configuration/hydra-build-machine ]; + profiles.clerie.cybercluster-vm.enable = true; + boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; @@ -22,7 +23,6 @@ networking.interfaces.ens18.ipv4.addresses = [ { address = "141.24.50.112"; prefixLength = 24; } ]; networking.defaultGateway6 = { address = "2001:638:904:ffc1::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 = { enable = true; diff --git a/hosts/monitoring-3/configuration.nix b/hosts/monitoring-3/configuration.nix index 9ee19c2..f0b1f5f 100644 --- a/hosts/monitoring-3/configuration.nix +++ b/hosts/monitoring-3/configuration.nix @@ -4,7 +4,6 @@ imports = [ ./hardware-configuration.nix - ../../configuration/proxmox-vm ./alertmanager.nix ./berlinerbaeder-exporter.nix ./blackbox.nix @@ -14,6 +13,8 @@ ./uptimestatus.nix ]; + profiles.clerie.mercury-vm.enable = true; + boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/sda"; @@ -22,7 +23,6 @@ networking.interfaces.ens19.ipv6.addresses = [ { address = "2001:638:904:ffca::7"; prefixLength = 64; } ]; networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; }; 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; diff --git a/hosts/nonat/configuration.nix b/hosts/nonat/configuration.nix index 61f6c64..2f2483d 100644 --- a/hosts/nonat/configuration.nix +++ b/hosts/nonat/configuration.nix @@ -4,10 +4,11 @@ imports = [ ./hardware-configuration.nix - ../../configuration/proxmox-vm ../../configuration/router ]; + profiles.clerie.mercury-vm.enable = true; + boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; @@ -21,7 +22,6 @@ ]; networking.defaultGateway = { address = "141.24.46.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 = [ { address = "192.168.10.1"; prefixLength = 24; } diff --git a/hosts/osmium/configuration.nix b/hosts/osmium/configuration.nix index 8166fd2..243cc12 100644 --- a/hosts/osmium/configuration.nix +++ b/hosts/osmium/configuration.nix @@ -4,12 +4,13 @@ imports = [ ./hardware-configuration.nix - ../../configuration/proxmox-vm ./nixfiles-updated-inputs.nix ./polkit-test.nix ]; + profiles.clerie.mercury-vm.enable = true; + boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; @@ -24,7 +25,6 @@ networking.interfaces.ens19.ipv6.addresses = [ { address = "2001:638:904:ffc7::6"; prefixLength = 64; } ]; networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; }; 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; [ git diff --git a/hosts/storage-2/configuration.nix b/hosts/storage-2/configuration.nix index dddd237..b664f44 100644 --- a/hosts/storage-2/configuration.nix +++ b/hosts/storage-2/configuration.nix @@ -4,13 +4,14 @@ imports = [ ./hardware-configuration.nix - ../../configuration/proxmox-vm ./firmware.nix ./mixcloud.nix ./syncthing.nix ./users.nix ]; + profiles.clerie.mercury-vm.enable = true; + boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; @@ -19,7 +20,6 @@ networking.interfaces.ens18.ipv6.addresses = [ { address = "2001:638:904:ffc0::4"; prefixLength = 64; } ]; networking.defaultGateway = { address = "192.168.10.1"; interface = "ens19"; }; 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; diff --git a/profiles/cybercluster-vm/default.nix b/profiles/cybercluster-vm/default.nix new file mode 100644 index 0000000..62856e5 --- /dev/null +++ b/profiles/cybercluster-vm/default.nix @@ -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; + + }; +} diff --git a/profiles/default.nix b/profiles/default.nix index 9bba5e6..6192023 100644 --- a/profiles/default.nix +++ b/profiles/default.nix @@ -3,7 +3,10 @@ { imports = [ + ./cybercluster-vm + ./fem-net ./hetzner-cloud + ./mercury-vm ./netcup ]; diff --git a/profiles/fem-net/default.nix b/profiles/fem-net/default.nix new file mode 100644 index 0000000..e0ee5d3 --- /dev/null +++ b/profiles/fem-net/default.nix @@ -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" ]; + + }; +} diff --git a/profiles/mercury-vm/default.nix b/profiles/mercury-vm/default.nix new file mode 100644 index 0000000..819a284 --- /dev/null +++ b/profiles/mercury-vm/default.nix @@ -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; + + }; +}