From 79a2320fd0930f904a605c1d84f87e8af9dbd606 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Fri, 31 Jul 2020 00:54:23 +0200 Subject: [PATCH] files: minor documentation improvements --- modules/lib/file-type.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/lib/file-type.nix b/modules/lib/file-type.nix index f82e9170f..f61a24ca6 100644 --- a/modules/lib/file-type.nix +++ b/modules/lib/file-type.nix @@ -21,6 +21,7 @@ with lib; absPath = if hasPrefix "/" p then p else "${basePath}/${p}"; in removePrefix (homeDirectory + "/") absPath; + defaultText = literalExample ""; description = '' Path to target file relative to ${basePathDesc}. ''; @@ -29,17 +30,20 @@ with lib; text = mkOption { default = null; type = types.nullOr types.lines; - description = "Text of the file."; + description = '' + Text of the file. If this option is null then + home.file.<name?>.source + must be set. + ''; }; source = mkOption { type = types.path; description = '' - Path of the source file. The file name must not start - with a period since Nix will not allow such names in - the Nix store. - - This may refer to a directory. + Path of the source file or directory. If + home.file.<name?>.text + is non-null then this option will automatically point to a file + containing that text. ''; };