mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 23:11:34 +01:00
43 lines
842 B
Nix
43 lines
842 B
Nix
{ inputs, ... }:
|
|
{
|
|
imports = [ inputs.nixos-hardware.nixosModules.framework-13-7040-amd ];
|
|
|
|
nixpkgs.hostPlatform = "x86_64-linux";
|
|
|
|
hardware = {
|
|
enableRedistributableFirmware = true;
|
|
cpu.amd.updateMicrocode = true;
|
|
};
|
|
|
|
boot = {
|
|
kernelModules = [ "kvm-amd" ];
|
|
initrd.availableKernelModules = [
|
|
"nvme"
|
|
"xhci_pci"
|
|
"thunderbolt"
|
|
"usb_storage"
|
|
"sd_mod"
|
|
];
|
|
};
|
|
|
|
zramSwap.enable = true;
|
|
|
|
services = {
|
|
fwupd.enable = true;
|
|
fprintd.enable = true; # fwupdmgr refresh && fwupdmgr update
|
|
upower = {
|
|
enable = true;
|
|
criticalPowerAction = "Hibernate";
|
|
};
|
|
|
|
logind = {
|
|
powerKey = "suspend-then-hibernate";
|
|
lidSwitch = "suspend-then-hibernate";
|
|
};
|
|
};
|
|
|
|
systemd.sleep.extraConfig = ''
|
|
HibernateDelaySec=2h
|
|
HibernateOnACPower=yes
|
|
'';
|
|
}
|