From 6c658d223681d42aff88950eaf92b9be4933c772 Mon Sep 17 00:00:00 2001 From: Franck Rasolo Date: Thu, 1 Aug 2024 17:46:24 +0200 Subject: [PATCH] work around for Homebrew clearing the password cache on every invocation https://github.com/Homebrew/brew/issues/17905#issuecomment-2258522878 --- darwin/bin/sudo | 5 +++++ darwin/configuration.nix | 2 ++ 2 files changed, 7 insertions(+) create mode 100755 darwin/bin/sudo diff --git a/darwin/bin/sudo b/darwin/bin/sudo new file mode 100755 index 0000000..560a0fc --- /dev/null +++ b/darwin/bin/sudo @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +if [ "$*" != "--reset-timestamp" ]; then + /usr/bin/sudo "$@" +fi diff --git a/darwin/configuration.nix b/darwin/configuration.nix index e26a996..26ac53e 100644 --- a/darwin/configuration.nix +++ b/darwin/configuration.nix @@ -83,6 +83,8 @@ }; system.activationScripts.preUserActivation.text = with pkgs.unstable; '' + export PATH=~/dev/dotfiles.nix/darwin/bin:$PATH + launchctl setenv XDG_CACHE_HOME ~/.xdg/cache launchctl setenv XDG_CONFIG_HOME ~/.xdg/config launchctl setenv XDG_DATA_HOME ~/.xdg/local/share