Find a file
Tristan Daniël Maat 05b6738c85
postgres: Set auth method to "reject"
This will reject connections from anywhere except 127.0.0.1, i.e., the
pod's network namespace.

This makes password authentication properly obsolete, instead of just
hiding the password (but still never authenticating with it), but
required a change upstream:
https://github.com/docker-library/postgres/pull/859
2021-07-25 22:20:39 +01:00
configuration postgres: Set auth method to "reject" 2021-07-25 22:20:39 +01:00
keys Start reworking the server for nix flakes 2021-04-12 01:58:03 +01:00
lib Add support for building minecraft modpacks 2021-04-25 06:23:08 +01:00
modules nginx: Make VM testing easier by binding virtualHosts to localhost 2021-05-17 00:13:38 +01:00
pkgs voor-kia: Update forge minecraft version 2021-07-25 19:31:46 +01:00
.gitignore Start reworking the server for nix flakes 2021-04-12 01:58:03 +01:00
flake.lock flake.lock: Update 2021-06-08 23:34:37 +01:00
flake.nix Upgrade to NixOS 21.05 2021-06-08 23:31:47 +01:00
LICENSE Add LICENSE 2019-11-26 23:26:10 +00:00
README.md README: Document deployment procedure 2021-04-28 00:53:05 +01:00

tlater.net server configuration

This is the NixOS configuration for tlater.net.

Testing

Building

Build the VM with:

nixos-rebuild build-vm --flake '.#vm'

Running

Note: M-2 will bring up a console for poweroff and such

Running should mostly be as simple as running the command the build script echos.

One caveat: create a larger disk image first. This can be done by running the following in the repository root:

qemu-img create -f qcow2 ./tlaternet.qcow2 20G

Everything else should be handled by the devShell.

New services

Whenever a new service is added, append an appropriate ,hostfwd=::3<port>:<port> to the QEMU_NET_OPTS specified in flake.nix to bind the service to a host port.

There is no way to test this without binding to the host port, sadly.

Deploying

Currently the deployment process is fully manual because there is no CI system.

Nix makes this fairly painless, though, it's simply:

nixos-rebuild switch --use-remote-sudo --target-host tlater.net --build-host localhost --flake .#tlaternet

This has the added benefit of running the build on the dev machine, which is 99% of the time much faster at building than the target (though artifact upload may take some time on slow connections).

Note that this also requires the current local user to also be present on the target host, as well as for this user to be in the target host's wheel group. See nix.trustedUsers.