Skip to content

Commit 965f93c

Browse files
committed
Add installation instructions for NixOS
1 parent e82dd73 commit 965f93c

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

install.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,36 @@ To fully remove zb from your machine:
5353
3. Delete the {term}`store directory`.
5454
4. Remove the `zbld` Unix users.
5555
5. Remove the `zbld` Unix group.
56+
57+
## NixOS
58+
59+
zb also includes a Nix flake for easy installation on NixOS.
60+
If you're using a flake-based NixOS configuration,
61+
you can use a configuration like this:
62+
63+
```nix
64+
{
65+
inputs = {
66+
nixpkgs.url = "nixpkgs/nixos-unstable";
67+
zb.url = "github:256lights/zb/v0.1.0";
68+
};
69+
70+
outputs = { self, nixpkgs, zb, ... }: {
71+
nixosConfigurations.foo = nixpkgs.lib.nixosSystem {
72+
system = "x86_64-linux";
73+
modules = [
74+
zb.nixosModules.default
75+
];
76+
};
77+
};
78+
}
79+
```
80+
81+
This module will make the same system-wide changes that the installer would.
82+
It also creates a systemd unit that will create the `/opt/zb/store` {term}`store directory` on first run
83+
and copy the objects from the installer.
84+
85+
If you're using Nix for package management on a non-NixOS operating system,
86+
we recommend using the generic installer
87+
rather than trying to manage zb through Nix.
88+
zb has its own {term}`store directory` that provides management capabilities similar to Nix.

0 commit comments

Comments
 (0)