Skip to content

Commit

Permalink
wallabag: TLS
Browse files Browse the repository at this point in the history
Signed-off-by: lucasew <lucas59356@gmail.com>
  • Loading branch information
lucasew committed Oct 14, 2024
1 parent 5cefb16 commit b7bff8f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion nix/nodes/common/services/ts-proxy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ in
type = lib.types.attrsOf (lib.types.submodule ({ name, ...}: {
options = {
enableFunnel = lib.mkEnableOption "enable funnel for this endpoint";
enableHTTPS = lib.mkEnableOption "enable HTTPS for this endpoint";

addr = lib.mkOption {
description = "What service to proxy";
Expand Down Expand Up @@ -107,7 +108,10 @@ in
"-n" host.name
"-s" "${cfg.dataDir}/tsproxy-${host.name}"
] ++ (lib.optional host.enableFunnel ["-f"]))}
]
++ (lib.optional host.enableFunnel ["-f"])
++ (lib.optional host.enableHTTPS ["-t"])
)}
'';
};
}) cfg.hosts));
Expand Down
3 changes: 2 additions & 1 deletion nix/nodes/common/services/wallabag.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ in
services.ts-proxy.hosts = {
wallabag = {
addr = "http://127.0.0.1:${toString config.networking.ports.wallabag.port}";
enableHTTPS = true;
};
};
services.nginx.virtualHosts."${cfg.domain}" = {
Expand Down Expand Up @@ -219,7 +220,7 @@ in
database_name = "wallabag";
database_user = cfg.user;
database_password = null; # socket authenticates using the user
domain_name = "http://" + cfg.domain;
domain_name = "https://" + cfg.domain;
database_table_prefix = "wallabag_";
database_socket = "/run/postgresql/.s.PGSQL.${toString config.services.postgresql.port}";
database_charset = "utf8";
Expand Down

0 comments on commit b7bff8f

Please sign in to comment.