feat(nix): update x1 hardware configuration for power and swap settings

- Added udev rules to manage Intel RAPL power limits
- Adjusted swapDevices formatting for consistency
This commit is contained in:
Harald Hoyer 2025-12-23 13:43:12 +01:00
parent 2e57003d80
commit a705acac9d

View file

@ -1,12 +1,12 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config {
, lib config,
, pkgs lib,
, modulesPath pkgs,
, inputs inputs,
, ... ...
}: }:
{ {
@ -16,6 +16,10 @@
hardware.enableRedistributableFirmware = lib.mkDefault true; hardware.enableRedistributableFirmware = lib.mkDefault true;
services.udev.extraRules = ''
SUBSYSTEM=="powercap", KERNEL=="intel-rapl:0", ATTR{constraint_0_power_limit_uw}="28000000", ATTR{constraint_1_power_limit_uw}="35000000", ATTR{constraint_1_time_window_us}="9994240"
'';
boot = { boot = {
initrd.availableKernelModules = [ initrd.availableKernelModules = [
"thunderbolt" "thunderbolt"