mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
neovide: add module
Neovide is a simple, no-nonsense, cross-platform graphical user interface for Neovim See <https://neovide.dev/>. Used ruff's module as reference during creation.
This commit is contained in:
parent
4c8647b1ed
commit
7923c69152
8 changed files with 121 additions and 0 deletions
|
@ -276,6 +276,12 @@
|
||||||
github = "nilp0inter";
|
github = "nilp0inter";
|
||||||
githubId = 1224006;
|
githubId = 1224006;
|
||||||
};
|
};
|
||||||
|
NitroSniper = {
|
||||||
|
name = "Nitro Sniper";
|
||||||
|
email = "nitro@ortin.dev";
|
||||||
|
github = "NitroSniper";
|
||||||
|
githubId = 44097331;
|
||||||
|
};
|
||||||
seylerius = {
|
seylerius = {
|
||||||
email = "sable@seyleri.us";
|
email = "sable@seyleri.us";
|
||||||
name = "Sable Seyler";
|
name = "Sable Seyler";
|
||||||
|
|
|
@ -1713,6 +1713,17 @@ in {
|
||||||
An unofficial GUI wrapper around the Tailscale CLI client.
|
An unofficial GUI wrapper around the Tailscale CLI client.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2024-09-13T09:50:49+00:00";
|
||||||
|
message = ''
|
||||||
|
A new module is available: 'programs.neovide'.
|
||||||
|
|
||||||
|
Neovide is a simple, no-nonsense, cross-platform graphical user
|
||||||
|
interface for Neovim (an aggressively refactored and updated Vim
|
||||||
|
editor).
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,6 +167,7 @@ let
|
||||||
./programs/ncspot.nix
|
./programs/ncspot.nix
|
||||||
./programs/ne.nix
|
./programs/ne.nix
|
||||||
./programs/neomutt.nix
|
./programs/neomutt.nix
|
||||||
|
./programs/neovide.nix
|
||||||
./programs/neovim.nix
|
./programs/neovim.nix
|
||||||
./programs/newsboat.nix
|
./programs/newsboat.nix
|
||||||
./programs/nheko.nix
|
./programs/nheko.nix
|
||||||
|
|
52
modules/programs/neovide.nix
Normal file
52
modules/programs/neovide.nix
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.programs.neovide;
|
||||||
|
settingsFormat = pkgs.formats.toml { };
|
||||||
|
|
||||||
|
in {
|
||||||
|
meta.maintainers = [ lib.hm.maintainers.NitroSniper ];
|
||||||
|
|
||||||
|
options.programs.neovide = {
|
||||||
|
enable = lib.mkEnableOption "Neovide, No Nonsense Neovim Client in Rust";
|
||||||
|
|
||||||
|
package = lib.mkPackageOption pkgs "neovide" { };
|
||||||
|
|
||||||
|
settings = lib.mkOption {
|
||||||
|
type = settingsFormat.type;
|
||||||
|
example = lib.literalExpression ''
|
||||||
|
{
|
||||||
|
fork = false;
|
||||||
|
frame = "full";
|
||||||
|
idle = true;
|
||||||
|
maximized = false;
|
||||||
|
neovim-bin = "/usr/bin/nvim";
|
||||||
|
no-multigrid = false;
|
||||||
|
srgb = false;
|
||||||
|
tabs = true;
|
||||||
|
theme = "auto";
|
||||||
|
title-hidden = true;
|
||||||
|
vsync = true;
|
||||||
|
wsl = false;
|
||||||
|
|
||||||
|
font = {
|
||||||
|
normal = [];
|
||||||
|
size = 14.0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Neovide configuration.
|
||||||
|
For available settings see <https://neovide.dev/config-file.html>.
|
||||||
|
For any option not found will need to be done in your neovim's config instead.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
home.packages = [ cfg.package ];
|
||||||
|
xdg.configFile."neovide/config.toml".source =
|
||||||
|
settingsFormat.generate "config.toml" cfg.settings;
|
||||||
|
};
|
||||||
|
}
|
|
@ -110,6 +110,7 @@ in import nmtSrc {
|
||||||
./modules/programs/ncmpcpp
|
./modules/programs/ncmpcpp
|
||||||
./modules/programs/ne
|
./modules/programs/ne
|
||||||
./modules/programs/neomutt
|
./modules/programs/neomutt
|
||||||
|
./modules/programs/neovide
|
||||||
./modules/programs/neovim
|
./modules/programs/neovim
|
||||||
./modules/programs/newsboat
|
./modules/programs/newsboat
|
||||||
./modules/programs/nheko
|
./modules/programs/nheko
|
||||||
|
|
1
tests/modules/programs/neovide/default.nix
Normal file
1
tests/modules/programs/neovide/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ neovide-program = ./neovide.nix; }
|
15
tests/modules/programs/neovide/expected.toml
Normal file
15
tests/modules/programs/neovide/expected.toml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
fork = false
|
||||||
|
frame = "full"
|
||||||
|
idle = true
|
||||||
|
maximized = false
|
||||||
|
neovim-bin = "/usr/bin/nvim"
|
||||||
|
no-multigrid = false
|
||||||
|
srgb = false
|
||||||
|
tabs = true
|
||||||
|
theme = "auto"
|
||||||
|
title-hidden = true
|
||||||
|
vsync = true
|
||||||
|
wsl = false
|
||||||
|
[font]
|
||||||
|
normal = []
|
||||||
|
size = 14.0
|
34
tests/modules/programs/neovide/neovide.nix
Normal file
34
tests/modules/programs/neovide/neovide.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.neovide = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
fork = false;
|
||||||
|
frame = "full";
|
||||||
|
idle = true;
|
||||||
|
maximized = false;
|
||||||
|
neovim-bin = "/usr/bin/nvim";
|
||||||
|
no-multigrid = false;
|
||||||
|
srgb = false;
|
||||||
|
tabs = true;
|
||||||
|
theme = "auto";
|
||||||
|
title-hidden = true;
|
||||||
|
vsync = true;
|
||||||
|
wsl = false;
|
||||||
|
|
||||||
|
font = {
|
||||||
|
normal = [ ];
|
||||||
|
size = 14.0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
test.stubs.neovide = { };
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileExists home-files/.config/neovide/config.toml
|
||||||
|
assertFileContent home-files/.config/neovide/config.toml ${./expected.toml}
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue