Update README

This commit is contained in:
Tissevert 2021-11-20 19:17:21 +01:00
parent d139d0ab78
commit 14dcb9aed6
1 changed files with 12 additions and 6 deletions

View File

@ -4,28 +4,34 @@ This Nix derivation provides an attribute set with each package referenced by it
## Quick try
To quickly try a package `${PACKAGE_NAME}` from this repository, you can issue on the command line :
To quickly try a package `${PACKAGE_NAME}` from the latest version of this repository, you can issue on the command line :
```bash
nix-env -f 'https://git.marvid.fr/Tissevert/mynixpkgs/archive/0.1.1.tar.gz' -i ${PACKAGE_NAME}
nix-env -f 'https://git.marvid.fr/Tissevert/mynixpkgs/archive/main.tar.gz' -i ${PACKAGE_NAME}
```
It's easy to pin a precise version by replacing `main` by the tag your interested in like so :
```bash
nix-env -f 'https://git.marvid.fr/Tissevert/mynixpkgs/archive/0.1.2.tar.gz' -i ${PACKAGE_NAME}
```
## Declarative setup
To use this repository in a more reproducible and less imperative way, you can include the following snippet it in your `/etc/nixos/configuration.nix` or anywhere else you please :
To use this repository declaratively from within a nix expression (say, in your `/etc/nixos/configuration.nix`) instead of from the command line, you can include the following snippet :
```nix
let
tissevertpkgs = import (
fetchTarball https://git.marvid.fr/Tissevert/mynixpkgs/archive/0.1.1.tar.gz
fetchTarball https://git.marvid.fr/Tissevert/mynixpkgs/archive/main.tar.gz
) {};
in
```
Then, anywhere where you select packages like for instance in `environment.systemPackages` or in your `users.users.<name>.packages` my packages are available within the attribute set `tissevertpkgs` like this for instance :
Then, anywhere where you select packages, for instance in `environment.systemPackages` or in your `users.users.<name>.packages`, my packages are available within the attribute set `tissevertpkgs` like this for instance :
```nix
packages = [ pkgs.git pkgs.vim tissevertpkgs.SJW ]
packages = [ tissevertpkgs.SJW ]
```
## Current package selection