flake: add a devShell

that includes the formatter
This commit is contained in:
teto
2026-02-25 09:55:01 +01:00
committed by Austin Horstman
parent 27ba84b1f0
commit 58330fd08d
3 changed files with 26 additions and 12 deletions

View File

@@ -157,18 +157,7 @@
lib.mapAttrs' renameTestPkg tests;
in
{
formatter = forAllPkgs (
pkgs:
pkgs.treefmt.withConfig {
runtimeInputs = with pkgs; [
nixfmt
deadnix
keep-sorted
nixf-diagnose
];
settings = pkgs.lib.importTOML ./treefmt.toml;
}
);
formatter = forAllPkgs (pkgs: pkgs.callPackage ./home-manager/formatter.nix { });
# TODO: increase buildbot testing scope
buildbot = forCI (
@@ -214,6 +203,10 @@
}
);
devShells = forAllPkgs (pkgs: {
default = pkgs.callPackage ./home-manager/devShell.nix { };
});
legacyPackages = forAllPkgs (
pkgs:
let

11
home-manager/devShell.nix Normal file
View File

@@ -0,0 +1,11 @@
{ pkgs, mkShell }:
let
formatter = pkgs.callPackage ./formatter.nix { };
in
mkShell {
name = "devShell";
packages = [
pkgs.coreutils
formatter
];
}

View File

@@ -0,0 +1,10 @@
{ pkgs }:
pkgs.treefmt.withConfig {
runtimeInputs = with pkgs; [
nixfmt
deadnix
keep-sorted
nixf-diagnose
];
settings = pkgs.lib.importTOML ../treefmt.toml;
}