gitea actions

pull/57/head
Tudor Roman 2024-01-26 17:51:30 +01:00
parent 578304c0de
commit fb7bdf0d85
Signed by: tudor
SSH Key Fingerprint: SHA256:3CwS9plgXBecpXImPGxDIaSktUXBejbV/zerZMqzzBk
4 changed files with 29 additions and 3 deletions

View File

@ -1,4 +1,4 @@
{ config, ...}:
{ config, pkgs, ...}:
{
imports = [ ../_all ./hardware.nix ];
@ -49,6 +49,7 @@
tudor-password.file = ../../secrets/ceres/tudor-password.age;
yarr-credentials.file = ../../secrets/ceres/yarr-credentials.age;
dedyn.file = ../../secrets/ceres/dedyn.age;
gitea-actions-token.file = ../../secrets/ceres/gitea-actions-token.age;
};
users.users.tudor = {

View File

@ -1,8 +1,10 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
let
cfg = config.systemModules.services.web.gitea;
in
with lib; {
with lib; let
name = "${config.networking.hostName}-1";
in {
options.systemModules.services.web.gitea.enable = mkEnableOption "Enable Gitea";
config = mkIf cfg.enable {
@ -18,6 +20,28 @@ with lib; {
settings.service = {
DISABLE_REGISTRATION = true;
};
settings.actions.ENABLED = true;
};
virtualisation.podman.enable = true;
services.gitea-actions-runner = {
instances.${name} = {
inherit name;
enable = true;
url = config.services.gitea.settings.server.ROOT_URL;
tokenFile = config.age.secrets.gitea-actions-token.path;
labels = [
"ubuntu-latest:docker://node:16-bullseye"
"ubuntu-22.04:docker://node:16-bullseye"
"ubuntu-20.04:docker://node:16-bullseye"
"ubuntu-18.04:docker://node:16-buster"
];
settings = {
log.level = "warn";
container.network = "host";
};
};
};
services.nginx.virtualHosts."git.tudorr.ro" = {

Binary file not shown.

View File

@ -7,4 +7,5 @@ in
"tudor-password.age".publicKeys = keys;
"yarr-credentials.age".publicKeys = keys;
"dedyn.age".publicKeys = keys;
"gitea-actions-token.age".publicKeys = keys;
}