Skip to main content

Module exec

Module exec 

Source

Functions§

brew_available
Check whether the brew binary is available.
brew_cask_info
Check if a brew cask exists and return its version.
brew_formula_info
Check if a brew formula exists and return its version.
brew_leaves
List installed brew formulae (top-level only, not deps).
brew_list_casks
List installed brew casks.
captured_text
Convert captured stdout/stderr into integration-safe text.
darwin_rebuild_build
Run darwin-rebuild build (for diff). No sudo needed — build only.
darwin_rebuild_rollback
Run darwin-rebuild –rollback (requires sudo for system activation).
darwin_rebuild_switch
Run darwin-rebuild switch (requires sudo for system activation). After a successful switch, re-registers nix .app bundles with LaunchServices so Spotlight displays correct icons.
ensure_profile_dirs
Ensure home-manager profile directories exist. Determinate Nix on fresh macOS doesn’t create per-user profile dirs, which causes home-manager to fail with “Could not find suitable profile directory”. Also fixes ~/.local ownership if the install script created it as root.
find_nix
Resolve the path to the nix binary. Checks well-known locations first, then falls back to PATH-based lookup. Preferring hardcoded paths prevents PATH-based binary injection.
git_commit
Stage all changes and commit in a git repo. Warns on failure instead of returning an error, since git may not be configured in all environments.
nix_command
nix_diff_closures
Show diff between current system and new build.
nix_eval_exists
Validate that a nix package attribute exists in nixpkgs.
nix_eval_version
Get the version of a nix package from nixpkgs. Returns None if not found.
nix_experimental_args
nix_flake_update
Run nix flake update.
nix_gc
Garbage collect nix store and remove old generations.
nix_search
Search nixpkgs for packages matching a query.
nix_shell
Run nix shell for an ephemeral package.
nixos_rebuild_build
Run nixos-rebuild build (for diff). No sudo needed — build only.
nixos_rebuild_rollback
Run nixos-rebuild –rollback (requires sudo for system activation).
nixos_rebuild_switch
Run nixos-rebuild switch (requires sudo for system activation).
system_rebuild_build
Platform-aware system rebuild build.
system_rebuild_rollback
Platform-aware system rebuild rollback.
system_rebuild_switch
Platform-aware system rebuild switch. Dispatches to darwin-rebuild or nixos-rebuild.