diff --git a/hosts/krypton/configuration.nix b/hosts/krypton/configuration.nix index 53bdecf..9f703ad 100644 --- a/hosts/krypton/configuration.nix +++ b/hosts/krypton/configuration.nix @@ -8,6 +8,7 @@ ../../configuration/desktop ./backup.nix + ./initrd.nix ./network.nix ./programs.nix ]; diff --git a/hosts/krypton/initrd.nix b/hosts/krypton/initrd.nix new file mode 100644 index 0000000..62a89f2 --- /dev/null +++ b/hosts/krypton/initrd.nix @@ -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 + ''; + +}