Skip to content

Commit

Permalink
nixos/waydroid: add option package
Browse files Browse the repository at this point in the history
  • Loading branch information
milahu committed Sep 20, 2024
1 parent 25ae33d commit b04b248
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nixos/modules/virtualisation/waydroid.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ in

options.virtualisation.waydroid = {
enable = lib.mkEnableOption "Waydroid";

package = lib.mkPackageOption pkgs "waydroid" { };
};

config = lib.mkIf cfg.enable {
Expand All @@ -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" ];

Expand All @@ -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";
};
};
Expand All @@ -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 ];
};

}

0 comments on commit b04b248

Please sign in to comment.