cute refactor
This commit is contained in:
parent
3e9d95c2a3
commit
7fb32811d4
12 changed files with 252 additions and 181 deletions
49
modules/forgejo/default.nix
Normal file
49
modules/forgejo/default.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.forgejo;
|
||||
sshPort = 2222;
|
||||
httpPort = 5000;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules = {
|
||||
forgejo = {
|
||||
enable = mkEnableOption "Deploy forgejo";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
sshPort
|
||||
httpPort
|
||||
];
|
||||
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
database = {
|
||||
type = "sqlite3";
|
||||
path = "/var/lib/forgejo/forgejo.db";
|
||||
};
|
||||
lfs.enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
domain = "git.nekomimi.pet";
|
||||
ROOT_URL = "https://git.nekomimi.pet";
|
||||
LANDING_PAGE = "explore";
|
||||
HTTP_PORT = 5000;
|
||||
SSH_LISTEN_PORT = 2222;
|
||||
SSH_PORT = 2222;
|
||||
START_SSH_SERVER = true;
|
||||
};
|
||||
# service.DISABLE_REGISTRATION = true;
|
||||
actions = {
|
||||
ENABLED = true;
|
||||
DEFAULT_ACTIONS_URL = "github";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue