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