1
0
nixfiles/hosts/krypton/initrd.nix

18 lines
428 B
Nix
Raw Permalink Normal View History

{ ... }:
{
boot.initrd.kernelModules = [ "thinkpad_acpi" ];
boot.initrd.preLVMCommands = ''
# Turn on keyboard backlight before asking for drive encryption password
echo 1 > /sys/class/leds/tpacpi::kbd_backlight/brightness
# Show battery levels
echo
echo "Battery level: External $(cat /sys/class/power_supply/BAT1/capacity)% Internal $(cat /sys/class/power_supply/BAT0/capacity)%"
echo
'';
}