1
0
Files
nixfiles/pkgs/clerie-sops/clerie-sops.nix

19 lines
389 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
CONFIG_FILE="$(mktemp)"
clerie-sops-config "$REPO_ROOT" > "$CONFIG_FILE"
exec sops --config "$CONFIG_FILE" "$@"
'';
}