infrastructure/dev-shells/default.nix
Fabian Hauser 9351b0534e
Some checks failed
CI / build (push) Successful in 1m34s
CI / deploy (docs-ops.qo.is) (push) Successful in 1m7s
CI / deploy (system-vm) (push) Has been cancelled
Remove vscode from devshell
2025-05-18 20:14:44 +03:00

59 lines
1.3 KiB
Nix

{
pkgs,
git-hooks-nix,
treefmtEval,
system,
self,
...
}:
let
pre-commit-check = git-hooks-nix.lib.${system}.run {
src = ../.;
hooks.treefmt = {
enable = true;
package = treefmtEval.config.build.wrapper;
always_run = true;
};
};
in
{
${system}.default = pkgs.mkShellNoCC {
name = "qois-infrastructure-shell";
buildInputs =
pre-commit-check.enabledPackages
++ (with self.packages.${system}; [
sops
sops-rekey
auto-deploy
])
++ (with pkgs; [
attic-client
deploy-rs
jq
nix-fast-build
nixVersions.latest
nixd
nixfmt-rfc-style
nixos-anywhere
pssh
ssh-to-age
yq
]);
LANG = "C.UTF-8";
LC_ALL = "C.UTF-8";
shellHook = ''
# Bring xdg data dirs of dependencies and current program into the
# environment. This will allow us to get shell completion if any
# and there might be other benefits as well.
xdg_inputs=( "''${buildInputs[@]}" )
for p in "''${xdg_inputs[@]}"; do
if [[ -d "$p/share" ]]; then
XDG_DATA_DIRS="''${XDG_DATA_DIRS}''${XDG_DATA_DIRS+:}$p/share"
fi
done
export XDG_DATA_DIRS
${pre-commit-check.shellHook}
'';
};
}