From 6472b2645cba9819e0c8171e69367916a42f0a1b Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 2 Sep 2019 16:38:59 +0100 Subject: [PATCH 1/4] feat: Add Travis CI configuration Adds a configuration that builds all of my own services and pushes the resulting closures to Cachix. --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..eace0ae15 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: nix +env: + - NIX_PATH="nixpkgs=${TRAVIS_BUILD_DIR}" +before_script: + - nix-env -f '' -iA cachix + - cachix use tazjin +script: + # All of my own tools are under the top-level 'tazjin' attribute + # set, this command will build all of them. + - nix-build -A tazjin | cachix push tazjin From 99ee84b4771546e571f845ade59154bc255ac514 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 2 Sep 2019 16:53:54 +0100 Subject: [PATCH 2/4] refactor(blog): Use callPackage to import derivation --- default.nix | 2 +- services/tazblog/default.nix | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/default.nix b/default.nix index 71ac4c3c6..ccb301d68 100644 --- a/default.nix +++ b/default.nix @@ -25,7 +25,7 @@ let localPkgs = self: super: { # Local projects should be added here: tazjin = { - blog = import ./services/tazblog { pkgs = self; }; + blog = self.callPackage ./services/tazblog {}; blog_cli = self.callPackage ./tools/blog_cli {}; gemma = self.callPackage ./services/gemma {}; }; diff --git a/services/tazblog/default.nix b/services/tazblog/default.nix index b1a1f9558..fa436b824 100644 --- a/services/tazblog/default.nix +++ b/services/tazblog/default.nix @@ -2,10 +2,10 @@ # # tazblog.nix was generated using cabal2nix. -{ pkgs ? import {} }: +{ writeShellScriptBin, haskell }: -let tazblog = pkgs.haskell.packages.ghc865.callPackage ./tazblog.nix {}; -in pkgs.writeShellScriptBin "tazblog" '' +let tazblog = haskell.packages.ghc865.callPackage ./tazblog.nix {}; +in writeShellScriptBin "tazblog" '' export PORT=8000 export RESOURCE_DIR=${./static} exec ${tazblog}/bin/tazblog From 4d9425464233506b6c787e33e9b474dfbc0d8a62 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 2 Sep 2019 17:10:53 +0100 Subject: [PATCH 3/4] docs: Add crude top-level README --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000..dc4b7f79e --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +depot +===== + +[![Build Status](https://travis-ci.org/tazjin/depot.svg?branch=master)](https://travis-ci.org/tazjin/depot) + +This repository is the [monorepo][] for my personal infrastructure. It is built +using [Nix][] and services are deployed on Google Cloud Platofrm using +[Nixery][]. + +Everything in here is MIT-licensed unless otherwise indicated in a service +subfolder. + +[monorepo]: https://en.wikipedia.org/wiki/Monorepo +[Nix]: https://nixos.org/nix +[Nixery]: https://github.com/google/nixery From 86d8c748a79de30d9bd4c4fdcec46d0e79ae5e6a Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 2 Sep 2019 17:11:09 +0100 Subject: [PATCH 4/4] chore: Catch all Nix results in gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 520d4b582..3afe2d6ac 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ bazel-* # Ignore Nix result symlinks result +result-*