summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJan Schmitt <git@smittie.de>2022-09-02 13:48:07 +0200
committerJan Schmitt <git@smittie.de>2022-09-02 14:34:06 +0200
commitad36f9fa0657a5dc234ca6c6762d38cb93f1559c (patch)
tree0b18d8b155f0f4dca7061ab57af684497e790220 /README.md
parent80cec5115aae74accc4ccfb9f84306d7863f0632 (diff)
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
Diffstat (limited to 'README.md')
-rw-r--r--README.md28
1 files changed, 21 insertions, 7 deletions
diff --git a/README.md b/README.md
index f7a59e7..2a78563 100644
--- a/README.md
+++ b/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=.