flake: refactor checks
This commit is contained in:
parent
55d89b9dd7
commit
ac5a7a76d1
1 changed files with 27 additions and 22 deletions
49
flake.nix
49
flake.nix
|
@ -51,12 +51,7 @@
|
||||||
{
|
{
|
||||||
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||||
|
|
||||||
herculesCI = { lib, ... }: {
|
herculesCI.ciSystems = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
ciSystems = [ "x86_64-linux" "aarch64-linux" ];
|
|
||||||
onPush.default.outputs = {
|
|
||||||
checks = lib.mkForce self.outputs.checks.x86_64-linux;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
hercules-ci.flake-update = {
|
hercules-ci.flake-update = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -76,25 +71,35 @@
|
||||||
|
|
||||||
hercules-ci.github-pages.branch = "master";
|
hercules-ci.github-pages.branch = "master";
|
||||||
|
|
||||||
perSystem = { config, pkgs, ... }: {
|
perSystem = { config, pkgs, ... }:
|
||||||
imports = [ ./dev/shell.nix ./terraform/shell.nix ];
|
let
|
||||||
treefmt.imports = [ ./dev/treefmt.nix ];
|
defaultPlatform = pkgs.stdenv.hostPlatform.system == "x86_64-linux";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./dev/shell.nix
|
||||||
|
./terraform/shell.nix
|
||||||
|
];
|
||||||
|
treefmt = {
|
||||||
|
flakeCheck = defaultPlatform;
|
||||||
|
imports = [ ./dev/treefmt.nix ];
|
||||||
|
};
|
||||||
|
|
||||||
checks = pkgs.lib.optionalAttrs (pkgs.stdenv.hostPlatform.system == "x86_64-linux") {
|
checks = pkgs.lib.optionalAttrs defaultPlatform {
|
||||||
nixosTests-hydra = pkgs.nixosTests.hydra.hydra_unstable;
|
nixosTests-hydra = pkgs.nixosTests.hydra.hydra_unstable;
|
||||||
nixosTests-lemmy = pkgs.nixosTests.lemmy;
|
nixosTests-lemmy = pkgs.nixosTests.lemmy;
|
||||||
nixosTests-pict-rs = pkgs.nixosTests.pict-rs;
|
nixosTests-pict-rs = pkgs.nixosTests.pict-rs;
|
||||||
|
};
|
||||||
|
|
||||||
|
hercules-ci.github-pages.settings.contents = pkgs.runCommand "pages"
|
||||||
|
{
|
||||||
|
buildInputs = [ config.devShells.mkdocs.nativeBuildInputs ];
|
||||||
|
} ''
|
||||||
|
cd ${self}
|
||||||
|
mkdocs build --strict --site-dir $out
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
hercules-ci.github-pages.settings.contents = pkgs.runCommand "pages"
|
|
||||||
{
|
|
||||||
buildInputs = [ config.devShells.mkdocs.nativeBuildInputs ];
|
|
||||||
} ''
|
|
||||||
cd ${self}
|
|
||||||
mkdocs build --strict --site-dir $out
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
flake.darwinConfigurations =
|
flake.darwinConfigurations =
|
||||||
let
|
let
|
||||||
inherit (self.lib) darwinSystem;
|
inherit (self.lib) darwinSystem;
|
||||||
|
|
Loading…
Add table
Reference in a new issue