diff options
author | Vincent Ambo <tazjin@gmail.com> | 2018-01-03T22·02+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@gmail.com> | 2018-01-03T22·02+0100 |
commit | a6a48806c4a870965d83cd936a323fea9ff19c54 (patch) | |
tree | 9925e6044c6185e6eea9b3e94f88cb31e96ce623 /nix/tazserve.nix | |
parent | 9464a1dee43740054a1cb01e00930906e75758b8 (diff) |
feat(nix): Add Gemma example deployment
Diffstat (limited to 'nix/tazserve.nix')
-rw-r--r-- | nix/tazserve.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/nix/tazserve.nix b/nix/tazserve.nix index 10fd1d1cbf58..f9aee1a57032 100644 --- a/nix/tazserve.nix +++ b/nix/tazserve.nix @@ -14,6 +14,11 @@ blogConfig = { proxyPass = "http://127.0.0.1:8000"; }; }; +gemma = import ./pkgs/gemma.nix { inherit pkgs; }; +gemmaConfig = writeTextFile { + name = "config.lisp"; + text = builtins.readFile ./gemma-config.lisp; +}; in { # Ensure that blog software is installed environment.systemPackages = [ @@ -47,6 +52,18 @@ in { rootUrl = "https://git.tazj.in/"; }; + # Set up Gemma + systemd.services.gemma = { + description = "Recurring task tracking app"; + script = "${gemma}/bin/gemma"; + serviceConfig.Restart = "always"; + wantedBy = [ "multi-user.target" ]; + + environment = { + GEMMA_CONFIG = "${gemmaConfig}"; + }; + }; + # Set up reverse proxy services.nginx = { enable = true; @@ -72,5 +89,14 @@ in { forceSSL = true; extraConfig = "return 302 https://www.google.com/maps/d/viewer?mid=1pJIYY9cuEdt9DuMTbb4etBVq7hs;"; }; + + # Gemma demo instance! + virtualHosts."gemma.tazj.in" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:4242"; + }; + }; }; } |