From 6750622c47a90060159544c8c928ef3440a43ec9 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 30 Jan 2019 09:46:10 -0800 Subject: Cleanup deploy.nix Mostly formatting tbh. --- deploy.nix | 51 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/deploy.nix b/deploy.nix index 3fb458b..d3a23d9 100644 --- a/deploy.nix +++ b/deploy.nix @@ -1,21 +1,36 @@ -{ config, lib, pkgs }: - nixpkgs = { - config = { - allowUnfree = true; - allowBroken = true; +# Nix config for the main biz machine. + +{ pkgs +, config +, ..., +}: + +{ + imports = [ ./ibb/module.nix ]; + nixpkgs.config.packageOverrides = pkgs: { + ibb = import ./ibb/default.nix {}; + }; + services = { + + ibb.enable = true; + + nginx = { + enable = true; + recommendedGzipSettings = true; + recommendedOptimisation = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + virtualHosts = { + "ibb.buildmindful.com" = { + forceSSL = true; + enableACME = true; + locations = { + "/" = { + proxyPass = "http://localhost:3000"; + }; + }; + }; + }; }; }; - services.nginx = { - enable = true; - recommendedGzipSettings = true; - recommendedOptimisation = true; - recommendedProxySettings = true; - recommendedTlsSettings = true; - virtualHosts."ibb.buildmindful.com" = { - enableACME = true; - forceSSL = true; - root = "/"; - locations."/".proxyPass = "https://localhost:3000"; - } } - -- cgit v1.2.3