added install script and git config
This commit is contained in:
@@ -6,6 +6,19 @@
|
||||
ll = "ls -la";
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = {
|
||||
user = {
|
||||
name = "Brian Nelson";
|
||||
email = "brian@briannelson.dev";
|
||||
};
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."yt-dlp.conf".text = ''
|
||||
-o /Users/briannelson/Downloads/yt-dlp/%(title)s.%(ext)s
|
||||
--no-mtime
|
||||
|
||||
27
install.sh
Normal file
27
install.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "==> Checking for Nix..."
|
||||
if ! command -v nix >/dev/null 2>&1; then
|
||||
echo "==> Installing Nix vis Determinate Systems installer..."
|
||||
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
else
|
||||
echo "Nix already installed, skipping."
|
||||
fi
|
||||
|
||||
echo "==> Copying config to /etc/nix-darwin..."
|
||||
sudo mkdir -p /etc/nix-darwin
|
||||
sudo cp -r . /etc/nix-darwin
|
||||
sudo chown -R root:wheel /etc/nix-darwin
|
||||
|
||||
echo "==> Renaming conflicting shell files if present..."
|
||||
[ -f /etc/bashrc ] && sudo mv /etc/bashrc /etc/bashrc.before-nix-darwin
|
||||
[ -f /etc/zshrc ] && sudo mv /etc/zshrc /etc/zshrc.before-nix-darwin
|
||||
[ -f /etc/zshenv ] && sudo mv /etc/zshenv /etc/zshenv.before-nix-darwin
|
||||
|
||||
echo "==> Bootstraping nix-darwin..."
|
||||
nix run nix-darwin/master#darwin-rebuild -- switch --flake /etc/nix-darwin
|
||||
|
||||
echo "==> Done! Restart your terminal to apply all changes."
|
||||
Reference in New Issue
Block a user