1
1
Files
deployed-nixos-server-and-apps/nixos-apps/git.ewanick.com.nix

87 lines
1.9 KiB
Nix

{ pkgs, ... }:
let baseUrl = "git.ewanick.com";
in
{
services.forgejo = {
enable = true;
appName = "Bill's Forgejo server, hosted on Linode using NixOS";
database.type = "postgres";
# Enable support for Git Large File Storage
lfs.enable = true;
settings = {
server = {
DOMAIN = baseUrl;
ROOT_URL = "https://${baseUrl}/";
HTTP_PORT = 3000;
};
service.DISABLE_REGISTRATION = true;
# Add support for actions, based on act: https://github.com/nektos/act
actions = {
ENABLED = true;
DEFAULT_ACTIONS_URL = "github";
};
# Sending emails is completely optional
# You can send a test email from the web UI at:
# Profile Picture > Site Administration > Configuration > Mailer Configuration
# mailer = {
# ENABLED = true;
# SMTP_ADDR = "mail.example.com";
# FROM = "noreply@${srv.DOMAIN}";
# USER = "noreply@${srv.DOMAIN}";
# };
};
# secrets = {
# mailer.PASSWD = config.age.secrets.forgejo-mailer-password.path;
# };
};
services.gitea-actions-runner = {
package = pkgs.forgejo-runner;
instances.default = {
enable = true;
name = "linode-nixos";
url = baseUrl;
tokenFile = ./git.ewanick.com/tokenFile;
hostPackages = with pkgs; [
bash
coreutils
curl
gawk
gitMinimal
gnused
wget
];
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
```
*/