From 04d1047adae9db31a2ba162fab4662ea323b4bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vili=20Sinerv=C3=A4?= Date: Tue, 17 Jun 2025 00:59:37 +0300 Subject: [PATCH] Move SIIT-DC to Hetzner --- hosts/siit-dc/configuration.nix | 2 +- hosts/siit-dc/state.nix | 18 ++------------- servers/siit-dc.nix | 4 ++-- shared/disko/hetzner-ext4.nix | 40 +++++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 19 deletions(-) create mode 100644 shared/disko/hetzner-ext4.nix diff --git a/hosts/siit-dc/configuration.nix b/hosts/siit-dc/configuration.nix index 9d4362e..eb1a09a 100644 --- a/hosts/siit-dc/configuration.nix +++ b/hosts/siit-dc/configuration.nix @@ -3,7 +3,7 @@ imports = [ ../../shared/base.nix ../../shared/hardware/vm.nix - ../../shared/disko/basic-ext4.nix + ../../shared/disko/hetzner-ext4.nix ../../servers/siit-dc.nix ]; diff --git a/hosts/siit-dc/state.nix b/hosts/siit-dc/state.nix index 00c45f5..ef43817 100644 --- a/hosts/siit-dc/state.nix +++ b/hosts/siit-dc/state.nix @@ -1,6 +1,6 @@ { lib, modulesPath, ... }: { - system.stateVersion = "24.05"; + system.stateVersion = "25.05"; imports = [ (modulesPath + "/profiles/qemu-guest.nix") @@ -16,23 +16,9 @@ "sr_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; + boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/81dc35b1-5a34-4924-b864-b53e5ca9df24"; - fsType = "ext4"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/D171-033F"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - networking.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; diff --git a/servers/siit-dc.nix b/servers/siit-dc.nix index d535cc4..efa8f33 100644 --- a/servers/siit-dc.nix +++ b/servers/siit-dc.nix @@ -11,12 +11,12 @@ { # Forgejo "ipv6 prefix" = "${config.custom.gua_pref}d2:be24:11ff:feee:9c55/128"; - "ipv4 prefix" = "87.92.33.54/32"; + "ipv4 prefix" = "157.180.86.116/32"; } { # Idacloud "ipv6 prefix" = "${config.custom.gua_pref}d3:be24:11ff:fece:7d63/128"; - "ipv4 prefix" = "82.181.174.95/32"; + "ipv4 prefix" = "95.216.180.210/32"; } ]; }; diff --git a/shared/disko/hetzner-ext4.nix b/shared/disko/hetzner-ext4.nix new file mode 100644 index 0000000..d6db7b8 --- /dev/null +++ b/shared/disko/hetzner-ext4.nix @@ -0,0 +1,40 @@ +{ + disko.devices = { + disk = { + main = { + device = "/dev/sda"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + boot = { + name = "boot"; + type = "EF02"; + size = "1M"; + }; + ESP = { + name = "ESP"; + type = "EF00"; + size = "512M"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + name = "nixos"; + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +}