etc: use .before-nix-darwin instead of .orig

This commit is contained in:
Michael Hoang 2023-07-11 18:58:29 +10:00
parent ac9a366aed
commit 63af129cb5
4 changed files with 7 additions and 8 deletions

View file

@ -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"