mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-02-05 02:59:14 +01:00
fix critical error with new host variable
This commit is contained in:
parent
7877d6c4d6
commit
99371af2a8
@ -21,6 +21,7 @@
|
||||
outputs = inputs@{ nixpkgs, home-manager, impermanence, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
host = "default";
|
||||
inherit (import ./hosts/${host}/options.nix) username hostname;
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
|
@ -57,6 +57,7 @@ mkdir hosts/$hostName
|
||||
cp hosts/default/*.nix hosts/$hostName
|
||||
git add .
|
||||
sed -i "/^\s*setHostname[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$hostName\"/" ./hosts/$hostName/options.nix
|
||||
sed -i "/^\s*host[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$hostName\"/" ./flake.nix
|
||||
|
||||
echo "-----"
|
||||
|
||||
@ -211,19 +212,12 @@ sed -i "/^\s*flatpak[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$flatpaks\"/" ./h
|
||||
|
||||
echo "-----"
|
||||
|
||||
echo "Must be true or false."
|
||||
echo "Please check spelling before pressing Enter!"
|
||||
read -p "Enable Python & Pycharm Support: [ false ] " pythonEnable
|
||||
if [ -z "$pythonEnable" ]; then
|
||||
pythonEnable="false"
|
||||
fi
|
||||
user_input_lower=$(echo "$pythonEnable" | tr '[:upper:]' '[:lower:]')
|
||||
case $user_input_lower in
|
||||
y|yes|true|t|enable)
|
||||
pythonEnable="true"
|
||||
;;
|
||||
*)
|
||||
pythonEnable="false"
|
||||
;;
|
||||
esac
|
||||
sed -i "/^\s*python[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$pythonEnable\"/" ./hosts/$hostName/options.nix
|
||||
|
||||
echo "-----"
|
||||
@ -303,5 +297,6 @@ echo "Please use responsibly."
|
||||
echo "-----"
|
||||
|
||||
echo "System is now going to reboot"
|
||||
# sleep 2
|
||||
# systemctl reboot
|
||||
echo "Control + C to cancel..."
|
||||
sleep 2
|
||||
systemctl reboot
|
||||
|
Loading…
Reference in New Issue
Block a user