From 367380bd8462419f0199d262b058fadfb43823ff Mon Sep 17 00:00:00 2001 From: traxys Date: Fri, 5 Jul 2024 22:08:25 +0200 Subject: [PATCH] modules/output: Remove the initContent option This (internal) option introduces IFD, and can be substituted internally with the `initPath` option easily. If the content is required somewhere users can use readFile on the initPath, though it will result in an IFD in their project. --- modules/top-level/output.nix | 8 -------- wrappers/hm.nix | 2 +- wrappers/nixos.nix | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/modules/top-level/output.nix b/modules/top-level/output.nix index e81a64e1..36a53a72 100644 --- a/modules/top-level/output.nix +++ b/modules/top-level/output.nix @@ -61,13 +61,6 @@ with lib; visible = false; }; - initContent = mkOption { - type = types.str; - description = "The content of the `init.lua` file."; - readOnly = true; - visible = false; - }; - printInitPackage = mkOption { type = types.package; description = "A tool to show the content of the generated `init.lua` file."; @@ -142,7 +135,6 @@ with lib; { type = lib.mkForce "lua"; finalPackage = wrappedNeovim; - initContent = readFile init; initPath = "${init}"; printInitPackage = pkgs.writeShellApplication { diff --git a/wrappers/hm.nix b/wrappers/hm.nix index 7f7e0ddf..7f5f848e 100644 --- a/wrappers/hm.nix +++ b/wrappers/hm.nix @@ -18,7 +18,7 @@ let shared = import ./_shared.nix helpers args; cfg = config.programs.nixvim; files = shared.configFiles // { - "nvim/init.lua".text = cfg.initContent; + "nvim/init.lua".source = cfg.initPath; }; in { diff --git a/wrappers/nixos.nix b/wrappers/nixos.nix index 1020f27f..cd10b075 100644 --- a/wrappers/nixos.nix +++ b/wrappers/nixos.nix @@ -19,7 +19,7 @@ let shared = import ./_shared.nix helpers args; cfg = config.programs.nixvim; files = shared.configFiles // { - "nvim/sysinit.lua".text = cfg.initContent; + "nvim/sysinit.lua".source = cfg.initPath; }; in {