Skip to content

DontEatOreo/nix-dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My dotfiles

built with nix

This repository contains my personal configuration files for nix-darwin and NixOS

Scope

To start with, all CLI tools are located in /shared and are shared between macOS and NixOS. For macOS, GUI programs are mainly managed by homebrew, except for vscode, which is managed by home-manager and is shared between macOS and NixOS. For NixOS, all GUI programs are managed by home-manager.

All macOS system settings are managed by system.nix

How to Use

To use this configuration, follow the steps below:

NixOS

# Navigate to /etc/nix/nixos
cd /etc/nix/nixos

# Clone the repository
git clone https://github.com/DontEatOreo/dotfiles.git

# Generate hardware-configuration.nix with `nixos-generate-config`
nixos-generate-config
# Then move hardware-configuration.nix to hosts/nixos/users/nyx
mv hardware-configuration.nix hosts/nixos/users/nyx
# Delete configuration.nix
rm configuration.nix

# Apply the configuration
sudo nixos-rebuild switch --flake .

macOS

# Installed Nix & Homebrew first
# Nix
sh <(curl -L https://nixos.org/nix/install)
# Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Navigate to the ~/.nixpkgs directory
cd ~/.nixpkgs

# Clone the repository
git clone https://github.com/DontEatOreo/dotfiles.git

# Install Nix Darwin
nix run nix-darwin -- switch --flake .

# For future apply the configuration
darwin-rebuild switch --flake .

Notes

  • If you end up getting an error of the sort of error: cached failure of attribute make sure to pass the option --option eval-cache false to nix run
  • TeX packages are disabled by default due to the file size
  • Special thanks to @ashuramaruzxc for bash & zsh aliases, PS1 and commonAttrs.