mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 11:36:07 +01:00
modules/android-integration: termux-open, termux-open-url, xdg-open
This commit is contained in:
parent
733a9fe55c
commit
b195fa0b15
6 changed files with 81 additions and 14 deletions
|
|
@ -29,6 +29,28 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
termux-open.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = "true";
|
||||
description = lib.mdDoc ''
|
||||
Provide a `termux-open` command
|
||||
that opens files or urls in external apps
|
||||
(uses `com.termux.app.TermuxOpenReceiver`).
|
||||
'';
|
||||
};
|
||||
|
||||
termux-open-url.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = "true";
|
||||
description = lib.mdDoc ''
|
||||
Provide a `termux-open-url` command
|
||||
that opens files or urls in external apps
|
||||
(uses `android.intent.action.VIEW`).
|
||||
'';
|
||||
};
|
||||
|
||||
termux-setup-storage.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
|
|
@ -40,6 +62,15 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
xdg-open.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = "true";
|
||||
description = lib.mdDoc ''
|
||||
Provide an `xdg-open` alias to `termux-open` command.
|
||||
'';
|
||||
};
|
||||
|
||||
unsupported.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
|
|
@ -58,6 +89,9 @@ in
|
|||
environment.packages =
|
||||
(ifD cfg.am.enable termux-am) ++
|
||||
(ifD cfg.termux-setup-storage.enable termux-tools.setup_storage) ++
|
||||
(ifD cfg.termux-open.enable termux-tools.open) ++
|
||||
(ifD cfg.termux-open-url.enable termux-tools.open_url) ++
|
||||
(ifD cfg.xdg-open.enable termux-tools.xdg_open) ++
|
||||
(ifD cfg.unsupported.enable termux-tools.out);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue