modules/fs: remove unused symlink.targetName option

This commit is contained in:
2024-09-30 15:18:32 +00:00
parent 1eea81c4ff
commit 80c67caf19

View File

@@ -103,19 +103,16 @@ let
default = null; default = null;
description = "create a file in the /nix/store with the provided text and use that as the target"; 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 = let
config = { name = path-lib.leaf path;
in {
target = lib.mkIf (config.text != null) ( target = lib.mkIf (config.text != null) (
(pkgs.writeTextFile { (pkgs.writeTextFile {
name = path-lib.leaf path; inherit name;
text = config.text; text = config.text;
destination = "/${config.targetName}"; destination = "/${name}";
}) + "/${config.targetName}" }) + "/${name}"
); );
}; };
}); });