diff --git a/modules/server/default.nix b/modules/server/default.nix index 0633cb7..7ea586e 100644 --- a/modules/server/default.nix +++ b/modules/server/default.nix @@ -7,6 +7,7 @@ ../software/beets ./bentopdf.nix ./calibre-web.nix + ./gitea.nix ./glances.nix ./immich.nix ./miniflux.nix diff --git a/modules/server/gitea.nix b/modules/server/gitea.nix new file mode 100644 index 0000000..2132d9e --- /dev/null +++ b/modules/server/gitea.nix @@ -0,0 +1,27 @@ +{ + config, + inputs, + lib, + pkgs, + xlib, + ... +}: +{ + services = { + gitea = { + enable = true; + stateDir = "${xlib.dirs.services-mnt-folder}/gitea"; + appName = "ZeroQ Gitea Service"; + settings = { + server = { + DOMAIN = "gitea.local"; + HTTP_PORT = 3000; + }; + }; + }; + }; + + systemd.tmpfiles.rules = [ + "z ${config.services.gitea.stateDir} 0755 gitea gitea -" + ]; +} diff --git a/modules/server/immich.nix b/modules/server/immich.nix index 66ca126..be2d43d 100644 --- a/modules/server/immich.nix +++ b/modules/server/immich.nix @@ -1,8 +1,8 @@ { config, + inputs, lib, pkgs, - inputs, xlib, ... }: diff --git a/modules/server/nextcloud.nix b/modules/server/nextcloud.nix index a13302b..4460ad8 100644 --- a/modules/server/nextcloud.nix +++ b/modules/server/nextcloud.nix @@ -18,14 +18,14 @@ in nextcloud-whiteboard-server = { enable = true; settings = { - NEXTCLOUD_URL = "http://nextcloud-private.local"; + NEXTCLOUD_URL = "http://nextcloud.private"; }; secrets = [ config.sops.secrets.nextcloud-whiteboard-jwt.path ]; }; nextcloud = { enable = true; package = pkgs.nextcloud33; - hostName = "nextcloud-private.local"; + hostName = "nextcloud.private"; database.createLocally = true; home = "${xlib.dirs.services-mnt-folder}/nextcloud"; configureRedis = true; @@ -44,14 +44,14 @@ in settings = { log_type = "file"; trusted_domains = [ - "nextcloud.zeroq.su" - "office.zeroq.su" - "office.local" "100.64.0.0" "192.168.1.20" "localhost" "nextcloud.local" - "nextcloud-private.local" + "nextcloud.private" + "nextcloud.zeroq.su" + "office.local" + "office.zeroq.su" ]; trusted_proxies = [ "100.64.1.0" @@ -68,11 +68,13 @@ in # phpPackage = pkgs.php85; extraApps = { inherit (config.services.nextcloud.package.packages.apps) + # richdocuments # gpoddersync # integration_paperless # memories + # news # nextpod - onlyoffice + # notify_push # phonetrack # repod # sociallogin @@ -90,15 +92,13 @@ in impersonate mail music - tasks - # news notes - # notify_push + onlyoffice polls previewgenerator - # richdocuments spreed tables + tasks user_oidc user_saml whiteboard @@ -110,31 +110,31 @@ in # ; }; }; - collabora-online = { - enable = false; - port = 9980; - # package = master.collabora-online; - settings = { - server_name = "office.zeroq.su"; - ssl = { - enable = false; - termination = true; - ssl_verification = false; - }; - net = { - listen = "0.0.0.0"; - post_allow.host = [ - "0.0.0.0" - ]; - }; - storage.wopi = { - "@allow" = true; - host = [ - "0.0.0.0/0" - ]; - }; - }; - }; + # collabora-online = { + # enable = false; + # port = 9980; + # # package = master.collabora-online; + # settings = { + # server_name = "office.zeroq.su"; + # ssl = { + # enable = false; + # termination = true; + # ssl_verification = false; + # }; + # net = { + # listen = "0.0.0.0"; + # post_allow.host = [ + # "0.0.0.0" + # ]; + # }; + # storage.wopi = { + # "@allow" = true; + # host = [ + # "0.0.0.0/0" + # ]; + # }; + # }; + # }; onlyoffice = { enable = true; hostname = "office.local"; diff --git a/modules/server/nginx.nix b/modules/server/nginx.nix index 574abf1..cef3ac6 100644 --- a/modules/server/nginx.nix +++ b/modules/server/nginx.nix @@ -17,7 +17,7 @@ in recommendedProxySettings = true; recommendedTlsSettings = true; virtualHosts = { - "nextcloud-private.local" = { + "nextcloud.private" = { forceSSL = false; enableACME = false; listen = [ @@ -89,6 +89,14 @@ in client_max_body_size 5G; ''; }; + "gitea.local" = { + forceSSL = false; + enableACME = false; + locations."/" = { + proxyPass = "http://${server}:3000"; + proxyWebsockets = true; + }; + }; "n8n.local" = { forceSSL = false; enableACME = false;