Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
tomodachi94 committed Apr 14, 2024
1 parent d879e1e commit d6bec3b
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
5 changes: 5 additions & 0 deletions home-modules/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
imports = [
./neovide
];
}
59 changes: 59 additions & 0 deletions home-modules/neovide/default.nix
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;
};
}
4 changes: 4 additions & 0 deletions home/common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@
./syncthing
./zoxide
./zsh

../../home-modules
];
programs.neovide.enable = true;
programs.neovide.settings.wsl = true;
}

0 comments on commit d6bec3b

Please sign in to comment.