From 80c67caf1913947d3b51ba3948536cb091940dbf Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 30 Sep 2024 15:18:32 +0000 Subject: [PATCH] modules/fs: remove unused `symlink.targetName` option --- modules/fs/default.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/modules/fs/default.nix b/modules/fs/default.nix index 72eec2c0d..879452a33 100644 --- a/modules/fs/default.nix +++ b/modules/fs/default.nix @@ -103,19 +103,16 @@ let default = null; description = "create a file in the /nix/store with the provided text and use that as the target"; }; - targetName = mkOption { - type = types.str; - default = path-lib.leaf path; - description = "name of file to create if generated from text"; - }; }; - config = { + config = let + name = path-lib.leaf path; + in { target = lib.mkIf (config.text != null) ( (pkgs.writeTextFile { - name = path-lib.leaf path; + inherit name; text = config.text; - destination = "/${config.targetName}"; - }) + "/${config.targetName}" + destination = "/${name}"; + }) + "/${name}" ); }; });