Skip to content

Commit

Permalink
more runner instances
Browse files Browse the repository at this point in the history
  • Loading branch information
chfanghr committed Aug 23, 2024
1 parent 96aa3e5 commit 3f091c5
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions hosts/Persephone/github-runners.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
{config, ...}: {
services.github-runners.chfanghr-dotfiles-v2 = {
tokenFile = config.age.secrets."github-runner-token-chfanghr-dotfiles-v2".path;
url = "https://github.com/chfanghr/dotfiles-v2";
};
{
config,
lib,
...
}: let
inherit (lib) range nameValuePair optionalString;
inherit (builtins) listToAttrs map toString;
in {
services.github-runners = listToAttrs (map (i: let
name = "chfanghr-dotfiles-v2${optionalString (i != 0) "-${toString i}"}";
in
nameValuePair name
{
tokenFile = config.age.secrets."github-runner-token-chfanghr-dotfiles-v2".path;
url = "https://github.com/chfanghr/dotfiles-v2";
}) (range 0 10));

age.secrets."github-runner-token-chfanghr-dotfiles-v2".file = ../../secrets/github-runner-token-chfanghr-dotfiles-v2.age;
}

0 comments on commit 3f091c5

Please sign in to comment.