hosts/krypton: Turn on keyboard backlight and display battery levels at cryptsetup askpass
This commit is contained in:
parent
9284723eae
commit
568d3f8d89
@ -8,6 +8,7 @@
|
|||||||
../../configuration/desktop
|
../../configuration/desktop
|
||||||
|
|
||||||
./backup.nix
|
./backup.nix
|
||||||
|
./initrd.nix
|
||||||
./network.nix
|
./network.nix
|
||||||
./programs.nix
|
./programs.nix
|
||||||
];
|
];
|
||||||
|
17
hosts/krypton/initrd.nix
Normal file
17
hosts/krypton/initrd.nix
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user