Skip to content

nunocf/determinate-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

132 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nix Configuration

Personal macOS Nix setup using flakes, nix-darwin, Home Manager, and nvf for Neovim.

Structure

  • flake.nix wires the system, Home Manager, and shared inputs.
  • darwin/ contains macOS system and Homebrew configuration.
  • home/ contains user-level modules for shell, tools, and editor setup.
  • home/nvim/ contains Neovim-focused modules and Lua customizations.
  • hosts/my-macbook/ contains host-specific overrides.
  • hosts/work-macbook/ contains a Home Manager-only target for a managed work Mac.

Neovim

Neovim is managed through nvf in home/nvf.nix.

Key pieces:

  • home/nvim/options.nix for core editor options
  • home/nvim/lsp.nix for LSP and Trouble
  • home/nvim/languages.nix for enabled language modules
  • home/nvim/lint.nix for nvim-lint integration
  • home/nvim/formatters.nix for conform.nvim
  • home/nvim/keymaps.nix for declarative mappings
  • home/nvim/config/*.lua for targeted runtime behavior split by concern

Most formatter/linter binaries are expected to come from project dev shells rather than this base config.

Apply

darwin-rebuild switch --flake .#my-macbook

Fresh Personal Mac Bootstrap

  1. Install Xcode Command Line Tools:

    xcode-select --install
  2. Install Nix on macOS. This repo expects a standard multi-user install; Determinate's installer is the easiest path:

    curl -fsSL https://install.determinate.systems/nix | sh -s -- install
  3. Open a new shell and verify Nix is available:

    nix --version
  4. Clone this repo to ~/.config/nix:

    git clone <repo-url> ~/.config/nix
    cd ~/.config/nix
  5. Bootstrap nix-darwin and apply the personal machine config:

    nix run nix-darwin/master#darwin-rebuild -- switch --flake ~/.config/nix#my-macbook
  6. Future updates can use either:

    darwin-rebuild switch --flake ~/.config/nix#my-macbook

    or the installed alias:

    nix-switch

For a Jamf-managed machine, apply only the user-level config:

home-manager switch --flake ~/.config/nix#work-macbook

This target intentionally skips nix-darwin, Homebrew ownership, macOS defaults, and default-browser activation. It also avoids setting a global Git identity or exporting the OpenAI API key from Keychain by default.

Fresh Work Mac Bootstrap

  1. Install Xcode Command Line Tools:

    xcode-select --install
  2. Install Nix on macOS. This repo expects a standard multi-user install; Determinate's installer is the easiest path:

    curl -fsSL https://install.determinate.systems/nix | sh -s -- install
  3. Open a new shell and verify Nix is available:

    nix --version
  4. Clone this repo to ~/.config/nix:

    git clone <repo-url> ~/.config/nix
    cd ~/.config/nix
  5. Set the work-machine username in hosts/work-macbook/settings.nix:

    {
      primaryUser = "your-macos-short-name";
    }
  6. Apply the managed-machine Home Manager target:

    nix run home-manager/master -- switch --flake ~/.config/nix#work-macbook
  7. Future updates can use either:

    home-manager switch --flake ~/.config/nix#work-macbook

    or the installed alias:

    hm-switch

The work-macbook target reads the username from hosts/work-macbook/settings.nix and assumes Apple Silicon (aarch64-darwin).

Notes

  • This repo keeps machine-specific changes in hosts/.
  • Managed machines should prefer homeConfigurations targets so Nix only owns user-level packages and dotfiles.
  • Neovim plugin behavior is configured declaratively where practical, with a small Lua layer for editor runtime behavior.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors