From 43d9ab3aec2ff0e2a5b4dfc182d8c323c36c3bc5 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Sun, 17 Mar 2024 15:13:46 -0500 Subject: [PATCH] switch to hetzner cloud from vultr --- hosts/algiz/hardware-configuration.nix | 20 ++++++++++++-------- hosts/algiz/system.nix | 11 ++--------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/hosts/algiz/hardware-configuration.nix b/hosts/algiz/hardware-configuration.nix index f2630ca..a48d849 100644 --- a/hosts/algiz/hardware-configuration.nix +++ b/hosts/algiz/hardware-configuration.nix @@ -4,30 +4,34 @@ { config, lib, + pkgs, + modulesPath, ... }: { - imports = []; + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; - boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"]; + boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"]; boot.initrd.kernelModules = []; boot.kernelModules = []; boot.extraModulePackages = []; fileSystems."/" = { - device = "/dev/disk/by-uuid/eb6cbf1e-e4a7-4312-a1af-4f78ad9cf138"; - fsType = "btrfs"; + device = "/dev/disk/by-uuid/70d6dad3-1778-43bf-8f87-76dd7f54c545"; + fsType = "ext4"; }; - swapDevices = []; + swapDevices = [ + {device = "/dev/disk/by-uuid/a4e4cad9-1844-45dd-9bea-eb77bd71c37b";} + ]; # 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..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.ens3.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - virtualisation.hypervGuest.enable = true; } diff --git a/hosts/algiz/system.nix b/hosts/algiz/system.nix index 14bc6ad..13b5fa1 100644 --- a/hosts/algiz/system.nix +++ b/hosts/algiz/system.nix @@ -4,13 +4,6 @@ rune = "algiz"; }; - swapDevices = [ - { - device = "/var/lib/swapfile"; - size = 2 * 1024; - } - ]; - services.resolved.enable = true; services.fail2ban = { @@ -38,7 +31,7 @@ # Use the GRUB 2 boot loader. boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only + boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions @@ -46,5 +39,5 @@ # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "22.11"; # Did you read the comment? + system.stateVersion = "23.11"; # Did you read the comment? }