mirror of
https://github.com/nix-community/home-manager
synced 2024-06-13 18:23:39 +02:00
29 lines
587 B
Nix
29 lines
587 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.waydroid;
|
|
|
|
in {
|
|
options.services.waydroid.enable = mkEnableOption "Waydroid Android container";
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
systemd.user.services.waydroid-session = {
|
|
Unit = {
|
|
Description = "Waydroid user session";
|
|
Requires = [ "waydroid-container.service" ];
|
|
};
|
|
Install.WantedBy = [ "default.target" ];
|
|
Service = {
|
|
ExecStart =
|
|
"${pkgs.waydroid}/bin/waydroid session start";
|
|
Restart = "always";
|
|
RestartSec = 12;
|
|
};
|
|
};
|
|
};
|
|
}
|