From f33b8c0cdfbfb090c53f48ab1feaee56d3fcd229 Mon Sep 17 00:00:00 2001 From: clerie Date: Mon, 28 Apr 2025 15:54:28 +0200 Subject: [PATCH] hosts/clerie-backup: Move VM to different region --- hosts/clerie-backup/configuration.nix | 6 +++--- profiles/default.nix | 1 + profiles/ruby-vm/default.nix | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 profiles/ruby-vm/default.nix diff --git a/hosts/clerie-backup/configuration.nix b/hosts/clerie-backup/configuration.nix index dfb7525..43612e1 100644 --- a/hosts/clerie-backup/configuration.nix +++ b/hosts/clerie-backup/configuration.nix @@ -8,7 +8,7 @@ ./restic-server.nix ]; - profiles.clerie.cybercluster-vm.enable = true; + profiles.clerie.ruby-vm.enable = true; boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; @@ -16,10 +16,10 @@ systemd.network.networks."10-wan" = { matchConfig.Name = "ens18"; address = [ - "2001:638:904:ffc1::6/64" + "2a00:fe0:1:21f::a/64" ]; routes = [ - { Gateway ="2001:638:904:ffc1::1"; } + { Gateway ="2a00:fe0:1:21f::1"; } ]; linkConfig.RequiredForOnline = "routable"; ipv6AcceptRAConfig.DHCPv6Client = "no"; diff --git a/profiles/default.nix b/profiles/default.nix index 5b6be2a..52a6699 100644 --- a/profiles/default.nix +++ b/profiles/default.nix @@ -14,6 +14,7 @@ ./mercury-vm ./netcup ./network-fallback-dhcp + ./ruby-vm ./serial-console ./wg-clerie ]; diff --git a/profiles/ruby-vm/default.nix b/profiles/ruby-vm/default.nix new file mode 100644 index 0000000..6c0deb4 --- /dev/null +++ b/profiles/ruby-vm/default.nix @@ -0,0 +1,23 @@ +{ config, lib, ... }: + +with lib; + +{ + + options.profiles.clerie.ruby-vm = { + enable = mkEnableOption "Profile for ruby VMs"; + }; + + config = mkIf config.profiles.clerie.ruby-vm.enable { + + profiles.clerie.serial-console.enable = true; + + services.qemuGuest.enable = true; + + networking.nameservers = [ + "2a00:fe0:0:2::300" + "2a00:fe0:0:3::300" + ]; + + }; +}