Configuration tweaks

This commit is contained in:
2024-03-27 23:44:54 +00:00
parent 71f434d51c
commit 4b96276cdf
2 changed files with 38 additions and 12 deletions

View File

@@ -1,5 +1,7 @@
#! /bin/bash
export NIXPKGS_ALLOW_UNFREE=1
detectDistro() {
if [ "$(uname -s)" = "Darwin" ]; then
echo "macOS"
@@ -30,7 +32,7 @@ fi
if ! nix --version &>/dev/null; then
echo -e "${YELLOW}[E] Nix not found.${ENDCOLOR}"
echo -e "${GREEN}[+] Installing the Nix package manager...${ENDCOLOR}"
sh <(curl -L https://nixos.org/nix/install) --daemon
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
. $HOME/.nix-profile/etc/profile.d/nix.sh
echo -e "${GREEN}[I] Installed Nix.${ENDCOLOR}"
fi
@@ -50,5 +52,4 @@ mkdir -p $HOME/.config/home-manager
rm $HOME/.config/home-manager/home.nix
ln -s $HOME/dotfiles/home.nix $HOME/.config/home-manager/home.nix
export NIXPKGS_ALLOW_UNFREE=1
home-manager switch -b backup
# home-manager -b backup switch