home-manager: Simplify the directory creation

The checks should be unnecessary, since `mkdir -p` is idempotent.
This commit is contained in:
talyz 2021-01-27 12:37:08 +01:00
parent 4d655d7842
commit 48b5d5291c
No known key found for this signature in database
GPG key ID: 2DED2151F4671A2B

View file

@ -232,12 +232,9 @@ in
systemctl = "XDG_RUNTIME_DIR=\${XDG_RUNTIME_DIR:-/run/user/$(id -u)} ${config.systemd.user.systemctlPath}";
in
''
if [[ ! -e ${targetDir} ]]; then
mkdir -p ${targetDir}
fi
if [[ ! -e ${mountPoint} ]]; then
mkdir -p ${mountPoint}
fi
mkdir -p ${targetDir}
mkdir -p ${mountPoint}
if ${mount} | grep -F ${mountPoint}' ' >/dev/null; then
if ! ${mount} | grep -F ${mountPoint}' ' | grep -F bindfs; then
if ! ${mount} | grep -F ${mountPoint}' ' | grep -F ${targetDir}' ' >/dev/null; then