Home Gen447 @ 2025-02-12-14:28

This commit is contained in:
Jonas Röger 2025-02-12 14:29:00 +01:00
parent aa96e0eae8
commit cb28c3492a
2 changed files with 41 additions and 21 deletions

View File

@ -1,6 +1,7 @@
{ {
config, config,
pkgs, pkgs,
lib,
... ...
}: rec { }: rec {
imports = [ imports = [
@ -31,6 +32,11 @@
age.keyFile = "${home.homeDirectory}/.config/sops/age/keys.txt"; age.keyFile = "${home.homeDirectory}/.config/sops/age/keys.txt";
}; };
# Make session variables available in systemd units
# SEE: https://github.com/nix-community/home-manager/pull/5543
systemd.user.settings.Manager.DefaultEnvironment =
lib.mapAttrs (_: lib.mkDefault) config.home.sessionVariables;
xdg.mimeApps = { xdg.mimeApps = {
enable = true; enable = true;

View File

@ -1,29 +1,43 @@
{ {
config, config,
lib,
pkgs, pkgs,
... ...
}: { }: {
programs.gpg = { options.yubikey = with lib; {
enable = true; pinentry = mkOption {
mutableKeys = false; type = types.enum ["qt" "gnome3"];
mutableTrust = false; default = "qt";
publicKeys = [ description = "The pinentry flavour to use";
{ };
source = ../../static/keys/my_pub.asc;
trust = "ultimate";
}
];
}; };
services.gpg-agent = {
enable = true; config = {
enableSshSupport = true; programs.gpg = {
enableZshIntegration = true; enable = true;
pinentryPackage = pkgs.pinentry.qt; mutableKeys = false;
extraConfig = '' mutableTrust = false;
allow-emacs-pinentry publicKeys = [
''; {
}; source = ../../static/keys/my_pub.asc;
home.sessionVariables = { trust = "ultimate";
SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh"; }
];
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
enableZshIntegration = true;
pinentryPackage =
if config.yubikey.pinentry == "qt"
then pkgs.pinentry-qt
else pkgs.pinentry.gnome3;
extraConfig = ''
allow-emacs-pinentry
'';
};
home.sessionVariables = {
SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh";
};
}; };
} }