diff --git a/hosts/jude/default.nix b/hosts/jude/default.nix index ed63cb2..94927e7 100644 --- a/hosts/jude/default.nix +++ b/hosts/jude/default.nix @@ -40,6 +40,7 @@ nix-tree oathToolkit synology-drive-client + terraform vagrant ventoy diff --git a/modules/ci-runner.nix b/modules/ci-runner.nix deleted file mode 100644 index 60921af..0000000 --- a/modules/ci-runner.nix +++ /dev/null @@ -1,102 +0,0 @@ -{ config, pkgs, lib, ... }: - -let - cfg = config.greg.ci-runner; - runnerNames = (builtins.attrNames cfg); - makeRunner = name: value: { - enable = true; - hostPackages = with pkgs; [ - bashInteractive - coreutils - curl - gawk - git - gnused - nodejs - nodejs_20 - podman - pup - gregpy - shellcheck - wget - ] ++ value.packages; - labels = lib.mkIf ( builtins.hasAttr "labels" value) value.labels; - name = config.networking.hostName; - tokenFile = config.age.secrets.forgejo-runner.path; - url = "https://src.thehellings.com"; - settings = { - runner.capacity = value.parallel; - container.network = "host"; - cache.enabled = true; - host = { - workdir_parent = "/var/lib/private/gitea-runner/${name}"; - }; - lxc.enabled = false; - }; - }; - - userName = "gitea-runner"; - -in with lib; { - options = { - greg.ci-runner = mkOption { - default = {}; - description = "List of gitea/forgejo runners to configure"; - example = '' - ``` - greg.ci-runner.snarfblatt = { - labels = [ "ubuntu-latest:docker://ubuntu:latest" ]; - }; - ``` - ''; - - type = with types; attrsOf ( submodule ( - { name, config, options, ... }: - { - options.labels = mkOption { - type = (types.listOf types.str); - default = []; - description = ''List of labels. The syntax is - more or less going to be something along the lines - of `:docker://` or - `native:host` for a system that will support running - commands directly on the server.''; - }; - - options.packages = mkOption { - type = (types.listOf types.package); - default = []; - description = ''List of extra packages that will be needed - in the running environment for this worker.''; - }; - - options.parallel = mkOption { - type = types.int; - default = 3; - description = "The maximum number of parallel jobs this runner will support."; - }; - }) - ); - }; - }; - - config = mkIf ( runnerNames != [] ) { - services.gitea-actions-runner.instances = ( mapAttrs makeRunner cfg); - #services.gitea-actions-runner.package = pkgs.forgejo-actions-runner; - - age.secrets.forgejo-runner = let - aName = builtins.elemAt runnerNames 0; - target = "gitea-runner-${aName}"; - in { - file = ../secrets/${config.networking.hostName}-forgejo-runner.age; - owner = userName; - group = userName; - }; - - users.users."${userName}" = { - isSystemUser = true; - group = "${userName}"; - }; - users.groups."${userName}" = {}; - }; -} diff --git a/modules/default.nix b/modules/default.nix index 70fac9a..2390683 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -5,7 +5,6 @@ let system = pkgs.system; in { imports = [ - ./ci-runner.nix ] ++ (if (lib.strings.hasSuffix "darwin" "nope") then [./darwin] else []) ++ (if (lib.strings.hasSuffix "linux" "linux") then [./linux] else []);