Commit graph

22 commits

Author SHA1 Message Date
William Carroll
2715591c97 Call readTree on all top-level, visible directories in briefcase
Instead of manually maintaining the list of directories that I expose to
readTree, I'm using `builtins.readDir` to get a list of all non-hidden top-level
directories.
2020-08-28 18:14:22 +01:00
William Carroll
3f3cba7c32 Define BuildKite pipelines in Nix
After a handful of failed attempts to run lint-secrets.sh due to a missing
`git-secrets` executable on my git server, I decided that now was a good time to
use Nix to define my BuildKite pipelines.

TL;DR:
- Delete ci/scripts directory
- Define ci/pipelines/{briefcase,socrates}.nix

Outside of this repository:
- I logged into my admin account at git.wpcarro.dev and changed my Gitea
  post-receive hook to trigger the briefcase pipeline
- I logged into my BuildKite account, deleted my build-briefcase pipeline,
  created a new briefcase pipeline that called:

  ```shell
  nix-build -A ci.pipelines.briefcase -o briefcase.yaml
  buildkite-agent pipeline upload briefcase.yaml
  ```

One day I will audit all of my ad-hoc, non-mono-repo activity (like the steps I
listed above) and attempt to fit everything herein... one step at a time,
though!
2020-08-21 11:12:57 +01:00
William Carroll
784de28be4 Remove <unstable> from briefcase
I don't use this anywhere, so it's time to shed more weight.
2020-08-20 11:26:32 +01:00
William Carroll
42efb3b08a Support build-briefcase.sh
For now, I'm supporting two CI pipelines:
- build-socrates
- build-briefcase

Conceptually, build-briefcase should cover what build-socrates does now, but
eventually I would like build-socrates to call `switch-to-configuration` so that
all of my websites, etc. stay fresh.
2020-08-20 11:26:32 +01:00
William Carroll
0b34482b6d Forward zoo.wpcarro.dev connections to :8000
Right now the 8000 port is hard-coded into the zoo server, which isn't ideal,
but "it works" (TM).
2020-08-20 11:26:31 +01:00
William Carroll
4ea55dd013 Support buildHaskell
Use Nix and Briefcase to easily create Haskell executables.

I'd eventually like to support something like: briefcase.buildHaskell.project
that let me define a few top-level values (e.g. ghcExtensions) and would give me
a ghci environment with the proper `.ghci` settings so that my development
environment mirrored my build environment... baby steps, though.
2020-08-12 16:26:17 +01:00
William Carroll
359f376005 Add ref attribute to fetchGit
Because revs afa9ca, dc80d7 aren't in the "default" (typically "master") branch
of NixOS/nixpkgs-channels, I need to specify the ref (aka branch) in order for
fetchGit to resolve the rev.
2020-07-06 14:22:34 +01:00
William Carroll
eb1af216cf Clear $NIX_PATH
Ensure that $NIX_PATH is empty using a .envrc file. nix.dev considers references
to <nixpkgs>, <briefcase>, <depot>, <unstable> to be an anti-pattern because it
hinders reproducibility by introducing an implicit environment.

This repository is chock-full of references to
<{nixpkgs,unstable,briefcase,depot}>, so right now everything is broken.
2020-07-02 14:39:08 +01:00
William Carroll
f4fea2346e Move sandbox into website
Nest the sandbox work under ./website.
2020-03-20 00:52:05 +00:00
William Carroll
1d5ab45303 Move learn to website/learn
Nest the learn directory in the website directory.
2020-03-20 00:47:21 +00:00
William Carroll
95e761e59b Move blog into website/blog
Nest the blog work within the website directory.
2020-03-20 00:46:29 +00:00
William Carroll
54d1a0048a Add sitemap to wpcarro.dev
- Create ./website directory
- Add a sitemap to wpcarro.dev
- Move covid-uk directory to sandbox directory

TODO: Next sandbox, blog, and learn in the website directory
2020-03-20 00:22:13 +00:00
William Carroll
dd9788fa73 Create line chart of UK confirmed corona virus cases
I was having trouble tracking the growth of corona virus cases in the UK.
Thankfully someone is publishing some daily COVID data as JSON. I downloaded
that data manually and plotted it using the chart.js library as a programming
exercise with Mimi.

Now I'm attempting to deploy to https://wpcarro.dev/covid-uk.

TODO(wpcarro): Prefer the live API data instead my soon-to-be-stale downloaded.
2020-03-18 22:08:09 +00:00
William Carroll
eb402bca74 Create derivation for learn.wpcarro.dev
Creating a derivation to abstract over the build process for learn.wpcarro.dev.
2020-03-16 16:54:16 +00:00
William Carroll
aa9b81fe21 Move wrapNonNixProgram to utils module
Define the wrapNonNixProgram in my Nix utils module.
2020-03-13 23:03:57 +00:00
William Carroll
b0dfa088a5 Move emacs to top-level nix expression
When I run `nix-build -f '<briefcase>' -iA emacs`, readTree will define...
- pkgs
- depot
- briefcase
...and whatever else I choose to define.
2020-03-04 19:49:45 +00:00
William Carroll
42c6ad3bb4 Simpify top-level nix expression
When I first created the monorepo, I borrowed @tazjin's monorepo's. I adapted
his depot/default.nix, replacing some of his paths with my paths. This worked
for me until recently.

I attemped to include <briefcase/monzo_ynab/job> as a systemd unit for my NixOS
machine, socrates. NixOS failed to build my changes, and I didn't fully
understand my default.nix since I borrowed most of it from @tazjin. I spent the
past week looking at the `fix` function. I realized that I didn't fully
understand how fixed-point recursion worked. This sent me down a rabbit hole
terminating with me studying the Y and Z combinators.

Ironically, after understanding the `fix` function, I realized that I didn't
need to use it where I was consuming it. I ended up pruning most of my
configuration, which resulted in this commit.

Yours truly,
lambda f: (lambda x: f(x(x)))(lambda x: f(x(x)))
2020-03-01 22:32:25 +00:00
William Carroll
6249e19cdc Add nixos as top-level monorepo package
I'd like to be able to call...
`nix-build -E '(import <briefcase> {}).nixos.socrates'`
...as part of my efforts to wane my dependence off of `nixos-rebuild`.
2020-03-01 22:32:24 +00:00
William Carroll
9e0fdd3973 Remove default values for Nix expression parameters
I'm not sure if this commit breaks everything in my monorepo. I think it
will.

Why am I doing this? Perhaps it's a bad idea. I don't fully understand how
readTree works. My ignorance is costing me hours of time spent debugging. In an
effort to better understand readTree, I'm removing the default values for my Nix
expression parameters, which I believe have preventing errors from surfacing.
2020-03-01 22:32:24 +00:00
William Carroll
fabf1c9334 Tidy up structure of briefcase
I had a spare fifteen minutes and decided that I should tidy up my
monorepo. The work of tidying up is not finished; this is a small step in the
right direction.

TL;DR
- Created a tools directory
- Created a scratch directory (see README.md for more information)
- Added README.md to third_party
- Renamed delete_dotfile_symlinks -> symlinkManager
- Packaged symlinkManager as an executable symlink-mgr using buildGo
2020-02-12 16:58:29 +00:00
William Carroll
64654d1d6d Create gopkgs directory for golang libs
- Created a gopkgs directory and registered it with default.nix's readTree
- Moved monzo_ynab/utils -> gopkgs
- Consumed utils.go in main.go
- Renamed monzo_ynab -> job
2020-02-10 10:06:40 +00:00
William Carroll
5c9079a410 Splice ./universe directory into ./
Manually merging:
- README.md: I added the description from universe/README.md into the heading of
  dotfiles/README.md.
- .envrc: dotfiles/.envrc was a superset of universe/.envrc
- .gitignore: Adding some of the ignored patterns from universe/.gitignore to
  dotfiles/.gitignore

Everything else here should be a simple rename.
2020-01-29 14:43:20 +00:00
Renamed from universe/default.nix (Browse further)