Add pre-commit check and devShell
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m0s
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m0s
This commit is contained in:
parent
ccb57f954e
commit
21403660c9
30
flake.nix
30
flake.nix
@ -114,14 +114,28 @@
|
||||
))
|
||||
];
|
||||
|
||||
checks =
|
||||
builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib
|
||||
// (forEachSystem (system: {
|
||||
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
nixfmt-rfc-style.enable = true;
|
||||
};
|
||||
};
|
||||
}));
|
||||
|
||||
formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
|
||||
|
||||
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
|
||||
buildInputs = [
|
||||
inputs.agenix.packages.x86_64-linux.agenix
|
||||
inputs.deploy-rs.packages.x86_64-linux.deploy-rs
|
||||
];
|
||||
};
|
||||
devShells = forEachSystem (system: {
|
||||
default = nixpkgs.legacyPackages.${system}.mkShell {
|
||||
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
||||
buildInputs = [
|
||||
inputs.agenix.packages.${system}.agenix
|
||||
inputs.deploy-rs.packages.${system}.deploy-rs
|
||||
] ++ self.checks.${system}.pre-commit-check.enabledPackages;
|
||||
};
|
||||
});
|
||||
|
||||
deploy = {
|
||||
magicRollback = true;
|
||||
@ -134,9 +148,5 @@
|
||||
"vps1"
|
||||
] mkDeployNode;
|
||||
};
|
||||
|
||||
checks = builtins.mapAttrs (
|
||||
system: deployLib: deployLib.deployChecks self.deploy
|
||||
) inputs.deploy-rs.lib;
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user