feat: add configuration to forgejo to be more cute
This commit is contained in:
parent
9dd83c5b92
commit
188b752420
2 changed files with 464 additions and 2 deletions
|
|
@ -1,21 +1,69 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
customDir = "/var/lib/forgejo/custom";
|
||||
themeCSS = ./forgejo-theme-gh-hc.css;
|
||||
in
|
||||
{
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
database.type = "postgres";
|
||||
# Enable support for Large File Storage
|
||||
lfs.enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "git.extremist.software";
|
||||
ROOT_URL = "https://git.extremist.software/";
|
||||
HTTP_PORT = 3000;
|
||||
LANDING_PAGE = "/jet";
|
||||
};
|
||||
# You can configure SMTP here using secrets if needed
|
||||
|
||||
service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
SHOW_REGISTRATION_BUTTON = false;
|
||||
EXPLORE_REQUIRE_SIGNIN_VIEW = true;
|
||||
};
|
||||
|
||||
"service.explore" = {
|
||||
DISABLE_USERS_PAGE = true;
|
||||
DISABLE_ORGANIZATIONS_PAGE = true;
|
||||
};
|
||||
|
||||
repository = {
|
||||
DISABLE_STARS = true;
|
||||
};
|
||||
|
||||
ui = {
|
||||
DEFAULT_THEME = "gh-hc";
|
||||
THEMES = "gh-hc,forgejo-auto,forgejo-light,forgejo-dark";
|
||||
SHOW_USER_EMAIL = true;
|
||||
};
|
||||
|
||||
"ui.meta" = {
|
||||
AUTHOR = "jet";
|
||||
DESCRIPTION = "Software extremist.";
|
||||
KEYWORDS = "git,forgejo,jet,extremist";
|
||||
};
|
||||
|
||||
other = {
|
||||
SHOW_FOOTER_VERSION = false;
|
||||
};
|
||||
|
||||
openid = {
|
||||
ENABLE_OPENID_SIGNIN = false;
|
||||
ENABLE_OPENID_SIGNUP = false;
|
||||
};
|
||||
|
||||
};
|
||||
database.passwordFile = config.age.secrets.forgejo-db.path;
|
||||
};
|
||||
|
||||
services.postgresql.enable = true;
|
||||
|
||||
# Deploy custom theme CSS to Forgejo's custom directory
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${customDir}/public 0755 forgejo forgejo -"
|
||||
"d ${customDir}/public/assets 0755 forgejo forgejo -"
|
||||
"d ${customDir}/public/assets/css 0755 forgejo forgejo -"
|
||||
"C+ ${customDir}/public/assets/css/theme-gh-hc.css 0644 forgejo forgejo - ${themeCSS}"
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue