17 lines
328 B
Nix
17 lines
328 B
Nix
{ pkgs, ... }:
|
|
|
|
pkgs.writeShellApplication {
|
|
name = "clerie-sops";
|
|
runtimeInputs = with pkgs; [
|
|
sops
|
|
clerie-sops-config
|
|
];
|
|
text = ''
|
|
REPO_ROOT="."
|
|
if GIT_ROOT=$(git rev-parse --show-toplevel); then
|
|
REPO_ROOT="$GIT_ROOT"
|
|
fi
|
|
exec sops --config <(clerie-sops-config "$REPO_ROOT") "$@"
|
|
'';
|
|
}
|