fix: create directory and add to version control so nix flake sees
parent
9ec0aa5e84
commit
88cde1a5b5
|
@ -15,10 +15,13 @@ echo "SCRIPT_DIR: ${SCRIPT_DIR}"
|
|||
SYSNIX_DIR="${SCRIPT_DIR}/../system-nix"
|
||||
|
||||
# Copy hardware-configuration of existing machine onto our version control
|
||||
HARDWARE_CONF="${SYSNIX_DIR}/profiles/${HOSTNAME}/hardware-configuration.nix"
|
||||
if [ ! -f ${HARDWARE_CONF} ];
|
||||
SYSNIX_PROF="${SYSNIX_DIR}/profiles/${HOSTNAME}"
|
||||
HARDWARE_CONF="${SYSNIX_PROF}/hardware-configuration.nix"
|
||||
if [ ! -f "${HARDWARE_CONF}" ]; then;
|
||||
mkdir "$SYSNIX_PROF"
|
||||
sudo cp /etc/nixos/hardware-configuration.nix ${HARDWARE_CONF}
|
||||
fi
|
||||
git add "${HARDWARE_CONF}"
|
||||
|
||||
echo "Apply nixos-rebuild"
|
||||
sudo nixos-rebuild switch --flake "${SYSNIX_DIR}#${HOSTNAME}"
|
||||
|
|
Loading…
Reference in New Issue