summary refs log tree commit diff stats
path: root/modules/nixos/vhack/etesync/default.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-20 13:58:21 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-20 13:58:21 +0100
commit33639143ea50404a04bc4c454435aff1bd79dd4b (patch)
treeede4b6832bb86ac30281fc22700ae1fe40658f37 /modules/nixos/vhack/etesync/default.nix
parentfix(treewide): Update to nixos release 24.11 (diff)
downloadnixos-server-33639143ea50404a04bc4c454435aff1bd79dd4b.tar.gz
nixos-server-33639143ea50404a04bc4c454435aff1bd79dd4b.zip
refactor({modules,test}): Migrate to a `by-name` structure
Diffstat (limited to 'modules/nixos/vhack/etesync/default.nix')
-rw-r--r--modules/nixos/vhack/etesync/default.nix72
1 files changed, 0 insertions, 72 deletions
diff --git a/modules/nixos/vhack/etesync/default.nix b/modules/nixos/vhack/etesync/default.nix
deleted file mode 100644
index 0f6c565..0000000
--- a/modules/nixos/vhack/etesync/default.nix
+++ /dev/null
@@ -1,72 +0,0 @@
-{
-  config,
-  lib,
-  ...
-}: let
-  cfg = config.vhack.etesync;
-in {
-  options.vhack.etesync = {
-    enable = lib.mkEnableOption ''
-      a secure, end-to-end encrypted, and privacy respecting sync for your contacts, calendars, tasks and notes.
-    '';
-  };
-
-  config = lib.mkIf cfg.enable {
-    services.etebase-server = {
-      enable = true;
-      port = 8001;
-      settings = {
-        global.secret_file = "${config.age.secrets.etebase-server.path}";
-        allowed_hosts = {
-          allowed_host1 = "etebase.vhack.eu";
-          allowed_host2 = "dav.vhack.eu";
-        };
-      };
-    };
-
-    age.secrets.etebase-server = {
-      file = ./secret_file.age;
-      mode = "700";
-      owner = "etebase-server";
-      group = "etebase-server";
-    };
-
-    environment.persistence."/srv".directories = [
-      {
-        directory = "/var/lib/etebase-server";
-        user = "etebase-server";
-        group = "etebase-server";
-        mode = "0700";
-      }
-    ];
-
-    services.nginx = {
-      enable = true;
-      recommendedTlsSettings = true;
-      recommendedOptimisation = true;
-      recommendedGzipSettings = true;
-      recommendedProxySettings = true;
-
-      virtualHosts = {
-        "etebase.vhack.eu" = {
-          enableACME = true;
-          forceSSL = true;
-
-          locations = {
-            # TODO: Maybe fix permissions to use pregenerated static files which would
-            # improve performance.
-            #"/static" = {
-            #  root = config.services.etebase-server.settings.global.static_root;
-            #};
-            "/" = {
-              proxyPass = "http://127.0.0.1:${builtins.toString config.services.etebase-server.port}";
-            };
-          };
-          serverAliases = [
-            "dav.vhack.eu"
-          ];
-        };
-      };
-    };
-  };
-}