From 89b790dcfae31f79ff8382b08ef720aaf961cc08 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Wed, 13 Nov 2024 01:35:46 +0800 Subject: [PATCH] feat: update justfile --- Justfile | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Justfile b/Justfile index 119ee05b3..0b0926f5b 100644 --- a/Justfile +++ b/Justfile @@ -81,6 +81,19 @@ fmt: gcroot: ls -al /nix/var/nix/gcroots/auto/ +# Verify all the store entries +# Nix Store can contains corrupted entries if the nix store object has been modified unexpectedly. +# This command will verify all the store entries, +# and we need to fix the corrupted entries manually via `sudo nix store delete ...` +[group('nix')] +verify-store: + nix store verify --all + +# Repair Nix Store Objects +[group('nix')] +repair-store *paths: + nix store repair {{paths}} + ############################################################################ # # NixOS Desktop related commands @@ -138,12 +151,12 @@ fe mode="default": darwin-set-proxy darwin-build "fern" {{mode}}; darwin-switch "fern" {{mode}} -# Reload yabai and skhd(macOS) +# Reset launchpad to force it to reindex Applications [macos] [group('desktop')] -yabai-reload: - launchctl kickstart -k "gui/502/org.nixos.yabai"; - launchctl kickstart -k "gui/502/org.nixos.skhd"; +reset-launchpad: + defaults write com.apple.dock ResetLaunchPad -bool true + killall Dock ############################################################################ #