diff --git a/maintainers/default.nix b/maintainers/default.nix index ed6c2237..569a3363 100644 --- a/maintainers/default.nix +++ b/maintainers/default.nix @@ -116,4 +116,9 @@ github = "aliaslion"; githubId = "122117018"; }; + nuclear-squid = { + name = "Nuclear-Squid"; + github = "Nuclear-Squid"; + githubId = 70967142; + }; } diff --git a/wrapperModules/n/neovide/module.nix b/wrapperModules/n/neovide/module.nix new file mode 100644 index 00000000..f751f46a --- /dev/null +++ b/wrapperModules/n/neovide/module.nix @@ -0,0 +1,33 @@ +{ + config, + lib, + wlib, + pkgs, + ... +}: +{ + imports = [ wlib.modules.default ]; + options = { + settings = lib.mkOption { + type = wlib.types.structuredValueWith { + nullable = false; + typeName = "TOML"; + }; + default = {}; + description = '' + Configuration passed to neovide using the `NEOVIDE_CONFIG` environment variable. + See for the config options. + ''; + }; + config = { + package = pkgs.neovide; + env.NEOVIDE_CONFIG = "${config.binDir}/config.toml"; + constructFiles.generatedConfig = { + content = builtins.toJSON config.settings; + relPath = "${config.binDir}/config.toml"; + builder = ''${pkgs.remarshal}/bin/json2toml "$1" "$2"''; + }; + meta.maintainers = [ wlib.maintainers.nuclear-squid ]; + }; + }; +}