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