fix: agenix on darwin - check if secrets already exists

This commit is contained in:
Ryan Yin
2024-01-07 21:39:40 +08:00
parent 474bd8ebf4
commit ede2763756

View File

@@ -77,6 +77,10 @@
#
# activationScripts are executed every time you run `nixos-rebuild` / `darwin-rebuild` or boot your system
system.activationScripts.postActivation.text = ''
sudo chown ${username} /etc/agenix/*
${pkgs.nushell}/bin/nu -c '
if (ls /etc/agenix/ | length) > 0 {
sudo chown ${username} /etc/agenix/*
}
'
'';
}