Skip to content

Commit

Permalink
gh runner: switch to pat
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Feb 13, 2024
1 parent 1c254ab commit 513dc7b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions nixos/github-runner.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ in
"emanote"
"haskell-flake"
"nixos-config"
"ema"
];
};
sopsPrefix = lib.mkOption {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 513dc7b

Please sign in to comment.