Added nutboy3 and nuttyclub
This commit is contained in:
+15
-6
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user