From afe02a3ff69a1aae54c3b7aad6f18b855785adf7 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Sat, 2 Aug 2025 17:09:44 +0200 Subject: [PATCH] central: add SSD, turn off autosuspend --- .../hardware-configuration.nix | 53 +++++++++++++------ 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/hosts/thegeneralist-central/hardware-configuration.nix b/hosts/thegeneralist-central/hardware-configuration.nix index 140ee9f..061f8e5 100644 --- a/hosts/thegeneralist-central/hardware-configuration.nix +++ b/hosts/thegeneralist-central/hardware-configuration.nix @@ -1,29 +1,52 @@ { lib, ... }: { - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "usbhid" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; # Wi-Fi stuff nixpkgs.config.allowUnfree = true; hardware.enableAllFirmware = true; - fileSystems."/" = - { - device = "/dev/disk/by-label/NIXROOT"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-label/NIXROOT"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { - device = "/dev/disk/by-label/NIXBOOT"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-label/NIXBOOT"; + fsType = "vfat"; + options = [ + "fmask=0022" + "dmask=0022" + ]; + }; - swapDevices = [{ - device = "/dev/disk/by-label/swap"; - }]; + swapDevices = [ + { + device = "/dev/disk/by-label/swap"; + } + ]; + + fileSystems."/mnt/usb" = { + device = "/dev/disk/by-uuid/AADEEA03DEE9C7A1"; + fsType = "ntfs-3g"; + options = [ + "rw" + "noatime" + ]; + }; + + boot.extraModprobeConfig = '' + options usbcore autosuspend=-1 + ''; # 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