From 5f1ae8a24f0976299d4a2e7b082ea9964f7fd324 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Thu, 20 Jun 2024 23:22:54 -0400 Subject: [PATCH] fix: better service restarting with launchctl --- nix/base-system/.zshrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nix/base-system/.zshrc b/nix/base-system/.zshrc index b4baa87..2ac1635 100644 --- a/nix/base-system/.zshrc +++ b/nix/base-system/.zshrc @@ -14,6 +14,9 @@ if [ -f "$HOME/Library/Application Support/dnvm/env" ]; then fi function service_restart() { - launchctl stop $1 - launchctl start $1 + launchctl kickstart -k -p $1 +} + +function root_shell() { + sudo -E zsh -i /etc/zshrc }