init new repo
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
{ pkgs, rhemawave, ...}:
|
||||
let
|
||||
rhemaApp = rhemawave.packages.${pkgs.system}.default;
|
||||
kioskscript = pkgs.writeShellScript "kiosk-start" ''
|
||||
OUTPUT=$(${pkgs.wlr-randr}/bin/wlr-randr | grep -m1 '^\S' | awk '{print $1}')
|
||||
${pkgs.wlr-randr}/bin/wlr-randr --output "$OUTPUT" --transform 90
|
||||
exec ${rhemaApp}/bin/rhemawave -d -s
|
||||
'';
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [ pkgs.wlr-randr];
|
||||
|
||||
environment.loginShellInit = pkgs.lib.mkForce ''
|
||||
if [ "$(tty)" = "/dev/tty1" ]; then
|
||||
export CODEBUG=netdns=cgo
|
||||
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
|
||||
for i in {1..10}; do
|
||||
if ${pkgs.iputils}/bin/ping -c 1 8.8.8.8 &> /dev/null; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export WLR_RENDERER=pixman
|
||||
export WLR_NO_HARDWARE_CURSORS=1
|
||||
|
||||
mkdir -p /home/kiosk/.local/share/rhemawave
|
||||
exec dbus-run-session cage -- ${kioskscript} > /tmp/kiosk.log 2>&1
|
||||
fi
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user