2024-06-27 11:24:25 +02:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
tiny-dfr ? pkgs.tiny-dfr
|
2024-09-16 14:23:32 +02:00
|
|
|
}:
|
|
|
|
assert tiny-dfr.version == "0.3.1";
|
|
|
|
{
|
2024-06-27 11:24:25 +02:00
|
|
|
services.udev.packages = [ tiny-dfr ];
|
|
|
|
systemd.services.tiny-dfr = {
|
|
|
|
enable = true;
|
2024-09-16 14:23:32 +02:00
|
|
|
description = "tiny-dfr";
|
|
|
|
after = ["systemd-user-sessions.service" "getty@tty1.service" "plymouth-quit.service" "systemd-logind.service" "dev-tiny_dfr_display.device" "dev-tiny_dfr_backlight.device" "dev-tiny_dfr_display_backlight.device"];
|
2024-06-27 11:24:25 +02:00
|
|
|
wantedBy = ["multi-user.target"];
|
2024-09-16 14:23:32 +02:00
|
|
|
bindsTo = ["dev-tiny_dfr_display.device" "dev-tiny_dfr_backlight.device" "dev-tiny_dfr_display_backlight.device"];
|
2024-06-27 11:24:25 +02:00
|
|
|
startLimitIntervalSec = 30;
|
|
|
|
startLimitBurst = 2;
|
|
|
|
serviceConfig = {
|
|
|
|
ExecStart = "${tiny-dfr}/bin/tiny-dfr";
|
|
|
|
Restart = "always";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|