From aa7c61019bf03a07380c54435daedd54bc18b64f Mon Sep 17 00:00:00 2001 From: Lyn Date: Sat, 19 Oct 2024 04:45:20 +0200 Subject: [PATCH] correction for accidentially creating an x86 server -_- --- hosts/wg-gateway/default.nix | 16 ++++++++++++++-- hosts/wg-gateway/hardware-configuration.nix | 15 ++++++++++----- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/hosts/wg-gateway/default.nix b/hosts/wg-gateway/default.nix index cdf0e85..eca3c9d 100644 --- a/hosts/wg-gateway/default.nix +++ b/hosts/wg-gateway/default.nix @@ -5,15 +5,27 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix ]; - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/sda"; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; lyn.kernel.latest.enable = true; lyn.kernel.hardened.enable =true; lyn.profiles.base.enable = true; lyn.users.lyn.enable = true; + # network networking.hostName = "wg-gateway"; # Define your hostname. + systemd.network.enable = true; + systemd.network.networks."10-wan" = { + matchConfig.Name = "enp1s0"; + networkConfig.DHCP = "ipv4"; + address = [ + "2a01:4f8:1c1b:d2db::/64" + ]; + routes = [ + { routeConfig.Gateway = "fe80::1"; } + ]; + }; system.stateVersion = "24.05"; } \ No newline at end of file diff --git a/hosts/wg-gateway/hardware-configuration.nix b/hosts/wg-gateway/hardware-configuration.nix index ec93d26..e336471 100644 --- a/hosts/wg-gateway/hardware-configuration.nix +++ b/hosts/wg-gateway/hardware-configuration.nix @@ -7,20 +7,25 @@ imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.kernelModules = [ "virtio_gpu" ]; boot.kernelParams = [ "console=tty" ]; - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_scsi" "sr_mod" ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/8585b573-d3d6-48a3-91cf-76d198ea3046"; + { device = "/dev/disk/by-uuid/7cb49846-af34-40ec-b144-decc9c284e94"; fsType = "ext4"; }; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/BEFA-C7BC"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + swapDevices = - [ { device = "/dev/disk/by-uuid/0e0e9cca-0017-47aa-93f8-3231a29fd772"; } + [ { device = "/dev/disk/by-uuid/63e6e56c-9fbd-4bc2-a0e7-8be171565710"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking @@ -30,5 +35,5 @@ networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; } \ No newline at end of file