forked from colin/nix-files
unl0kr: fix that unl0kr wasnt always visible (so, wait for /dev/fb0 to appear before launch)
This commit is contained in:
parent
3b43562841
commit
bf99a64b89
|
@ -15,6 +15,15 @@ let
|
|||
PATH=$PATH:$extraPath command -v "$1"
|
||||
}
|
||||
|
||||
# give some time for the framebuffer device to appear;
|
||||
# unl0kr depends on it but doesn't know to wait for it.
|
||||
for _ in $(seq 25); do
|
||||
if [ -e /dev/fb0 ]; then
|
||||
break
|
||||
fi
|
||||
sleep 0.2
|
||||
done
|
||||
|
||||
# TODO: make this more robust to failure.
|
||||
# - if `unl0kr` fails, then the second `redirect-tty` sends a newline to `login`, causing it to exit and the service fails.
|
||||
# - if `redirect-tty` fails, then... the service is left hanging.
|
||||
|
@ -134,8 +143,6 @@ in
|
|||
# necessary for `sanebox` to be found. TODO: add this to every systemd service.
|
||||
"/run/current-system/sw" # `/bin` is appended
|
||||
];
|
||||
# needed to find sanebox profiles (TODO: add this to every service)
|
||||
environment.XDG_DATA_DIRS = "/run/current-system/sw/share";
|
||||
|
||||
serviceConfig.Type = "simple";
|
||||
serviceConfig.Restart = "always";
|
||||
|
|
Loading…
Reference in New Issue
Block a user