GPG
This module sets some defaults for gpg, mainly to let your gpg-agent handle ssh keys.
View the synix Home Manager module on Forgejo.
SSH Setup
GPG
You need a GPG authentication subkey. Follow the steps below to create one. If you already have a GPG key, skip to step 2.
1. Generate a new GPG key
- Select
1as the type of key. - Select
4096for the keysize. - Select
0to choose 'Never expire'. - Enter your name, email address, and a comment (if you want). Select
0for 'Okay'.
2. Create an authentication subkey
- At the new
gpg>prompt, enter:addkey - When prompted, enter your passphrase.
- When asked for the type of key you want, select: (8) RSA (set your own capabilities).
- Enter
Sto toggle the ‘Sign’ action off. - Enter
Eto toggle the ‘Encrypt’ action off. - Enter
Ato toggle the ‘Authenticate’ action on. The output should now include Current allowed actions: Authenticate, with nothing else on that line. - Enter
Qto continue. - When asked for a keysize, choose
4096. - Select
0to choose 'Never expire'. - Once the key is created, enter
quitto leave the gpg prompt, andyat the prompt to save changes.
HM config
imports = [
inputs.synix.homeModules.gpg
];
services.gpg-agent.sshKeys = [ "YOUR_AUTH_SUBKEY_KEYGRIP" ];
Get the keygrip of your authentication subkey with:
gpg -K --with-keygrip