aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: f1559cdffdc58c32b06fda3b84c82de2eaef1f2c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Description

Based on [this gist](https://gist.github.com/sardemff7/759cbf956bea20d382a6128c641d2746)
and [pinentry-rofi](https://github.com/plattfot/pinentry-rofi). Thank
you, Fredrik Salomonsson, for doing all the hard work.

Simple
[pinentry](https://www.gnupg.org/related_software/pinentry/index.html)
gui using [rofi](https://github.com/davatorium/rofi).

It\'s similar in functionality as the gist and the previous script, but
on the MicroOS, where I work now, it is essential to install as
few as possible additional software, so Guile is certainly too much.

Then add it to your `~/.gnupg/gpg-agent.conf`

On a distribution that is using systemd (here I\'m using Arch Linux as
an example) simply run:

``` shell
echo "GUIX_LOCPATH=$GUIX_LOCPATH"
```

Copy that, then run:

``` shell
systend --user edit gpg-agent.service
```

And add it in the `override.conf`

``` conf
[Service]
Environment=GUIX_LOCPATH=%h/.guix-profile/lib/locale
```

On my system, `GUIX_LOCPATH` points to the default profile
i.e. `$HOME/.guix-profile/lib/locale`. `%h` in
systemd gives you the path to the home directory. This should be the
case for most people, but if your `GUIX_LOCPATH` points to
something different change the `override.conf` to reflect
that.

# Gpg-agent

To use `pinentry-rofi` with `gpg-agent`, you can
set it as the `pinentry-program` in the
`~/.gnupg/gpg-agent.conf`. Note that you need to use the full
path to the binary.

For example for Arch Linux this would be:

``` conf
pinentry-program /usr/bin/pinentry-rofi
```

And for guix:

``` conf
pinentry-program <HOME>/.guix-profile/bin/pinentry-rofi
```

Where `<HOME>` is the full path to home for your user.

Don\'t forget to restart `gpg-agent` for the changes to take
affect:

``` shell
gpg-connect-agent reloadagent /bye
```