diff options
Diffstat (limited to 'roles/web/images/default.nix')
| -rw-r--r-- | roles/web/images/default.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/roles/web/images/default.nix b/roles/web/images/default.nix new file mode 100644 index 0000000..cd01d92 --- /dev/null +++ b/roles/web/images/default.nix @@ -0,0 +1,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"; + }; + }; + }; + }; +} |