Commit Graph

88 Commits

Author SHA1 Message Date
phaer
5c6e0e5e9a docs: add mkdocs-awesome-pages-plugin 2024-06-13 13:06:22 +02:00
phaer
6ff41abd61 docs: fix devshell 2024-06-13 11:54:11 +02:00
phaer
bb4b27886f add render_options hook 2024-06-11 19:08:00 +02:00
phaer
42ff2e8d4d move dreamDocs out of docs dir
to reduce unecessary rebuilds
2024-06-11 19:08:00 +02:00
phaer
7cb146701a add mkdocs-based docs site 2024-06-11 19:05:26 +02:00
DavHau
2fc4ef33cc docs: overhaul reference documentation pipeline
- use nixosOptionsDoc commonMark output
- simplify a lot of things
- redesign towards a future generic standalon nixosOptionsWebsite function
2024-04-05 19:42:14 +07:00
DavHau
6ddb9a7f5e override/python: fix devShells for nvidia packages 2024-03-26 05:53:26 +00:00
DavHau
306e5bff07 pythonEnv: init
Add experimental one-liner command to create python environments.

```command
$ nix run github:nix-community/dream2nix#__pythonEnv requests whisper-ctranslate2
...

$ python -c "import requests; print('imported requests')"
imported requests

$ whisper-ctranslate2 --version
whisper-ctranslate2 0.4.1
```
2024-03-26 05:03:45 +00:00
DavHau
f017de2de4 mkDerivation: stop depending on all core modules
mkDerivation should be minimal, but currently it always pulls in modules like `lock` and `paths` etc. despite those not being needed for many instances, like when mkDerivation is imported by a dependency.

Modules like pip which do need some of these core modules, now need to directly depend on them.

This will remove a bunch of unneeded options which currently pollute the manual.

The remaining core dependencies of mkDerivation are now: deps, env, ui
2024-03-18 11:15:30 +00:00
DavHau
86e4b94689 docs/overrides: explain how to find options 2024-03-17 14:34:12 +00:00
DavHau
b6e6d36f9d docs: init overrides 2024-03-17 09:27:24 +00:00
DavHau
b8d00b7c98 docs: update module system intro 2024-03-17 06:04:46 +00:00
DavHau
b727a07775 override: unify overriding across modules
Add options `overrides.${name}` and `overrideAll` to all language modules that manage a dependency tree.

This is done in a backward compatible fashion. Old options for overriding dependencies continue working, though those are not displayed in the manual anymore.

For the following modules the manual now suggest using the new unified override options:
- for pip: use `pip.overrides` and `pip.overrideAll` instead of  `pip.drvs`
- for nodejs-granular-v3: use `nodejs-granular-v3.overrides` and `nodejs-granular-v3.overrideAll` instead of `nodejs-granular-v3.deps`
- `php-granular`: use `php-granular.override` and `php-granular.overrideAll` instead of `php-granular.deps`
2024-03-13 14:25:41 +07:00
DavHau
63ab24d893 docs: refine public/experimental
Move some barely used modules to the experimental section to reduce surface.
Instead of the separate dev-shell module the nodejs package should have a devShell subattribute.
2024-03-12 11:25:12 +00:00
DavHau
45d941d49f docs: don't strip foreign module options
previously the options of other imported modules were not shown which gave an incomplete picture. For example the docs page for the `pip` module did not show the options prefixed with `mkDerivation` which are accepted and needed by the pip module.
It's better to have everything on one page for each module.
2024-03-12 11:05:59 +00:00
DavHau
ba4be52cdf ci: build website only on x86_64-linux to reduce build time
The website builds really slow on other platforms due to the buildbot remote builder setup.
2024-03-12 10:08:01 +00:00
DavHau
211528826c cleanup core options
- don't import eval-cache and flags modules by default (those have never been used so far)
- mark options of package-func as internal. Those are for maintainers only and don't need to be rendered by default
2024-03-12 09:41:59 +00:00
DavHau
bb13da673a checks.nix-unit: use nix-unit from nixpkgs 2024-03-12 07:09:04 +00:00
DavHau
deb4c98014 docs: fix links to examples 2024-03-11 10:41:05 +00:00
DavHau
42838c5909 examples: cleanup and rename to simplify
- name example more consistently, eg. `{language}-packaging-{feature}` or `{language}-local-development-{feature}`
- move some examples to the modules integration tests directory instead as their purpose was mainly testing and they weren't good example
- module owned checks: import via flake if available
2024-03-09 04:45:59 +00:00
DavHau
3b9e0780a0 docs: separate public and internal modules 2024-03-07 08:51:00 +00:00
Arnout Engelen
367e7fcc98 Getting started docs
I always forget how to get going with dream2nix, and while this
page doesn't contain much more than you'd already find in the
examples, I do think it's a good starting point for allowing
people to start more confidently.
2024-02-09 20:33:18 +07:00
DavHau
0f2d06b43e examples: add readme for packages examples 2024-01-07 06:28:34 +00:00
DavHau
6aa5a29244 chore: remove more unnecessary flake outputs
...to make buildbot eval quicker
2023-12-10 06:10:36 +00:00
DavHau
95fa909f84 docs: remove spam from flake-outputs
...instead use internal options to pass the module docs pages to the renderer
2023-12-10 06:03:22 +00:00
DavHau
4b155e6a5d docs: render docs also for core modules 2023-12-03 08:53:50 +00:00
DavHau
db35339b1e test: add per module testing infra
So far, /examples was the only place with packages that are built in the CI pipeline.
This change allows us to add package build tests to individual modules at the location where the module is defined. This has several benefits:

- We are not forced to add unnecessary examples in order to maintain test coverage
- When modules get removed, their tests will be removed alongside
- It allows us to keep old modules around and assure they keep working without having to keep outdated examples in /examples
2023-11-17 07:27:54 +00:00
DavHau
24e81d5ce8 examples: rename repo examples 2023-11-07 19:08:27 +07:00
DavHau
3030cd5877 examples/python-pdm: migrate to ./packages 2023-11-07 19:08:27 +07:00
DavHau
bce7ab631d nodejs-package-json: use v3 lock file 2023-11-07 18:45:35 +07:00
DavHau
3b42e5a8e4 docs: fix missing options for modules
- render all top-level options declared by a module
2023-11-07 16:34:00 +07:00
DavHau
581a7cff0b flake: separate top-level from dev-flake fully 2023-11-05 03:42:18 +00:00
DavHau
d8e4b477e3 refactor: move dev related things to /dev-flake
The goal is to reduce the flake inputs visible to the user
Still, the top-level flake re-exposes the outputs of the dev-flake, but
without exposing its inputs. This means a devShell is still available in
the top-level, for example.

This also removes the /modules/flake.nix. Its original purpose was
separating the modules inputs from the development inputs, but this is
now done the opposite way around by moving the dev inputs to
/dev-flake/flake.nix.
2023-11-05 03:42:18 +00:00
DavHau
1f680838ab lib: move to /lib from /modules/flake-parts/lib 2023-11-05 03:23:11 +00:00
adisbladis
e16b6544e2 pdm: Select wheel using pyproject.nix 2023-11-04 06:36:34 +00:00
DavHau
954bacb0a6 chore: more formatter into separate flake module 2023-10-31 12:09:56 +00:00
DavHau
bc2e8ddb64 chore put pre-commit-checks into extra file 2023-10-31 15:00:35 +03:00
DavHau
543315a7cf chore: move devShells to separate module 2023-10-31 11:46:26 +00:00
DavHau
5914156eb7 examples: add flake.nix to each example
This makes hte examples more standalone and suitable for copy & paste
2023-10-31 11:36:21 +00:00
DavHau
61bc3b1377 examples: remove dream2nix- prefix 2023-10-30 21:42:51 +00:00
DavHau
c6c1a430ff lib: move to /modules/flake-parts/lib 2023-10-24 23:08:13 +00:00
DavHau
cf82f7a1ed docs: configure highlight.js 2023-10-23 19:31:57 +00:00
DavHau
731ac1daf1 docs: better summary + embed modules README.md 2023-10-22 22:10:43 +00:00
DavHau
aac7f3f77e pdm: build package with deps 2023-10-22 00:50:36 +00:00
DavHau
b10f3495e5 checks: add system attribute 2023-10-17 18:12:32 +00:00
DavHau
1caf997f69 linkchecker: disable because of performance issues 2023-10-12 00:55:37 +02:00
DavHau
5798a23484 docs: add reference documentation to website 2023-10-12 00:55:37 +02:00
DavHau
d2e9a494d1 modules: fixup core modules for docs rendering 2023-10-12 00:51:07 +02:00
DavHau
cd7dee14ae modules: fixup more nodejs modules for docs rendering 2023-10-11 21:43:01 +00:00
DavHau
e6800060c9 modules: fixups nodejs modules to render docs 2023-10-11 21:12:59 +00:00