Last active
November 10, 2024 01:32
-
-
Save domenkozar/03a1c3926c8172be0fcc6f567d3ab8ac to your computer and use it in GitHub Desktop.
Boot NixOS into chromium kiosk (tested on NixOS 14.04)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services.xserver = { | |
enable = true; | |
monitorSection = '' | |
Option "NODPMS" | |
''; | |
serverLayoutSection = '' | |
Option "BlankTime" "0" | |
Option "DPMS" "false" | |
''; | |
displayManager.auto.user = "guest"; | |
displayManager.auto.enable = true; | |
displayManager.slim.enable = false; | |
displayManager.xserverArgs = [ "-nocursor" ]; | |
desktopManager.default = "chromium"; | |
desktopManager.session = [{ | |
name = "chromium"; | |
start = '' | |
# dont blank the screen after 5min | |
xset dpms force on | |
xset -dpms & | |
xset s noblank & | |
xset s off & | |
# empty i3 config to shutup wizard | |
mkdir -p /home/guest/i3 | |
touch /home/guest/.i3/config | |
# dont allow chromium to complain | |
sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' /home/guest/.config/chromium/Default/Preferences || true | |
sleep 5; | |
# start browser | |
while true; do ${pkgs.chromium}/bin/chromium --incognito --touch-events --disable-translate --kiosk http://192.168.1.2:8080/; done | |
''; | |
}]; | |
windowManager.default = "i3"; | |
windowManager.i3.enable = true; | |
resolutions = [{ | |
x = 1280; | |
y = 1024; | |
}]; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment