mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-06-25 22:41:54 +02: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, ... }:
|
outputs = inputs@{ nixpkgs, home-manager, impermanence, ... }:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
host = "default";
|
||||||
inherit (import ./hosts/${host}/options.nix) username hostname;
|
inherit (import ./hosts/${host}/options.nix) username hostname;
|
||||||
|
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
|
@ -57,6 +57,7 @@ mkdir hosts/$hostName
|
|||||||
cp hosts/default/*.nix hosts/$hostName
|
cp hosts/default/*.nix hosts/$hostName
|
||||||
git add .
|
git add .
|
||||||
sed -i "/^\s*setHostname[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$hostName\"/" ./hosts/$hostName/options.nix
|
sed -i "/^\s*setHostname[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$hostName\"/" ./hosts/$hostName/options.nix
|
||||||
|
sed -i "/^\s*host[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$hostName\"/" ./flake.nix
|
||||||
|
|
||||||
echo "-----"
|
echo "-----"
|
||||||
|
|
||||||
@ -211,19 +212,12 @@ sed -i "/^\s*flatpak[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$flatpaks\"/" ./h
|
|||||||
|
|
||||||
echo "-----"
|
echo "-----"
|
||||||
|
|
||||||
|
echo "Must be true or false."
|
||||||
|
echo "Please check spelling before pressing Enter!"
|
||||||
read -p "Enable Python & Pycharm Support: [ false ] " pythonEnable
|
read -p "Enable Python & Pycharm Support: [ false ] " pythonEnable
|
||||||
if [ -z "$pythonEnable" ]; then
|
if [ -z "$pythonEnable" ]; then
|
||||||
pythonEnable="false"
|
pythonEnable="false"
|
||||||
fi
|
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
|
sed -i "/^\s*python[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$pythonEnable\"/" ./hosts/$hostName/options.nix
|
||||||
|
|
||||||
echo "-----"
|
echo "-----"
|
||||||
@ -303,5 +297,6 @@ echo "Please use responsibly."
|
|||||||
echo "-----"
|
echo "-----"
|
||||||
|
|
||||||
echo "System is now going to reboot"
|
echo "System is now going to reboot"
|
||||||
# sleep 2
|
echo "Control + C to cancel..."
|
||||||
# systemctl reboot
|
sleep 2
|
||||||
|
systemctl reboot
|
||||||
|
Loading…
x
Reference in New Issue
Block a user