CDIST-TYPE__DOT_FILE(7)
β¨ cdist-type__dot_file β¨
okay bestie, welcome to cdist-type__dot_file(7) β the manpage that's gonna make per-user dotfiles feel like a main character moment π
π NAME π
cdist-type__dot_file β install a file under a user's home directory π β¨
πΈ DESCRIPTION πΈ
So like. This type installs a file (and that file is literally the __object_id, no cap) under a user's home directory. It's giving "per-user config files, but make it effortless" π
The file owner and group? Deduced from the user. As in, the user you're installing the file for. The way that works is just... yes π
And here's the iconic part: unlike the regular __file type, you do not need to make any assumptions about where the user's home directory actually is. You just don't. We handle it. Periodt π¦
π REQUIRED PARAMETERS π
userβ the user, for who file is installed. yeah you gotta tell us who's getting the dotfile, that's non-negotiable bestie π
π OPTIONAL PARAMETERS π
dirmodeβ forwarded to the__directorytype asmodeποΈmodeβ forwarded to the__filetypestateβ forwarded to the__filetypesourceβ forwarded to the__filetypefileβ forwarded to the__filetype. This one can be used if multiple users need to have a dotfile updated, which will result in duplicate object id errors π When you use thefileparameter, the object id can be some unique value β¨
π MESSAGES π
This type inherits all messages from the file type, and does not add any new ones. no extra drama, no new lore π«Ά
π EXAMPLES π
# Install .forward file for user 'alice'. Since state is 'present',
# 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 'bob', 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 'eve'. 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" \
--user $user \
--file .vimrc \
--state exists \
--source "$__files/$user/.vimrc"
done
okay the last one?? a whole loop?? one type, four users, one.vimrceach?? that's the--fileparameter doing its little dance so the object ids stay unique. obsessed π₯
π SEE ALSO π
cdist-type__file(7) β go read that one too, it's the sibling π
π COPYING π
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+). π
ποΈ COPYRIGHT ποΈ
ungleich GmbH 2021
and that's the whole page bestie!! π this was version 7.0.0, dated Jul 31, 2022, brought to you by the fine folks at ungleich GmbH β go forth and dotfile responsibly π β¨π
π¦ where this page comes from
- fedora 43: cdist 7.0.0-16.fc43 Β· GPL-3.0-only
- fedora 44: cdist 7.0.0-18.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms