22 lines
743 B
Nix
22 lines
743 B
Nix
{
|
|
pkgs,
|
|
tiny-dfr ? pkgs.tiny-dfr
|
|
}:
|
|
assert tiny-dfr.version == "0.3.1";
|
|
{
|
|
services.udev.packages = [ tiny-dfr ];
|
|
systemd.services.tiny-dfr = {
|
|
enable = true;
|
|
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"];
|
|
wantedBy = ["multi-user.target"];
|
|
bindsTo = ["dev-tiny_dfr_display.device" "dev-tiny_dfr_backlight.device" "dev-tiny_dfr_display_backlight.device"];
|
|
startLimitIntervalSec = 30;
|
|
startLimitBurst = 2;
|
|
serviceConfig = {
|
|
ExecStart = "${tiny-dfr}/bin/tiny-dfr";
|
|
Restart = "always";
|
|
};
|
|
};
|
|
}
|