cute refactor
This commit is contained in:
parent
3e9d95c2a3
commit
7fb32811d4
12 changed files with 252 additions and 181 deletions
47
modules/github-runners/default.nix
Normal file
47
modules/github-runners/default.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.github-runners;
|
||||
extraPackages =
|
||||
let gtar = pkgs.runCommandNoCC "gtar" { } ''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${lib.getExe pkgs.gnutar} $out/bin/gtar
|
||||
'';
|
||||
in
|
||||
with pkgs; [
|
||||
nix
|
||||
nixci
|
||||
cachix
|
||||
coreutils
|
||||
which
|
||||
jq
|
||||
gtar
|
||||
docker
|
||||
curl
|
||||
];
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules = {
|
||||
github-runners = {
|
||||
enable = mkEnableOption "Deploy github runners";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.github-runners = {
|
||||
simplelink = {
|
||||
enable = true;
|
||||
name = "simplelink";
|
||||
url = "https://github.com/waveringana/simplelink";
|
||||
token = config.age.secrets."build-token".path;
|
||||
user = "regent";
|
||||
group = "docker";
|
||||
extraPackages = extraPackages;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue