From 64a0cf0df2ad6e26be59f4da7ff4a568bc896ce0 Mon Sep 17 00:00:00 2001 From: Florian Franzen Date: Thu, 25 Nov 2021 14:48:06 +0100 Subject: [PATCH] nixos/waydroid: enable kernel psi interface if required --- nixos/modules/virtualisation/waydroid.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/waydroid.nix b/nixos/modules/virtualisation/waydroid.nix index 854ab056dbb8..4fc798ff39f8 100644 --- a/nixos/modules/virtualisation/waydroid.nix +++ b/nixos/modules/virtualisation/waydroid.nix @@ -18,7 +18,8 @@ let /dev/hwbinder = hidl ''; -in { +in +{ options.virtualisation.waydroid = { enable = mkEnableOption "Waydroid"; @@ -36,6 +37,12 @@ in { (isEnabled "ASHMEM") ]; + /* NOTE: we always enable this flag even if CONFIG_PSI_DEFAULT_DISABLED is not on + as reading the kernel config is not always possible and on kernels where it's + already on it will be no-op + */ + boot.kernelParams = [ "psi=1" ]; + environment.etc."gbinder.d/waydroid.conf".source = waydroidGbinderConf; environment.systemPackages = with pkgs; [ waydroid ];