Fix ageBin for home manager module

This commit is contained in:
Andrew Lubawy 2024-07-22 13:40:14 -07:00
parent de96bd907d
commit 68bf9616a8
No known key found for this signature in database
GPG key ID: 8E98BAE1F49C2709

View file

@ -8,7 +8,7 @@
with lib; let with lib; let
cfg = config.age; cfg = config.age;
ageBin = lib.getExe config.age.package; ageBin = config.age.ageBin;
newGeneration = '' newGeneration = ''
_agenix_generation="$(basename "$(readlink "${cfg.secretsDir}")" || echo 0)" _agenix_generation="$(basename "$(readlink "${cfg.secretsDir}")" || echo 0)"
@ -157,6 +157,17 @@ in {
options.age = { options.age = {
package = mkPackageOption pkgs "age" {}; package = mkPackageOption pkgs "age" {};
ageBin = mkOption {
type = types.str;
default = lib.getExe pkgs.age;
defaultText = literalExpression ''
"''${pkgs.age}/bin/age"
'';
description = ''
The age executable to use.
'';
};
secrets = mkOption { secrets = mkOption {
type = types.attrsOf secretType; type = types.attrsOf secretType;
default = {}; default = {};