mirror of
https://github.com/Death916/nixconfig.git
synced 2026-04-11 04:48:25 -07:00
forgejo init and flake
This commit is contained in:
parent
f221845ddf
commit
0318e2e56f
3 changed files with 37 additions and 0 deletions
27
modules/forgejo.nix
Normal file
27
modules/forgejo.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.forgejo = {
|
||||||
|
enable = true;
|
||||||
|
database = {
|
||||||
|
type = "postgres";
|
||||||
|
user = "forgejo";
|
||||||
|
name = "forgejo";
|
||||||
|
socket = "/run/postgresql";
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
DOMAIN = "git.death916.xyz";
|
||||||
|
HTTP_PORT = 3050;
|
||||||
|
ROOT_URL = "https://git.death916.xyz/";
|
||||||
|
PROTOCOL = "http";
|
||||||
|
};
|
||||||
|
service = {
|
||||||
|
DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 3050 ];
|
||||||
|
}
|
||||||
|
|
@ -59,6 +59,15 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.postgresql = {
|
||||||
|
enable = true;
|
||||||
|
ensureDatabases = [ "forgejo" ];
|
||||||
|
ensureUsers = [{
|
||||||
|
name = "forgejo";
|
||||||
|
ensureDBOwnership = true;
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
vim
|
vim
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
../modules/nixos/common/tailscale.nix
|
../modules/nixos/common/tailscale.nix
|
||||||
../modules/soju.nix
|
../modules/soju.nix
|
||||||
../modules/containers/docker/pangolin.nix
|
../modules/containers/docker/pangolin.nix
|
||||||
|
# ../modules/forgejo.nix
|
||||||
# ../modules/adguard.nix
|
# ../modules/adguard.nix
|
||||||
../modules/containers/docker/juicefs.nix
|
../modules/containers/docker/juicefs.nix
|
||||||
../modules/nixos/orac/restic.nix
|
../modules/nixos/orac/restic.nix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue