fix: Repair OSK implementation
This commit is contained in:
committed by
Hunter Halloran
parent
cc5b7b04d6
commit
6ea6185d7c
121
sw-kiosk.nix
121
sw-kiosk.nix
@@ -10,44 +10,91 @@
|
|||||||
'')}/bin/chromium-kiosk";
|
'')}/bin/chromium-kiosk";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.xserver.desktopManager.phosh = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = "engr-ugaif";
|
desktopManager.phosh = {
|
||||||
group = "users";
|
enable = true;
|
||||||
|
user = "engr-ugaif";
|
||||||
|
group = "users";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc."xdg/autostart/kiosk-chromium.desktop".text = ''
|
services.displayManager = {
|
||||||
[Desktop Entry]
|
gdm.enable = true;
|
||||||
Type=Application
|
autoLogin = {
|
||||||
Name=Factory Kiosk
|
enable = true;
|
||||||
Exec=${pkgs.chromium}/bin/chromium \
|
user = "engr-ugaif";
|
||||||
--enable-features=UseOzonePlatform \
|
};
|
||||||
--ozone-platform=wayland \
|
|
||||||
--kiosk \
|
|
||||||
--start-fullscreen \
|
|
||||||
--noerrdialogs \
|
|
||||||
--disable-session-crashed-bubble \
|
|
||||||
https://ha.factory.uga.edu
|
|
||||||
X-GNOME-Autostart-enabled=true
|
|
||||||
X-GNOME-Autostart-Phase=Applications
|
|
||||||
'';
|
|
||||||
|
|
||||||
environment.sessionVariables = {
|
|
||||||
GDK_SCALE = "2";
|
|
||||||
GDK_DPI_SCALE = "0.5";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services."phosh-enable-osk" = {
|
services.dbus.enable = true;
|
||||||
description = "Enable on-screen keyboard in Phosh";
|
|
||||||
|
programs.dconf = {
|
||||||
|
enable = true;
|
||||||
|
profiles.user = {
|
||||||
|
databases = [{
|
||||||
|
settings = {
|
||||||
|
"org/gnome/desktop/interface" = {
|
||||||
|
color-scheme = "prefer-dark";
|
||||||
|
clock-format = "12h";
|
||||||
|
clock-show-weekday = true;
|
||||||
|
};
|
||||||
|
"org/gnome/desktop/media-handling" = {
|
||||||
|
automount = false;
|
||||||
|
automount-open = false;
|
||||||
|
autorun-never = true;
|
||||||
|
};
|
||||||
|
"org/gnome/settings-daemon/plugins/power" = {
|
||||||
|
sleep-inactive-ac-type = "nothing";
|
||||||
|
};
|
||||||
|
"org/gnome/desktop/a11y/applications" = {
|
||||||
|
screen-keyboard-enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
security.pam.services."login".enableGnomeKeyring = true;
|
||||||
|
security.pam.services."gdm-password".enableGnomeKeyring = true;
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
|
||||||
|
systemd.user.services.squeekboard = {
|
||||||
|
description = "Squeekboard on-screen keyboard";
|
||||||
wantedBy = [ "graphical-session.target" ];
|
wantedBy = [ "graphical-session.target" ];
|
||||||
partOf = [ "graphical-session.target" ];
|
partOf = [ "graphical-session.target" ];
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = pkgs.writeShellScript "phosh-enable-osk.sh" ''
|
ExecStart = "${pkgs.squeekboard}/bin/squeekboard";
|
||||||
#!/bin/sh
|
Restart = "on-failure";
|
||||||
# Allow OSK usage in this session
|
};
|
||||||
${pkgs.glib.bin}/bin/gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true || true
|
};
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
GDK_SCALE = "2";
|
||||||
|
GDK_DPI_SCALE = "0.5";
|
||||||
|
|
||||||
|
# Make GLib / gsettings actually see schemas
|
||||||
|
XDG_DATA_DIRS = [ "/run/current-system/sw/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}" ];
|
||||||
|
GSETTINGS_SCHEMA_DIR =
|
||||||
|
"/run/current-system/sw/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services."force-osk" = {
|
||||||
|
description = "Force-enable GNOME OSK after session init";
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
partOf = [ "graphical-session.target" ];
|
||||||
|
|
||||||
|
unitConfig = {
|
||||||
|
After = [ "gnome-session-initialized.target" "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.glib.bin}/bin/gsettings set \
|
||||||
|
org.gnome.desktop.a11y.applications screen-keyboard-enabled true
|
||||||
'';
|
'';
|
||||||
|
Type = "oneshot";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -108,12 +155,14 @@
|
|||||||
oh-my-posh
|
oh-my-posh
|
||||||
zsh
|
zsh
|
||||||
git
|
git
|
||||||
dbus
|
|
||||||
glib
|
glib
|
||||||
squeekboard
|
squeekboard
|
||||||
(pkgs.writeShellScriptBin "osk-wayland" ''
|
dconf
|
||||||
exec ${pkgs.squeekboard}/bin/squeekboard "$@"
|
phoc
|
||||||
'')
|
gsettings-desktop-schemas
|
||||||
|
#(pkgs.writeShellScriptBin "osk-wayland" ''
|
||||||
|
# exec ${pkgs.squeekboard}/bin/squeekboard "$@"
|
||||||
|
#'')
|
||||||
inputs.lazyvim-nixvim.packages.${stdenv.hostPlatform.system}.nvim
|
inputs.lazyvim-nixvim.packages.${stdenv.hostPlatform.system}.nvim
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -135,14 +184,6 @@
|
|||||||
defaultFonts.monospace = [ "FiraCode Nerd Font Mono" ];
|
defaultFonts.monospace = [ "FiraCode Nerd Font Mono" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
programs.mtr.enable = true;
|
|
||||||
programs.gnupg.agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSSHSupport = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Bluetooth
|
# Bluetooth
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user