diff options
Diffstat (limited to 'nextcloud.nix')
| -rw-r--r-- | nextcloud.nix | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/nextcloud.nix b/nextcloud.nix index df89990..eedb507 100644 --- a/nextcloud.nix +++ b/nextcloud.nix @@ -79,13 +79,12 @@ { config, lib, ... }: let - httpPort = 900; nextcloud = config.services.nextcloud.hostName; in { services.nextcloud = { https = lib.mkForce false; - hostName = lib.mkForce "localhost"; + hostName = lib.mkForce "nextcloud.localhost"; }; systemd.tmpfiles.rules = [ @@ -94,14 +93,13 @@ ]; services.caddy.virtualHosts = { - "http://localhost:${toString httpPort}".extraConfig = + "http://${nextcloud}:${toString config.virtualisation.exposedPorts.http.port}".extraConfig = config.services.caddy.virtualHosts.${nextcloud}.extraConfig; }; - networking.firewall.allowedTCPPorts = [ - httpPort - ]; services.getty.helpLine = lib.mkBefore '' - Nextcloud: http://localhost:${toString (config.virtualisation.portOffset + httpPort)} + Nextcloud: http://${nextcloud}:${ + with config.virtualisation; toString (portOffset + exposedPorts.http.port) + } ''; }; }; |
