ok version

This commit is contained in:
afoucaultc 2026-07-05 19:09:01 +02:00
parent 059c33b908
commit 60ebe96728
7 changed files with 9 additions and 10 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
HOST="${1:-$(hostname)}"
USER_HOME=$(getent passwd "${SUDO_USER:-$USER}" | cut -d: -f6)
HOST="${1:-$(hostname)}" # trouve le host
USER_HOME=$(getent passwd "${SUDO_USER:-$USER}" | cut -d: -f6) # récupère le path du home
echo "→ Rebuild (sans update) : $HOST"
sudo nixos-rebuild switch --flake "path:$USER_HOME/nixos-config#$HOST"