Skip to content

My Nix config for NixOS, Darwin, and Linux based environments

Notifications You must be signed in to change notification settings

imcquee/nix-home

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖥️ New machine setup

Build ISO: nix build .#nixosConfigurations.iso.config.system.build.isoImage

Installation guide: https://nixos.org/manual/nixos/unstable/#sec-installation-manual

❄️ NixOS Config

  1. Clone repo
git clone https://github.com/imcquee/nix-home.git
  1. Get tailscale key and replace 'tskey-examplekeyhere' in tailscale.nix

  2. Rebuild host

sudo nixos-rebuild switch --flake /home/$USER/nix-home/#dev
  1. On subsequent runs, just run rebuild e.g. : rebuild dev

🍎 Darwin setup

  1. Install Nix
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
  1. Setup Git (if not already installed)
nix-shell -p git
  1. Clone repo
git clone https://github.com/imcquee/nix-home.git
  1. Rebuild host
nix run nix-darwin -- switch --flake .#MBP2018
# or
nix run nix-darwin -- switch --flake .#mini
  1. On subsequent runs, just run rebuild e.g. : rebuild MBP2018

🏡 Home-Manger setup

  1. Install Nix
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
  1. Setup Home-Manger and Git (if not already installed)
nix-shell -p git home-manager
  1. Clone repo
git clone https://github.com/imcquee/nix-home.git
  1. Setup Home-Manager
home-manager switch --flake /home/$USER/nix-home#universal
  1. On subsequent runs, just run rebuild e.g. : rebuild universal

  2. Install tailscale

curl -fsSL https://tailscale.com/install.sh | sh

Useful tips

Upgrading flake

  1. nix flake update

Authenticating with GitHub

  1. gh auth login
  2. gh auth setup-git

Cleanup storage

Delete stale paths: nix-collect-garbage

Delete stale paths and generations older than x days: nix-collect-garbage --delete-older-than 30d

Using Home Manager on Windows WSL

After setting up tailscale, immediately run sudo chattr +i /etc/resolv.conf To prevent Windows from overwriting the dns config sudo chattr -i /etc/resolv.conf Reverses this

TODO

  • Make public
  • Migrate Neovim
  • Fix copy paste in neovim
  • Add DE option
  • Add Non-Nixos
  • Build custom installer
  • Migrate Darwin over
  • Migrate to Nix managed Fish
  • Test oneshot tailscale implementation
  • Add Github actions integration with cachix
  • Add Stylix config
  • Build custom bootstrap script for Non-Nixos environments
  • Fix systemd services

About

My Nix config for NixOS, Darwin, and Linux based environments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published