nixos/trackpoint: replace activationScript
Replace with a separate systemd service ordered before sysinit.target
This commit is contained in:
parent
36f2ab21ea
commit
9b29bc0010
1 changed files with 10 additions and 3 deletions
|
@ -80,10 +80,17 @@ with lib;
|
||||||
ACTION=="add|change", SUBSYSTEM=="input", ATTR{name}=="${cfg.device}", ATTR{device/speed}="${toString cfg.speed}", ATTR{device/sensitivity}="${toString cfg.sensitivity}"
|
ACTION=="add|change", SUBSYSTEM=="input", ATTR{name}=="${cfg.device}", ATTR{device/speed}="${toString cfg.speed}", ATTR{device/sensitivity}="${toString cfg.sensitivity}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
system.activationScripts.trackpoint =
|
systemd.services.trackpoint = {
|
||||||
''
|
wantedBy = [ "sysinit.target" ] ;
|
||||||
${config.systemd.package}/bin/udevadm trigger --attr-match=name="${cfg.device}"
|
before = [ "sysinit.target" "shutdown.target" ];
|
||||||
|
conflicts = [ "shutdown.target" ];
|
||||||
|
unitConfig.DefaultDependencies = false;
|
||||||
|
serviceConfig.Type = "oneshot";
|
||||||
|
serviceConfig.RemainAfterExit = true;
|
||||||
|
serviceConfig.ExecStart = ''
|
||||||
|
${config.systemd.package}/bin/udevadm trigger --attr-match=name="${cfg.device}
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf (cfg.emulateWheel) {
|
(mkIf (cfg.emulateWheel) {
|
||||||
|
|
Loading…
Reference in a new issue