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 ];
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enable pipewire/pipewire-pulse for audio
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
};
|
|
|
|
}
|