Compare commits
24 Commits
working
...
e3706e95f8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3706e95f8 | ||
| b4ce55c151 | |||
| f36234ea8c | |||
| 6b61eaf75d | |||
| 1368ac7d23 | |||
| 0774d02c5c | |||
| 262c5ae623 | |||
| 60f5073114 | |||
| a1b639bfa5 | |||
| ec53448c90 | |||
| ef2fe843b1 | |||
| ba26a2c3a2 | |||
| 32d5892ddd | |||
| 8b159a2eee | |||
| 2bb2eaa751 | |||
| 8750caa5d2 | |||
| 3cf16ff880 | |||
| 863b47e663 | |||
| f9a722aad8 | |||
| c9d180680d | |||
| fe2053bd10 | |||
| ea7507e7e3 | |||
| ca5ea4e1ab | |||
| b6711ec221 |
15
README.md
Normal file
15
README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# My nix-darwin Configuration
|
||||
This repo is meant to be a declarative setup for new macOS devices, specifically focused on the application installs. All GUI applications will be handled by homebrew and some brews or CLI tools. The more stable and maintained CLI tools are installed via nixpkgs.
|
||||
|
||||
## Installation
|
||||
1. Clone this repo onto the machine (probably fastest via usb) or install `git` seperatly and run `git clone https://git.briannelson.dev/brian/nix-darwin.git`
|
||||
2. `cd` into the repo
|
||||
3. Run `./install.sh` this will run a bash script that handles all of the installation of nix, file renaming and copying the files to the correct directory.
|
||||
|
||||
## Homebrew
|
||||
I like using homebrew as my package manager for most apps as its really easy and convienent to run `brew upgrade` to update all apps in 1 go. I love nix for many other reasons but some of the packages on the stable branch aren't always up-to-date and take a while to update.
|
||||
|
||||
## Future Options
|
||||
I like the option of setting the dock up using some of the options in nix-darwin but only on initial build. I found that getting the macOS machine setup with nix-darwin and setting all the dock apps was cool but if you made changes to to dock for whatever reason (installing a new app, having a different prefernce, etc.), rebuilding the system would then set the dock back to the original option.
|
||||
|
||||
I think that the use of Homebrew can help with this a little bit in the sense that I can update most apps without having to rebuild the system. So making changes to the dock via the "normal" click and drag on macOS can stay persistent for the most part but remembering to set the change in the config will be important for rebuilds.
|
||||
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 "$(pwd)/." /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