mirror of
https://github.com/ryantm/agenix.git
synced 2024-11-01 08:39:54 +03:00
28 lines
570 B
Nix
28 lines
570 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
options,
|
|
...
|
|
}: let
|
|
secret = "hello";
|
|
testScript = pkgs.writeShellApplication {
|
|
name = "agenix-integration";
|
|
text = ''
|
|
grep "${secret}" "${config.age.secrets.system-secret.path}"
|
|
'';
|
|
};
|
|
in {
|
|
imports = [
|
|
./install_ssh_host_keys_darwin.nix
|
|
../modules/age.nix
|
|
];
|
|
|
|
services.nix-daemon.enable = true;
|
|
|
|
age = {
|
|
identityPaths = options.age.identityPaths.default ++ ["/etc/ssh/this_key_wont_exist"];
|
|
secrets.system-secret.file = ../example/secret1.age;
|
|
};
|
|
|
|
environment.systemPackages = [testScript];
|
|
}
|