Commit Graph

17 Commits

Author SHA1 Message Date
Archit Gupta
fe5916eb40 Use submoduleWith instead of submodule
This results in not enabling shorthandOnlyDefinesConfig, allowing
imports to be set in submodules. This can, for example, allow a devShell
to import another devShell's config to extend it.
2024-03-21 04:12:42 -07:00
Archit Gupta
360fd2099d Allow devShells to be directly set to derivations 2024-02-25 18:44:31 -08:00
Archit Gupta
3304eb3746 Nix now requires app programs to be paths in store 2024-02-24 21:31:24 -08:00
Archit Gupta
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
Archit Gupta
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
Archit Gupta
1fa95e0d84 Add support for configuring legacyPackages 2024-02-07 01:49:29 -08:00
Archit Gupta
787ce03070 Support package functions without named args 2024-01-16 11:01:32 -08:00
Archit Gupta
e143290511 Fix packages depending on pkg with same name
If a package depends on a package with same name, this causes an
infinite recursion as it tries to depend on itself. This is not likely
what was intended, and breaks ability to re-export packages, so instead
if a package depends on the same name, that now refers to the previous
version.
2024-01-16 10:48:48 -08:00
Archit Gupta
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
Archit Gupta
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
Archit Gupta
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
Archit Gupta
81371a8bf4 Add test for overridden devShell without other options 2023-12-05 22:31:36 -08:00
Archit Gupta
8f3bfc39aa Allow devShell to be set to a package definition 2023-12-05 19:44:12 -08:00
Archit Gupta
27f9ac981c Fix formatter when devShell is null
The formatter uses `devShell.packages` for its path which is not
available when devShell is null. A default value of empty list should be
used when devShell is null.
2023-12-05 02:06:23 -08:00
Archit Gupta
dccabae216 Clean up devShell options
Using a submodule for devShell removes the need to make every option
nullable and the need to check all of them. By using nullOr submodule,
we can tell if the value has been set and have default values for
options.

This also enables enabling a devShell with no options set.
2023-12-05 01:29:42 -08:00
Archit Gupta
a4e4a341f2 Allow configuring the stdenv for devShell 2023-12-05 01:00:35 -08:00
Archit Gupta
8bfdd263ed Add tests 2023-12-04 23:48:31 -08:00