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:
parent
2e57003d80
commit
a705acac9d
1 changed files with 12 additions and 8 deletions
|
|
@ -1,21 +1,25 @@
|
|||
# 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
|
||||
, pkgs
|
||||
, modulesPath
|
||||
, inputs
|
||||
, ...
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-11th-gen
|
||||
];
|
||||
|
||||
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 = {
|
||||
initrd.availableKernelModules = [
|
||||
"thunderbolt"
|
||||
|
|
@ -66,7 +70,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
swapDevices = [{ device = "/dev/mapper/luks-280f2e07-e5fc-478e-b7ee-445c99bea415"; }];
|
||||
swapDevices = [ { device = "/dev/mapper/luks-280f2e07-e5fc-478e-b7ee-445c99bea415"; } ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue