mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
wrappers: simplify modules
This commit is contained in:
parent
6252a41fc6
commit
3d96960348
7 changed files with 30 additions and 18 deletions
|
@ -33,12 +33,7 @@ in
|
|||
darwinConfig = config;
|
||||
inherit helpers;
|
||||
};
|
||||
modules = [
|
||||
{
|
||||
options.enable = mkEnableOption "nixvim";
|
||||
config.wrapRc = mkForce true;
|
||||
}
|
||||
] ++ shared.topLevelModules;
|
||||
modules = [ ./modules/darwin.nix ] ++ shared.topLevelModules;
|
||||
};
|
||||
};
|
||||
nixvim.helpers = shared.helpers;
|
||||
|
|
|
@ -35,7 +35,7 @@ in
|
|||
hmConfig = config;
|
||||
inherit helpers;
|
||||
};
|
||||
modules = [ (import ./modules/hm.nix { inherit lib; }) ] ++ shared.topLevelModules;
|
||||
modules = [ ./modules/hm.nix ] ++ shared.topLevelModules;
|
||||
};
|
||||
};
|
||||
nixvim.helpers = shared.helpers;
|
||||
|
|
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;
|
||||
};
|
||||
}
|
|
@ -36,15 +36,7 @@ in
|
|||
nixosConfig = config;
|
||||
inherit helpers;
|
||||
};
|
||||
modules = [
|
||||
{
|
||||
options = {
|
||||
enable = mkEnableOption "nixvim";
|
||||
defaultEditor = mkEnableOption "nixvim as the default editor";
|
||||
};
|
||||
config.wrapRc = mkForce true;
|
||||
}
|
||||
] ++ shared.topLevelModules;
|
||||
modules = [ ./modules/nixos.nix ] ++ shared.topLevelModules;
|
||||
};
|
||||
};
|
||||
nixvim.helpers = shared.helpers;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue