Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
d891f73
refactor: extract all inline home.activation scripts to bash files
shunkakinoki Apr 12, 2026
484b173
chore: format shell scripts
shunkakinoki Apr 12, 2026
92cee4f
Merge branch 'main' into refactor/extract-activation-scripts
shunkakinoki Apr 12, 2026
8980fa8
fix: add shellcheck disable directives for SC2016 and SC2012
shunkakinoki Apr 12, 2026
f7b7738
fix: tighten activation inline checker per codex review
shunkakinoki Apr 12, 2026
bd4f90b
chore: format obsidian config
shunkakinoki Apr 12, 2026
1144962
refactor: extract git-ai and obsidian configs to tracked JSON files
shunkakinoki Apr 12, 2026
a2a71c0
refactor: rename obsidian config.json to obsidian.json
shunkakinoki Apr 12, 2026
53b9d51
refactor: add nix-trust dependency to nix-build target
shunkakinoki Apr 12, 2026
41041d4
refactor: add 'act' to the package list in default.nix
shunkakinoki Apr 12, 2026
533f320
refactor: quote arguments in activation scripts for improved safety a…
shunkakinoki Apr 12, 2026
39ac87d
refactor: align indentation in check_nix_inline_scripts_spec.sh for c…
shunkakinoki Apr 12, 2026
b626b35
refactor: add shellcheck disable comments for quoting in activation s…
shunkakinoki Apr 12, 2026
044fce8
refactor: update shellcheck disable comments for consistency in spec …
shunkakinoki Apr 12, 2026
832420a
refactor: remove unnecessary shellcheck disable comments for quoting …
shunkakinoki Apr 12, 2026
21dbf5a
refactor: exclude additional paths from ShellCheck in Makefile
shunkakinoki Apr 12, 2026
860d305
refactor: update .gitignore for dotagents configuration and improve s…
shunkakinoki Apr 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions config/claude/activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Copy Claude settings.json (git-ai needs write access, breaks with symlinks)
# Usage: activate.sh <settings_json>
set -euo pipefail
SETTINGS_JSON="$1"

mkdir -p ~/.claude
cp -f "$SETTINGS_JSON" ~/.claude/settings.json
chmod 644 ~/.claude/settings.json
6 changes: 2 additions & 4 deletions config/claude/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{ lib, ... }:
{ lib, pkgs, ... }:
{
# Use activation script for settings.json instead of symlink
# git-ai install-hooks needs write access, which breaks with Nix store symlinks
home.activation.claudeConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
$DRY_RUN_CMD mkdir -p ~/.claude
$DRY_RUN_CMD cp -f ${./settings.json} ~/.claude/settings.json
$DRY_RUN_CMD chmod 644 ~/.claude/settings.json
$DRY_RUN_CMD ${pkgs.bash}/bin/bash ${./activate.sh} ${./settings.json}
'';

home.file.".claude/hooks/pushover.sh" = {
Expand Down
12 changes: 12 additions & 0 deletions config/codex/activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Copy Codex config files (atomic writes break symlinks)
# Usage: activate.sh <config_toml> <hooks_json>
set -euo pipefail
CONFIG_TOML="$1"
HOOKS_JSON="$2"

mkdir -p ~/.codex/hooks
cp -f "$CONFIG_TOML" ~/.codex/config.toml
chmod 600 ~/.codex/config.toml
cp -f "$HOOKS_JSON" ~/.codex/hooks.json
chmod 644 ~/.codex/hooks.json
8 changes: 2 additions & 6 deletions config/codex/default.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{ lib, ... }:
{ lib, pkgs, ... }:
{
# Use activation script instead of home.file symlink
# Codex CLI uses atomic writes that break symlinks, so we force-copy on each switch
home.activation.codexConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
$DRY_RUN_CMD mkdir -p ~/.codex/hooks
$DRY_RUN_CMD cp -f ${./config.toml} ~/.codex/config.toml
$DRY_RUN_CMD chmod 600 ~/.codex/config.toml
$DRY_RUN_CMD cp -f ${./hooks.json} ~/.codex/hooks.json
$DRY_RUN_CMD chmod 644 ~/.codex/hooks.json
$DRY_RUN_CMD ${pkgs.bash}/bin/bash ${./activate.sh} ${./config.toml} ${./hooks.json}
'';

home.file.".codex/hooks/notify.sh" = {
Expand Down
9 changes: 9 additions & 0 deletions config/cursor/activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Copy Cursor hooks.json (git-ai needs write access, breaks with symlinks)
# Usage: activate.sh <hooks_json>
set -euo pipefail
HOOKS_JSON="$1"

mkdir -p ~/.cursor
cp -f "$HOOKS_JSON" ~/.cursor/hooks.json
chmod 644 ~/.cursor/hooks.json
6 changes: 2 additions & 4 deletions config/cursor/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{ lib, ... }:
{ lib, pkgs, ... }:
{
# Use activation script instead of symlink
# git-ai install-hooks needs write access, which breaks with Nix store symlinks
home.activation.cursorHooks = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
$DRY_RUN_CMD mkdir -p ~/.cursor
$DRY_RUN_CMD cp -f ${./hooks.json} ~/.cursor/hooks.json
$DRY_RUN_CMD chmod 644 ~/.cursor/hooks.json
$DRY_RUN_CMD ${pkgs.bash}/bin/bash ${./activate.sh} ${./hooks.json}
'';
}
11 changes: 11 additions & 0 deletions config/gemini/activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Copy Gemini settings.json if it doesn't already exist
# Usage: activate.sh <settings_json>
set -euo pipefail
SETTINGS_JSON="$1"

mkdir -p "$HOME/.gemini"
if [ ! -f "$HOME/.gemini/settings.json" ]; then
cp "$SETTINGS_JSON" "$HOME/.gemini/settings.json"
chmod 644 "$HOME/.gemini/settings.json"
fi
11 changes: 2 additions & 9 deletions config/gemini/default.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
{ config, ... }:
let
geminiSettingsSource = ./settings.json;
in
{ config, pkgs, ... }:
{
# Use activation script to copy settings.json instead of symlinking
# This allows ruler and other tools to modify the file
home.activation.geminiSettings = config.lib.dag.entryAfter [ "writeBoundary" ] ''
mkdir -p "$HOME/.gemini"
if [ ! -f "$HOME/.gemini/settings.json" ]; then
$DRY_RUN_CMD cp ${geminiSettingsSource} "$HOME/.gemini/settings.json"
$DRY_RUN_CMD chmod 644 "$HOME/.gemini/settings.json"
fi
$DRY_RUN_CMD ${pkgs.bash}/bin/bash ${./activate.sh} ${./settings.json}
'';
}
23 changes: 23 additions & 0 deletions config/k3s/activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Sync k3s config to /etc/rancher/k3s/ (requires sudo)
set -euo pipefail

if [ ! -f "$HOME/.config/k3s/config.yaml" ]; then
exit 0
fi

SUDO_CMD=""
if command -v sudo >/dev/null 2>&1; then
SUDO_CMD="sudo"
elif [ -x /run/wrappers/bin/sudo ]; then
SUDO_CMD="/run/wrappers/bin/sudo"
elif [ -x /usr/bin/sudo ]; then
SUDO_CMD="/usr/bin/sudo"
fi
Comment on lines +9 to +16

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The sudo detection logic is duplicated across multiple activation scripts (k3s, bin-shells, tailscale, ip-forwarding). This logic should be refactored into a shared helper script in home-manager/activation/ to improve maintainability and ensure consistent behavior (e.g., consistent support for doas and error handling).


if [ -n "$SUDO_CMD" ]; then
$SUDO_CMD mkdir -p /etc/rancher/k3s
$SUDO_CMD cp "$HOME/.config/k3s/config.yaml" /etc/rancher/k3s/config.yaml
else
echo "Warning: sudo not found, skipping k3s config installation" >&2
fi
19 changes: 1 addition & 18 deletions config/k3s/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,7 @@
# Activation script to sync config to /etc/rancher/k3s/
home.activation.k3s-config = lib.mkIf pkgs.stdenv.isLinux (
config.lib.dag.entryAfter [ "writeBoundary" ] ''
if [ -f "$HOME/.config/k3s/config.yaml" ]; then
# Find sudo (NixOS uses /run/wrappers/bin/sudo)
SUDO_CMD=""
if command -v sudo >/dev/null 2>&1; then
SUDO_CMD="sudo"
elif [ -x /run/wrappers/bin/sudo ]; then
SUDO_CMD="/run/wrappers/bin/sudo"
elif [ -x /usr/bin/sudo ]; then
SUDO_CMD="/usr/bin/sudo"
fi

if [ -n "$SUDO_CMD" ]; then
$DRY_RUN_CMD $SUDO_CMD mkdir -p /etc/rancher/k3s
$DRY_RUN_CMD $SUDO_CMD cp "$HOME/.config/k3s/config.yaml" /etc/rancher/k3s/config.yaml
else
echo "Warning: sudo not found, skipping k3s config installation" >&2
fi
fi
$DRY_RUN_CMD ${pkgs.bash}/bin/bash ${./activate.sh}
''
);
}
10 changes: 10 additions & 0 deletions config/omp/activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Copy OMP config and set up extension symlink
# Usage: activate.sh <config_yml>
set -euo pipefail
CONFIG_YML="$1"

mkdir -p ~/.omp/agent ~/.omp/agent/extensions
cp -f "$CONFIG_YML" ~/.omp/agent/config.yml
chmod 644 ~/.omp/agent/config.yml
ln -sfn "$HOME/dotfiles/node_modules/@oh-my-pi/swarm-extension" ~/.omp/agent/extensions/swarm-extension
7 changes: 2 additions & 5 deletions config/omp/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{ lib, ... }:
{ lib, pkgs, ... }:
{
# Use activation script instead of home.file symlink.
# Keep only the tracked config.yml in dotfiles and leave runtime state untouched.
home.activation.ompConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
$DRY_RUN_CMD mkdir -p ~/.omp/agent ~/.omp/agent/extensions
$DRY_RUN_CMD cp -f ${./config.yml} ~/.omp/agent/config.yml
$DRY_RUN_CMD chmod 644 ~/.omp/agent/config.yml
$DRY_RUN_CMD ln -sfn "$HOME/dotfiles/node_modules/@oh-my-pi/swarm-extension" ~/.omp/agent/extensions/swarm-extension
$DRY_RUN_CMD ${pkgs.bash}/bin/bash ${./activate.sh} ${./config.yml}
'';
}
1 change: 0 additions & 1 deletion config/openclaw/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ in
# Hydrate OpenClaw config from .env secrets
# Gateway mode on Kyber, client mode everywhere else
home.activation.hydrateOpenclawConfig = config.lib.dag.entryAfter [ "writeBoundary" ] ''
mkdir -p ${homeDir}/.openclaw
${pkgs.bash}/bin/bash ${hydrateScript} || true
'';
}
1 change: 1 addition & 0 deletions config/openclaw/hydrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set -euo pipefail

MODE="@mode@"
STATE_DIR="${OPENCLAW_STATE_DIR:-${HOME}/.openclaw}"
mkdir -p "$STATE_DIR"
CONFIG="${OPENCLAW_CONFIG_PATH:-${STATE_DIR}/openclaw.json}"
TEMPLATE="@template@"
SECRETS_DIR="${HOME}/.config/openclaw"
Expand Down
13 changes: 13 additions & 0 deletions config/serena/activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Copy Serena config if missing or is a symlink
# Usage: activate.sh <source> <dest>
set -euo pipefail
SRC="$1"
DEST="$2"

mkdir -p "$(dirname "$DEST")"
if [ ! -f "$DEST" ] || [ -L "$DEST" ]; then
rm -f "$DEST"
cp "$SRC" "$DEST"
chmod u+w "$DEST"
fi
10 changes: 2 additions & 8 deletions config/serena/default.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
{ config, ... }:
{ config, pkgs, ... }:
let
serenaConfigSrc = ./serena_config.yml;
serenaConfigDest = "${config.home.homeDirectory}/.serena/serena_config.yml";
in
{
home.activation.serenaConfig = config.lib.dag.entryAfter [ "writeBoundary" ] ''
mkdir -p "$(dirname "${serenaConfigDest}")"
if [ ! -f "${serenaConfigDest}" ] || [ -L "${serenaConfigDest}" ]; then
rm -f "${serenaConfigDest}"
cp "${serenaConfigSrc}" "${serenaConfigDest}"
chmod u+w "${serenaConfigDest}"
fi
$DRY_RUN_CMD ${pkgs.bash}/bin/bash ${./activate.sh} ${./serena_config.yml} "${serenaConfigDest}"
'';
}
25 changes: 25 additions & 0 deletions home-manager/activation/deploy-agenix-secret.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Decrypt and deploy an agenix secret if destination doesn't exist
# Usage: deploy-agenix-secret.sh <dest_path> <secret_file> <identity_key> <rage_bin>
set -euo pipefail
DEST="$1"
SECRET_FILE="$2"
IDENTITY_KEY="$3"
RAGE_BIN="$4"

if [[ -f "$DEST" ]]; then
exit 0
fi

echo "Deploying secret from agenix..."
if [[ ! -f "$SECRET_FILE" ]]; then
echo "Warning: Secret file not found at $SECRET_FILE" >&2
exit 0
fi

if "$RAGE_BIN" -d -i "$IDENTITY_KEY" "$SECRET_FILE" -o "$DEST" 2>/dev/null; then
chmod 0600 "$DEST"
echo "Secret deployed successfully"
else
echo "Warning: SSH key not authorized to decrypt - skipping" >&2
fi
9 changes: 9 additions & 0 deletions home-manager/activation/ensure-directory.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Create directories with specified permissions
# Usage: ensure-directory.sh <mode> <dir1> [dir2...]
set -euo pipefail
MODE="$1"; shift
for DIR in "$@"; do
mkdir -p "$DIR"
chmod "$MODE" "$DIR"
done
28 changes: 28 additions & 0 deletions home-manager/activation/import-gpg-key.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# Import GPG key from agenix-encrypted file
# Usage: import-gpg-key.sh <gpg_secret_file> <identity_key> <agenix_dir> <rage_bin> <gpg_bin> <key_fingerprint>
set -euo pipefail
GPG_SECRET_FILE="$1"
IDENTITY_KEY="$2"
AGENIX_DIR="$3"
RAGE_BIN="$4"
GPG_BIN="$5"
KEY_FINGERPRINT="$6"
GPG_TEMP_FILE="$AGENIX_DIR/gpg.key"

mkdir -p "$AGENIX_DIR"

if [[ ! -f "$GPG_SECRET_FILE" ]]; then
exit 0
fi

if "$GPG_BIN" --list-secret-keys 2>/dev/null | grep -q "$KEY_FINGERPRINT"; then
exit 0
fi

echo "Importing GPG key from agenix..."
if "$RAGE_BIN" -d -i "$IDENTITY_KEY" -o "$GPG_TEMP_FILE" "$GPG_SECRET_FILE" 2>/dev/null; then
"$GPG_BIN" --batch --import "$GPG_TEMP_FILE" 2>/dev/null

@cubic-dev-ai cubic-dev-ai Bot Apr 12, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Ensure the decrypted temp key file is removed even when GPG import fails; with set -e, the current order can leave sensitive key material on disk.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At home-manager/activation/import-gpg-key.sh, line 25:

<comment>Ensure the decrypted temp key file is removed even when GPG import fails; with `set -e`, the current order can leave sensitive key material on disk.</comment>

<file context>
@@ -0,0 +1,28 @@
+
+echo "Importing GPG key from agenix..."
+if "$RAGE_BIN" -d -i "$IDENTITY_KEY" -o "$GPG_TEMP_FILE" "$GPG_SECRET_FILE" 2>/dev/null; then
+  "$GPG_BIN" --batch --import "$GPG_TEMP_FILE" 2>/dev/null
+  rm -f "$GPG_TEMP_FILE"
+  echo "GPG key imported successfully"
</file context>
Fix with Cubic

rm -f "$GPG_TEMP_FILE"
echo "GPG key imported successfully"
fi
Comment on lines +23 to +28

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

The decrypted GPG private key is written to a temporary file on disk. If the script is interrupted or if the gpg --import command fails, this sensitive file may not be deleted, potentially exposing the private key. It is recommended to use a trap to ensure cleanup.

Suggested change
echo "Importing GPG key from agenix..."
if "$RAGE_BIN" -d -i "$IDENTITY_KEY" -o "$GPG_TEMP_FILE" "$GPG_SECRET_FILE" 2>/dev/null; then
"$GPG_BIN" --batch --import "$GPG_TEMP_FILE" 2>/dev/null
rm -f "$GPG_TEMP_FILE"
echo "GPG key imported successfully"
fi
echo "Importing GPG key from agenix..."
trap 'rm -f "$GPG_TEMP_FILE"' EXIT
if "$RAGE_BIN" -d -i "$IDENTITY_KEY" -o "$GPG_TEMP_FILE" "$GPG_SECRET_FILE" 2>/dev/null; then
"$GPG_BIN" --batch --import "$GPG_TEMP_FILE" 2>/dev/null
echo "GPG key imported successfully"
fi

38 changes: 38 additions & 0 deletions home-manager/modules/bin-shells/activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
# Create /bin shell symlinks on non-NixOS Linux systems
# Usage: activate.sh <bash_path> <fish_path> <zsh_path>
set -euo pipefail
BASH_PATH="$1"
FISH_PATH="$2"
ZSH_PATH="$3"

# Skip on NixOS - /bin symlinks are managed at the system level
if [ -f /etc/NIXOS ]; then
echo "Skipping /bin shell symlinks on NixOS (managed by system configuration)"
exit 0
fi

SUDO_CMD=""
if command -v sudo >/dev/null 2>&1; then
SUDO_CMD="sudo"
elif [ -x /run/wrappers/bin/sudo ]; then
SUDO_CMD="/run/wrappers/bin/sudo"
elif [ -x /usr/bin/sudo ]; then
SUDO_CMD="/usr/bin/sudo"
elif [ "$(id -u)" -ne 0 ]; then
echo "Creating /bin shell symlinks requires root privileges, but sudo is not available." >&2
exit 1
fi

run_root_cmd() {
if [ -n "$SUDO_CMD" ]; then
"$SUDO_CMD" "$@"
else
"$@"
fi
}

run_root_cmd mkdir -p /bin
run_root_cmd ln -sf "$BASH_PATH" /bin/bash
run_root_cmd ln -sf "$FISH_PATH" /bin/fish
run_root_cmd ln -sf "$ZSH_PATH" /bin/zsh
Comment on lines +36 to +38

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Overwriting /bin/bash with a symlink to the Nix store on a non-NixOS system is highly intrusive and risky. If the Nix store path becomes invalid or inaccessible, the system's primary shell will be broken, potentially preventing logins or breaking system scripts. It is generally safer to manage user shells via chsh or to provide the Nix-managed shells in the user's PATH rather than modifying system-wide paths in /bin.

30 changes: 1 addition & 29 deletions home-manager/modules/bin-shells/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,7 @@ in
{
config = lib.mkIf isLinux {
home.activation.binShells = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
# Skip on NixOS — /bin symlinks are managed at the system level
if [ -f /etc/NIXOS ]; then
echo "Skipping /bin shell symlinks on NixOS (managed by system configuration)"
else
SUDO_CMD=""
if command -v sudo >/dev/null 2>&1; then
SUDO_CMD="sudo"
elif [ -x /run/wrappers/bin/sudo ]; then
SUDO_CMD="/run/wrappers/bin/sudo"
elif [ -x /usr/bin/sudo ]; then
SUDO_CMD="/usr/bin/sudo"
elif [ "$(id -u)" -ne 0 ]; then
echo "Creating /bin shell symlinks requires root privileges, but sudo is not available." >&2
exit 1
fi

run_root_cmd() {
if [ -n "$SUDO_CMD" ]; then
''${DRY_RUN_CMD:-} "$SUDO_CMD" "$@"
else
''${DRY_RUN_CMD:-} "$@"
fi
}

run_root_cmd mkdir -p /bin
run_root_cmd ln -sf ${pkgs.bash}/bin/bash /bin/bash
run_root_cmd ln -sf ${pkgs.fish}/bin/fish /bin/fish
run_root_cmd ln -sf ${pkgs.zsh}/bin/zsh /bin/zsh
fi
$DRY_RUN_CMD ${pkgs.bash}/bin/bash ${./activate.sh} ${pkgs.bash}/bin/bash ${pkgs.fish}/bin/fish ${pkgs.zsh}/bin/zsh
'';
};
}
10 changes: 2 additions & 8 deletions home-manager/modules/cargo-globals/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,8 @@ in
{
# Install cargo global packages from Cargo.toml using home-manager activation
home.activation.installCargoGlobals = config.lib.dag.entryAfter [ "writeBoundary" ] ''
${lib.optionalString (!isDarwin) ''
if [ "$(${pkgs.systemd}/bin/systemctl is-system-running 2>/dev/null)" = "starting" ]; then
echo "System is booting, skipping cargo globals install"
exit 0
fi
''}
export PATH=${pkgs.rustup}/bin:${pkgs.cargo}/bin:${pkgs.rustc}/bin:${pkgs.dasel}/bin:${pkgs.jq}/bin:${pkgs.gcc}/bin:${pkgs.pkg-config}/bin:${pkgs.perl}/bin:$PATH
export CARGO_HOME="$HOME/.cargo"
$DRY_RUN_CMD ${pkgs.rustup}/bin/rustup toolchain install stable --no-self-update || true
$DRY_RUN_CMD ${pkgs.rustup}/bin/rustup default stable || true
export PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig${libiconvPkgConfigPath}''${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
export OPENSSL_DIR="${pkgs.openssl.dev}"
export OPENSSL_LIB_DIR="${pkgs.openssl.out}/lib"
Expand All @@ -33,6 +25,8 @@ in
${lib.optionalString isDarwin ''export CPATH="${libiconvCPath}''${CPATH:+:$CPATH}"''}
${lib.optionalString isDarwin ''export LDFLAGS="${libiconvLdFlags}''${LDFLAGS:-}"''}
${lib.optionalString isDarwin ''export CPPFLAGS="${libiconvCppFlags}''${CPPFLAGS:-}"''}
${lib.optionalString (!isDarwin) ''export SYSTEMCTL_BIN="${pkgs.systemd}/bin/systemctl"''}
export RUSTUP_BIN="${pkgs.rustup}/bin/rustup"
$DRY_RUN_CMD ${pkgs.bash}/bin/bash ${./install-cargo-globals.sh}
'';

Expand Down
Loading
Loading