Skip to content

Commit

Permalink
WIP: okc-gpg
Browse files Browse the repository at this point in the history
...can't make okc-ssh-agent work even on Termux...
  • Loading branch information
t184256 committed Jul 7, 2024
1 parent 2d1c38f commit 06acadf
Show file tree
Hide file tree
Showing 7 changed files with 2,821 additions and 7 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/emulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,13 @@ jobs:
# below 28: bootstrap didn't start, IDK why
# 34: sometimes work, but doesn't seem stable, even w/o caching images
script:
- android_integration
- bootstrap_flakes
- bootstrap_channels
- poke_around
- test_channels_uiautomator
- test_channels_shell
# android_integration
# bootstrap_flakes
# bootstrap_channels
- okc_agents
# poke_around
# test_channels_uiautomator
# test_channels_shell

steps:
- name: Checkout repository
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
`am`, `termux-open`, `termux-open-url`, `termux-reload-settings`,
`termux-setup-storage`, `termux-wake-lock`, `termux-wake-unlock`
and `xdg-open`.
* Another option under `android-integration`, `okc-gpg`,
provides a GPG agent for OpenKeychain,
courtesy of https://github.com/DDoSolitary/okc-agents.
This lets you use PGP keys stored on hardware tokens, like Yubikeys.

### Compatibility considerations

Expand Down
20 changes: 19 additions & 1 deletion modules/environment/android-integration.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE.

{ config, lib, pkgs, ... }:
{ config, lib, pkgs, nixpkgs, ... }:

let
cfg = config.android-integration;
Expand All @@ -11,6 +11,10 @@ let
pkgs.callPackage (import ../../pkgs/android-integration/termux-tools.nix) {
inherit termux-am;
};
okc-agents =
import (../../pkgs/android-integration/okc-agents) {
inherit nixpkgs pkgs termux-am;
};
in
{

Expand Down Expand Up @@ -103,13 +107,25 @@ in
'';
};

okc-gpg.enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = "true";
description = lib.mdDoc ''
Provides a GPG agent for OpenKeychain,
courtesy of https://github.com/DDoSolitary/okc-agents.
This lets you use PGP keys stored on hardware tokens, like Yubikeys.
'';
};

unsupported.enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = "true";
description = lib.mdDoc ''
Provide several more unsupported and untested commands.
For testing and for brave souls only.
Currently provides `termux-backup` and `okc-ssh-agent`.
'';
};

Expand All @@ -127,6 +143,8 @@ in
(ifD cfg.termux-wake-lock.enable termux-tools.wake_lock) ++
(ifD cfg.termux-wake-unlock.enable termux-tools.wake_unlock) ++
(ifD cfg.xdg-open.enable termux-tools.xdg_open) ++
(ifD cfg.okc-gpg.enable okc-agents.okc_gpg) ++
(ifD cfg.unsupported.enable okc-agents.out) ++
(ifD cfg.unsupported.enable termux-tools.out);
};
}
Loading

0 comments on commit 06acadf

Please sign in to comment.