Skip to content

Commit

Permalink
convert to flakes
Browse files Browse the repository at this point in the history
  • Loading branch information
gvolpe committed Dec 27, 2022
1 parent 0333429 commit e30a62b
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 18 deletions.
18 changes: 0 additions & 18 deletions README.adoc

This file was deleted.

46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# nmd

Fork of [rycee/nmd](https://gitlab.com/rycee/nmd/) with theming options and flake support.

## Usage

Add flake input.

```nix
{
inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable;
nmd = {
url = github:gvolpe/nmd;
inputs.nixpkgs.follows = "nixpkgs";
};
};
}
```

Add overlay.

```nix
{
pkgs = import nixpkgs {
inherit system;
overlays = [ inputs.nmd.overlays.default ];
};
}
```

Use the functions provided in the `pkgs.nmd` set, e.g.

```nix
{
docs = pkgs.nmd.buildDocBookDocs {
pathName = "super-cool-flake";
projectName = "My super cool project";
modulesDocs = [ modulesDocs ];
documentsDirectory = ./.;
documentType = "book";
theme = "night-owl";
};
}
```
File renamed without changes.
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
description = "nmd: NixOS Module Documentation";

inputs.nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable;

outputs = { self, nixpkgs }:
{
overlays.default = f: p: {
nmd = p.callPackage ./builders.nix { };
};
};
}

0 comments on commit e30a62b

Please sign in to comment.