add waydroid

This commit is contained in:
Daniel Langbein 2023-09-18 21:48:05 +02:00
parent de3341a461
commit f35b25de30
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002
4 changed files with 45 additions and 0 deletions

View File

@ -50,6 +50,7 @@ in
../../modules/lid-switch-handling.nix ../../modules/lid-switch-handling.nix
../../modules/sendmail-mta.nix ../../modules/sendmail-mta.nix
../../modules/journalwatch.nix ../../modules/journalwatch.nix
#../../modules/waydroid.nix
]; ];
networking.hostName = "yodaTab"; networking.hostName = "yodaTab";

View File

@ -50,6 +50,7 @@ in
../../modules/lid-switch-handling.nix ../../modules/lid-switch-handling.nix
../../modules/sendmail-mta.nix ../../modules/sendmail-mta.nix
../../modules/journalwatch.nix ../../modules/journalwatch.nix
#../../modules/waydroid.nix
]; ];
networking.hostName = "yodaTux"; networking.hostName = "yodaTux";

View File

@ -52,6 +52,7 @@ in
../../modules/lid-switch-handling.nix ../../modules/lid-switch-handling.nix
../../modules/sendmail-mta.nix ../../modules/sendmail-mta.nix
../../modules/journalwatch.nix ../../modules/journalwatch.nix
#../../modules/waydroid.nix
]; ];
networking.hostName = "yodaYoga"; networking.hostName = "yodaYoga";

42
modules/waydroid.nix Normal file
View File

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