Move gpg into home-manager
This commit is contained in:
parent
175be8db19
commit
a22a3f390b
|
@ -14,6 +14,7 @@ with lib; with nLib; {
|
|||
./programs/image-editing.nix
|
||||
./programs/media.nix
|
||||
./programs/wine.nix
|
||||
./programs/gpg.nix
|
||||
./services/syncthing.nix
|
||||
./services/email.nix
|
||||
];
|
||||
|
@ -36,6 +37,8 @@ with lib; with nLib; {
|
|||
util = {
|
||||
# Wine support, disabled by default
|
||||
wine = mkEnableOption "wine";
|
||||
# GPG support, enabled by default on desktop
|
||||
gpg = mkEnableOptionT "gpg";
|
||||
};
|
||||
devel = {
|
||||
jvm = mkDefaultOption "JVM Development Utilites" config.nathan.config.isDesktop;
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.nathan.programs.util.gpg {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
};
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
enableExtraSocket = true;
|
||||
extraConfig = ''
|
||||
allow-emacs-pinentry
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -6,29 +6,6 @@ in
|
|||
with lib;
|
||||
{
|
||||
config = mkIf np.gpg {
|
||||
# Setup environment for gpg agent
|
||||
environment.shellInit = ''
|
||||
export GPG_TTY="$(tty)"
|
||||
gpg-connect-agent /bye
|
||||
export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
|
||||
'';
|
||||
|
||||
environment.sessionVariables = {
|
||||
SSH_AUTH_SOCK =
|
||||
"/run/user/1000/gnupg/S.gpg-agent.ssh";
|
||||
};
|
||||
|
||||
programs = {
|
||||
# Disable ssh-agent, the gpg-agent will fill in
|
||||
ssh.startAgent = false;
|
||||
# Enable gpg-agent with ssh support
|
||||
gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
enableExtraSocket = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Enable ykpersonalize to work
|
||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||
# Enable smartcard service
|
||||
|
|
Loading…
Reference in New Issue