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);
|
formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
|
||||||
|
|
||||||
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
|
devShells = forEachSystem (system: {
|
||||||
buildInputs = [
|
default = nixpkgs.legacyPackages.${system}.mkShell {
|
||||||
inputs.agenix.packages.x86_64-linux.agenix
|
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
||||||
inputs.deploy-rs.packages.x86_64-linux.deploy-rs
|
buildInputs = [
|
||||||
];
|
inputs.agenix.packages.${system}.agenix
|
||||||
};
|
inputs.deploy-rs.packages.${system}.deploy-rs
|
||||||
|
] ++ self.checks.${system}.pre-commit-check.enabledPackages;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
deploy = {
|
deploy = {
|
||||||
magicRollback = true;
|
magicRollback = true;
|
||||||
@ -134,9 +148,5 @@
|
|||||||
"vps1"
|
"vps1"
|
||||||
] mkDeployNode;
|
] mkDeployNode;
|
||||||
};
|
};
|
||||||
|
|
||||||
checks = builtins.mapAttrs (
|
|
||||||
system: deployLib: deployLib.deployChecks self.deploy
|
|
||||||
) inputs.deploy-rs.lib;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user