2023-01-29 23:42:58 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
2023-02-11 15:19:01 +01:00
|
|
|
options,
|
2023-01-29 23:42:58 +01:00
|
|
|
...
|
|
|
|
}: let
|
|
|
|
secret = "hello";
|
|
|
|
testScript = pkgs.writeShellApplication {
|
|
|
|
name = "agenix-integration";
|
|
|
|
text = ''
|
2023-05-04 01:25:54 +02:00
|
|
|
grep "${secret}" "${config.age.secrets.system-secret.path}"
|
2023-01-29 23:42:58 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
imports = [
|
|
|
|
./install_ssh_host_keys_darwin.nix
|
|
|
|
../modules/age.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
services.nix-daemon.enable = true;
|
|
|
|
|
2023-05-04 01:25:54 +02:00
|
|
|
age = {
|
|
|
|
identityPaths = options.age.identityPaths.default ++ ["/etc/ssh/this_key_wont_exist"];
|
|
|
|
secrets.system-secret.file = ../example/secret1.age;
|
|
|
|
};
|
2023-01-29 23:42:58 +01:00
|
|
|
|
|
|
|
environment.systemPackages = [testScript];
|
|
|
|
}
|