infrastructure/packages/sops.nix
Fabian Hauser fef2377502
All checks were successful
CI / build (push) Successful in 13m53s
Commit files for public release
2024-10-02 16:57:36 +03:00

20 lines
419 B
Nix

{
pkgs,
self,
system,
...
}:
pkgs.writeShellApplication {
name = "sops";
meta.description = "Run SOPS with the generated configuration";
runtimeInputs = with pkgs; [
sops
gitMinimal
nix
];
text = ''
FLAKE_ROOT="$(git rev-parse --show-toplevel)"
nix build --out-link "$FLAKE_ROOT/.sops.yaml" "$FLAKE_ROOT#sops-config"
sops --config "''${FLAKE_ROOT}/.sops.yaml" "''${@}"
'';
}