eg25-control: run as own user

its perms might still need adjustment so that it can control modem power and write to mmcli
This commit is contained in:
Colin 2023-09-15 03:54:01 +00:00
parent a0e6efb409
commit 1546304b4e
2 changed files with 13 additions and 0 deletions

View File

@ -84,4 +84,8 @@
sane.ids.rtkit.gid = 2307;
# phosh
sane.ids.feedbackd.gid = 2308;
# new moby users
sane.ids.eg25-control.uid = 2309;
sane.ids.eg25-control.gid = 2309;
}

View File

@ -12,9 +12,17 @@ in
};
config = lib.mkIf cfg.enable {
users.groups.eg25-control = {};
users.users.eg25-control = {
group = "eg25-control";
isSystemUser = true;
};
# TODO: persist eg25-control cache/new dirs
systemd.services.eg25-control-powered = {
description = "power to the Qualcomm eg25 modem used by PinePhone";
serviceConfig = {
User = "eg25-control";
Type = "simple";
RemainAfterExit = true;
ExecStart = "${cfg.package}/bin/eg25-control --power-on --verbose";
@ -32,6 +40,7 @@ in
# - want to upload almanac even when GPS *isn't* enabled, if we have internet connection.
description = "background GPS tracking";
serviceConfig = {
User = "eg25-control";
Type = "simple";
RemainAfterExit = true;
ExecStart = "${cfg.package}/bin/eg25-control --enable-gps --dump-debug-info --verbose";