1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2025-03-13 20:28:41 +00:00

dev: Use hercules-ci-effects.flakeModule

This commit is contained in:
Robert Hensing 2022-05-28 13:18:06 +02:00
parent 39a134713e
commit 8fe43d231b
2 changed files with 10 additions and 11 deletions

View file

@ -1,8 +1,9 @@
{ config, lib, inputs, ... }:
{ config, lib, inputs, withSystem, ... }:
{
imports = [
inputs.pre-commit-hooks-nix.flakeModule
inputs.hercules-ci-effects.flakeModule
../site/flake-module.nix
];
systems = [ "x86_64-linux" "aarch64-darwin" ];
@ -30,23 +31,21 @@
};
flake = {
# Because of ./README.md, we can't use the built-in flake support, including
# the `effects` flake attribute. We have to define `herculesCI` ourselves.
options.herculesCI = lib.mkOption { type = lib.types.raw; };
config.herculesCI = { branch, ... }: {
onPush.default.outputs = {
inherit (config.flake) packages checks;
effects =
let
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
effects = inputs.hercules-ci-effects.lib.withPkgs pkgs;
in
{
withSystem "x86_64-linux" ({ config, pkgs, effects, ... }: {
netlifyDeploy = effects.netlifyDeploy {
content = config.flake.packages.x86_64-linux.siteContent;
content = config.packages.siteContent;
secretName = "default-netlify";
siteId = "29a153b1-3698-433c-bc73-62415efb8117";
productionDeployment = branch == "main";
};
};
});
};
};

6
dev/flake.lock generated
View file

@ -20,11 +20,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1653487348,
"narHash": "sha256-lWqxXMRqO8blpwhH2qvrFBVp6aZ7V+Z3xTqkNWKyLQw=",
"lastModified": 1653740649,
"narHash": "sha256-3kZc+D03J+Uleftpdv5BuBogwkc45zvhDte/AI0BvaI=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "0ab66b56d3f2b40ddfd981899d1757773632075f",
"rev": "6d99ef9727b1327ec7eb6fa2055b74bd88ea4709",
"type": "github"
},
"original": {