1
Fork 0
mirror of https://github.com/RGBCube/agenix synced 2025-07-29 01:37:44 +00:00

Add darwin tests for home-manager module

This commit is contained in:
Nathan Henrie 2023-05-03 17:25:54 -06:00 committed by Bruno BELANYI
parent 19bf5a20d8
commit 50743bd117
2 changed files with 73 additions and 18 deletions

View file

@ -0,0 +1,33 @@
{
pkgs,
config,
options,
lib,
...
}: {
imports = [../modules/age-home.nix];
age = {
identityPaths = options.age.identityPaths.default ++ ["/Users/user1/.ssh/this_key_wont_exist"];
secrets.user-secret.file = ../example/secret2.age;
};
home = rec {
username = "runner";
homeDirectory = lib.mkForce "/Users/${username}";
stateVersion = lib.trivial.release;
};
home.file = let
name = "agenix-home-integration";
in {
${name}.source = pkgs.writeShellApplication {
inherit name;
text = let
secret = "world!";
in ''
diff -q "${config.age.secrets.user-secret.path}" <(printf '${secret}\n')
'';
};
};
}