Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
2972bf312e |
|||
|
6628ed9789 |
|||
|
b16ceb22ee |
5 changed files with 108 additions and 1 deletions
20
flake.nix
20
flake.nix
|
|
@ -293,6 +293,26 @@
|
||||||
./hosts/git
|
./hosts/git
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
nixosConfigurations."forgejo-runner" = nixpkgs.lib.nixosSystem {
|
||||||
|
#system = "x86_64-linux";
|
||||||
|
#pkgs = import nixpkgs { inherit system; };
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
agenix.nixosModules.default
|
||||||
|
{ environment.systemPackages = [ (agenix.packages.${system}.default) ]; }
|
||||||
|
{
|
||||||
|
age.secrets = {
|
||||||
|
forgejo-runner-token-snowden = {
|
||||||
|
file = ./secrets/forgejo-runner-token-snowden.age;
|
||||||
|
owner = "root";
|
||||||
|
group = "root";
|
||||||
|
mode = "0444";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
./hosts/forgejo-runner
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
#);
|
#);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
34
hosts/forgejo-runner/default.nix
Normal file
34
hosts/forgejo-runner/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../common.nix
|
||||||
|
../../services/openssh.nix
|
||||||
|
../../services/prometheus-node.nix
|
||||||
|
./forgejo-runner.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "forgejo-runner";
|
||||||
|
firewall = {
|
||||||
|
allowedTCPPorts = [
|
||||||
|
22 # SSH
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMn0SP19A5C8PqdH+99ki3TILozj/U4tBSQxcRRepN21 samuel@pluto"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.etc."ssh/banner".text = ''
|
||||||
|
_ __ __ __ ___ ___ __ _ __
|
||||||
|
/\`'__\/\ \/\ \ /' _ `\ /' _ `\ /'__`\/\`'__\
|
||||||
|
\ \ \/ \ \ \_\ \/\ \/\ \/\ \/\ \/\ __/\ \ \/
|
||||||
|
\ \_\ \ \____/\ \_\ \_\ \_\ \_\ \____\\ \_\
|
||||||
|
\/_/ \/___/ \/_/\/_/\/_/\/_/\/____/ \/_/
|
||||||
|
'';
|
||||||
|
services.openssh.settings.Banner = "/etc/ssh/banner";
|
||||||
|
|
||||||
|
system.stateVersion = "26.05";
|
||||||
|
}
|
||||||
52
hosts/forgejo-runner/forgejo-runner.nix
Normal file
52
hosts/forgejo-runner/forgejo-runner.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.gitea-actions-runner = {
|
||||||
|
package = pkgs.forgejo-runner;
|
||||||
|
instances.snowden = {
|
||||||
|
enable = true;
|
||||||
|
name = "snowden";
|
||||||
|
url = "https://git.berlin.ccc.de";
|
||||||
|
labels = [
|
||||||
|
"debian-stable:docker://docker.io/debian:stable-slim"
|
||||||
|
"alpine-latest:docker://docker.io/alpine:latest"
|
||||||
|
"buildkit:docker://docker.io/moby/buildkit:rootless"
|
||||||
|
];
|
||||||
|
tokenFile = config.age.secrets.forgejo-runner-token-env.path;
|
||||||
|
settings = {
|
||||||
|
runner.labels = {
|
||||||
|
debian-stable = {
|
||||||
|
backend = "docker";
|
||||||
|
backend-options = {
|
||||||
|
image = "docker.io/debian:stable-slim";
|
||||||
|
platform = "linux/amd64";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
alpine-latest = {
|
||||||
|
backend = "docker";
|
||||||
|
backend-options = {
|
||||||
|
image = "docker.io/alpine:latest";
|
||||||
|
platform = "linux/amd64";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildkit = {
|
||||||
|
backend = "docker";
|
||||||
|
backend-options = {
|
||||||
|
image = "docker.io/moby/buildkit:rootless";
|
||||||
|
platform = "linux/amd64";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
server.connections.forgejo = {
|
||||||
|
url = "https://git.berlin.ccc.de/";
|
||||||
|
uuid = "7fd3683e-1bc1-429f-8467-e6d27044eb91";
|
||||||
|
token_url = "file://${config.age.secrets.forgejo-runner-token.path}";
|
||||||
|
};
|
||||||
|
container = {
|
||||||
|
enable_ipv6 = true;
|
||||||
|
docker_host = "unix:///run/podman/podman.sock";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Binary file not shown.
|
|
@ -24,6 +24,7 @@ let
|
||||||
_monitoring = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINmRWdAUur0lb08NiB6ZWLrGmCeELRV30ElxRLfVJGPB root@monitoring";
|
_monitoring = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINmRWdAUur0lb08NiB6ZWLrGmCeELRV30ElxRLfVJGPB root@monitoring";
|
||||||
_dav = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICArHbX8OlNOv8HCWyyFvyi60d6MRFYe+apK0iGJ7yIM root@dav";
|
_dav = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICArHbX8OlNOv8HCWyyFvyi60d6MRFYe+apK0iGJ7yIM root@dav";
|
||||||
_git = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII93S1RUXVbH6mQksk9c5fXP8avSKXEUHBH0a7/ZbZY5 root@git";
|
_git = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII93S1RUXVbH6mQksk9c5fXP8avSKXEUHBH0a7/ZbZY5 root@git";
|
||||||
|
_runner = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKFC7hGJC7cZ2NlrPEP9dhX1+vBNpoTFVNTKcyJX+EVP root@forgejo-runner";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"matrix_admin_password.age".publicKeys = xengi;
|
"matrix_admin_password.age".publicKeys = xengi;
|
||||||
|
|
@ -66,7 +67,7 @@ in
|
||||||
"radicale_htpasswd.age".publicKeys = xengi ++ [ _dav ];
|
"radicale_htpasswd.age".publicKeys = xengi ++ [ _dav ];
|
||||||
"forgejo-internal-token.age".publicKeys = xengi ++ kaythxbye ++ [ _git ];
|
"forgejo-internal-token.age".publicKeys = xengi ++ kaythxbye ++ [ _git ];
|
||||||
"forgejo-runner-token-snowden-env.age".publicKeys = xengi ++ kaythxbye ++ [ _git ];
|
"forgejo-runner-token-snowden-env.age".publicKeys = xengi ++ kaythxbye ++ [ _git ];
|
||||||
"forgejo-runner-token-snowden.age".publicKeys = xengi ++ kaythxbye ++ [ _git ];
|
"forgejo-runner-token-snowden.age".publicKeys = xengi ++ kaythxbye ++ [ _git _runner ];
|
||||||
"forgejo-secret-key.age".publicKeys = xengi ++ kaythxbye ++ [ _git ];
|
"forgejo-secret-key.age".publicKeys = xengi ++ kaythxbye ++ [ _git ];
|
||||||
"forgejo-oauth2-jwt-secret.age".publicKeys = xengi ++ kaythxbye ++ [ _git ];
|
"forgejo-oauth2-jwt-secret.age".publicKeys = xengi ++ kaythxbye ++ [ _git ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue