normful / nixos-dotfiles

Dotfiles and configuration for NixOS and macOS+Nix+nix-darwin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nixos-dotfiles

Dotfiles and configuration for macOS+Nix+nix-darwin.

To keep things simple, I'm purposely not using home-manager. Instead, I'm using GNU Stow to symlink dotfiles into $HOME instead.

Typical Usage

make mac
make stow

Some manual steps needed on macOS

Changing Shell to Fish

sudo rm /etc/shells
make mac
chsh -s /run/current-system/sw/bin/fish

Note that after an upgrade of macOS, /etc/shells may be recreated by macOS, so you'll need to delete it again.

Why I don't run NixOS in a VM on a macOS host

Previously, I tried running NixOS in a VM in VMWare Fusion and Parallels. Although that worked, I realized that I prefer the simplicity of running Nix directly on my macOS host. It seems like there's too many constant bugs and workarounds needed to make Parallels Tools or VMWare Tools properly.

Neovim Config

  1. ./nix-nvim/nvim.nix is used in my neovim Nix override.
  2. ./nix-nvim/customRC.vim.nix is the .vimrc file that Nix generates. It loads general lua modules, and loads:
  3. ./nix-nvim/initLazy.lua, which initializes lazy.nvim

The rest of the Neovim config, which is in ./nvim, is not managed by Nix.

It's purposely not controlled by Nix, so that it can be easily reused on other systems that are not running Nix (e.g. other macOS systems where I don't run Nix, or other Linux systems).

./nvim/.config/nvim is symlinked into ~/.config/nvim using stow.

lazy.nvim automatically loads all the plugin config from ~/.config/nvim/lua/plugins/`.

There's a handful of miscellaneous old unused nvim config in ./nvim_OLD that I don't use anymore.

About

Dotfiles and configuration for NixOS and macOS+Nix+nix-darwin

License:MIT License


Languages

Language:Lua 59.8%Language:Shell 20.4%Language:Vim Script 14.7%Language:Nix 4.8%Language:Makefile 0.2%