From 8ae77094e6c6664c07598dbcb13658382baa0f96 Mon Sep 17 00:00:00 2001 From: xenia Date: Mon, 21 Oct 2024 21:44:22 -0400 Subject: [PATCH] update readme --- README.md | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 519ed4c..79cf38c 100644 --- a/README.md +++ b/README.md @@ -11,39 +11,49 @@ upstreaming into nixpkgs if there is sufficient interest ## usage -dragnpkgs provides a set of nixos modules and a nixpkgs overlay containing custom packages -(automatically applied). to use, import the top-level module into your system configuration, eg +dragnpkgs provides a set of nixos modules and a nixpkgs overlay containing custom packages. the +modules require the overlay + +### non-flake ```nix {config, lib, pkgs, ...}: { imports = [ - path/to/dragnpkgs + /path/to/dragnpkgs/module.nix ]; -} -``` -alternatively, add it as a nix channel -```bash -nix-channel --add https://git.lain.faith/haskal/dragnpkgs/archive/main.tar.gz dragnpkgs -``` - -then in system config -```nix -{config, lib, pkgs, ...}: -{ - imports = [ - - ]; + nixpkgs.overlays = [ (import /path/to/dragnpkgs/overlay.nix) ]; } ``` for standalone nix on other distros, use `~/.config/nixpkgs/overlays.nix` to enable the dragnpkgs overlay ```nix -(import {}).nixpkgs.overlays +[ (import ) ] ``` +### 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 documentation for options provided by dragnpkgs