From da56401123ae357fcbc9399aec482cb56faef0a0 Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Fri, 7 Jul 2023 22:42:13 +0200 Subject: [PATCH] gitea setup --- hosts/nixos/common/optional/gitea.nix | 28 +++++++++++++++++++++++++++ hosts/nixos/tethys/default.nix | 1 + 2 files changed, 29 insertions(+) create mode 100644 hosts/nixos/common/optional/gitea.nix diff --git a/hosts/nixos/common/optional/gitea.nix b/hosts/nixos/common/optional/gitea.nix new file mode 100644 index 0000000..43827b7 --- /dev/null +++ b/hosts/nixos/common/optional/gitea.nix @@ -0,0 +1,28 @@ +{ lib, ... }: { + services.gitea = { + enable = true; + appName = "pinktea"; + stateDir = "/persist/state/pinktea"; + lfs.enable = true; + + dump = { + enable = true; + type = "tar.gz"; + }; + + # See [the cheatsheet](https://docs.gitea.com/next/administration/config-cheat-sheet) + settings = { + session.COOKIE_SECURE = false; # TODO: set to true when serving over https + repository = { + DISABLED_REPO_UNITS = ""; + DEFAULT_REPO_UNITS = lib.strings.concatStringsSep "," [ + "repo.code" + "repo.releases" + "repo.issues" + "repo.pulls" + ]; + DISABLE_STARS = true; + }; + }; + }; +} diff --git a/hosts/nixos/tethys/default.nix b/hosts/nixos/tethys/default.nix index f3bf580..a8e31e2 100644 --- a/hosts/nixos/tethys/default.nix +++ b/hosts/nixos/tethys/default.nix @@ -12,6 +12,7 @@ ../common/optional/xdg-portal.nix ../common/optional/hyprland.nix ../common/optional/syncthing.nix + ../common/optional/gitea.nix ../common/optional/xmonad ./hardware-configuration.nix