feat: add checks to devShell

This commit is contained in:
Swarsel 2024-12-11 01:17:01 +01:00
parent 647a2ae1a8
commit 0a6cf0e006
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
3 changed files with 41 additions and 13 deletions

1
.gitignore vendored
View file

@ -3,3 +3,4 @@ secrets/keys/private-keys-v1.d/
result
*.~undo-tree~
*.iso
.pre-commit-config.yaml

View file

@ -684,16 +684,29 @@ In this section I am creating some attributes that define general concepts of my
homeManagerModules = import ./modules/home;
packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
devShells = forEachSystem
(pkgs:
devShells = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
checks = self.checks.${system};
in
{
default = pkgs.mkShell {
NIX_CONFIG = "experimental-features = nix-command flakes";
nativeBuildInputs = [ pkgs.nix pkgs.home-manager pkgs.git ];
inherit (checks.pre-commit-check) shellHook;
buildInputs = checks.pre-commit-check.enabledPackages;
nativeBuildInputs = [
pkgs.nix
pkgs.home-manager
pkgs.git
pkgs.just
pkgs.age
pkgs.ssh-to-age
pkgs.sops
];
};
});
# this sets the formatter that is going to be used by nix fmt
formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt);
checks = forAllSystems (
system:

View file

@ -199,16 +199,30 @@
homeManagerModules = import ./modules/home;
packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
devShells = forEachSystem
(pkgs:
devShells = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
checks = self.checks.${system};
in
{
default = pkgs.mkShell {
NIX_CONFIG = "experimental-features = nix-command flakes";
nativeBuildInputs = [ pkgs.nix pkgs.home-manager pkgs.git ];
inherit (checks.pre-commit-check) shellHook;
buildInputs = checks.pre-commit-check.enabledPackages;
nativeBuildInputs = [
pkgs.nix
pkgs.home-manager
pkgs.git
pkgs.just
pkgs.age
pkgs.ssh-to-age
pkgs.sops
];
};
});
}
);
# this sets the formatter that is going to be used by nix fmt
formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt);
checks = forAllSystems (
system: