mirror of
https://github.com/davegallant/nix-config
synced 2025-08-05 23:03:40 +00:00
34 lines
1.0 KiB
Markdown
34 lines
1.0 KiB
Markdown
# nix-config
|
|
|
|
[](https://builtwithnix.org)
|
|
|
|
This repo stores nix to manage my machines running both [NixOS](https://nixos.org/) and macOS. The initial structure was inspired by [samuelgrf/nixos-config](https://gitlab.com/samuelgrf/nixos-config/-/tree/master/).
|
|
|
|
The configuration is very specific to my own machines and setup, but it may be a useful reference for anyone else learning or experimenting with nix, whether it be on a personal machine or a server.
|
|
|
|
## Setup
|
|
|
|
> on macOS: install the latest unstable nix from https://github.com/numtide/nix-unstable-installer (for nix flakes),
|
|
> and nix-darwin: https://github.com/LnL7/nix-darwin
|
|
|
|
To run a rebuild:
|
|
|
|
```sh
|
|
./rebuild.sh switch
|
|
```
|
|
|
|
|
|
## Update
|
|
|
|
To update nixpkgs defined in [flake.nix](./flake.nix), run:
|
|
|
|
```sh
|
|
nix flake update
|
|
```
|
|
|
|
If there are updates, they should be reflected in [flake.lock](./flake.lock).
|
|
|
|
## Pre-commit hooks
|
|
|
|
Pre-commit hooks are automatically activated when [direnv](https://github.com/direnv/direnv) is installed.
|