nix-config/modules/scripts/battery.nix

17 lines
369 B
Nix

{
flake.modules.homeManager.gui =
{ pkgs, ... }:
{
home.packages = [
(pkgs.writeShellApplication {
name = "battery";
runtimeInputs = with pkgs; [ upower ];
text = ''
upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep -E 'state|to full|percentage'
'';
})
];
};
}