mirror of
https://github.com/ryantm/agenix.git
synced 2024-09-11 06:05:38 +03:00
allow customizing ageBin
This commit is contained in:
parent
52ea2f8c32
commit
c2f6bd077c
@ -10,7 +10,7 @@ let
|
|||||||
if lib.versionOlder pkgs.rage.version "0.5.0"
|
if lib.versionOlder pkgs.rage.version "0.5.0"
|
||||||
then pkgs.callPackage ../pkgs/rage.nix { }
|
then pkgs.callPackage ../pkgs/rage.nix { }
|
||||||
else pkgs.rage;
|
else pkgs.rage;
|
||||||
ageBin = "${rage}/bin/rage";
|
ageBin = config.age.ageBin;
|
||||||
|
|
||||||
users = config.users.users;
|
users = config.users.users;
|
||||||
|
|
||||||
@ -96,6 +96,13 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.age = {
|
options.age = {
|
||||||
|
ageBin = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "${rage}/bin/rage";
|
||||||
|
description = ''
|
||||||
|
The age executable to use.
|
||||||
|
'';
|
||||||
|
};
|
||||||
secrets = mkOption {
|
secrets = mkOption {
|
||||||
type = types.attrsOf secretType;
|
type = types.attrsOf secretType;
|
||||||
default = { };
|
default = { };
|
||||||
|
@ -8,13 +8,14 @@
|
|||||||
nix,
|
nix,
|
||||||
mktemp,
|
mktemp,
|
||||||
diffutils,
|
diffutils,
|
||||||
|
ageBin ? "${
|
||||||
|
# we need at least rage 0.5.0 to support ssh keys
|
||||||
|
if rage.version < "0.5.0"
|
||||||
|
then callPackage ./rage.nix {}
|
||||||
|
else rage
|
||||||
|
}/bin/rage"
|
||||||
} :
|
} :
|
||||||
let
|
let
|
||||||
# we need at least rage 0.5.0 to support ssh keys
|
|
||||||
rageToUse = if rage.version < "0.5.0"
|
|
||||||
then callPackage ./rage.nix {}
|
|
||||||
else rage;
|
|
||||||
ageBin = "${rageToUse}/bin/rage";
|
|
||||||
sedBin = "${gnused}/bin/sed";
|
sedBin = "${gnused}/bin/sed";
|
||||||
nixInstantiate = "${nix}/bin/nix-instantiate";
|
nixInstantiate = "${nix}/bin/nix-instantiate";
|
||||||
mktempBin = "${mktemp}/bin/mktemp";
|
mktempBin = "${mktemp}/bin/mktemp";
|
||||||
|
Loading…
Reference in New Issue
Block a user