kiosk mode for tablets

This commit is contained in:
2025-12-05 12:59:41 -05:00
parent b73141a5e6
commit 7ea7cb5138
3 changed files with 78 additions and 2 deletions

View File

@@ -8,7 +8,6 @@ let
commonModules = [
../boot.nix
../sw.nix
../users
home-manager.nixosModules.home-manager
disko.nixosModules.disko
@@ -89,6 +88,7 @@ in
system = "x86_64-linux";
extraModules = [
./nix-laptop.nix
../sw.nix
];
};
@@ -97,6 +97,7 @@ in
system = "x86_64-linux";
extraModules = [
./nix-desktop.nix
../sw.nix
];
};
@@ -105,6 +106,7 @@ in
system = "x86_64-linux";
extraModules = [
./nix-surface.nix
../sw-kiosk.nix
inputs.nixos-hardware.nixosModules.microsoft-surface-go
];
};

74
sw-kiosk.nix Normal file
View File

@@ -0,0 +1,74 @@
{ pkgs, inputs, ... }:
{
services.cage = {
enable = true;
program = "${(pkgs.writeShellScriptBin "chromium-kiosk" ''
${pkgs.chromium}/bin/chromium --kiosk "https://ha.factory.uga.edu"
'')}/bin/chromium-kiosk;";
};
# Enable networking
networking.networkmanager.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
environment.systemPackages = with pkgs; [
htop
binutils
(chromium.override {
commandLineArgs = [ "--enable-features=TouchpadOverscrollHistoryNavigation" ];
})
oh-my-posh
zsh
git
inputs.lazyvim-nixvim.packages.${stdenv.hostPlatform.system}.nvim
];
programs.chromium = {
enable = true;
extensions = [
"ecdaoooilnflogancccpapbeebbpkhoj" # Chrome Virtual Keyboard
];
};
programs.zsh.enable = true;
programs.nix-ld.enable = true;
fonts.packages = with pkgs; [
nerd-fonts.fira-code
];
fonts.fontconfig = {
enable = true;
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
hardware.bluetooth.enable = true;
# Firewall
networking.firewall.enable = true;
# Enable the OpenSSH daemon.
services.openssh.enable = true;
}

2
sw.nix
View File

@@ -86,6 +86,6 @@
# Sensors
services.thermald.enable = true;
# Enable the OpenSSH daemon.
# Enable the OpenSSH daemon.
services.openssh.enable = true;
}