nixos/upower: drop custom unit
All of these changes ++ are in the upstream unit Also drop glib in path of unit as I don't believe this should be needed anymore.
This commit is contained in:
parent
ab48ede4c3
commit
92740dd4a8
@ -5,8 +5,11 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.services.upower;
|
cfg = config.services.upower;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
###### interface
|
###### interface
|
||||||
@ -49,41 +52,7 @@ in
|
|||||||
|
|
||||||
services.udev.packages = [ cfg.package ];
|
services.udev.packages = [ cfg.package ];
|
||||||
|
|
||||||
systemd.services.upower =
|
systemd.packages = [ cfg.package ];
|
||||||
{ description = "Power Management Daemon";
|
|
||||||
path = [ pkgs.glib.out ]; # needed for gdbus
|
|
||||||
serviceConfig =
|
|
||||||
{ Type = "dbus";
|
|
||||||
BusName = "org.freedesktop.UPower";
|
|
||||||
ExecStart = "@${cfg.package}/libexec/upowerd upowerd";
|
|
||||||
Restart = "on-failure";
|
|
||||||
# Upstream lockdown:
|
|
||||||
# Filesystem lockdown
|
|
||||||
ProtectSystem = "strict";
|
|
||||||
# Needed by keyboard backlight support
|
|
||||||
ProtectKernelTunables = false;
|
|
||||||
ProtectControlGroups = true;
|
|
||||||
ReadWritePaths = "/var/lib/upower";
|
|
||||||
ProtectHome = true;
|
|
||||||
PrivateTmp = true;
|
|
||||||
|
|
||||||
# Network
|
|
||||||
# PrivateNetwork=true would block udev's netlink socket
|
|
||||||
RestrictAddressFamilies = "AF_UNIX AF_NETLINK";
|
|
||||||
|
|
||||||
# Execute Mappings
|
|
||||||
MemoryDenyWriteExecute = true;
|
|
||||||
|
|
||||||
# Modules
|
|
||||||
ProtectKernelModules = true;
|
|
||||||
|
|
||||||
# Real-time
|
|
||||||
RestrictRealtime = true;
|
|
||||||
|
|
||||||
# Privilege escalation
|
|
||||||
NoNewPrivileges = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# The upower daemon seems to get stuck after doing a suspend
|
# The upower daemon seems to get stuck after doing a suspend
|
||||||
# (i.e. subsequent suspend requests will say "Sleep has already
|
# (i.e. subsequent suspend requests will say "Sleep has already
|
||||||
|
Loading…
x
Reference in New Issue
Block a user