.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "CDIST-TYPE__DOT_FILE" "7" "Jan 15, 2023" "7.0.0" "cdist" .SH NAME .sp cdist\-type__dot_file \- install file under user\(aqs home directory .SH DESCRIPTION .sp This type installs a file (=\fI__object_id\fP) under user\(aqs home directory, providing a way to install per\-user configuration files. File owner and group is deduced from user, for who file is installed. .sp Unlike regular __file type, you do not need make any assumptions, where user\(aqs home directory is. .SH REQUIRED PARAMETERS .INDENT 0.0 .TP .B user User, for who file is installed .UNINDENT .SH OPTIONAL PARAMETERS .INDENT 0.0 .TP .B dirmode forwarded to \fB__directory\fP type as mode .TP .B mode forwarded to \fB__file\fP type .TP .B state forwarded to \fB__file\fP type .TP .B source forwarded to \fB__file\fP type .TP .B file forwarded to \fB__file\fP type This can be used if multiple users need to have a dotfile updated, which will result in duplicate object id errors. When using the file parameter the object id can be some unique value. .UNINDENT .SH MESSAGES .sp This type inherits all messages from \fBfile\fP type, and do not add any new. .SH EXAMPLES .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C # Install .forward file for user \(aqalice\(aq. Since state is \(aqpresent\(aq, # user is not meant to edit this file, all changes will be overridden. # It is good idea to put warning about it in file itself. __dot_file .forward \-\-user alice \-\-source "$__files/forward" # Install .muttrc for user \(aqbob\(aq, if not already present. User can safely # edit it, his changes will not be overwritten. __dot_file .muttrc \-\-user bob \-\-source "$__files/recommended_mutt_config" \-\-state exists # Install default xmonad config for user \(aqeve\(aq. Parent directory is created automatically. __dot_file .xmonad/xmonad.hs \-\-user eve \-\-state exists \-\-source "$__files/xmonad.hs" # install .vimrc for root and some users for user in root userx usery userz; do __dot_file "${user}_dot_vimrc" \e \-\-user $user \e \-\-file .vimrc \e \-\-state exists \e \-\-source "$__files/$user/.vimrc" done .ft P .fi .UNINDENT .UNINDENT .SH SEE ALSO .sp \fBcdist\-type__file\fP(7) .SH COPYING .sp Copyright (C) 2015 Dmitry Bogatov. Free use of this software is granted under the terms of the GNU General Public License version 3 or later (GPLv3+). .SH COPYRIGHT ungleich GmbH 2021 .\" Generated by docutils manpage writer. .