mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
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.
33 lines
561 B
Nix
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;
|
|
};
|
|
}
|