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

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;