1
0
Fork 0
nix-configuration/systems/x86_64-linux/Shura/hardware-configuration.nix

50 lines
1 KiB
Nix
Raw Normal View History

# Lenovo Legion Slim 7 Gen 7 AMD (16ARHA7)
2024-12-06 18:04:47 +00:00
{
pkgs,
modulesPath,
namespace,
...
}:
let
bootUUID = "AFCB-D880"; # The UUID of the boot partition.
luksUUID = "bcf67e34-339e-40b9-8ffd-bec8f7f55248"; # The UUID of the locked LUKS partition.
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
2024-02-29 14:53:34 +00:00
# Configure the kernel.
boot = {
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
2024-02-29 14:53:34 +00:00
# Hardware defaults detected by nixos-generate-configuration
initrd = {
availableKernelModules = [
"nvme"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
};
2024-02-29 14:53:34 +00:00
kernelModules = [ "kvm-amd" ];
};
2024-02-29 14:53:34 +00:00
# Configure the main filesystem.
2024-12-06 18:04:47 +00:00
${namespace}.filesystem = {
enable = true;
partitions = {
boot = "/dev/disk/by-uuid/${bootUUID}";
luks = "/dev/disk/by-uuid/${luksUUID}";
};
swapFile = {
enable = true;
size = 16384;
};
};
# Limit the number of cores Nix can use
nix.settings.cores = 12;
2024-02-29 14:53:34 +00:00
}