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:
parent
a0e6efb409
commit
1546304b4e
|
@ -84,4 +84,8 @@
|
||||||
sane.ids.rtkit.gid = 2307;
|
sane.ids.rtkit.gid = 2307;
|
||||||
# phosh
|
# phosh
|
||||||
sane.ids.feedbackd.gid = 2308;
|
sane.ids.feedbackd.gid = 2308;
|
||||||
|
|
||||||
|
# new moby users
|
||||||
|
sane.ids.eg25-control.uid = 2309;
|
||||||
|
sane.ids.eg25-control.gid = 2309;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,9 +12,17 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
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 = {
|
systemd.services.eg25-control-powered = {
|
||||||
description = "power to the Qualcomm eg25 modem used by PinePhone";
|
description = "power to the Qualcomm eg25 modem used by PinePhone";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
User = "eg25-control";
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
ExecStart = "${cfg.package}/bin/eg25-control --power-on --verbose";
|
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.
|
# - want to upload almanac even when GPS *isn't* enabled, if we have internet connection.
|
||||||
description = "background GPS tracking";
|
description = "background GPS tracking";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
User = "eg25-control";
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
ExecStart = "${cfg.package}/bin/eg25-control --enable-gps --dump-debug-info --verbose";
|
ExecStart = "${cfg.package}/bin/eg25-control --enable-gps --dump-debug-info --verbose";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user