Code Monkey home page Code Monkey logo

dotfiles's Introduction

Build Nix environments

Martin's dotfiles and Nix config

These are my dotfiles. There are many like them, but these are mine.

Bootstrapping a new machine

On a new mac, you might need to install git.

xcode-select --install

Verify the installation by running

xcode-select -p

should output the following

/Library/Developer/CommandLineTools

Clone this repo. It might be a good idea to clone using HTTPS if you don’t have your SSH keys configured. I store my SSH key on a Yubikey for portability but that setup relies on some of the stuff that’s configured in here. HTTPS is a safe bet. You can always fix your local git config later on using something like

git config [email protected]:.insteadof https://github.com/

Install nix on macOS

In order to perform a multi-user install of nix on macOS, follow these steps.

The first order of business is to make sure diskutil is in your $PATH. If it isn’t, execute

export PATH=/usr/sbin:$PATH

to add it. Now you can go ahead and run the installer

sh <(curl -L https://nixos.org/nix/install) --daemon

This should take you throught the process in a nice and straight-forward way. Once the installation finishes, you can verify it by opening a new terminal, and executing

nix-shell -p nix-info --run "nix-info -m"

It’s possible that this won’t work straight away, and you may get something like

error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted

Don’t worry. The issue is very likely that the nix-daemon isn’t up and running just yet. Give it a few seconds and try again.

Flakes

With Nix installed, we’re ready to bootstrap and install the actual configuration. Flakes is finally supported in the latest versions of Nix, so from the root of the checkout out repo we should be able to go ahead and run

nix build \
	--extra-experimental-features nix-command \
	--extra-experimental-features flakes \
	.#darwinConfigurations.bootstrap-x86.system
./result/sw/bin/darwin-rebuild switch --flake .#bootstrap-x86

Then open up a new terminal session and run

darwin-rebuild switch --flake .#macbook

Tada! Everything should be installed and ready to go.

Links

dotfiles's People

Contributors

hardselius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dotfiles's Issues

About nix-darwin flake configuration switching

Hi, I follow the README to setup my darwin flake configuration on my MacBook Air, after building bootstrap system then switching, report this error.
截屏2021-02-08 上午10 13 18
I was saw the issue from here, I don't know how you solve the problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.