nixfiles/shells/repo.nix
2025-07-13 05:19:29 -07:00

34 lines
883 B
Nix
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
pkgs,
inputs,
std,
...
}:
with pkgs; let
repo = import ../outputs.nix {inherit inputs;};
inherit (std) set;
repoShell = mkShell {
nativeBuildInputs =
[
nf-build-system
nf-update
lix
fd # fd, better fine!
ripgrep # rg, better grep!
sops
deadnix # dead-code scanner
alejandra # code formatter
statix # anti-pattern finder
deploy-rs.deploy-rs # deployment system
]
++ set.values (set.map (name: _: (pkgs.writeShellScriptBin "${name}-rebuild" ''
${pkgs.darwin-rebuild}/bin/darwin-rebuild switch --flake $REPO_ROOT#${name} $@
''))
repo.darwinConfigurations);
shellHook = ''
export CI_PLATFORM="impure"
echo -e "\e[39m\e[1m$USER@$REPO_HOSTNAME - \e[35m''$(realpath --relative-to=../ ./nixos/)\e[0m"
'';
};
in
repoShell