Browse Source

daemon: remove the need for upower

master
parent
commit
6e09eea304
Signed by: govanify GPG Key ID: DE62E1E2A6145556
4 changed files with 4 additions and 11 deletions
  1. +2
    -5
      components/headfull/graphical/wm.nix
  2. +2
    -5
      docs/design.txt
  3. +0
    -1
      profiles/laptop.nix
  4. BIN
      secrets/components/amaurot.nix

+ 2
- 5
components/headfull/graphical/wm.nix View File

@ -53,17 +53,14 @@ let
fi
'';
bat-opt = if cfg.battery then " | bat: $battery_info" else "";
bat-opt = if cfg.battery then " | bat: $battery_info%" else "";
status-sh = pkgs.writeShellScript "status.sh" (
''
date_formatted=$(date "+%a %d/%m/%Y %H:%M")
mail=$(cat ~/.local/share/mail/unread)
'' + optionalString cfg.battery ''
battery_status=$(cat /sys/class/power_supply/BAT/status)
battery_info=$(upower --show-info $(upower --enumerate |\
grep 'BAT') |\
egrep "state|percentage" | grep -oP '[0-9]*%')
battery_info=$(cat /sys/class/power_supply/BAT/capacity)
'' + ''
echo "mail: $mail${bat-opt} | $date_formatted"
''


+ 2
- 5
docs/design.txt View File

@ -65,7 +65,6 @@ programs:
root:
* dhcpcd
* upowerd
* sshd
* NetworkManager & friends
* systemd and friends
@ -219,10 +218,8 @@ Per-application security for the root user is basically:
* sshd is not sandboxed for obvious reasons but I would be very surprised if
someone was able to break into it.
* dhcpcd are so small and so limited in their scope that I doubt it would be
likely to break into the system through them. With that said I'd classify
upower as a slightly higher risk than dhcpcd, and I believe both would need
some kind of root access to be exploited successfully
* dhcpcd is so small and limited in its scope that I doubt it would be
likely to break into the system through them.
* At this point attacking NetworkManager would result in attacking its API,
which I would hope is secure enough.


+ 0
- 1
profiles/laptop.nix View File

@ -3,7 +3,6 @@ with lib;
{
config = mkIf (config.navi.profile.name == "laptop") {
#hardware.enableAllFirmware = true;
services.upower.enable = true;
# low power also means low performance
nix.distributedBuilds = true;


BIN
secrets/components/amaurot.nix View File


Loading…
Cancel
Save