# Encrypts a file as secrets/.age for the recipients in secrets/secrets.nix. # `nix` (to read secrets.nix) is taken from the system PATH. { lib, writeShellApplication, coreutils, diffutils, git, jq, age, }: writeShellApplication { name = "secret-from-file"; runtimeInputs = [ coreutils diffutils git jq age ]; text = builtins.readFile ./secret-from-file.sh; meta = { description = "Encrypt an existing file as secrets/.age using the agenix recipient rules"; mainProgram = "secret-from-file"; platforms = lib.platforms.linux; }; }