Skip to content

Stop using nix-env -iA and add better instructions for Nix users #538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,35 @@ brew install --HEAD zk

### Nix

```sh
# Run zk from Nix store without installing it:
`zk` is available in nixpkgs and has a [Home Manager](https://github.com/nix-community/home-manager) module.

If you want to run `zk` without permanently installing it:
```
nix run nixpkgs#zk
# Or, to install it permanently:
nix-env -iA zk
```

Or, if you want to create an ephemeral shell with `zk` available:
```
nix shell nixpkgs#zk
```

To permanently install `zk` on NixOS at the system level, include `nixpkgs.zk` in `environment.systemPackages` in your system configuration (`/etc/nixos/configuration.nix` by default):
```
environment.systemPackages = [
# Your other packages here
nixpkgs.zk
];

```

If you are using [Home Manager](https://github.com/nix-community/home-manager), instead of installing for all users on the system, you can permanently install and configure `zk` just for your user via the Home Manager module. Add this to your Home Manager configuration:
```
programs.zk.enable = true;

# Modify `${XDG_CONFIG_HOME}/zk/config.toml` through this attr
programs.zk.settings = {
# Add your own configuration settings for zk here
};
```

### Alpine Linux
Expand Down