add forgejo

This commit is contained in:
freek 2026-10-08 20:09:33 +02:00
parent e1276b0cea
commit 0cd207bd22
3 changed files with 78 additions and 1 deletions

View file

@ -1,5 +1,8 @@
{ modulesPath, ... }: {
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
./forgejo.nix
];
boot.loader.grub = {
efiSupport = true;

48
flake.lock generated Normal file
View file

@ -0,0 +1,48 @@
{
"nodes": {
"disko": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1789770686,
"narHash": "sha256-uZkBR7yHdIKUFB5SZdfgh1qkGfI3XmYmI/lTiquxbck=",
"owner": "nix-community",
"repo": "disko",
"rev": "725ea35e410ad83be4931d1bff7e090eacaf3563",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "disko",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1782847189,
"narHash": "sha256-twXPFqFsrrY5r28Zh7Homgcp2gUMBgQ6WDS98Q/3xFI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b6018f87da91d19d0ab4cf979885689b469cdd41",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"disko": "disko",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

26
forgejo.nix Normal file
View file

@ -0,0 +1,26 @@
{ pkgs, ... }: {
services.mysql = {
enable = true;
package = pkgs.mysql84;
};
services.forgejo = {
enable = true;
database = {
type = "mysql";
socket = "/run/mysqld/mysqld.sock";
createDatabase = true;
};
settings.service.DISABLE_REGISTRATION = true;
settings.server = {
DOMAIN = "46.225.70.113";
ROOT_URL = "http://46.225.70.113:3000/";
HTTP_PORT = 3000;
SSH_PORT = 2222;
SSH_LISTEN_PORT = 2222;
START_SSH_SERVER = true;
};
};
networking.firewall.allowedTCPPorts = [ 3000 2222 ];
}