gitea: copy configs from old server

This commit is contained in:
Dmitriy Pleshevskiy 2022-10-15 23:51:15 +03:00
parent bc9dbf0881
commit 2e83fc54b4
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
2 changed files with 80 additions and 1 deletions

View file

@ -43,21 +43,89 @@ in
package = pkgs.postgresql_14; package = pkgs.postgresql_14;
}; };
programs.gnupg.agent.enable = true;
services.gitea = { services.gitea = {
enable = true; enable = true;
httpPort = 9901; httpPort = 9901;
domain = "nix-git.pleshevski.ru"; domain = "nix-git.pleshevski.ru";
rootUrl = "https://nix-git.pleshevski.ru"; rootUrl = "https://nix-git.pleshevski.ru";
appName = "Pleshevskiy Git Repositories";
mailerPasswordFile = config.age.secrets.mailserver-users-jan-passfile.path;
database = { database = {
type = "postgres"; type = "postgres";
host = "/run/postgresql"; host = "/run/postgresql";
port = config.services.postgresql.port; port = config.services.postgresql.port;
}; };
lfs.enable = true;
settings = { settings = {
log.LEVEL = "Error"; log.LEVEL = "Error";
service.DISABLE_REGISTRATION = true;
metrics.ENABLED = true; metrics.ENABLED = true;
database.CHARSET = "utf8";
server.DISABLE_ROUTER_LOG = true; server.DISABLE_ROUTER_LOG = true;
service = {
ALLOW_ONLY_EXTERNAL_REGISTRATION = false;
DEFAULT_KEEP_EMAIL_PRIVATE = false;
DEFAULT_ALLOW_CREATE_ORGANIZATION = true;
DEFAULT_ENABLE_TIMETRACKING = true;
DEFAULT_ENABLE_DEPENDENCIES = false;
DISABLE_REGISTRATION = true;
ENABLE_NOTIFY_MAIL = false;
ENABLE_CAPTCHA = false;
ENABLE_TIMETRACKING = false;
REQUIRE_SIGNIN_VIEW = false;
REGISTER_EMAIL_CONFIRM = false;
NO_REPLY_ADDRESS = "noreply.pleshevski.ru";
};
repository = {
DISABLE_MIGRATIONS = false;
DISABLE_HTTP_GIT = false;
DISABLE_STARS = true;
DEFAULT_BRANCH = "main";
DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH = true;
};
"repository.signing" = {
SIGNING_KEY = "default";
DEFAULT_TRUST_MODEL = "collaboratorcommiter";
MERGES = "pubkey,basesigned,commitssigned";
};
"repository.local" = {
LOCAL_COPY_PATH = "${config.services.gitea.stateDir}/tmp/local-repo";
};
"repository.upload" = {
TEMP_PATH = "${config.services.gitea.stateDir}/uploads";
ALLOWED_TYPES = "image/*";
};
"repository.pull-request" = {
WORK_IN_PROGRESS_PREFIXES = "Draft:,[Draft]:,WIP:,[WIP]:";
};
indexer = {
ISSUE_INDEXER_PATH = "${config.services.gitea.stateDir}/indexers/issues.bleve";
};
sessions = {
PROVIDER = "file";
PROVIDER_CONFIG = "${config.services.gitea.stateDir}/sessions";
};
picture = {
AVATAR_UPLOAD_PATH = "${config.services.gitea.stateDir}/avatars";
REPOSITORY_AVATAR_UPLOAD_PATH = "${config.services.gitea.stateDir}/repo-avatars";
DISABLE_GRAVATAR = false;
ENABLE_FEDERATED_AVATAR = true;
};
attachment = {
PATH = "${config.services.gitea.stateDir}/attachments";
};
mailer = {
ENABLED = true;
MAILER_TYPE = "smtp";
FROM = "\"${config.services.gitea.appName}\" <no-reply@pleshevski.ru>";
USER = "dmitriy@pleshevski.ru";
HOST = "mail.pleshevski.ru:465";
};
openid = {
ENABLE_OPENID_SIGNIN = true;
ENABLE_OPENID_SIGNUP = false;
};
}; };
}; };

11
notes/ssh.md Normal file
View file

@ -0,0 +1,11 @@
# Get key for machine
```sh
ssh-keyscan <host>
```
If you want to get key for the current machine you can use the following code
```sh
ssh-keyscan localhost
```