nix-stuff/machines/SteamDeck/hardware-configuration.nix

79 lines
2 KiB
Nix
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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,
modulesPath,
...
}: let
# \x20 is the escape code for a space
ssdLabel = ''Deck\\x20SSD'';
in {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
# Enable support for the Xbox One wireless dongle
hardware.xone.enable = true;
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems = {
"efi_boot_partition" = {
mountPoint = "/boot/efi";
label = "deckboot";
fsType = "vfat";
};
/*
Mount the root subvolume of the SSD
This is helpful for getting things from
my old Arch install, as well as for running btdu
*/
"btrfs_root_subvolume" = {
mountPoint = "/mnt/ssd";
label = ssdLabel;
fsType = "btrfs";
options = ["subvolid=5" "ro"];
};
"btrfs_root" = {
mountPoint = "/";
label = ssdLabel;
fsType = "btrfs";
options = ["subvol=@" "compress=zstd"];
};
"btrfs_persist" = {
mountPoint = "/persist";
label = ssdLabel;
fsType = "btrfs";
options = ["subvol=@persist"];
neededForBoot = true;
};
"btrfs_boot" = {
mountPoint = "/boot";
label = ssdLabel;
fsType = "btrfs";
options = ["subvol=@boot" "compress=zstd"];
};
"btrfs_home" = {
mountPoint = "/home";
label = ssdLabel;
fsType = "btrfs";
options = ["subvol=@home" "compress=zstd"];
};
"btrfs_nix" = {
mountPoint = "/nix";
label = ssdLabel;
fsType = "btrfs";
options = ["subvol=@nix" "compress=zstd"];
};
};
swapDevices = [];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}