This commit is contained in:
commit
fef2377502
174 changed files with 7423 additions and 0 deletions
20
packages/sops.nix
Normal file
20
packages/sops.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
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" "''${@}"
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue