2024-05-14 12:03:36 -05:00
|
|
|
{ pkgs, config, lib, ... }:
|
2024-05-20 19:36:31 -05:00
|
|
|
{
|
2024-05-23 12:22:57 -05:00
|
|
|
imports = [
|
|
|
|
../cachix.nix
|
|
|
|
];
|
2024-05-14 12:03:36 -05:00
|
|
|
environment.systemPackages = with pkgs; [
|
2024-05-23 11:26:32 -05:00
|
|
|
# vim -- added by srvos.nixosModules.server
|
|
|
|
# git -- srvos.nixosModules.server
|
|
|
|
# tmux -- srvos.nixosModules.server
|
2024-05-14 12:03:36 -05:00
|
|
|
cachix
|
2024-05-14 14:21:22 -05:00
|
|
|
lazydocker
|
|
|
|
lazygit
|
2024-05-23 11:26:32 -05:00
|
|
|
nodejs_20 # required by actions such as checkout
|
2024-05-14 12:03:36 -05:00
|
|
|
];
|
|
|
|
|
|
|
|
sops.secrets."forgejo-runner-token" = {
|
2024-06-18 17:52:57 -05:00
|
|
|
# configure secret for the gitea/forgejo runner.
|
2024-05-14 12:03:36 -05:00
|
|
|
sopsFile = ./secrets.sops.yaml;
|
|
|
|
mode = "0444";
|
2024-05-14 13:22:24 -05:00
|
|
|
restartUnits = [ "gitea-runner-default.service" ];
|
2024-05-14 12:03:36 -05:00
|
|
|
};
|
|
|
|
|
2024-06-18 17:52:57 -05:00
|
|
|
sops.secrets."cachix/agent_auth_tokens/fj-shadowfax-x86_64" = {
|
|
|
|
# configure secret for cachix deploy agent.
|
|
|
|
sopsFile = ./secrets.sops.yaml;
|
|
|
|
mode = "0444";
|
|
|
|
restartUnits = [ "cachix-agent.service" ];
|
|
|
|
};
|
|
|
|
|
2024-05-21 14:12:28 -05:00
|
|
|
nix.settings.trusted-users = [ "gitea-runner" ];
|
2024-05-26 11:16:48 -05:00
|
|
|
users.users.jahanson = {
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [ "wheel" "docker" ];
|
|
|
|
initialPassword = "debug123";
|
|
|
|
};
|
2024-05-14 12:03:36 -05:00
|
|
|
|
|
|
|
virtualisation.docker.enable = true;
|
|
|
|
|
2024-05-14 13:38:39 -05:00
|
|
|
users.users.gitea-runner.group = "gitea-runner";
|
2024-05-14 13:41:38 -05:00
|
|
|
users.groups.gitea-runner = {};
|
2024-05-14 13:38:39 -05:00
|
|
|
users.users.gitea-runner.extraGroups = [ "docker" ];
|
|
|
|
users.users.gitea-runner.isNormalUser = true;
|
|
|
|
|
2024-05-15 07:45:21 -05:00
|
|
|
# Runner communication port for cache restores.
|
|
|
|
networking.firewall.allowedTCPPorts = [ 45315 ];
|
|
|
|
|
2024-05-14 12:03:36 -05:00
|
|
|
services.gitea-actions-runner = {
|
|
|
|
package = pkgs.forgejo-actions-runner;
|
|
|
|
instances.default = {
|
|
|
|
enable = true;
|
2024-05-23 11:26:32 -05:00
|
|
|
name = "fj-shadowfax-x86_64";
|
2024-05-14 12:03:36 -05:00
|
|
|
url = "https://git.hsn.dev";
|
|
|
|
# Obtaining the path to the runner token file may differ
|
|
|
|
tokenFile = config.sops.secrets.forgejo-runner-token.path;
|
|
|
|
labels = [
|
2024-05-20 08:46:49 -05:00
|
|
|
"docker:docker://node:20-bullseye"
|
2024-05-23 11:26:32 -05:00
|
|
|
"x86_64"
|
2024-05-20 08:46:49 -05:00
|
|
|
"linux"
|
2024-05-20 19:36:31 -05:00
|
|
|
"pc"
|
2024-05-23 11:26:32 -05:00
|
|
|
"docker-x86_64:docker://node:20-bullseye"
|
|
|
|
"native-x86_64:host"
|
2024-05-14 12:03:36 -05:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2024-06-18 17:52:57 -05:00
|
|
|
|
|
|
|
services.cachix-agent = {
|
|
|
|
enable = true;
|
|
|
|
credentialsFile = config.sops.secrets."cachix/agent_auth_tokens/fj-shadowfax-x86_64".path;
|
|
|
|
};
|
|
|
|
|
2024-05-14 12:03:36 -05:00
|
|
|
system.stateVersion = "24.05";
|
2024-05-20 19:36:31 -05:00
|
|
|
}
|