mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-28 02:37:09 +00:00
docs: extend documentation
* mention prerequisite of nix * explicitly mention implications when using the uninstaller. * mention channel ownership when using nix as a daemon-service. * add additional ways to work with the documentation. * give another example how to run tests
This commit is contained in:
parent
80cec5115a
commit
ad36f9fa06
1 changed files with 21 additions and 7 deletions
28
README.md
28
README.md
|
@ -8,6 +8,8 @@ Nix modules for darwin, `/etc/nixos/configuration.nix` for macOS.
|
|||
|
||||
## Install
|
||||
|
||||
To install nix-darwin, a working installation of [nix](https://github.com/NixOS/nix#installation) is required.
|
||||
|
||||
```bash
|
||||
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
|
||||
./result/bin/darwin-installer
|
||||
|
@ -30,6 +32,9 @@ nix-channel --update darwin
|
|||
darwin-rebuild changelog
|
||||
```
|
||||
|
||||
> NOTE: If you are using nix as a daemon service the channel for that will be owned by root.
|
||||
> Use `sudo -i nix-channel --update darwin` instead.
|
||||
|
||||
## Uninstalling
|
||||
|
||||
There's also an uninstaller if you don't like the project and want to
|
||||
|
@ -40,6 +45,8 @@ nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A uninstalle
|
|||
./result/bin/darwin-uninstaller
|
||||
```
|
||||
|
||||
> NOTE: This will also uninstall nix alongside nix-darwin.
|
||||
|
||||
## Example configuration
|
||||
|
||||
Configuration lives in `~/.nixpkgs/darwin-configuration.nix`. Check out
|
||||
|
@ -164,6 +171,16 @@ writing defaults...
|
|||
$
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Reference documentation of all the options is available here
|
||||
https://lnl7.github.io/nix-darwin/manual/index.html#sec-options.
|
||||
This can also be accessed locally using `man 5 configuration.nix`.
|
||||
|
||||
`darwin-help` will open a html version of the manpage in the default browser.
|
||||
|
||||
Furthermore there's `darwin-option` to introspect the settings of a system and it's available options.
|
||||
|
||||
```
|
||||
$ darwin-option services.activate-system.enable
|
||||
Value:
|
||||
|
@ -179,12 +196,6 @@ Description:
|
|||
Whether to activate system at boot time.
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Reference documentation of all the options is available here
|
||||
https://lnl7.github.io/nix-darwin/manual/index.html#sec-options.
|
||||
This can also be accessed locally using `man 5 configuration.nix`.
|
||||
|
||||
There's also a small wiki https://github.com/LnL7/nix-darwin/wiki about
|
||||
specific topics, like macOS upgrades.
|
||||
|
||||
|
@ -194,6 +205,9 @@ There are basic tests that run sanity checks for some of the modules,
|
|||
you can run them like this:
|
||||
|
||||
```bash
|
||||
> run all tests
|
||||
nix-build release.nix -A tests
|
||||
> or just a subset
|
||||
nix-build release.nix -A tests.environment-path
|
||||
```
|
||||
|
||||
|
@ -204,7 +218,7 @@ Don't hesitate to contribute modules or open an issue.
|
|||
|
||||
To build your configuration with local changes you can run this. This
|
||||
flag can also be used to override darwin-config or nixpkgs, for more
|
||||
information on the `-I` flag look at the nix-build manpage.
|
||||
information on the `-I` flag look at the nix-build [manpage](https://nixos.org/manual/nix/stable/command-ref/nix-build.html).
|
||||
|
||||
```bash
|
||||
darwin-rebuild switch -I darwin=.
|
||||
|
|
Loading…
Add table
Reference in a new issue