feat(nixos): auto-start UxPlay as a user systemd service
Run UxPlay under graphical-session.target so the AirPlay receiver is discoverable as soon as the GNOME session is up, instead of requiring a manual `uxplay` invocation per login. Constraint: UxPlay needs the active graphical session for display + PipeWire Rejected: system-level service | runs before user session, no display/audio access Rejected: GNOME autostart .desktop entry | no Restart-on-failure semantics Confidence: high Scope-risk: narrow Directive: keep wantedBy on graphical-session.target (not default.target) so the unit only runs when a desktop session is live Not-tested: behavior on fast user switching between two desktop sessions
This commit is contained in:
@@ -293,6 +293,20 @@
|
||||
};
|
||||
};
|
||||
|
||||
# Auto-start UxPlay with the graphical session so iOS Screen Mirroring
|
||||
# can find this host without manually launching it.
|
||||
systemd.user.services.uxplay = {
|
||||
description = "UxPlay AirPlay Mirror Receiver";
|
||||
partOf = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" "pipewire.service" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.uxplay}/bin/uxplay";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
|
||||
security.pam.services = {
|
||||
login.u2fAuth = true;
|
||||
sudo.u2fAuth = true;
|
||||
|
||||
Reference in New Issue
Block a user