@ -331,13 +331,20 @@
Disable the permission changes to $HOME/.ssh/*. This feature is
enabled by default.
The following four "local" configurations are not stored in the
The following five "local" configurations are not stored in the
$HOME/.config/yadm/config, they are stored in the local repository.
local.class
Specify a class for the purpose of symlinking alternate files.
By default, no class will be matched.
By default, no class will be matched. The local host can be
assigned multiple classes using command:
yadm config --add local.class < additional-class >
local.arch
Override the architecture for the purpose of symlinking alter-
nate files.
local.hostname
Override the hostname for the purpose of symlinking alternate
@ -384,23 +391,31 @@
Valid if the value matches the current user. Current user is
calculated by running id -u -n.
hostname, h
Valid if the value matches the short hostname. Hostname is cal-
culated by running uname -n, and trimming off any domain.
class, c
Valid if the value matches the local.class configuration. Class
must be manually set using yadm config local.class < class > . See
the CONFIGURATION section for more details about setting
local.class.
distro, d
Valid if the value matches the distro. Distro is calculated by
running lsb_release -si or by inspecting the ID from /etc/os-
release.
distro_family, f
Valid if the value matches the distro family. Distro family is
calculated by inspecting the ID_LIKE line from /etc/os-release.
os, o Valid if the value matches the OS. OS is calculated by running
uname -s.
class, c
Valid if the value matches the local.class configuration. Class
must be manually set using yadm config local.class < class > . See
the CONFIGURATION section for more details about setting
local.class.
hostname, h
Valid if the value matches the short hostname. Hostname is cal-
culated by running uname -n, and trimming off any domain.
arch, a
Valid if the value matches the architecture. Architecture is
calculated by running uname -m.
default
Valid when no other alternate is valid.
@ -450,7 +465,7 @@
$HOME/path/example.txt -> $HOME/path/example.txt##os.Darwin,host-
name.host2
However, on another Macbook named "host3", yadm will create a symbolic
However, on another Mack book named "host3", yadm will create a symbolic
link which looks like this:
$HOME/path/example.txt -> $HOME/path/example.txt##os.Darwin
@ -474,7 +489,7 @@
then no link will be created.
Links are also created for directories named this way, as long as they
have at least one yadm managed file within them.
have at least one yadm managed file within them (at the top level) .
yadm will automatically create these links by default. This can be dis-
abled using the yadm.auto-alt configuration. Even if disabled, links
@ -488,9 +503,9 @@
yadm config local.class Work
Similarly, the values of os, hostname, and user can be manually over-
ridden using the configuration options local.os, local.hostname, and
local.user.
Similarly, the values of architecture, os, hostname, and user can be
manually overridden using the configuration options local.arch,
local.os, local.hostname, and local. user.
## TEMPLATES
@ -533,13 +548,17 @@
plate:
Default Jinja or ESH Description
------------- ------------- --------------------------
yadm.class YADM_CLASS Locally defined yadm class
------------- ------------- ----------------------------
yadm.arch YADM_ARCH uname -m
yadm.class YADM_CLASS Last locally defined class
yadm.classes YADM_CLASSES All classes
yadm.distro YADM_DISTRO lsb_release -si
yadm.distro_family YADM_DISTRO_FAMILY ID_LIKE from /etc/os-release
yadm.hostname YADM_HOSTNAME uname -n (without domain)
yadm.os YADM_OS uname -s
yadm.user YADM_USER id -u -n
yadm.source YADM_SOURCE Template filename
yadm.user YADM_USER id -u -n
env.VAR Environment variable VAR
NOTE: The OS for "Windows Subsystem for Linux" is reported as "WSL",
even though uname identifies as "Linux".