workstation: drop gpg in favor of SSH key
This commit is contained in:
parent
a4de24b987
commit
6fb9bb1a6b
4 changed files with 12 additions and 32 deletions
|
@ -24,7 +24,7 @@ in
|
|||
./desktop
|
||||
./development
|
||||
./fish.nix
|
||||
./gpg.nix
|
||||
./ssh.nix
|
||||
./communication.nix
|
||||
./mail.nix
|
||||
./helix.nix
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
8
modules/workstation/home-manager/ssh.nix
Normal file
8
modules/workstation/home-manager/ssh.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.ssh-agent.enable = true;
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
forwardAgent = true;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue