From db17d622844efaeeb35ffefbaabd205c21b09c59 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Sun, 28 May 2023 19:10:56 +0200 Subject: nixos/cage: add environment config Give WLR_LIBINPUT_NO_DEVICES as example. This allows launching without any input devices, which makes sense for a kiosk system. --- nixos/modules/services/wayland/cage.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'nixos') diff --git a/nixos/modules/services/wayland/cage.nix b/nixos/modules/services/wayland/cage.nix index 330dce1d0c0ff..cf4c0798cd48b 100644 --- a/nixos/modules/services/wayland/cage.nix +++ b/nixos/modules/services/wayland/cage.nix @@ -23,6 +23,15 @@ in { example = ["-d"]; }; + options.services.cage.environment = mkOption { + type = types.attrsOf types.str; + default = {}; + example = { + WLR_LIBINPUT_NO_DEVICES = "1"; + }; + description = lib.mdDoc "Additional environment variables to pass to Cage."; + }; + options.services.cage.program = mkOption { type = types.path; default = "${pkgs.xterm}/bin/xterm"; @@ -79,6 +88,7 @@ in { # Set up a full (custom) user session for the user, required by Cage. PAMName = "cage"; }; + environment = cfg.environment; }; security.polkit.enable = true; -- cgit 1.4.1