gh runner: switch to pat

This commit is contained in:
Sridhar Ratnakumar 2024-02-13 13:59:39 -05:00
parent 1c254abf17
commit 513dc7b31c

View file

@ -49,6 +49,7 @@ in
"emanote"
"haskell-flake"
"nixos-config"
"ema"
];
};
sopsPrefix = lib.mkOption {
@ -100,18 +101,15 @@ in
};
in
userModule // {
sops.secrets = lib.listToAttrs (builtins.map
(name: lib.nameValuePair "${cfg.sopsPrefix}/${name}" {
mode = "0440";
})
cfg.repositories);
sops.secrets."${cfg.sopsPrefix}/srid".mode = "0440";
containers =
lib.listToAttrs (builtins.map
(name:
let tokenFile = top.config.sops.secrets."${cfg.sopsPrefix}/${name}".path;
in lib.nameValuePair "github-runner-${name}" {
let
tokenFile = top.config.sops.secrets."${cfg.sopsPrefix}/srid".path;
in
lib.nameValuePair "github-runner-${name}" {
autoStart = true;
bindMounts."${tokenFile}" = {
hostPath = tokenFile;