diff --git a/nixos/deck.nix b/nixos/deck.nix index d591d49..cebf702 100644 --- a/nixos/deck.nix +++ b/nixos/deck.nix @@ -17,6 +17,9 @@ ./desktop/fonts.nix ./desktop/qt.nix + # Laptop/Portable only + ./hardware/wireless.nix + # Steam Deck only ./deck/jovian.nix diff --git a/nixos/hardware/machines/deck.nix b/nixos/hardware/machines/deck.nix new file mode 100644 index 0000000..fd13391 --- /dev/null +++ b/nixos/hardware/machines/deck.nix @@ -0,0 +1,61 @@ +# This file was initially made by 'nixos-generate-config', try not to edit too much +{ config, lib, pkgs, modulesPath, ... }: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + # Set all boot options + boot = { + # Set a kernel version and load/blacklist drivers + kernelPackages = pkgs.linux_jovian; + blacklistedKernelModules = [ + "pcspkr" + ]; + kernel.sysctl."vm.max_map_count" = 2147483642; + initrd = { + availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; + kernelModules = [ + "vfio" + "vfio_pci" + "vfio_iommu_type1" + "kvm-amd" + ]; + }; + + # Manage supported filesystems + supportedFilesystems = { + ntfs = true; + zfs = lib.mkForce false; + }; + }; + + # Mount everything as necessary + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/f0786b07-8303-416f-87ff-276bfd696387"; + fsType = "bcachefs"; + }; + "/boot" = { + device = "/dev/disk/by-uuid/EF6D-9009"; + fsType = "vfat"; + }; + }; + + # Set the swap partition + swapDevices = [ + { device = "/dev/disk/by-uuid/2e4c5120-716d-4cdc-84a0-c9e6391760db"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}