Commit Graph

29 Commits

Author SHA1 Message Date
aaf1441ff7 Add hardeningDisable to devShell module 2024-10-30 21:52:12 -07:00
a1e3b8bc3e Make all _module.args available in moduleArgs 2024-08-03 11:20:29 -07:00
a31923bf14 Use direct flake url for nixpkgs 2024-07-09 05:09:41 +00:00
b7002c7cad Clarify passing of inputs in documentation 2024-06-29 17:12:34 -07:00
f34d07dd57 Document defining packages for a subset of systems 2024-06-29 16:49:38 -07:00
6af2ed9b42 Document importDir 2024-05-20 21:04:51 -07:00
9dca671d0e Pass inputs in examples 2024-05-20 20:43:36 -07:00
c576f0b59a Add note about default inputs and CLI flags 2024-05-20 20:43:36 -07:00
fb530e878f Propagate nixpkgs.config to NixOS and HM 2024-04-06 18:05:28 -07:00
3c8387832b Fix typos in API docs 2024-03-13 08:46:00 -07:00
cecfafe9a4 Set defaults for inputs from flake.lock
If the `src` passed to flakelight contains a flake.lock, it will now be
read and used to set defaults for `inputs`. Explicitly passed inputs
will override this.
2024-03-10 19:26:37 -07:00
360fd2099d Allow devShells to be directly set to derivations 2024-02-25 18:44:31 -08:00
3304eb3746 Nix now requires app programs to be paths in store 2024-02-24 21:31:24 -08:00
efcf01325b Enable faster building of formatter
Since the formatter always depended on devShell packages, building the
formatter involved building all the devShell packages, which can be
slow.

In the case where formatters are set to plain strings, such as
"nixpkgs-fmt", depending on the devShell packages is necessary in order
to put the formatting utility on the path. But when a formatters option
is set to an package, such as "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt",
then that formatter option does not depend on the devShell packages.

Flakelight now detects if any of the configured formatters are using the
first form, and only if so does it add the devShell packages dependency.
This allows the first form to still work, without incurring a cost for
flakes that only use the second form.

Users can use the second form for all formatters options if they wish to
not build the devShell packages when using the formatter.
2024-02-19 02:35:16 -08:00
a50fbcba1a Allow all of devShells config types in devShells
`devShell` accepted either a package def, a submodule value, or a
function to a submodule value. `devShells` only accepted package defs.
This brings all the options of `devShells` to any devShell configured
with `devShells`.
2024-02-07 01:49:29 -08:00
9fe4cb1994 Enable devShell as a function to take packages
Before, devShell could be set to a submodule config, a package def, or a
function taking module args and returning a submodule config. This
changes the last form to take the package set instead.

This enables cleaner configuration by not needing each option to
individually be a function of pkgs. Passing pkgs also gives more
flexibility as all the module args are available under the `moduleArgs`
attr.

Code that relied on module args not directly in the package set will now
have to access them from the `moduleArgs` attr.
2024-02-07 01:49:29 -08:00
1fa95e0d84 Add support for configuring legacyPackages 2024-02-07 01:49:29 -08:00
733cebf6b1 Add option type descriptions to docs 2024-01-15 02:55:01 -08:00
3dd1d890a3 Update nixDir documentation 2024-01-15 00:28:48 -08:00
cc2f42fbdf Enable simpler config of nixos/home configurations
Instead of having to call the configuration generation functions, the
params can just be set, and the functions will be called automatically
with additional useful settings automatically set.
2024-01-14 02:19:34 -08:00
1b51df0be3 Add propogationModule feature
The `propagationModule` config option provides a module that can be used
to propagate flakelight configuration into other module systems such as
NixOS or home-manager.
2024-01-13 18:04:31 -08:00
4b9d78f35f Speed up extracting default package pname
In order to speed up evalutation of flakes setting `packages.default`,
this trys to compute the pname in multiple ways, ordered by speed. The
pname can be set manually, which is fastest. To avoid computing a new
nixpkgs and flakelight overlays, the second option just uses callPackage
from stock nixpkgs. If that fails, the prior, most accurate, method is
used which creates a new nixpkgs with all the overlays available.
2024-01-11 17:35:01 -08:00
bcaa85757e Add pkgsFor module arg
This enables modules to access packages given some system, outside of
per-system attributes.
2024-01-11 17:35:01 -08:00
0760edb005 Refactor autoloadArgs to moduleArgs
The set of args passed to modules is useful for more than just
autoloading. This renames it appropriately and makes it available
through pkgs arguments as well.
2024-01-11 17:35:01 -08:00
2d82ec80e7 Update repository location 2023-12-18 21:46:35 -08:00
8f3bfc39aa Allow devShell to be set to a package definition 2023-12-05 19:44:12 -08:00
3b8c95b637 Add note about flake description to API guide 2023-12-05 18:58:54 -08:00
a4e4a341f2 Allow configuring the stdenv for devShell 2023-12-05 01:00:35 -08:00
64557b89d5 Capitalize API guide filename for discoverability 2023-12-04 23:46:21 -08:00