update readme

This commit is contained in:
xenia 2024-10-21 21:44:22 -04:00
parent 9dbbf96816
commit 8ae77094e6
1 changed files with 28 additions and 18 deletions

View File

@ -11,39 +11,49 @@ upstreaming into nixpkgs if there is sufficient interest
## usage ## usage
dragnpkgs provides a set of nixos modules and a nixpkgs overlay containing custom packages dragnpkgs provides a set of nixos modules and a nixpkgs overlay containing custom packages. the
(automatically applied). to use, import the top-level module into your system configuration, eg modules require the overlay
### non-flake
```nix ```nix
{config, lib, pkgs, ...}: {config, lib, pkgs, ...}:
{ {
imports = [ imports = [
path/to/dragnpkgs /path/to/dragnpkgs/module.nix
]; ];
}
```
alternatively, add it as a nix channel nixpkgs.overlays = [ (import /path/to/dragnpkgs/overlay.nix) ];
```bash
nix-channel --add https://git.lain.faith/haskal/dragnpkgs/archive/main.tar.gz dragnpkgs
```
then in system config
```nix
{config, lib, pkgs, ...}:
{
imports = [
<dragnpkgs>
];
} }
``` ```
for standalone nix on other distros, use `~/.config/nixpkgs/overlays.nix` to enable the dragnpkgs for standalone nix on other distros, use `~/.config/nixpkgs/overlays.nix` to enable the dragnpkgs
overlay overlay
```nix ```nix
(import <dragnpkgs> {}).nixpkgs.overlays [ (import <dragnpkgs/overlay.nix>) ]
``` ```
### flake
for flake usage, point your `nixpkgs` to this repo
```nix
{
inputs = {
# for nixos-24.05
nixpkgs.url = "git+https://git.lain.faith/haskal/dragnpkgs.git?ref=nixos-24.05";
# for nixos-unstable
nixpkgs.url = "git+https://git.lain.faith/haskal/dragnpkgs.git?ref=main";
};
}
```
note that overriding inputs to the flake won't necessarily work because of the way nixpkgs registers
itself with the system. this requires really annoying hacks to get working at all. if you want to
depend on `dragnpkgs` with a different version of `nixpkgs` (ie not 24.05 or unstable), clone the
repo and recreate `flake.lock`. aren't flakes so cool and fun!!!!
## options documentation ## options documentation
documentation for options provided by dragnpkgs documentation for options provided by dragnpkgs