Collection of scripts, utilities, home-manager, and NixOS configurations.
- Requires a recent version of
Nix(At least ~2.4, but probably 2.18+)curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install- (Or)
sh <(curl -L https://nixos.org/nix/install) --daemon
- [macOS Users] install
nix-darwinby reading these docs.
[!info] Requires Flakes and nix commands enabled
Ensure you have the nix config folder in your home dir:
mkdir -p $HOME/.config/nix/Add the line enabling these features to the config file:
echo "experimental-features = flakes nix-command" >> $HOME/.config/nix/nix.conf"
While you can use it directly, I recommend cloning so you can make changes.
- Clone this repo and
cdinto the folder - Test build using default home-manager config:
nix build . - Setup configuration:
nix run . -- -b backup- You might need the
-b backupto let it move existing configs around so it can "take over" with a symlink.
- You might need the
Part of the configuration has shell functions switch-home, switch-nix, and switch-darwin which expect the repo at $HOME/src/dotfiles and will apply whatever configuration is there.
Project templates are registered in the flake. Use the standard Nix template flow:
# Create a new project from a template
nix flake new my-app -t .#nextjs
# or from GitHub
nix flake new my-app -t github:chrisportela/dotfiles#nextjsThen:
cd my-app
direnv allow
pnpm install
pnpm db:migrate
pnpm devList available templates: nix flake show . (look under templates).