Add other services
This commit is contained in:
parent
0bbb49efee
commit
ff8a4d23a9
10 changed files with 377 additions and 7 deletions
32
services/gitea/default.nix
Normal file
32
services/gitea/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.services.vm_gitea;
|
||||
in
|
||||
{
|
||||
options.services.vm_gitea = {
|
||||
enable = lib.mkEnableOption "Enable minimal config";
|
||||
db_ip = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Gitea database IP address";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
user = "tbarnouin";
|
||||
settings = {
|
||||
server.HTTP_PORT = 3000;
|
||||
server.ROOT_URL = "http://${config.services.vm.vm_ip}/";
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
};
|
||||
database = {
|
||||
createDatabase = false;
|
||||
type = "postgres";
|
||||
host = "${cfg.db_ip}";
|
||||
user = "gitea";
|
||||
passwordFile = "/run/secrets/gitea/gitea-dbpass";
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 3000 ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue