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 = {
|
2023-04-29 19:11:06 +00:00
|
|
|
packages = with pkgs;[ chromium vscode spotify tartube-yt-dlp ];
|
2022-06-06 19:16:30 +00:00
|
|
|
group = "kiosk";
|
|
|
|
isNormalUser = true;
|
|
|
|
uid = 1003;
|
2023-04-29 19:11:06 +00:00
|
|
|
extraGroups = [ "wheel" "audio" "pulse" "pipewire" ];
|
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 = ''
|
2022-06-10 19:37:49 +00:00
|
|
|
${pkgs.xorg.xset}/bin/xset -display :0 s off -dpms
|
|
|
|
${pkgs.xorg.xrandr}/bin/xrandr --output HDMI2 --right-of HDMI1
|
2018-11-05 12:51:54 +00:00
|
|
|
'';
|
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
|
|
|
|
2023-04-29 19:11:06 +00:00
|
|
|
environment.systemPackages = [
|
|
|
|
pkgs.gnomeExtensions.appindicator pkgs.pavucontrol pkgs.jellyfin-media-player pkgs.chromium pkgs.firefox pkgs.kodi
|
|
|
|
pkgs.pavucontrol
|
|
|
|
];
|
2021-03-12 19:27:16 +00:00
|
|
|
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 = {
|
2022-06-10 19:37:49 +00:00
|
|
|
ExecStart = "${pkgs.xorg.xset}/bin/xset -display :0 s off -dpms";
|
2018-10-21 21:22:21 +00:00
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
2023-04-29 19:11:06 +00:00
|
|
|
services.pipewire.systemWide = lib.mkForce false;
|
|
|
|
services.pipewire.config.pipewire-pulse = {
|
|
|
|
"pulse.properties"."server.address" = [ "unix:native" "tcp:4713" ];
|
|
|
|
};
|
2018-10-21 21:22:21 +00:00
|
|
|
|
2017-05-12 09:29:46 +00:00
|
|
|
}
|