kiosk/kiosk.nix

39 lines
847 B
Nix
Raw Normal View History

2024-11-15 18:26:11 -05:00
{ pkgs, lib, ... }:
let
dashboardUrl = "https://night.purduehackers.com";
in
{
# Create user to host kiosk
users.users.kiosk = {
2024-11-15 18:39:35 -05:00
isNormalUser = true;
2024-11-15 18:26:11 -05:00
group = "kiosk";
2024-11-15 18:39:35 -05:00
home = "/tmp/kiosk";
2024-11-15 18:26:11 -05:00
};
users.groups.kiosk = { };
# Setup caged kiosk, with kiosk firefox
services.cage = {
enable = true;
user = "kiosk";
program = ''
${lib.getExe pkgs.firefox} \
--kiosk \
--private-window "${dashboardUrl}"
'';
extraArguments = [ "-d" ];
};
# Set firefox autoplay policy to always allow autoplay for dashboard
programs.firefox.policies = {
Permissions.Autoplay.Allow = [ dashboardUrl ];
2024-12-07 17:00:08 -05:00
DontCheckDefaultBrowser = true;
2024-11-15 18:26:11 -05:00
};
# Enable pipewire/pipewire-pulse for audio
security.rtkit.enable = true;
services.pipewire = {
enable = true;
pulse.enable = true;
};
}