Added nutboy3 and nuttyclub

This commit is contained in:
2021-11-13 10:30:58 -08:00
parent 1c059841e6
commit d7ee19dd2f
32 changed files with 2052 additions and 419 deletions
+15 -6
View File
@@ -64,15 +64,15 @@ in {
};
repository-dir = mkOption {
type = path;
type = str;
description = "Path at which to store repositories.";
example = /srv/git/repo;
example = "/srv/git/repo";
};
state-dir = mkOption {
type = path;
type = str;
description = "Path at which to store server state.";
example = /srv/git/state;
example = "/srv/git/state";
};
user = mkOption {
@@ -103,6 +103,15 @@ in {
networking.firewall.allowedTCPPorts =
mkIf (cfg.ssh != null) [ cfg.ssh.listen-port ];
environment.systemPackages = with pkgs; let
gitea-admin = writeShellScriptBin "gitea-admin" ''
TMP=$(mktemp -d /tmp/gitea-XXXXXXXX)
${gitea}/bin/gitea --custom-path ${cfg.state-dir}/custom --config ${cfg.state-dir}/custom/conf/app.ini --work-path $TMP $@
'';
in [
gitea-admin
];
services = {
gitea = {
enable = true;
@@ -118,8 +127,8 @@ in {
domain = cfg.hostname;
httpAddress = "127.0.0.1";
httpPort = cfg.local-port;
repositoryRoot = toString cfg.repository-dir;
stateDir = toString cfg.state-dir;
repositoryRoot = cfg.repository-dir;
stateDir = cfg.state-dir;
rootUrl = "https://${cfg.hostname}/";
user = mkIf (cfg.user != null) cfg.user;
ssh = {