wrappers: simplify modules

This commit is contained in:
Matt Sturgeon 2024-07-02 15:06:39 +01:00 committed by MattSturgeon
parent 6252a41fc6
commit 3d96960348
7 changed files with 30 additions and 18 deletions

View file

@ -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;

View file

@ -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;

View file

@ -0,0 +1,8 @@
{ lib, ... }:
{
imports = [ ./enable.nix ];
config = {
wrapRc = lib.mkForce true;
};
}

View file

@ -0,0 +1,4 @@
{ lib, ... }:
{
options.enable = lib.mkEnableOption "nixvim";
}

View file

@ -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 ];
}

View file

@ -0,0 +1,12 @@
{ lib, ... }:
{
options = {
defaultEditor = lib.mkEnableOption "nixvim as the default editor";
};
imports = [ ./enable.nix ];
config = {
wrapRc = lib.mkForce true;
};
}

View file

@ -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;