about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2023-07-28 18:57:19 +0200
committerGitHub <noreply@github.com>2023-07-28 18:57:19 +0200
commit1e37e277ca67f7b703a56a07c8663ff03a362d0f (patch)
tree65937ba12f1aea562f8e21a779710f2b87c77ec1 /nixos
parent3ac8c61e9d2b491ed1421c63c3c0c53df64eb489 (diff)
parentdb17d622844efaeeb35ffefbaabd205c21b09c59 (diff)
Merge pull request #234652 from Valodim/cage-extra-environment
nixos/cage: add environment config
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/wayland/cage.nix10
1 files changed, 10 insertions, 0 deletions
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;