2024-10-02 15:52:04 +02:00
|
|
|
{
|
2024-10-19 18:40:58 +02:00
|
|
|
findutils,
|
2024-10-02 15:52:04 +02:00
|
|
|
self,
|
|
|
|
system,
|
2024-10-19 18:40:58 +02:00
|
|
|
writeShellApplication,
|
2024-10-02 15:52:04 +02:00
|
|
|
...
|
|
|
|
}:
|
2024-10-19 18:40:58 +02:00
|
|
|
writeShellApplication {
|
2024-10-02 15:52:04 +02:00
|
|
|
name = "sops-rekey";
|
|
|
|
meta.description = "Rekey all sops secrets with changed keys";
|
|
|
|
runtimeInputs = [
|
2024-10-19 18:40:58 +02:00
|
|
|
findutils
|
2024-10-02 15:52:04 +02:00
|
|
|
self.packages.${system}.sops
|
|
|
|
];
|
|
|
|
text = ''
|
|
|
|
find . -regex '.*\.sops\..*$' -type f -exec sops updatekeys {} \;
|
|
|
|
'';
|
|
|
|
}
|