Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 1.99 KB

README.md

File metadata and controls

58 lines (44 loc) · 1.99 KB

Dotfiles

My dotfiles in Home-manager and Nix.

Getting started

Nix Setup

  1. Install Nix via Multi-user installation.
  2. Enable the nix-command and flakes features, which nix build and nix run need:
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
  1. Build and Install this project as follows (the configuration for the current system, mymac or myubuntu, is selected automatically):
nix build          # build only; the result is linked at ./result
./result/activate  # switch to the built configuration

Or build and switch in one step:

nix run

Updating packages

Package versions are pinned by flake.lock. To update them:

make upgrade   # update flake.lock, build, and show the version changes
make switch    # activate
git commit flake.lock -m "flake: update inputs"

Use make update INPUT=nixpkgs to update one input only, and make help to list all targets.

macOS System Settings (optional)

darwinConfigurations.mymac manages macOS system settings (Dock, Finder, key repeat, Caps Lock → Control, system-wide Nix settings) with nix-darwin. It doesn't touch the user environment, which still comes from the steps above.

The first time, run nix-darwin from the flake:

sudo nix run nix-darwin -- switch --flake .#mymac

After that, darwin-rebuild is installed:

sudo darwin-rebuild switch --flake .#mymac

Emacs Setup

After installing Emacs through this configuration, you need to reinstall LSP packages with plist support:

  1. Start Emacs (packages will be installed automatically)
  2. Run: M-x lsp-reinstall-packages-for-plists
  3. Restart Emacs

This step is necessary because the configuration uses LSP_USE_PLISTS=true (set in emacs/early-init.el) for better LSP performance. LSP packages must be compiled with this environment variable to avoid hash-table/plist type errors.