From b04b248fd0c1594b1a09ca8dc9c7ddabcaf69dc8 Mon Sep 17 00:00:00 2001 From: Milan Hauth Date: Fri, 20 Sep 2024 14:31:58 +0200 Subject: [PATCH] nixos/waydroid: add option package --- nixos/modules/virtualisation/waydroid.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nixos/modules/virtualisation/waydroid.nix b/nixos/modules/virtualisation/waydroid.nix index ae4555f3a6724..f3a2dc643479c 100644 --- a/nixos/modules/virtualisation/waydroid.nix +++ b/nixos/modules/virtualisation/waydroid.nix @@ -21,6 +21,8 @@ in options.virtualisation.waydroid = { enable = lib.mkEnableOption "Waydroid"; + + package = lib.mkPackageOption pkgs "waydroid" { }; }; config = lib.mkIf cfg.enable { @@ -43,7 +45,7 @@ in environment.etc."gbinder.d/waydroid.conf".source = waydroidGbinderConf; - environment.systemPackages = with pkgs; [ waydroid ]; + environment.systemPackages = [ cfg.package ]; networking.firewall.trustedInterfaces = [ "waydroid0" ]; @@ -57,7 +59,7 @@ in serviceConfig = { Type = "dbus"; UMask = "0022"; - ExecStart = "${pkgs.waydroid}/bin/waydroid -w container start"; + ExecStart = "${cfg.package}/bin/waydroid -w container start"; BusName = "id.waydro.Container"; }; }; @@ -66,7 +68,7 @@ in "d /var/lib/misc 0755 root root -" # for dnsmasq.leases ]; - services.dbus.packages = with pkgs; [ waydroid ]; + services.dbus.packages = [ cfg.package ]; }; }