22
0
mirror of https://github.com/SuperSandro2000/nixos-modules.git synced 2024-06-13 11:35:47 +02:00

Add gitea opinionated defaults

This commit is contained in:
Sandro - 2023-01-06 21:11:53 +01:00
parent b6c9bfc627
commit 435ebe0ff3
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5

19
modules/gitea.nix Normal file
View File

@ -0,0 +1,19 @@
{ config, lib, libS, ... }:
let
cfg = config.services.gitea;
in
{
options = {
services.gitea.recommendedDefaults = libS.mkOpinionatedOption "set recommended, secure default settings";
};
config = lib.mkIf cfg.enable {
services.gitea.settings = lib.mkIf cfg.recommendedDefaults (libS.modules.mkRecursiveDefault {
"update_checker".ENABLED = false;
other.SHOW_FOOTER_VERSION = false;
session.COOKIE_SECURE = lib.mkForce true;
time.DEFAULT_UI_LOCATION = config.time.timeZone;
});
};
}