diff --git a/flake.nix b/flake.nix index aef1444c..5ebed9d5 100644 --- a/flake.nix +++ b/flake.nix @@ -211,7 +211,7 @@ ref = "main"; rev = "012d29d4b4d7148414bb649c39805479c7a4327b"; }; - tiny-dfr = import ./nixos/tiny-dfr.nix { inherit pkgs; }; + tiny-dfr = import ./nixos/tiny-dfr.nix { pkgs = pkgs-unstable; }; in nixpkgs.lib.nixosSystem { inherit system; diff --git a/nixos/tiny-dfr.nix b/nixos/tiny-dfr.nix index ee1fe92f..3f124cd6 100644 --- a/nixos/tiny-dfr.nix +++ b/nixos/tiny-dfr.nix @@ -1,13 +1,16 @@ { 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 = "tinydfr"; - after = ["systemd-user-sessions.service" "getty@tty1.service" "plymouth-quit.service" "systemd-logind.service"]; + 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 = {