diff options
author | Robert Helgesson <robert@rycee.net> | 2020-07-31 00:54:23 +0200 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2020-07-31 00:54:23 +0200 |
commit | 79a2320fd0930f904a605c1d84f87e8af9dbd606 (patch) | |
tree | c3da6df1def5778f1e987c3c0cc3b6559bf3a3c8 /modules/lib | |
parent | bb6eb9b13e3d40a22633fb80cbc75347af5bed3c (diff) |
files: minor documentation improvements
Diffstat (limited to 'modules/lib')
-rw-r--r-- | modules/lib/file-type.nix | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/modules/lib/file-type.nix b/modules/lib/file-type.nix index f82e9170ffc..f61a24ca67d 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 "<name>"; 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 + <link linkend="opt-home.file._name__.source">home.file.<name?>.source</link> + 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. - </para><para> - This may refer to a directory. + Path of the source file or directory. If + <link linkend="opt-home.file._name__.text">home.file.<name?>.text</link> + is non-null then this option will automatically point to a file + containing that text. ''; }; |