From 328b8d6411b169550ef4d46fa3e6287d9cbf9e9c Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Sun, 2 Nov 2025 19:48:31 +0100 Subject: [PATCH] update deck hardware config --- hosts/nixos/deck/hardware-configuration.nix | 49 +++++++-------------- hosts/nixos/deck/system.nix | 1 + 2 files changed, 18 insertions(+), 32 deletions(-) diff --git a/hosts/nixos/deck/hardware-configuration.nix b/hosts/nixos/deck/hardware-configuration.nix index ce176fb..316d010 100644 --- a/hosts/nixos/deck/hardware-configuration.nix +++ b/hosts/nixos/deck/hardware-configuration.nix @@ -1,43 +1,28 @@ -# Placeholder hardware configuration for Steam Deck -# -# This file must be generated on the actual Steam Deck hardware. -# -# To generate this file: -# 1. Boot into the Jovian-NixOS installer ISO on the Steam Deck -# 2. Run: nixos-generate-config --root /mnt --show-hardware-config > hardware-configuration.nix -# 3. Copy the generated file to this location -# -# The generated file will include: -# - CPU and GPU detection -# - Storage device configuration -# - Kernel modules for Steam Deck hardware -# - File system configuration -# -# DO NOT attempt to use this placeholder for installation. - +# 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 = [ ]; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; - # Placeholder - will be replaced by actual hardware detection - boot.initrd.availableKernelModules = [ ]; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - # Placeholder filesystem configuration - fileSystems."/" = { - device = "/dev/disk/by-label/nixos"; - fsType = "ext4"; - }; + # Filesystem and swap configuration managed by disko (see disk-config.nix) - fileSystems."/boot" = { - device = "/dev/disk/by-label/boot"; - fsType = "vfat"; - }; - - swapDevices = [ ]; + # 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.enp4s0f3u1u1c2.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/nixos/deck/system.nix b/hosts/nixos/deck/system.nix index a2e61d1..0b411ff 100644 --- a/hosts/nixos/deck/system.nix +++ b/hosts/nixos/deck/system.nix @@ -3,6 +3,7 @@ { imports = [ ./hardware-configuration.nix + ./disk-config.nix ../system-default.nix # Common NixOS system configuration ../../../modules/desktop.nix ];