Commit graph

14 commits

Author SHA1 Message Date
Matt Sturgeon
f99264c1fb
modules/nixpkgs: don't assign elaborated platforms
See https://github.com/NixOS/nixpkgs/pull/376988
2025-02-04 23:57:58 +00:00
Matt Sturgeon
82415eaa5d
modules/nixpkgs: warn about changing defaults
If end-users change the nixpkgs revision to something other than our
default, they can run into issues not picked up by our test suite.
2025-01-19 13:13:15 +00:00
Matt Sturgeon
51474292cd
modules/nixpkgs: remove pkgs default text 2025-01-17 10:16:10 +00:00
Matt Sturgeon
8c6f9ed8c4
lib/modules: allow specifying system as an evalNixvim arg 2025-01-17 10:16:10 +00:00
Matt Sturgeon
7790746d38
modules/nixpkgs: add useGlobalPackages option 2025-01-17 10:16:09 +00:00
Matt Sturgeon
912841c1a7
modules/nixpkgs: construct an instance of nixpkgs.source 2025-01-17 09:37:03 +00:00
Matt Sturgeon
8dc8fa38b0
modules/nixpkgs: add hostPlatform & buildPlatform options 2025-01-17 09:37:03 +00:00
Matt Sturgeon
5bd04ce09a
modules/nixpkgs: add config option 2025-01-17 09:37:02 +00:00
Matt Sturgeon
9487403532
modules/context: flake option, provides access to our flake 2024-12-23 12:18:06 +00:00
Matt Sturgeon
bef9feb446
lib/modules: pass inputs.nixpkgs into evalNixvim
Expose our locked nixpkgs as the `nixpkgs.source` module options.

This only happens when `evalNixvim` is part of a lib that was provided
`flake` as an argument.

Stubbed the `nixpkgs.source` option for now. Eventually, this will be
used to construct `pkgs` internally. For now, it's purely informational.
2024-12-15 18:41:23 +00:00
Matt Sturgeon
c4ad4d0b2e
modules/nixpkgs: add overlays option
Based on the `nixpkgs.overlays` option available in NixOS, allows users
to further customize the `pkgs` instance used when evaluating nixvim.

The standard module tests are now provided a few extra module args to
enable a test where we instantiate a custom nixpkgs instance.
2024-10-19 21:11:42 +01:00
Matt Sturgeon
b9d17d5e6c
modules/nixpkgs: restructure nixpkgs.pkgs.isDefined assertion
We can throw inline to ensure our error is displayed before any attempt
to use the (non-existent) `pkgs` arg results in a less helpful error.
2024-10-19 21:11:42 +01:00
Matt Sturgeon
4b7a41276a
modules/nixpkgs: initial pkgs option, drop defaultPkgs specialArg
This minimal implementation allows `nixpkgs.pkgs` to be defined, but
does not implement evaluating an instance from a pkgsPath when _not_
defined.

The `defaultPkgs` specialArg is dropped in favour of `nixpkgs.pkgs`
being defined. If it's not defined, an assertion is thrown.

In the future, a nixpkgs source path can be supplied, defaulting to the
flake's `inputs.nixpkgs`. Along with other `nixpkgs.*` options, this
will allow a `pkgs` instance to be evaluated within the module eval.
2024-09-27 09:30:12 +01:00
Matt Sturgeon
8c3d521bff
modules: move nixpkgs module to top-level modules
Make `pkgs` available to files submodules by passing _all_ module args
through. We already did this for `specialArgs`.
2024-09-27 09:30:12 +01:00
Renamed from modules/misc/nixpkgs.nix (Browse further)