From ef0fa015a8236241bdcc27f32e6a4aa537d96cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Sat, 5 Jul 2025 20:03:57 +0200 Subject: [PATCH] top-level/output: add enablePrintInit option --- modules/top-level/output.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/top-level/output.nix b/modules/top-level/output.nix index 87b93ff6..350562a7 100644 --- a/modules/top-level/output.nix +++ b/modules/top-level/output.nix @@ -81,6 +81,17 @@ in ''; }; + enablePrintInit = mkOption { + type = types.bool; + default = true; + example = false; + description = '' + Install a tool that shows the content of the generated `init.lua` file. + + Run it using `${config.build.printInitPackage.meta.mainProgram}`. + ''; + }; + build = { # TODO: `standalonePackage`; i.e. package + printInitPackage + man-docs bundled together @@ -287,10 +298,12 @@ in with config.build; [ nvimPackage - printInitPackage ] ++ lib.optionals config.enableMan [ manDocsPackage + ] + ++ lib.optionals config.enablePrintInit [ + printInitPackage ]; meta.mainProgram = "nvim"; };