Replies: 5 comments 1 reply
-
This is what's failing inside the bin/apply command: # Function to replace tokens in each file
replace_tokens() {
local file="$1"
if [[ $(basename $1) != "apply" ]]; then
if [[ "$OS" == "Darwin" ]]; then
# macOS
LC_ALL=C LANG=C sed -i '' -e "s/%USER%/$USERNAME/g" "$file"
LC_ALL=C LANG=C sed -i '' -e "s/%EMAIL%/$GIT_EMAIL/g" "$file"
LC_ALL=C LANG=C sed -i '' -e "s/%NAME%/$GIT_NAME/g" "$file"
else
# Linux or other
sed -i -e "s/%USER%/$USERNAME/g" "$file"
sed -i -e "s/%EMAIL%/$GIT_EMAIL/g" "$file"
sed -i -e "s/%NAME%/$GIT_NAME/g" "$file"
sed -i -e "s/%INTERFACE%/$PRIMARY_IFACE/g" "$file"
sed -i -e "s/%DISK%/$BOOT_DISK/g" "$file"
sed -i -e "s/%HOST%/$HOST_NAME/g" "$file"
fi
fi
}
# Traverse directories and call replace_tokens on each Nix file
export -f replace_tokens
find . -type f -exec bash -c 'replace_tokens "$0"' {} \; I can test this again, maybe something changed. But need a little bit of time. |
Beta Was this translation helpful? Give feedback.
-
Oh, try this first: Initialize the flake in it's own directory. You're running everything out of your home directory, so the scripts are trying to manipulate other files. |
Beta Was this translation helpful? Give feedback.
-
I updated the instructions to be: mkdir -p nixos-config && (cd nixos-config && nix flake init -t github:dustinlyons/nixos-config#starter) |
Beta Was this translation helpful? Give feedback.
-
Thanks @dustinlyons . With the latest updates it has all worked perfectly! Really appreciate it |
Beta Was this translation helpful? Give feedback.
-
Great to hear! |
Beta Was this translation helpful? Give feedback.
-
Hi @dustinlyons ,
Thanks so much for this project and instructions.
Im a nix / nixos rookie and im struggling to install it on a VM (parallels) running MacOS Sonoma from my MacOS machine.
Steps 1 to 3 seems to be going fine however when I try to run the command on step 4 I get a lot of permission errors while getting constantly prompt to allow permissions to terminal etc.
If I then carry on, it will fail on
chmod +x bin/darwin-build && chmod +x bin/build && bin/build
Im wondering if its because its not supported inside the MacOS VM?
Thanks
Here is the log:
Beta Was this translation helpful? Give feedback.
All reactions