about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-12-30 20:36:41 +0100
committerMel <einebeere@gmail.com>2024-12-30 20:36:41 +0100
commit43c4c6d39f99a4c4b8bbbc2c3e228c7be463e4f5 (patch)
tree2e60e8c84682d33f4c52a7b5d27aaba474d0f930
parent0f5851ea94cb14a55aa150aaba3f554b5ef5a10b (diff)
downloadspecimen-43c4c6d39f99a4c4b8bbbc2c3e228c7be463e4f5.tar.zst
specimen-43c4c6d39f99a4c4b8bbbc2c3e228c7be463e4f5.zip
Move server from Hetzner to OVH
Signed-off-by: Mel <einebeere@gmail.com>
-rw-r--r--configuration/devices.nix32
-rw-r--r--configuration/hardware.nix59
-rw-r--r--flake.nix2
3 files changed, 44 insertions, 49 deletions
diff --git a/configuration/devices.nix b/configuration/devices.nix
index de787dd..dcb7e86 100644
--- a/configuration/devices.nix
+++ b/configuration/devices.nix
@@ -1,37 +1,35 @@
 { ... }:
 
 {
-  boot.loader = {
-    systemd-boot.enable = true;
-    efi.canTouchEfiVariables = true;
-  };
+  boot.loader.grub = {
+    enable = true;
+    version = 2;
+    device = "/dev/sda";
+ };
 
   networking = {
     useDHCP = false;
     nftables.enable = true;
-    # these are Hetzner's DNS servers.
+    # Cloudflare DNS
     nameservers = [
-      "185.12.64.1"
-      "185.12.64.2"
-      "2a01:4ff:ff00::add:1"
-      "2a01:4ff:ff00::add:2"
+      "1.1.1.1"
+      "1.0.0.1"
+      "2606:4700:4700::1111"
+      "2606:4700:4700::1001"
     ];
   };
 
   systemd.network.enable = true;
   systemd.network.networks."10-wan" = {
-    name = "enp1s0";
+    name = "ens3";
     DHCP = "no";
     address = [
-      "2a01:4f8:c2c:cd93::1"
-      "128.140.111.76"
+      "2001:41d0:701:1100::522b"
+      "162.19.227.249"
     ];
     routes = [
-      { Gateway = "fe80::1"; }
-      {
-        Gateway = "172.31.1.1";
-        GatewayOnLink = true;
-      }
+      { Gateway = "2001:41d0:701:1100::1"; }
+      { Gateway = "162.19.227.1"; }
     ];
   };
 }
diff --git a/configuration/hardware.nix b/configuration/hardware.nix
index ed7c4a7..46b789f 100644
--- a/configuration/hardware.nix
+++ b/configuration/hardware.nix
@@ -1,42 +1,39 @@
-{
-  config,
-  lib,
-  pkgs,
-  modulesPath,
-  ...
-}:
+# Do not modify this file!  It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations.  Please make changes
+# to /etc/nixos/configuration.nix instead.
+{ config, lib, pkgs, modulesPath, ... }:
 
 {
-  imports = [
-    (modulesPath + "/profiles/qemu-guest.nix")
-  ];
+  imports =
+    [ (modulesPath + "/profiles/qemu-guest.nix")
+    ];
 
-  boot.initrd.availableKernelModules = [
-    "xhci_pci"
-    "virtio_scsi"
-    "sr_mod"
-  ];
+  boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" ];
   boot.initrd.kernelModules = [ ];
-  boot.kernelModules = [ ];
+  boot.kernelModules = [ "kvm-intel" ];
   boot.extraModulePackages = [ ];
 
-  fileSystems."/" = {
-    device = "/dev/disk/by-uuid/d48dd0f5-a41c-47d4-a0b9-acfad95c8e99";
-    fsType = "ext4";
-  };
+  fileSystems."/" =
+    { device = "/dev/disk/by-uuid/947307ee-6563-4d6d-a388-98e23bb48810";
+      fsType = "ext4";
+    };
+
+  fileSystems."/boot" =
+    { device = "/dev/disk/by-uuid/e685d09e-35bf-45f8-8178-ccf5731c5793";
+      fsType = "ext4";
+    };
 
-  fileSystems."/boot" = {
-    device = "/dev/disk/by-uuid/9506-1A24";
-    fsType = "vfat";
-    options = [
-      "fmask=0077"
-      "dmask=0077"
+  swapDevices =
+    [ { device = "/dev/disk/by-uuid/920d8d4b-6d48-4063-b202-a80e2cd5f64f"; }
     ];
-  };
 
-  swapDevices = [
-    { device = "/dev/disk/by-uuid/5097c4ba-3b7f-4cce-a674-9cedb3fbc052"; }
-  ];
+  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+  # (the default) this is the recommended approach. When using systemd-networkd it's
+  # still possible to use this option, but it's recommended to use it in conjunction
+  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+  networking.useDHCP = lib.mkDefault true;
+  # networking.interfaces.ens3.useDHCP = lib.mkDefault true;
 
-  nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
+  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
 }
diff --git a/flake.nix b/flake.nix
index 51a43fd..a19809e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -72,7 +72,7 @@
 
       nixosConfigurations.${name} =
         let
-          defaultSystem = "aarch64-linux";
+          defaultSystem = "x86_64-linux";
           pkgs = pkgsForSystem defaultSystem;
         in
         lib.nixosSystem {