aboutsummaryrefslogtreecommitdiff
path: root/roles/web/images/default.nix
blob: cd01d92193a8ff2ba8268eb2b10a94f3ef6b3a8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ config, pkgs, lib, inputs, ... }:
with lib;

let 
  cfg = config.roles.web.images;
in {
  options.roles.web.images = {
    enable = mkEnableOption "images site";
  };

  config = mkIf cfg.enable {
    networking.firewall.allowedTCPPorts = [ 80 443 ];
    
    services.nginx = {
      enable = true;
      virtualHosts = {
        "i.cxl.sh" = {
          addSSL = true;
          enableACME = true;

          root = "/srv/web/images";
        };
      };
    };
  };
}