feat(options): add defaultEditor option (#589)

This commit is contained in:
mrtnvgr 2023-09-18 21:38:58 +07:00 committed by GitHub
parent 358f5732f2
commit bfd1c5bace
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 6 deletions

View file

@ -18,7 +18,10 @@ in {
default = {};
type = types.submodule ([
{
options.enable = mkEnableOption "nixvim";
options = {
enable = mkEnableOption "nixvim";
defaultEditor = mkEnableOption "Set nixvim as the default editor";
};
}
]
++ shared.topLevelModules);
@ -34,7 +37,7 @@ in {
xdg.configFile = files;
})
{
inherit (cfg) warnings assertions;
inherit (cfg) warnings assertions defaultEditor;
}
]);
}

View file

@ -31,7 +31,7 @@ in {
type = types.bool;
default = false;
description = ''
Symlink <command>vi</command> to <command>nvim</command> binary.
Symlink `vi` to `nvim` binary.
'';
};
@ -39,7 +39,7 @@ in {
type = types.bool;
default = false;
description = ''
Symlink <command>vim</command> to <command>nvim</command> binary.
Symlink `vim` to `nvim` binary.
'';
};

View file

@ -18,7 +18,10 @@ in {
default = {};
type = types.submodule ([
{
options.enable = mkEnableOption "nixvim";
options = {
enable = mkEnableOption "nixvim";
defaultEditor = mkEnableOption "Set nixvim as the default editor";
};
config.wrapRc = mkForce true;
}
]
@ -36,7 +39,7 @@ in {
environment.variables."VIM" = "/etc/nvim";
})
{
inherit (cfg) warnings assertions;
inherit (cfg) warnings assertions defaultEditor;
}
]);
}