Allow consuming jail.nix without flakes

This commit is contained in:
Alex David 2025-08-15 07:51:01 -07:00
commit c37ae887fd
3 changed files with 24 additions and 2 deletions

View file

@ -2,8 +2,9 @@
## Installation
It is currently recommended to install jail.nix as a flake input to your
configuration:
### Flakes
To install jail.nix using flakes, add jail.nix to your flake inputs:
```nix
# flake.nix
@ -16,6 +17,21 @@ configuration:
}
```
### callPackage
To install jail.nix using a different dependency manager like
[niv](https://github.com/nmattia/niv), you can use `pkgs.callPackage`:
```nix
let
sources = import ./nix/sources.nix;
pkgs = import sources.nixpkgs {};
jail-nix = pkgs.callPackage sources."jail.nix" {};
jail = jail-nix.init pkgs;
in
# ...
```
---
## Initializing