70 lines
1.3 KiB
Nix
70 lines
1.3 KiB
Nix
{ pkgs, ... }:
|
|
let baseUrl = "git.ewanick.com";
|
|
in
|
|
{
|
|
services.gitea = {
|
|
enable = true;
|
|
appName = "Bill's Gitea server, hosted on Linode using NixOS";
|
|
settings = {
|
|
server = {
|
|
DOMAIN = baseUrl;
|
|
ROOT_URL = "https://${baseUrl}/";
|
|
HTTP_PORT = 3000;
|
|
};
|
|
service = {
|
|
DISABLE_REGISTRATION = true;
|
|
};
|
|
actions = {
|
|
ENABLED = true;
|
|
DEFAULT_ACTIONS_URL = "self";
|
|
};
|
|
};
|
|
};
|
|
|
|
services.gitea-actions-runner.instances = {
|
|
"first-runner" = {
|
|
enable = true;
|
|
url = baseUrl;
|
|
tokenFile = ./git.ewanick.com/tokenFile;
|
|
hostPackages = with pkgs; [
|
|
bash
|
|
coreutils
|
|
curl
|
|
gawk
|
|
gitMinimal
|
|
gnused
|
|
wget
|
|
];
|
|
name = "linode-nixos";
|
|
labels = [
|
|
"native:host"
|
|
];
|
|
};
|
|
};
|
|
|
|
services.caddy = {
|
|
enable = true;
|
|
virtualHosts = {
|
|
"${baseUrl}" = {
|
|
extraConfig = ''
|
|
reverse_proxy localhost:3000
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|
|
|
|
/*
|
|
# README
|
|
|
|
## View users and use the command line
|
|
|
|
Do something like this, preferably as the gitea user
|
|
|
|
```bash
|
|
$ sudo su gitea
|
|
$ /nix/store/5xwh7m7252m9ljvr3lyilcza1q699r2c-gitea-1.17.4/bin/gitea -c /var/lib/gitea/custom/conf/app.ini admin user list
|
|
```
|
|
*/
|