Update modules/hardware.nix modules/power.nix
This commit is contained in:
parent
089067d058
commit
3ce31a7e12
@ -76,16 +76,12 @@ with deviceSpecific; {
|
|||||||
ANALOGIO: 0
|
ANALOGIO: 0
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
boot.kernelModules = [ "ec_sys" ];
|
||||||
systemd.services.thinkpad_leds = {
|
systemd.services.thinkpad_leds = {
|
||||||
enable = config.device == "T490s-Laptop";
|
enable = config.device == "T490s-Laptop";
|
||||||
description = "Set up thinkpad leds";
|
description = "Set up thinkpad leds";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
script = ''
|
script = ''echo -n -e "\x0e" | dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null'';
|
||||||
modprobe -r ec_sys
|
|
||||||
modprobe ec_sys write_support=1
|
|
||||||
echo -n -e "\x0e" | dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null
|
|
||||||
modprobe -r ec_sys
|
|
||||||
'';
|
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -109,10 +105,7 @@ with deviceSpecific; {
|
|||||||
"axp288_adc"
|
"axp288_adc"
|
||||||
]; # Disable battery driver as it hangs this piece of shit
|
]; # Disable battery driver as it hangs this piece of shit
|
||||||
extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ];
|
extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ];
|
||||||
extraModprobeConfig = if (device == "ASUS-Laptop") then
|
extraModprobeConfig = "options ec_sys write_support=1";
|
||||||
"options iwlwifi swcrypto=1 power_save=0 power_level=5 11n_disable=8 bt_coex_active=1"
|
|
||||||
else
|
|
||||||
""; # Attempt to fix broken wireless
|
|
||||||
kernel.sysctl."vm.swappiness" = 0;
|
kernel.sysctl."vm.swappiness" = 0;
|
||||||
kernelPackages = pkgs.linuxPackages;
|
kernelPackages = pkgs.linuxPackages;
|
||||||
kernel.sysctl."kernel/sysrq" = 1;
|
kernel.sysctl."kernel/sysrq" = 1;
|
||||||
|
@ -44,12 +44,4 @@ with deviceSpecific; {
|
|||||||
echo "900" > /sys/class/backlight/*/brightness
|
echo "900" > /sys/class/backlight/*/brightness
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
systemd.services.leds_setup = {
|
|
||||||
enable = (device == "ASUS-Laptop");
|
|
||||||
description = "Set up leds triggers";
|
|
||||||
wantedBy = ["multi-user.target"];
|
|
||||||
script = ''
|
|
||||||
echo "phy0rx" > /sys/class/leds/asus-wireless\:\:airplane/trigger
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user