2022-04-10 05:48:34 +03:00
|
|
|
{tlib, ...}:
|
2023-05-05 03:09:46 +03:00
|
|
|
tlib.genPkgs (pkgs: let
|
|
|
|
agenix-wrapped = pkgs.writeShellApplication {
|
|
|
|
name = "agenix";
|
|
|
|
runtimeInputs = [pkgs.agenix];
|
|
|
|
text = ''
|
|
|
|
if [ -z "''${1-}" ]; then
|
|
|
|
agenix
|
|
|
|
else
|
2023-05-09 02:58:14 +03:00
|
|
|
RULES="/etc/nixos/secrets/secrets.nix" agenix -i /persist/keys/ssh_key "$@"
|
2023-05-05 03:09:46 +03:00
|
|
|
fi
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in {
|
2022-04-09 21:33:13 +03:00
|
|
|
default = with pkgs;
|
|
|
|
mkShell {
|
|
|
|
name = "prts";
|
2023-05-05 03:09:46 +03:00
|
|
|
buildInputs = [git git-crypt alejandra helix agenix-wrapped rage];
|
|
|
|
shellHook = ''
|
|
|
|
echo \"$(tput bold)welcome to PRTS, $USER$(tput sgr0)\"
|
|
|
|
'';
|
2022-04-09 21:33:13 +03:00
|
|
|
};
|
|
|
|
})
|