diff --git a/hosts/yodaTab/configuration.nix b/hosts/yodaTab/configuration.nix index ce74727..84326fd 100644 --- a/hosts/yodaTab/configuration.nix +++ b/hosts/yodaTab/configuration.nix @@ -50,6 +50,7 @@ in ../../modules/lid-switch-handling.nix ../../modules/sendmail-mta.nix ../../modules/journalwatch.nix + #../../modules/waydroid.nix ]; networking.hostName = "yodaTab"; diff --git a/hosts/yodaTux/configuration.nix b/hosts/yodaTux/configuration.nix index eb8e61e..2c7e314 100644 --- a/hosts/yodaTux/configuration.nix +++ b/hosts/yodaTux/configuration.nix @@ -50,6 +50,7 @@ in ../../modules/lid-switch-handling.nix ../../modules/sendmail-mta.nix ../../modules/journalwatch.nix + #../../modules/waydroid.nix ]; networking.hostName = "yodaTux"; diff --git a/hosts/yodaYoga/configuration.nix b/hosts/yodaYoga/configuration.nix index de46095..8f07bf8 100644 --- a/hosts/yodaYoga/configuration.nix +++ b/hosts/yodaYoga/configuration.nix @@ -52,6 +52,7 @@ in ../../modules/lid-switch-handling.nix ../../modules/sendmail-mta.nix ../../modules/journalwatch.nix + #../../modules/waydroid.nix ]; networking.hostName = "yodaYoga"; diff --git a/modules/waydroid.nix b/modules/waydroid.nix new file mode 100644 index 0000000..7ed2fe4 --- /dev/null +++ b/modules/waydroid.nix @@ -0,0 +1,42 @@ +{ config, pkgs, ... }: + +{ + # Installation and Usage. https://nixos.wiki/wiki/WayDroid + # + # Installation: + # Fetch WayDroid images. + # You can add the parameters "-s GAPPS -f" to have GApps support. + # sudo waydroid init + # + # Usage: + # Start the WayDroid LXC container + # sudo systemctl start waydroid-container + # sudo journalctl -b -u waydroid-container + # #=> Started Waydroid Container. + # Start WayDroid session + # You'll know it is finished when you see the message "Android with user 0 is ready". + # waydroid session start + # Install and launch F-Droid + # curl -L -o ~/Downloads/F-Droid.apk https://f-droid.org/F-Droid.apk + # waydroid app install ~/Downloads/F-Droid.apk + # waydroid app launch org.fdroid.fdroid + # Stop WayDroid session + # waydroid session stop + # Stop the Waydroid LXC container + # sudo systemctl stop waydroid-container + + # TODO: Is WayDroid rooted? How to un-root it? + # https://github.com/waydroid/waydroid/issues/935 + + assertions = [{ + assertion = config.services.xserver.displayManager.gdm.wayland; + message = "Waydroid requires Wayland."; + }]; + + virtualisation.waydroid.enable = true; + + # Clipboard sharing. https://nixos.wiki/wiki/WayDroid#Clipboard_sharing + environment.systemPackages = with pkgs; [ + wl-clipboard + ]; +}