-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d879e1e
commit d6bec3b
Showing
3 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
imports = [ | ||
./neovide | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
|
||
let | ||
|
||
cfg = config.programs.neovide; | ||
|
||
settingsFormat = pkgs.formats.toml { }; | ||
|
||
in { | ||
meta.maintainers = with hm.maintainers; [ tomodachi94 ]; | ||
|
||
options.programs.neovide = { | ||
enable = mkEnableOption | ||
"neovide, a simple, no-nonsense, cross-platform graphical user interface for Neovim"; | ||
|
||
package = mkPackageOption pkgs "neovide" { }; | ||
|
||
settings = mkOption { | ||
type = settingsFormat.type; | ||
example = lib.literalExpression '' | ||
{ | ||
wsl = false; | ||
no-multigrid = false; | ||
vsync = true; | ||
maximized = false; | ||
srgb = false; | ||
idle = true; | ||
neovim-bin = "${pkgs.lib.getExe myCustomNeovimPackage}"; | ||
frame = "full"; | ||
title-hidden = true; | ||
tabs = true; | ||
font = { | ||
normal = [ "MonoLisa Nerd Font" ]; | ||
size = 18; | ||
features = { | ||
MonoLisa = [ "+ss01" "+ss07" "+ss11" "-calt" "+ss09" "+ss02" "+ss14" "+ss16" "+ss17" ]; | ||
}; | ||
}; | ||
} | ||
''; | ||
default = { | ||
neovim-bin = lib.mkDefault (lib.getExe config.programs.neovim.package); # Respect the user's programs.neovim configuration | ||
}; | ||
description = '' | ||
Neovide configuration, written to {file}`$XDG_CONFIG_HOME/neovide/config.toml`. | ||
For available settings and default values, see <https://neovide.dev/config-file.html>. | ||
''; | ||
}; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
home.packages = [ cfg.package ]; | ||
|
||
xdg.configFile."neovide/config.toml".source = | ||
settingsFormat.generate "neovide-config.toml" cfg.settings; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters