diff options
author | Franck Cuny <franck@fcuny.net> | 2023-04-23 14:53:55 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2023-04-23 14:53:55 -0700 |
commit | aecd9524b7cb0b80b86838f5463aa3e2b15686f8 (patch) | |
tree | 6345b170bbaddc60a4912afe3f9e87b6bcc61881 /modules/services/sourcegraph | |
parent | hosts/carmel: enable promtail (diff) | |
download | world-aecd9524b7cb0b80b86838f5463aa3e2b15686f8.tar.gz |
modules/services: delete unused services
I'm not using anymore sourcegraph drone and gitea.
Diffstat (limited to 'modules/services/sourcegraph')
-rw-r--r-- | modules/services/sourcegraph/default.nix | 55 |
1 files changed, 0 insertions, 55 deletions
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; - }; - }; -} |