22
0
mirror of https://github.com/SuperSandro2000/nixos-modules.git synced 2024-06-11 02:34:05 +02:00
nixos-modules/modules/gitea.nix

20 lines
529 B
Nix
Raw Normal View History

2023-01-06 21:11:53 +01:00
{ 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;
});
};
}