add cache config
Some checks are pending
/ Build Nix targets (push) Has started running

This commit is contained in:
Awen Lelu 2025-11-12 11:51:23 +01:00
parent 6e7950523f
commit c228d817a7

View File

@ -1,15 +1,24 @@
{nodes, inputs, pkgs, ...}:let
{
nodes,
inputs,
pkgs,
...
}:
let
sin-address = "192.168.1.14";
unstable = import inputs.unstable {system = pkgs.system;};
in{
unstable = import inputs.unstable { system = pkgs.system; };
in
{
imports = [
./virtualisation.nix
];
networking.nat.forwardPorts = [{
sourcePort = nodes.sin.config.services.gitea.settings.server.SSH_PORT;
proto = "tcp";
destination = "${sin-address}:22";
}];
networking.nat.forwardPorts = [
{
sourcePort = nodes.sin.config.services.gitea.settings.server.SSH_PORT;
proto = "tcp";
destination = "${sin-address}:22";
}
];
services.gitea-actions-runner.package = unstable.gitea-actions-runner;
@ -21,8 +30,27 @@ in{
token = "uEDPBW6Z9oItAKRtloVwis0LkPbD4OmV2w5esOhW";
labels = [
"ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04"
]
;
];
settings = {
cache = {
# Enable cache server to use actions/cache.
enabled = true;
# The directory to store the cache data.
# If it's empty, the cache data will be stored in $HOME/.cache/actcache.
dir = "";
# The host of the cache server.
# It's not for the address to listen, but the address to connect from job containers.
# So 0.0.0.0 is a bad choice, leave it empty to detect automatically.
host = "";
# The port of the cache server.
# 0 means to use a random available port.
port = 0;
# The external cache server URL. Valid only when enable is true.
# If it's specified, act_runner will use this URL as the ACTIONS_CACHE_URL rather than start a server by itself.
# The URL should generally end with "/".
external_server = "";
};
};
};
};
}