Try simpler github-runner.nix

This commit is contained in:
Tom McLaughlin 2022-10-13 19:12:52 -06:00
parent 69d9538b34
commit fc8fdb03a0

View File

@ -8,21 +8,12 @@ with lib;
let
cfg = config.services.github-runner;
svcName = "github-runner";
in
{
options.services.github-runner = import ./github-runner/options.nix args;
config = mkIf cfg.enable {
warnings = optionals (isStorePath cfg.tokenFile) [
''
`services.${svcName}.tokenFile` points to the Nix store and, therefore, is world-readable.
Consider using a path outside of the Nix store to keep the token private.
''
];
systemd.services.${svcName} = import ./github-runner/service.nix (args // { inherit svcName; });
services.github-runners.${cfg.name} = cfg;
};
}