diff --git a/configuration.nix b/configuration.nix index a558f72..4a8417a 100644 --- a/configuration.nix +++ b/configuration.nix @@ -70,6 +70,10 @@ desktopManager.wallpaper.mode = "fill"; }; + imports = [ + ./programm_configs/yubikey-gpg.nix + ]; + services.gvfs.enable = true; # Configure console keymap diff --git a/programm_configs/git.nix b/programm_configs/git.nix index 344e202..e548548 100644 --- a/programm_configs/git.nix +++ b/programm_configs/git.nix @@ -3,5 +3,9 @@ enable = true; userName = "CDaut"; userEmail = "git@cdaut.de"; + signing = { + signByDefault = true; + key = null; + }; }; } \ No newline at end of file diff --git a/programm_configs/yubikey-gpg.nix b/programm_configs/yubikey-gpg.nix new file mode 100644 index 0000000..0701a4c --- /dev/null +++ b/programm_configs/yubikey-gpg.nix @@ -0,0 +1,24 @@ +{ config, lib, pkgs, ... }: + +{ + + services.pcscd.enable = true; + programs.ssh.startAgent = false; + + environment.systemPackages = with pkgs; [ + yubikey-personalization + ]; + + services.udev.packages = [ pkgs.yubikey-personalization ]; + + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + environment.shellInit = '' + gpg-connect-agent /bye + export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + ''; + +} \ No newline at end of file