workstation: drop gpg in favor of SSH key

This commit is contained in:
Victor Mignot 2024-12-03 09:53:55 +01:00
parent a4de24b987
commit 6fb9bb1a6b
Signed by: dala
SSH key fingerprint: SHA256:+3O9MhlDc2tJL0n+E+Myr7nL+74DP9AXdIXHmIqZTkY
4 changed files with 12 additions and 32 deletions

View file

@ -24,7 +24,7 @@ in
./desktop
./development
./fish.nix
./gpg.nix
./ssh.nix
./communication.nix
./mail.nix
./helix.nix

View file

@ -25,14 +25,15 @@ with lib;
package = pkgs.gitAndTools.gitFull;
userName = "Victor Mignot";
userEmail = "dala@dalaran.fr";
signing = mkIf config.my.pgp.enable {
key = "BEAFED3D";
signing = {
key = "~/.ssh/id_ed25519_sk.pub";
signByDefault = true;
};
extraConfig = {
init = {
defaultBranch = "main";
};
gpg.format = "ssh";
core = {
editor = "${pkgs.helix}/bin/hx";
};

View file

@ -1,29 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
{
options.my.pgp.enable = mkOption {
type = types.bool;
default = true;
example = false;
description = ''
Add GPG keyring and GPG Agent configuration.
'';
};
config = mkIf config.my.pgp.enable {
programs.gpg.enable = true;
services.gpg-agent = {
enable = true;
enableScDaemon = true;
enableSshSupport = true;
sshKeys = [ "40DE2FEE4D3C5E2C" ];
pinentryPackage = pkgs.pinentry-curses;
};
};
}

View file

@ -0,0 +1,8 @@
{ ... }:
{
services.ssh-agent.enable = true;
programs.ssh = {
enable = true;
forwardAgent = true;
};
}