Lorri does not cleanly integrate with my corporate device, which cannot run
NixOS. To expose dependencies to Emacs buffers, I will use nix-buffer.el, which
reads its values from dir-locals.nix. To easily expose dependencies from my
existing shell.nix files into dir-locals.nix, I wrote a Nix utility function.
- 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
Right now my website is serving at sandbox.wpcarro.dev, but I would rather
people view it at sandbox.wpcarro.dev/covid-19.
I previously tried to accomplish this with the following Nginx configuration:
```nix
locations."/covid-19" = {
root = briefcase.covid-uk;
}
```
I am now trying `alias = ...` instead of `root = ...`. I got the idea from this
SO question, https://stackoverflow.com/questions/10631933/nginx-static-file-serving-confusion-with-root-alias.
- Prefer hosting on sandbox.wpcarro.dev; I would prefer to host it at
sandbox.wpcarro.dev/covid-19, but I haven't figure out how to use Nginx to do
serve locations like /covid-19 yet.
- Splice the src directory: When I develop locally and index.html exists within
./src, I cannot access ./node_modules because ./node_modules is in a parent
directory. I could fix this if I used a bundler like Parcel or Webpack, but I
do not want to set that up at this time.
- Introduce Tailwind for CSS. This complicates my build a bit as well. For now,
I'm including output.css even though ideally I should not version-control this
file. I haven't figured out how to `yarn install` and run commands like `npx
tailwindcss build styles.css -o output.css` in a Nix derivation yet. Hopefully
I will learn and refactor this.
- Add some content about why I made this chart
- Add some content about some of my covid-19 predictions
- Add a footer to the webpage
- Delete timeseries.json and prefer fetching the published data instead
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.
With this simple change, Nix should copy the static directory and all of its
contents to /nix/store and return the path to that directory.
See TODO for more what I would have liked to do ideally.
readTree uses the output attribute set of default.nix as the value for
nixos.socrates, which disables me from resolving nixos.socrates.rebuild since
there is no rebuild attribute in the output attribute set from default.nix.
If I rename default.nix -> configuration.nix, I can resolve
nixos.socrates.{configuration,hardware,rebuild}.
2020-03-07 16:17:23 +00:00
Renamed from nixos/socrates/default.nix (Browse further)