2024-04-20 23:20:14 +02:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
pkgs.writeShellApplication {
|
|
|
|
name = "clerie-sops";
|
|
|
|
runtimeInputs = with pkgs; [
|
|
|
|
sops
|
2024-11-21 22:31:42 +01:00
|
|
|
clerie-sops-config
|
2024-04-20 23:20:14 +02:00
|
|
|
];
|
|
|
|
text = ''
|
2024-11-21 22:31:42 +01:00
|
|
|
REPO_ROOT="."
|
|
|
|
if GIT_ROOT=$(git rev-parse --show-toplevel); then
|
|
|
|
REPO_ROOT="$GIT_ROOT"
|
|
|
|
fi
|
|
|
|
exec sops --config <(clerie-sops-config "$REPO_ROOT") "$@"
|
2024-04-20 23:20:14 +02:00
|
|
|
'';
|
|
|
|
}
|