summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/flake/ci.nix78
-rw-r--r--modules/nixos/server/default.nix2
2 files changed, 14 insertions, 66 deletions
diff --git a/modules/flake/ci.nix b/modules/flake/ci.nix
index a8dd0c8..c958ed3 100644
--- a/modules/flake/ci.nix
+++ b/modules/flake/ci.nix
@@ -1,77 +1,23 @@
{
- config,
inputs,
myLib,
self,
- withSystem,
...
}: let
- mkUpdateEffect = herculesCI: inputs: pullRequestTitle: let
- cfg = config.hercules-ci.flake-update;
- in
- withSystem cfg.effect.system ({hci-effects, ...}:
- hci-effects.flakeUpdate {
- gitRemote = herculesCI.config.repo.remoteHttpUrl;
- user = "x-access-token";
- autoMergeMethod = "rebase";
- commitSummary = pullRequestTitle;
- inherit pullRequestTitle inputs;
- inherit (cfg) updateBranch forgeType createPullRequest pullRequestBody;
- });
-in {
- imports = [
- inputs.hercules-ci-effects.flakeModule
+ ciSystems = [
+ "x86_64-linux"
+ "aarch64-linux"
];
- herculesCI = {lib, ...} @ herculesCI: let
- inherit (lib) mkForce;
- ciSystems = [
- "x86_64-linux"
- "aarch64-linux"
- ];
- in {
- inherit ciSystems;
-
- onPush = {
- default = {
- outputs = with (myLib.ci ciSystems);
- mkForce {
- apps = mkCompatibleApps self.apps;
- checks = mkCompatible self.checks;
- devShells = mkCompatible self.devShells;
- formatter = mkCompatibleFormatters self.formatter;
- # disabled to save storage
- #homeConfigurations = mkCompatibleHM self.homeConfigurations;
- hosts = mkCompatibleCfg' self.nixosConfigurations;
- };
- };
- };
-
- onSchedule = let
- mkUpdateEffect' = mkUpdateEffect herculesCI;
- in {
- nixpkgs-update = {
- when = {
- hour = [0];
- minute = 0;
- };
-
- outputs = {
- effects.nixpkgs-update = mkUpdateEffect' ["nixpkgs" "nixpkgs-stable"] "flake: update nixpkgs inputs";
- };
- };
-
- flake-update = mkForce {
- when = {
- dayOfMonth = [1 8 15 22 29];
- hour = [0];
- minute = 0;
- };
+ ci = sys: myLib.ci ["${sys}"];
+ hm = sys: (ci sys).mkCompatibleHM self.homeConfigurations;
+ hosts = sys: (ci sys).mkCompatibleCfg self.nixosConfigurations;
+in {
+ flake = {
+ checks = inputs.nixpkgs.lib.genAttrs ciSystems hosts;
+ };
- outputs = {
- effects.flake-update = mkUpdateEffect' [] "flake: update all inputs";
- };
- };
- };
+ perSystem = {system, ...}: {
+ checks = (hm system).${system};
};
}
diff --git a/modules/nixos/server/default.nix b/modules/nixos/server/default.nix
index 4774c5e..feae6e0 100644
--- a/modules/nixos/server/default.nix
+++ b/modules/nixos/server/default.nix
@@ -34,12 +34,14 @@ in {
trusted-users = ["${config.networking.hostName}"];
trusted-substituters = [
"https://getchoo.cachix.org"
+ "https://cache.garnix.io"
"https://nix-community.cachix.org"
"https://wurzelpfropf.cachix.org"
];
trusted-public-keys = [
"getchoo.cachix.org-1:ftdbAUJVNaFonM0obRGgR5+nUmdLMM+AOvDOSx0z5tE="
+ "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"wurzelpfropf.cachix.org-1:ilZwK5a6wJqVr7Fyrzp4blIEkGK+LJT0QrpWr1qBNq0="
];