summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorLuna Nova <git@lunnova.dev>2022-03-07 08:39:15 -0800
committerLuna Nova <git@lunnova.dev>2022-03-07 08:39:15 -0800
commit064362042091a21a75a682d7d9d0811e0033f73b (patch)
tree9f4731c895f8733b5bdefeac5492d72f8198799f /nixos/tests
parent71a02ab76f35c36a4830716edcb8d168b154a19b (diff)
downloadnixpkgs-064362042091a21a75a682d7d9d0811e0033f73b.tar
nixpkgs-064362042091a21a75a682d7d9d0811e0033f73b.tar.gz
nixpkgs-064362042091a21a75a682d7d9d0811e0033f73b.tar.bz2
nixpkgs-064362042091a21a75a682d7d9d0811e0033f73b.tar.lz
nixpkgs-064362042091a21a75a682d7d9d0811e0033f73b.tar.xz
nixpkgs-064362042091a21a75a682d7d9d0811e0033f73b.tar.zst
nixpkgs-064362042091a21a75a682d7d9d0811e0033f73b.zip
nixos/input-remapper: document pkexec workaround in test
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/input-remapper.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/nixos/tests/input-remapper.nix b/nixos/tests/input-remapper.nix
index 8b993961708..f692564caa5 100644
--- a/nixos/tests/input-remapper.nix
+++ b/nixos/tests/input-remapper.nix
@@ -18,7 +18,14 @@ import ./make-test-python.nix ({ pkgs, ... }:
         services.input-remapper.enable = true;
         users.users.sybil = { isNormalUser = true; group = "wheel"; };
         test-support.displayManager.auto.user = user.name;
-        # passwordless pkexec bodge
+        # workaround for pkexec not working in the test environment
+        # Error creating textual authentication agent:
+        #   Error opening current controlling terminal for the process (`/dev/tty'):
+        #   No such device or address
+        # passwordless pkexec with polkit module also doesn't work
+        # to allow the program to run, we replace pkexec with sudo
+        # and turn on passwordless sudo
+        # this is not correct in general but good enough for this test
         security.sudo = { enable = true; wheelNeedsPassword = false; };
         security.wrappers.pkexec = pkgs.lib.mkForce
           {