diff options
author | sefidel <contact@sefidel.net> | 2024-01-24 19:18:11 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2024-01-24 19:18:11 +0900 |
commit | 497c3cd7864fdbcc546408d6d86ebfad37aa9b78 (patch) | |
tree | 6cd5bf30b9953156d71192fa96e34a863dda5926 /modules/services/cinny-web.nix | |
parent | a1dc1ff8c07155f697a30145168820612b28b6cd (diff) | |
download | infra-497c3cd7864fdbcc546408d6d86ebfad37aa9b78.tar.gz infra-497c3cd7864fdbcc546408d6d86ebfad37aa9b78.zip |
wip: try to use infra-modules infra-modules
Diffstat (limited to 'modules/services/cinny-web.nix')
-rw-r--r-- | modules/services/cinny-web.nix | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/modules/services/cinny-web.nix b/modules/services/cinny-web.nix deleted file mode 100644 index e796ff8..0000000 --- a/modules/services/cinny-web.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; -let - cfg = config.modules.services.cinny-web; -in -{ - options.modules.services.cinny-web = { - enable = mkEnableOption "cinny-web"; - package = mkOption { type = types.package; default = pkgs.cinny; }; - hostName = mkOption { type = types.str; default = config.networking.hostName; }; - matrix.serverName = mkOption { type = types.str; default = config.networking.hostName; }; - tls.acmeHost = mkOption { type = types.str; default = cfg.hostName; }; - }; - - config = mkIf cfg.enable { - services.nginx.virtualHosts.${cfg.hostName} = { - useACMEHost = cfg.tls.acmeHost; - forceSSL = true; - - root = cfg.package.override { - conf = { - # Index of the default homeserver from `homeserverList` - defaultHomeserver = 0; - homeserverList = [ cfg.matrix.serverName ]; - }; - }; - - locations."~ \\.(js|css|woff|woff2?|png|jpe?g|svg)$".extraConfig = '' - add_header Cache-Control "public, max-age=14400, must-revalidate"; - ''; - }; - }; -} |