Skip to content

dimonzozo/nix-config

Repository files navigation

[nix-darwin] & [Home Manager] Configurations

This repository contains a Nix Flake for configuring my computers and/or their home environment. It is not intended to be a drop in configuration for your computer, but might serve as a reference or starting point for your own configuration.

Installing

Macos

It is easier to manage configuration if each host has unique hostname. We can make it cool and choose from some theme i've used https://hostnamegenerator.com.

HOSTNAME=dambrosio

sudo scutil --set HostName "$HOSTNAME"
sudo scutil --set LocalHostName "$HOSTNAME"
sudo scutil --set ComputerName "$HOSTNAME"

Installing Macos console utils.

xcode-select --install

Then let's declare few env variables for pleasant scripting.

CONFIG_DIR=$HOME/.config/nix-config
SOPS_DIR=$HOME/.config/sops/age/

Creating config dir and cloning project.

mkdir -p $CONFIG_DIR
git clone https://github.com/dimonzozo/nix-config $CONFIG_DIR

Installing NIX with unoficiall, but very cool installer. Please read more about it here.

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

TODO: add block about creating host config here

Applying nix-darwin and home-manager configuration.

nix run nix-darwin -- switch --flake $HOME/.config/nix-config
nix run home-manager -- switch -b backup --flake $HOME/.config/nix-config

Inspirations

Resources

See also

About

Conquering chaos with Nix Flake.

Topics

Resources

License

Stars

Watchers

Forks

Languages