Adopt Home Manager; manage starship, nix.conf, and opencode config

This commit is contained in:
2026-10-08 22:17:14 +00:00
commit 40abf86655
12 changed files with 465 additions and 0 deletions
Executable
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Install this repo's system nix.conf into place. Idempotent.
#
# sudo ./install.sh update /etc/nix/nix.conf (backs up the current one)
#
# The user-level ~/.config/nix/nix.conf is managed declaratively by Home
# Manager (see home/default.nix).
set -euo pipefail
repo_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
conf_file="$repo_dir/config/nix.conf"
target=/etc/nix/nix.conf
if [ ! -d "$(dirname "$target")" ]; then
sudo mkdir -p "$(dirname "$target")"
fi
if [ -f "$target" ] && ! cmp -s "$conf_file" "$target"; then
sudo cp -a "$target" "$target.bak.$(date +%Y%m%d%H%M%S)"
fi
sudo cp "$conf_file" "$target"
echo "installed $target"