diff --git a/nixconf.sh b/nixconf.sh index 841be39..d9ad5fc 100644 --- a/nixconf.sh +++ b/nixconf.sh @@ -1,23 +1,27 @@ #!/bin/bash #nix-shell -p git -echo "replacing config" +echo "==================================================" +echo "replacing config" +echo "==================================================" cd /etc/nixos/ rm configuration.nix git clone https://dev.spittank.org/MK/NixConfig.git cp /etc/nixos/NixConfig/configuration.nix /etc/nixos/ rm -r /etc/nixos/NixConfig/ -#read -p "name the device number" number -#echo "$number" >> configuration.nix -echo "generating config" +echo "==================================================" +read -p "name the device number" number +sed -i "s/nixoslaptop/nixoslaptop$number/g" configuration.nix +echo "==================================================" +echo "generating config" +echo "==================================================" nixos-rebuild switch +echo "==================================================" while true; do read -p "reboot?" yn case $yn in [Yy]* ) reboot;; [Nn]* ) exit;; -* ) echo "Please answer yes or no";; +* ) echo "Please answer yes or no";; esac done - -