Set runner name to attr name for github-runners.${name}
This commit is contained in:
@@ -14,7 +14,7 @@ in
|
||||
{
|
||||
options.services.github-runners = mkOption {
|
||||
default = {};
|
||||
type = with types; attrsOf (submodule { options = import ./github-runner/options.nix args; });
|
||||
type = with types; attrsOf (submodule { options = import ./github-runner/options.nix (args // { includeNameDefault = false; }); });
|
||||
example = {
|
||||
runner1 = {
|
||||
enable = true;
|
||||
@@ -36,15 +36,15 @@ in
|
||||
};
|
||||
|
||||
config = {
|
||||
systemd.services = flip mapAttrs' cfg (n: v:
|
||||
systemd.services = flip mapAttrs' cfg (name: v:
|
||||
let
|
||||
svcName = "github-runner-${n}";
|
||||
svcName = "github-runner-${name}";
|
||||
in
|
||||
nameValuePair svcName
|
||||
(import ./github-runner/service.nix (args // {
|
||||
inherit svcName;
|
||||
cfg = v;
|
||||
systemdDir = "github-runner/${n}";
|
||||
cfg = v // { inherit name; };
|
||||
systemdDir = "github-runner/${name}";
|
||||
}))
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user