diff --git a/README.md b/README.md index 8e50a14..95ac05c 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,8 @@ nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer > updated by default. If you didn't use the installer or skipped some of the options you'll have to take care of this yourself. > Either modify the existing file to source/import the one from `/etc/static` or remove it. Some examples: -- `mv /etc/bashrc /etc/bashrc.orig` +- `mv /etc/bashrc /etc/bashrc.before-nix-darwin` - `echo 'if test -e /etc/static/bashrc; then . /etc/static/bashrc; fi' | sudo tee -a /etc/bashrc` -- `echo 'if test -e /etc/static/bashrc; then . /etc/static/bashrc; fi' | tee -a ~/.bashrc` ## Updating diff --git a/modules/programs/ssh/default.nix b/modules/programs/ssh/default.nix index e472d7b..87978e6 100644 --- a/modules/programs/ssh/default.nix +++ b/modules/programs/ssh/default.nix @@ -164,9 +164,9 @@ in }; }; - # Clean up .orig file left over from using knownSha256Hashes + # Clean up .before-nix-darwin file left over from using knownSha256Hashes system.activationScripts.etc.text = '' - auth_keys_orig=/etc/ssh/sshd_config.d/101-authorized-keys.conf.orig + auth_keys_orig=/etc/ssh/sshd_config.d/101-authorized-keys.conf.before-nix-darwin if [ -e "$auth_keys_orig" ] && [ "$(shasum -a 256 $auth_keys_orig | cut -d ' ' -f 1)" = "${oldAuthorizedKeysHash}" ]; then rm "$auth_keys_orig" diff --git a/modules/services/tailscale.nix b/modules/services/tailscale.nix index 6603f53..4135ade 100644 --- a/modules/services/tailscale.nix +++ b/modules/services/tailscale.nix @@ -74,10 +74,10 @@ in "2c28f4fe3b4a958cd86b120e7eb799eee6976daa35b228c885f0630c55ef626c" ]; - # Cleaning up the .orig file is necessary as any files in /etc/resolver will be used. + # Cleaning up the .before-nix-darwin file is necessary as any files in /etc/resolver will be used. system.activationScripts.etc.text = mkAfter '' - if [ -e /etc/resolver/ts.net.orig ]; then - rm /etc/resolver/ts.net.orig + if [ -e /etc/resolver/ts.net.before-nix-darwin ]; then + rm /etc/resolver/ts.net.before-nix-darwin fi ''; }; diff --git a/modules/system/etc.nix b/modules/system/etc.nix index d26c45e..2dfafcc 100644 --- a/modules/system/etc.nix +++ b/modules/system/etc.nix @@ -69,7 +69,7 @@ in o=''${o%% *} for h in ''${etcSha256Hashes["$l"]}; do if [ "$o" = "$h" ]; then - mv "$l" "$l.orig" + mv "$l" "$l.before-nix-darwin" ln -s "$f" "$l" break else