{ config, pkgs, ... }: {
  environment.systemPackages = with pkgs; [ nginx ];
  services.nginx.enable = true;
  services.nginx.virtualHosts = {
    "polsevev.dev" = {
      useACMEHost = "polsevev.dev";
      forceSSL = true;
      root = "/var/www/polsevev/dist";
    };
    "stortissvatnet.no" = {
      useACMEHost = "stortissvatnet.no";
      forceSSL = true;
      root = "/var/www/stortissvatnet";
    };
    "tissvasselva.no" = {
      useACMEHost = "tissvasselva.no";
      forceSSL = true;
      root = "/var/www/tissvasselva";
    };
  };


  security.acme = {
    acceptTerms = true;
    defaults.email = "rolf.martin@glomsrud.no";
    certs = {
      "polsevev.dev" = {
        domain = "polsevev.dev";
        dnsProvider = "cloudflare";
        environmentFile = /cloudflare.env;
        group = config.services.nginx.group;
      };
      "stortissvatnet.no" = {
        domain = "stortissvatnet.no";
        dnsProvider = "cloudflare";
        environmentFile = /cloudflare.env;
        group = config.services.nginx.group;
      };
      "tissvasselva.no" = {
        domain = "tissvasselva.no";
        dnsProvider = "cloudflare";
        environmentFile = /cloudflare.env;
        group = config.services.nginx.group;
      };
    };
  };

  

}
