Compare

8f71fac972b4fe5a98459148d9b33d1748deaa7f .. 1b39fcad8bea4beb8058fe2514a71ab9033b0558 · 1 commits

Changed files

FileChanges
users/ryan/home.nix +22 −13 raw

Commits

HashSubjectAuthorDate
1b39fcad Fix gpg-agent woe Ryan Schanzenbacher
diff --git a/users/ryan/home.nix b/users/ryan/home.nix
index de34c60..ffbab67 100644
--- a/users/ryan/home.nix
+++ b/users/ryan/home.nix
@@ -164,19 +164,28 @@
targets.darwin.linkApps.directory = "Applications/User Apps";
# Symlink System apps into the user apps "system" dir
- home.activation.linkSystemApps = lib.hm.dag.entryAfter ["writeBoundary"] ''
- if [[ -z "$HOME" ]]; then
- echo "ERROR: HOME was not defined. This should not happen. Bailing! ">&2
- exit 1
- fi
-
- $DRY_RUN_CMD mkdir -p "$HOME/Applications/System Apps"
-
- $DRY_RUN_CMD rm -rf "$HOME/Applications/System Apps/"*.app
-
- $DRY_RUN_CMD find /Applications /System/Applications -maxdepth 2 -name "*.app" \
- -prune -exec ln -sf {} "$HOME/Applications/System Apps/" \;
- '';
+ home.activation.linkSystemApps = lib.mkIf pkgs.stdenv.isDarwin (
+ lib.hm.dag.entryAfter ["writeBoundary"] ''
+ if [[ -z "$HOME" ]]; then
+ echo "ERROR: HOME was not defined. This should not happen. Bailing! ">&2
+ exit 1
+ fi
+
+ $DRY_RUN_CMD mkdir -p "$HOME/Applications/System Apps"
+
+ $DRY_RUN_CMD rm -rf "$HOME/Applications/System Apps/"*.app
+
+ $DRY_RUN_CMD find /Applications /System/Applications -maxdepth 2 -name "*.app" \
+ -prune -exec ln -sf {} "$HOME/Applications/System Apps/" \;
+ ''
+ );
+
+ # Restart gpg-agent
+ home.activation.restartGpgAgent = lib.mkIf pkgs.stdenv.isDarwin (
+ lib.hm.dag.entryAfter ["writeBoundary"] ''
+ $DRY_RUN_CMD ${pkgs.gnupg}/bin/gpgconf --kill gpg-agent || true
+ ''
+ );
xdg.configFile."aerc" = {
source = ./aerc;