nixos/waydroid: remove with lib; and friends
This commit is contained in:
committed by
Emery Hemingway
parent
14c62b156a
commit
be6ac65b52
@@ -1,10 +1,8 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.virtualisation.waydroid;
|
||||
kCfg = config.lib.kernelConfig;
|
||||
kernelPackages = config.boot.kernelPackages;
|
||||
waydroidGbinderConf = pkgs.writeText "waydroid.conf" ''
|
||||
[Protocol]
|
||||
@@ -22,19 +20,19 @@ in
|
||||
{
|
||||
|
||||
options.virtualisation.waydroid = {
|
||||
enable = mkEnableOption (lib.mdDoc "Waydroid");
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Waydroid");
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = singleton {
|
||||
assertion = versionAtLeast (getVersion config.boot.kernelPackages.kernel) "4.18";
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = lib.singleton {
|
||||
assertion = lib.versionAtLeast (lib.getVersion config.boot.kernelPackages.kernel) "4.18";
|
||||
message = "Waydroid needs user namespace support to work properly";
|
||||
};
|
||||
|
||||
system.requiredKernelConfig = with config.lib.kernelConfig; [
|
||||
(isEnabled "ANDROID_BINDER_IPC")
|
||||
(isEnabled "ANDROID_BINDERFS")
|
||||
(isEnabled "ASHMEM") # FIXME Needs memfd support instead on Linux 5.18 and waydroid 1.2.1
|
||||
system.requiredKernelConfig = [
|
||||
(kCfg.isEnabled "ANDROID_BINDER_IPC")
|
||||
(kCfg.isEnabled "ANDROID_BINDERFS")
|
||||
(kCfg.isEnabled "ASHMEM") # FIXME Needs memfd support instead on Linux 5.18 and waydroid 1.2.1
|
||||
];
|
||||
|
||||
/* NOTE: we always enable this flag even if CONFIG_PSI_DEFAULT_DISABLED is not on
|
||||
|
||||
Reference in New Issue
Block a user