modules/age: build local rage if pkgs.rage is older than 0.5.0

This commit is contained in:
Cole Helbling 2021-03-01 13:11:02 -08:00
parent 9b8f6c01fe
commit ef7ec993e8
No known key found for this signature in database
GPG Key ID: B37E0F2371016A4C
1 changed files with 6 additions and 1 deletions

View File

@ -4,7 +4,12 @@ with lib;
let
cfg = config.age;
rage = pkgs.callPackage ../pkgs/rage.nix {};
# we need at least rage 0.5.0 to support ssh keys
rage =
if lib.versionOlder pkgs.rage.version "0.5.0"
then pkgs.callPackage ./rage.nix { }
else pkgs.rage;
ageBin = "${rage}/bin/rage";
users = config.users.users;