2024-05-28 05:49:23 +03:00
|
|
|
{
|
|
|
|
tlib,
|
|
|
|
inputs,
|
|
|
|
...
|
|
|
|
}:
|
2023-05-05 03:09:46 +03:00
|
|
|
tlib.genPkgs (pkgs: let
|
2023-11-24 17:02:44 +03:00
|
|
|
mkNakedShell = pkgs.callPackage inputs.naked-shell {};
|
2023-05-05 03:09:46 +03:00
|
|
|
agenix-wrapped = pkgs.writeShellApplication {
|
|
|
|
name = "agenix";
|
|
|
|
runtimeInputs = [pkgs.agenix];
|
|
|
|
text = ''
|
|
|
|
if [ -z "''${1-}" ]; then
|
|
|
|
agenix
|
|
|
|
else
|
2024-05-28 07:24:09 +03:00
|
|
|
RULES="$FLAKE/secrets/secrets.nix" agenix -i "$FLAKE/ssh_key" "$@"
|
2023-05-05 03:09:46 +03:00
|
|
|
fi
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in {
|
2024-05-28 05:49:23 +03:00
|
|
|
default = mkNakedShell {
|
|
|
|
name = "prts";
|
2024-05-28 07:24:09 +03:00
|
|
|
packages = (with pkgs; [git git-crypt alejandra helix rage]) ++ [agenix-wrapped];
|
2024-05-28 05:49:23 +03:00
|
|
|
shellHook = ''
|
|
|
|
echo \"$(tput bold)welcome to PRTS, $USER$(tput sgr0)\"
|
|
|
|
'';
|
|
|
|
};
|
2022-04-09 21:33:13 +03:00
|
|
|
})
|