]> Untitled Git - MarigoldOS/.git/blob - profiles/gitea.nix
more 0x00 stuff moved over
[MarigoldOS/.git] / profiles / gitea.nix
1 { config, lib, pkgs, ... }:
2 let
3     fqdn = "gitea.${config.networking.hostName}.${config.networking.domain}";
4 in {
5   environment.systemPackages = [ pkgs.tea ];
6   services.gitea = {
7     enable = true;
8     domain = "${fqdn}";
9     rootUrl = if config.security.acme.acceptTerms then "https://${fqdn}" else "http://${fqdn}";
10     httpAddress = "127.0.0.1";
11     disableRegistration = true;
12     settings = {
13       server = {
14         SSH_DOMAIN = "${fqdn}";
15         LANDING_PAGE = "explore";
16       };
17       ui = {
18         DEFAULT_THEME = "arc-green";
19       };
20       U2F = {
21         APP_ID = if config.security.acme.acceptTerms then "https://${fqdn}" else "http://${fqdn}";
22         TRUSTED_FACETS = if config.security.acme.acceptTerms then "https://${fqdn}" else "http://${fqdn}";
23       };
24     };
25   };
26   helpers.webservices."${fqdn}" = {
27     port = config.services.gitea.httpPort;
28     auth = false;
29   };
30 }
31