Skip to content
/ .dots Public

NixOS + nix-darwin + home-manager config for MacBook Pro (M1) and Framework Laptop (Intel)

Notifications You must be signed in to change notification settings

rober-m/.dots

Repository files navigation

My personal dotfiles

This is the configuration for my machines:

  • MacBook Pro (M2) with MacOS using nix-darwin and home-manager
  • Framework (Intel) with NixOS using home-manager

Folder structure:

.dots
   ├─ modules (all modules)
   |   ├─ shared (modules shared between all systems)
   |   |    ├─ system (system-level config/modules)
   |   |    └─ home   (user-level config/modules)
   |   ├─ darwin (only Darwin/MacOS modules)
   |   |    ├─ nix-darwin
   |   |    └─ home
   |   └─ linux (only Linux/NixOS modules)
   |        ├─ nixos
   |        └─ home
   ├─ hosts (specific configurations for each machine)
   |   ├─ framework
   |   └─ macbook16
   ├─ overlays
   ├─ scripts
   └─ wallpapers

Folder dependency (higher depends on lower):

                    flake.nix
                       |
                     hosts
         --------------|--------------|
         |                            |
         |                            |
     macbook16                    framework
         |                            |
         |                            |
darwin (nix-darwin, home)     linux (NixOS, home)
         |                            |
         |                            |
         --------------|---------------
                shared (system, home)

TODOs

  • Add better instructions to README.
  • Add secrets management.
  • Should I expicitly import modules instead of using default.nix to make it easier to handle multiple systems?

Installation (troubleshooting section below)

TODO: Add instructions

Troubleshooting

If darwin-rebuild stops working

Likely, this happened due to a MacOS update that broke the symlinks. Run this command at the root of the .dots dir to solve it:

nix run nix-darwin -- switch --flake .#macbook

If Neovim can't load packages

I'm not sure about this, but if Neovim has problems loading modules or finding packpath:

  1. Install vimPlugins.packer-nvim
  2. Run :PackerInstall
  3. Rebuild

Related docs

Inspiration