From 6c64f78d6a254d0596ccfce3bec845eda3b9da17 Mon Sep 17 00:00:00 2001 From: Victor Date: Fri, 14 Apr 2023 22:28:06 +0200 Subject: [PATCH] switch to forgejo --- nixos/hosts/olympus/gitea/configuration.nix | 1 + .../hosts/olympus/hedgedoc/configuration.nix | 37 +++++++------------ 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/nixos/hosts/olympus/gitea/configuration.nix b/nixos/hosts/olympus/gitea/configuration.nix index b0b68a1..0fcc87d 100644 --- a/nixos/hosts/olympus/gitea/configuration.nix +++ b/nixos/hosts/olympus/gitea/configuration.nix @@ -48,6 +48,7 @@ in services.gitea = { enable = true; domain = "git.0x76.dev"; + package = pkgs.forgejo; rootUrl = "https://git.0x76.dev"; lfs.enable = true; dump.type = "tar.gz"; diff --git a/nixos/hosts/olympus/hedgedoc/configuration.nix b/nixos/hosts/olympus/hedgedoc/configuration.nix index 21c8a5c..c11021c 100644 --- a/nixos/hosts/olympus/hedgedoc/configuration.nix +++ b/nixos/hosts/olympus/hedgedoc/configuration.nix @@ -2,13 +2,12 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ lib, config, pkgs, inputs, ... }: +{ lib, config, pkgs, ... }: let db_name = "hedgedoc"; db_user = "hedgedoc"; vs = config.vault-secrets.secrets; -in -{ +in { imports = [ ]; # This value determines the NixOS release from which the default @@ -19,27 +18,22 @@ in # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "21.11"; # Did you read the comment? - # Additional packages - environment.systemPackages = with pkgs; [ ]; - environment.noXlibs = lib.mkForce false; - networking.firewall.allowedTCPPorts = [ config.services.hedgedoc.settings.port ]; + networking.firewall.allowedTCPPorts = + [ config.services.hedgedoc.settings.port ]; vault-secrets.secrets.hedgedoc = { }; - services.postgresql = - { - enable = true; - package = pkgs.postgresql_13; - ensureDatabases = [ db_name ]; - ensureUsers = [ - { - name = db_user; - ensurePermissions = { "DATABASE ${db_name}" = "ALL PRIVILEGES"; }; - } - ]; - }; + services.postgresql = { + enable = true; + package = pkgs.postgresql_13; + ensureDatabases = [ db_name ]; + ensureUsers = [{ + name = db_user; + ensurePermissions = { "DATABASE ${db_name}" = "ALL PRIVILEGES"; }; + }]; + }; services.hedgedoc = { enable = true; @@ -51,10 +45,7 @@ in domain = "md.0x76.dev"; protocolUseSSL = true; hsts.enable = true; - allowOrigin = [ - config.services.hedgedoc.settings.domain - "hedgedoc" - ]; + allowOrigin = [ config.services.hedgedoc.settings.domain "hedgedoc" ]; allowAnonymous = false; allowEmailRegister = false; allowAnonymousEdits = true;