summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-06-06 21:59:59 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2021-06-06 21:59:59 +0200
commit11c09b3072ff4dddfe14a0becf1430296303e230 (patch)
tree7a3e53acd4e975c6ae731fd65914f21099943354
parent755fc00a004ee890582dbb8f35b3b43e09f6202f (diff)
downloadnixos-11c09b3072ff4dddfe14a0becf1430296303e230.tar
nixos-11c09b3072ff4dddfe14a0becf1430296303e230.tar.gz
nixos-11c09b3072ff4dddfe14a0becf1430296303e230.tar.bz2
nixos-11c09b3072ff4dddfe14a0becf1430296303e230.tar.xz
nixos-11c09b3072ff4dddfe14a0becf1430296303e230.zip
only attempt to rmdir /etc/nixos if it *is* a dir
-rw-r--r--system-profiles/core.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/system-profiles/core.nix b/system-profiles/core.nix
index 588f4632..14a1dae3 100644
--- a/system-profiles/core.nix
+++ b/system-profiles/core.nix
@@ -79,7 +79,7 @@ in {
79 system.activationScripts.symlink-flake = '' 79 system.activationScripts.symlink-flake = ''
80 if test -L /etc/nixos; then 80 if test -L /etc/nixos; then
81 ln -nsf ${flake} /etc/nixos 81 ln -nsf ${flake} /etc/nixos
82 elif rmdir --ignore-fail-on-non-empty /etc/nixos; then 82 elif test -d /etc/nixos && rmdir --ignore-fail-on-non-empty /etc/nixos; then
83 ln -s ${flake} /etc/nixos 83 ln -s ${flake} /etc/nixos
84 fi 84 fi
85 ''; 85 '';