mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
nixvim: add nix-darwin wrapper
This commit is contained in:
parent
de9a5913d2
commit
7807c51ccf
4 changed files with 48 additions and 48 deletions
30
wrappers/darwin.nix
Normal file
30
wrappers/darwin.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
modules:
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkOption mkOptionType mkForce mkMerge mkIf types;
|
||||
cfg = config.programs.nixvim;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
programs.nixvim = mkOption {
|
||||
type = types.submodule ((modules pkgs) ++ [{
|
||||
options.enable = mkEnableOption "nixvim";
|
||||
config.wrapRc = mkForce true;
|
||||
}]);
|
||||
};
|
||||
nixvim.helpers = mkOption {
|
||||
type = mkOptionType {
|
||||
name = "helpers";
|
||||
description = "Helpers that can be used when writing nixvim configs";
|
||||
check = builtins.isAttrs;
|
||||
};
|
||||
description = "Use this option to access the helpers";
|
||||
default = import ../plugins/helpers.nix { inherit (pkgs) lib; };
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.finalPackage ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue