Works on Darwin

This commit is contained in:
greg-compass
2022-09-07 20:01:51 -05:00
parent 16e54a97b4
commit 4a86e70de4
33 changed files with 123 additions and 110 deletions
+8 -1
View File
@@ -9,11 +9,18 @@ else
target="gui"
fi
if [ "$(uname -s)" == "Darwin" ]; then
src="$HOME/.config/nix/"
target=gui
else
src=/etc/nixos
fi
# Build and switch
echo "Building $(uname -m)-$target"
dest=$(mktemp -d)
pushd "$dest" > /dev/null
nix build --impure /etc/nixos#homeConfigurations.$(uname -m)-$target.activationPackage
nix build --impure "$src#homeConfigurations.$(uname -m)-$target.activationPackage"
./result/activate
popd > /dev/null
rm -r "$dest"