mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-30 15:44:41 +02:00
wrappers: simplify modules
This commit is contained in:
parent
6252a41fc6
commit
3d96960348
7 changed files with 30 additions and 18 deletions
8
wrappers/modules/darwin.nix
Normal file
8
wrappers/modules/darwin.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
imports = [ ./enable.nix ];
|
||||
|
||||
config = {
|
||||
wrapRc = lib.mkForce true;
|
||||
};
|
||||
}
|
4
wrappers/modules/enable.nix
Normal file
4
wrappers/modules/enable.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.enable = lib.mkEnableOption "nixvim";
|
||||
}
|
|
@ -1,8 +1,7 @@
|
|||
{ lib }:
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
options = {
|
||||
enable = mkEnableOption "nixvim";
|
||||
defaultEditor = mkEnableOption "nixvim as the default editor";
|
||||
|
||||
vimdiffAlias = mkOption {
|
||||
|
@ -13,4 +12,6 @@ with lib;
|
|||
'';
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ ./enable.nix ];
|
||||
}
|
||||
|
|
12
wrappers/modules/nixos.nix
Normal file
12
wrappers/modules/nixos.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options = {
|
||||
defaultEditor = lib.mkEnableOption "nixvim as the default editor";
|
||||
};
|
||||
|
||||
imports = [ ./enable.nix ];
|
||||
|
||||
config = {
|
||||
wrapRc = lib.mkForce true;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue