~afontaine/home unlisted

home/flake.nix -rw-r--r-- 9.4 KiB
Use a URL to Connect to the DB

For actual deployments, a URL is easier to use.
Match On Post Creation

Matching will blow up on error, hopefully giving us a stack trace.

Also log out the new post _just to be sure._
Add Alias for Formatting with Prettier

Also bump some node packages.
Drop SCSS Support

I don't need it, so let's focus on just using tailwind. This means we
don't need to build libsass either.
Correct hash for Frontend Files
Set Cachix Token Via Environment

Safer than writing to configuration in CI environments probably.
Balance Post Header by Moving Byline

To help balance out the header of a post, move the byline to below the
header text.
Format Flake And Add Node Dependencies as Package

Mostly for better re-use throughout the flake, also the dev shell will
automatically link the node modules into the right spot. I need to look
into doing this with the elixir ones next, but that might be trickier.

Also add a build file! Now builds are managed by sourcehut!
Move to Nixpkgs Master

The elixir building utilities were merged, so we can rely on master for
now. Eventually I want to move to unstable for maximum nix cache hits.
Set the URL via an Environment Variable

This is for route generation to be able to not just be `example.com`.
Finalize Basic Deployment Module

The options work now, so that's good. I think more are probably needed,
but at least the basics work.
Add Oneshot Service for Creating and Migrating DB

This should create and update the database schema before starting the
web application via a SystemD oneshot service.
Split static assets into separate package

Just to keep things cached and clean!
First pass at a NixOS Module for Deployment

It should be secret friendly. Does not currently set up databases, etc.,
but should start and stop the service at least!
Move inotify tools to be optional

It is only supported on Linux, so it should be marked as such.
Set up Nix Build for Release

`nix build .#home` will build a mix release for the application that
can (currently) be configured with the following environment variables:

- `DATABASE_URL`: A URL describing the database to connect to, of the
  form `ecto://user:pass@host/db_name`
- `POOL_SIZE`: The DB connection pool size
- `SECRET_KEY_BASE`: Usually generated via `mix phx.gen.secret`
- `PORT`: The port to listen on
- `TZ_DATA_DIR`: The directory to cache timezone data. Needed, as the
  default value is the release directory, which is read-only when
  launched via nix.

It also seems tailwind's jit was folded into the mainline, so that got
bumped here as part of making the build work.
Generate Blog Apps

These apps will handle storing and displaying posts, comments.
Initial

Generated Phoenix 1.5.8 umbrella application