From bb6952cc095b43538b478a717e16cb62f8985c97 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Thu, 17 Mar 2022 15:59:53 +0100 Subject: [PATCH] fuuko/hedgedoc: Migrate to okarin --- machines/fuuko/configuration.nix | 1 - machines/okarin/configuration.nix | 1 + machines/{fuuko => okarin}/services/hedgedoc.nix | 7 +++---- 3 files changed, 4 insertions(+), 5 deletions(-) rename machines/{fuuko => okarin}/services/hedgedoc.nix (90%) diff --git a/machines/fuuko/configuration.nix b/machines/fuuko/configuration.nix index 5dffc22..f52c5ea 100644 --- a/machines/fuuko/configuration.nix +++ b/machines/fuuko/configuration.nix @@ -10,7 +10,6 @@ ./services/dnsmasq.nix ./services/gitea.nix ./services/grafana.nix - ./services/hedgedoc.nix ./services/hydra.nix ./services/matrix ./services/media-backup.nix diff --git a/machines/okarin/configuration.nix b/machines/okarin/configuration.nix index 37e0acd..d461541 100644 --- a/machines/okarin/configuration.nix +++ b/machines/okarin/configuration.nix @@ -5,6 +5,7 @@ ./hardware-configuration.nix ../../modules + ./services/hedgedoc.nix ./services/invidious ./services/libreddit.nix ./services/nitter.nix diff --git a/machines/fuuko/services/hedgedoc.nix b/machines/okarin/services/hedgedoc.nix similarity index 90% rename from machines/fuuko/services/hedgedoc.nix rename to machines/okarin/services/hedgedoc.nix index 0f1a404..a5e91a2 100644 --- a/machines/fuuko/services/hedgedoc.nix +++ b/machines/okarin/services/hedgedoc.nix @@ -7,7 +7,7 @@ in enable = true; ensureDatabases = [ "hedgedoc" ]; ensureUsers = lib.singleton { - name = "codimd"; + name = "hedgedoc"; ensurePermissions = { "DATABASE hedgedoc" = "ALL PRIVILEGES"; }; @@ -22,14 +22,13 @@ in db = { dialect = "postgres"; host = "/run/postgresql"; - #user = "hedgedoc"; + user = "hedgedoc"; database = "hedgedoc"; }; domain = "pad.sbruder.de"; protocolUseSSL = true; csp.enable = true; imageUploadType = "filesystem"; - uploadsPath = "/data/hedgedoc/uploads"; }; }; @@ -51,7 +50,7 @@ in }; systemd.tmpfiles.rules = [ - "d ${cfg.configuration.uploadsPath} 0700 codimd codimd - -" + "d ${cfg.configuration.uploadsPath} 0700 hedgedoc hedgedoc - -" ]; services.nginx.virtualHosts."pad.sbruder.de" = {