Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davhau/flake-parts-auto
Auto import and expose modules in your flake
https://github.com/davhau/flake-parts-auto
Last synced: 6 days ago
JSON representation
Auto import and expose modules in your flake
- Host: GitHub
- URL: https://github.com/davhau/flake-parts-auto
- Owner: DavHau
- Created: 2023-09-19T18:21:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-20T19:59:44.000Z (about 1 year ago)
- Last Synced: 2024-10-11T23:35:26.870Z (about 1 month ago)
- Language: Nix
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Flake Parts Auto
# Why?
flake-parts uses module system, which allows great modularization of your flake.# How?
See `./examples/mkFlake/flake.nix` and `./examples/importModules/flake.nix`. This library takes a `modulesDir` and imports and exports modules automatically from the following paths:The modules defined in `//.nix` are exported as `modules..`
To be compatible with existing module systems, these `moduleKind` are treated specially:
- `/flake-parts/.nix` is exported to `flakeModules.` for [flake-parts](https://github.com/hercules-ci/flake-parts) compatibility.
- `/nixos/.nix` is exported to `nixosModules.` for nixpkg compatibility.
- `/darwin/.nix` is exported to `darwinModules.` for nixpkg compatibility.# Disadvantages:
- There is no way to specify which modules should not be imported/exported, so all modules are both imported and exported. To customize this you have to adapt the logic in `./modules/flake-parts/all-modules.nix`