working devShell!

This commit is contained in:
Charlie Root 2024-07-22 00:05:07 +02:00
commit 8e2371ddf6
11 changed files with 21 additions and 19 deletions

36
parts/shell.nix Normal file
View file

@ -0,0 +1,36 @@
{
perSystem = {
config,
pkgs,
...
}: {
devShells.default = pkgs.mkShellNoCC {
name = "nichts";
shellHook = ''
${config.pre-commit.installationScript}
'';
DIRENV_LOG_FORMAT = "";
inputsFrom = [config.treefmt.build.devShell];
packages = [
config.treefmt.build.wrapper # treewide formatter
pkgs.git # take a guess
(pkgs.writeShellApplication {
name = "update";
text = ''
nix flake update && git commit flake.lock -m "flake: bump inputs"
'';
})
(pkgs.writeShellApplication {
name = "rebuild";
text = ''
nh os switch
'';
})
];
};
};
}