From aecd9524b7cb0b80b86838f5463aa3e2b15686f8 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 23 Apr 2023 14:53:55 -0700 Subject: modules/services: delete unused services I'm not using anymore sourcegraph drone and gitea. --- modules/services/sourcegraph/default.nix | 55 -------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 modules/services/sourcegraph/default.nix (limited to 'modules/services/sourcegraph/default.nix') diff --git a/modules/services/sourcegraph/default.nix b/modules/services/sourcegraph/default.nix deleted file mode 100644 index 4fd0b8d..0000000 --- a/modules/services/sourcegraph/default.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ config, pkgs, lib, ... }: -let - cfg = config.my.services.sourcegraph; - secrets = config.age.secrets; -in -{ - options.my.services.sourcegraph = with lib; { - enable = mkEnableOption "sourcegraph server"; - vhostName = mkOption { - type = types.str; - example = "cs.fcuny.net"; - description = "Name for the virtual host"; - }; - }; - - config = lib.mkIf cfg.enable { - virtualisation.oci-containers.containers.sourcegraph = { - image = "sourcegraph/server:3.31.2"; - - ports = [ "127.0.0.1:7080:7080" ]; - - volumes = [ - "/var/lib/sourcegraph/etc:/etc/sourcegraph" - "/var/lib/sourcegraph/data:/var/opt/sourcegraph" - ]; - - # Sourcegraph needs a higher nofile limit, it logs warnings - # otherwise (unclear whether it actually affects the service). - extraOptions = [ "--ulimit" "nofile=10000:10000" ]; - }; - - services.nginx.virtualHosts."${cfg.vhostName}" = { - forceSSL = true; - useACMEHost = cfg.vhostName; - listen = [ - { - addr = "100.85.232.66"; - port = 443; - ssl = true; - } - { - addr = "100.85.232.66"; - port = 80; - ssl = false; - } - ]; - locations."/" = { proxyPass = "http://127.0.0.1:7080"; }; - }; - - security.acme.certs."${cfg.vhostName}" = { - dnsProvider = "gcloud"; - credentialsFile = secrets."acme/credentials".path; - }; - }; -} -- cgit 1.4.1