2024-05-03 17:32:27 -04:00
|
|
|
# Lenovo Legion Slim 7 Gen 7 AMD (16ARHA7)
|
2024-08-02 17:55:48 -04:00
|
|
|
{ pkgs, modulesPath, ... }:
|
2024-07-03 11:43:21 -04:00
|
|
|
let
|
2024-07-03 11:56:10 -04:00
|
|
|
bootUUID = "AFCB-D880"; # The UUID of the boot partition.
|
2024-07-03 11:43:21 -04:00
|
|
|
luksUUID = "bcf67e34-339e-40b9-8ffd-bec8f7f55248"; # The UUID of the locked LUKS partition.
|
|
|
|
in
|
2024-05-07 18:02:59 -04:00
|
|
|
{
|
|
|
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
# Configure the kernel.
|
|
|
|
boot = {
|
2024-11-07 16:50:00 -05:00
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
# Hardware defaults detected by nixos-generate-configuration
|
|
|
|
initrd = {
|
|
|
|
availableKernelModules = [
|
|
|
|
"nvme"
|
|
|
|
"xhci_pci"
|
|
|
|
"usbhid"
|
|
|
|
"usb_storage"
|
|
|
|
"sd_mod"
|
|
|
|
"rtsx_pci_sdmmc"
|
|
|
|
];
|
|
|
|
};
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
kernelModules = [ "kvm-amd" ];
|
|
|
|
};
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-07-03 11:43:21 -04:00
|
|
|
# Configure the main filesystem.
|
2024-07-03 21:13:13 -04:00
|
|
|
aux.system.filesystem = {
|
2024-07-05 09:36:11 -04:00
|
|
|
enable = true;
|
|
|
|
partitions = {
|
|
|
|
boot = "/dev/disk/by-uuid/${bootUUID}";
|
|
|
|
luks = "/dev/disk/by-uuid/${luksUUID}";
|
2024-05-07 18:02:59 -04:00
|
|
|
};
|
2024-07-05 09:36:11 -04:00
|
|
|
swapFile = {
|
2024-07-03 11:43:21 -04:00
|
|
|
enable = true;
|
2024-07-05 09:36:11 -04:00
|
|
|
size = 16384;
|
2024-05-07 18:02:59 -04:00
|
|
|
};
|
|
|
|
};
|
2024-08-23 10:56:14 -04:00
|
|
|
|
2024-09-23 14:12:56 -04:00
|
|
|
# Limit the number of cores Nix can use
|
|
|
|
nix.settings.cores = 12;
|
2024-02-29 09:53:34 -05:00
|
|
|
}
|