2018-01-29 13:45:26 +00:00
|
|
|
{ pkgs, lib, ... }:
|
2017-05-12 09:29:46 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
imports = [
|
|
|
|
./base.nix
|
|
|
|
];
|
2022-06-06 19:16:30 +00:00
|
|
|
users.users.kiosk = {
|
|
|
|
packages = [ pkgs.chromium pkgs.vscode ];
|
|
|
|
group = "kiosk";
|
|
|
|
isNormalUser = true;
|
|
|
|
uid = 1003;
|
|
|
|
extraGroups = [ "wheel" "audio" "pulse" ];
|
2018-11-05 12:51:54 +00:00
|
|
|
};
|
2022-06-06 19:16:30 +00:00
|
|
|
users.groups.kiosk.gid = 989 ;
|
2017-05-12 09:29:46 +00:00
|
|
|
services.xserver = {
|
|
|
|
|
2021-03-12 19:27:16 +00:00
|
|
|
windowManager = lib.mkForce { awesome.enable = false; };
|
|
|
|
displayManager.gdm.enable = true;
|
|
|
|
displayManager.autoLogin = {
|
2020-04-23 08:31:29 +00:00
|
|
|
enable = true;
|
2022-06-06 19:16:30 +00:00
|
|
|
user = lib.mkForce "kiosk";
|
2020-04-23 08:31:29 +00:00
|
|
|
};
|
2021-03-12 19:27:16 +00:00
|
|
|
displayManager.defaultSession = "gnome";
|
2021-12-05 13:21:19 +00:00
|
|
|
desktopManager.gnome.enable = true;
|
2020-04-23 08:31:29 +00:00
|
|
|
displayManager.sessionCommands = ''
|
2018-11-05 12:51:54 +00:00
|
|
|
${pkgs.xlibs.xset}/bin/xset -display :0 s off -dpms
|
|
|
|
${pkgs.xlibs.xrandr}/bin/xrandr --output HDMI2 --right-of HDMI1
|
|
|
|
'';
|
2017-05-12 09:29:46 +00:00
|
|
|
# xrandrHeads = [ "HDMI1" "HDMI2" ];
|
|
|
|
# prevent screen from turning off, disable dpms
|
|
|
|
};
|
2018-10-21 21:22:21 +00:00
|
|
|
|
2021-03-12 19:27:16 +00:00
|
|
|
|
|
|
|
environment.systemPackages = [ pkgs.gnomeExtensions.appindicator ];
|
|
|
|
services.dbus.packages = with pkgs; [ gnome2.GConf gnome3.gnome-settings-daemon ];
|
|
|
|
|
2018-10-21 21:22:21 +00:00
|
|
|
systemd.services.xset-off = {
|
|
|
|
after = [ "display-manager.service" ];
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
serviceConfig = {
|
|
|
|
ExecStart = "${pkgs.xlibs.xset}/bin/xset -display :0 s off -dpms";
|
|
|
|
RemainAfterExit = "yes";
|
2018-11-05 12:51:54 +00:00
|
|
|
TimeoutSec = "5s";
|
|
|
|
RestartSec="5s";
|
2018-10-21 21:22:21 +00:00
|
|
|
Restart = "on-failure";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-05-12 09:29:46 +00:00
|
|
|
}
|