All tracked files were committed as 755; only Nix reads them. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JZ16yf4acmaSiHq81vyQ6Z
28 lines
600 B
Nix
28 lines
600 B
Nix
# Encrypts a file as secrets/<name>.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/<name>.age using the agenix recipient rules";
|
|
mainProgram = "secret-from-file";
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|