nix-community.nixvim/wrappers/darwin.nix
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

33 lines
561 B
Nix

self:
{
pkgs,
config,
lib,
...
}:
let
inherit (lib)
mkIf
;
cfg = config.programs.nixvim;
evalArgs = {
extraSpecialArgs = {
darwinConfig = config;
};
modules = [
./modules/darwin.nix
];
};
in
{
_file = ./darwin.nix;
imports = [ (import ./_shared.nix { inherit self evalArgs; }) ];
config = mkIf cfg.enable {
environment.systemPackages = [
cfg.build.package
cfg.build.printInitPackage
] ++ lib.optional cfg.enableMan self.packages.${pkgs.stdenv.hostPlatform.system}.man-docs;
};
}