nixos/waydroid: allow override waydroid
This commit is contained in:
parent
6f7fdf8e4b
commit
ee0937ff0d
@ -8,7 +8,6 @@
|
||||
let
|
||||
cfg = config.virtualisation.waydroid;
|
||||
kCfg = config.lib.kernelConfig;
|
||||
kernelPackages = config.boot.kernelPackages;
|
||||
waydroidGbinderConf = pkgs.writeText "waydroid.conf" ''
|
||||
[Protocol]
|
||||
/dev/binder = aidl2
|
||||
@ -26,6 +25,7 @@ in
|
||||
|
||||
options.virtualisation.waydroid = {
|
||||
enable = lib.mkEnableOption "Waydroid";
|
||||
package = lib.mkPackageOption pkgs "waydroid" { };
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
@ -49,7 +49,7 @@ in
|
||||
|
||||
environment.etc."gbinder.d/waydroid.conf".source = waydroidGbinderConf;
|
||||
|
||||
environment.systemPackages = with pkgs; [ waydroid ];
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
networking.firewall.trustedInterfaces = [ "waydroid0" ];
|
||||
|
||||
@ -63,7 +63,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";
|
||||
};
|
||||
};
|
||||
@ -72,7 +72,7 @@ in
|
||||
"d /var/lib/misc 0755 root root -" # for dnsmasq.leases
|
||||
];
|
||||
|
||||
services.dbus.packages = with pkgs; [ waydroid ];
|
||||
services.dbus.packages = [ cfg.package ];
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user