ark/shells/default.nix

25 lines
627 B
Nix
Raw Normal View History

2023-11-24 17:02:44 +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 {
2023-11-24 17:02:44 +03:00
default =
mkNakedShell {
2022-04-09 21:33:13 +03:00
name = "prts";
2023-11-24 17:02:44 +03:00
packages = with pkgs; [git git-crypt alejandra helix agenix-wrapped rage];
2023-05-05 03:09:46 +03:00
shellHook = ''
echo \"$(tput bold)welcome to PRTS, $USER$(tput sgr0)\"
'';
2022-04-09 21:33:13 +03:00
};
})