ark/shells/default.nix

28 lines
619 B
Nix
Raw Normal View History

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
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 {
2024-05-28 05:49:23 +03:00
default = mkNakedShell {
name = "prts";
packages = with pkgs; [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
})