mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
modules/android-integration: add am command
This commit is contained in:
parent
b7e7cd423d
commit
c4c4f09e3d
10 changed files with 175 additions and 0 deletions
36
modules/environment/android-integration.nix
Normal file
36
modules/environment/android-integration.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.android-integration;
|
||||
|
||||
termux-am =
|
||||
pkgs.callPackage (import ../../pkgs/android-integration/termux-am.nix) { };
|
||||
in
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options.android-integration = {
|
||||
|
||||
am.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = "true";
|
||||
description = lib.mdDoc ''
|
||||
Provide an `am` (activity manager) command.
|
||||
Is not guaranteed to be a real deal, could be of limited compatibility
|
||||
with real `am` (like `termux-am`).
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = {
|
||||
environment.packages =
|
||||
lib.mkIf cfg.am.enable [ termux-am ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue