From c8c58562bd74de933b124901fa4ffa353d2ba7c8 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Wed, 24 Jan 2024 20:50:43 +0100 Subject: [PATCH] hetzner improvemnts --- systems/hetzner/default.nix | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/systems/hetzner/default.nix b/systems/hetzner/default.nix index 00d82f7..00ca7f1 100644 --- a/systems/hetzner/default.nix +++ b/systems/hetzner/default.nix @@ -16,36 +16,33 @@ boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; boot.loader = { + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot"; + }; grub = { enable = true; - device = "/dev/disk/by-id/nvme-SAMSUNG_MZVL2512HCJQ-00B00_S675NX0RA55622"; + efiSupport = true; + device = "nodev"; }; }; - - networking.usePredictableInterfaceNames = false; - networking.dhcpcd.enable = false; - systemd.network = { - enable = true; - networks."eth0" = { - extraConfig = '' - [Match] - Name = eth0 - [Network] - # Add your own assigned ipv6 subnet here here! - Address = 2a01:4f8:a0:31e5::/64 - Gateway = fe80::1 - # optionally you can do the same for ipv4 and disable DHCP (networking.dhcpcd.enable = false;) - Address = 85.10.200.204 - Gateway = 85.10.200.193 - ''; + networking = { + useDHCP = false; + interfaces."enp41s0" = { + ipv4.addresses = [{ address = "85.10.200.204 "; prefixLength = 26; }]; + ipv6.addresses = [{ address = "2a01:4f8:a0:31e5::"; prefixLength = 64; }]; }; + defaultGateway = "85.10.200.193"; + defaultGateway6 = { address = "fe80::1"; interface = "enp41s0"; }; }; time.timeZone = "Europe/Berlin"; services.openssh.settings.PermitRootLogin = lib.mkForce "yes"; + services.openssh.ports = [ 2222 ]; + console = { enable = true; }; @@ -56,7 +53,7 @@ type = "disk"; content = { type = "table"; - format = "msdos"; + format = "gpt"; partitions = [ { name = "ESP";