Commit graph

579 commits

Author SHA1 Message Date
f97dc7e121 fix settings and add dummy view
This introduces customisation to `settings.py` that
- allow controlling the relevant parameters from our systemd wrapper
  (more brittle and non-obvious than it should be, see TODOs)
- correctly configure SASS processing and static file compression
  (not as easy as it sounds)
2025-02-13 00:26:28 +01:00
7c33e8aaf3 scaffold Django web service
This setup is greatly inspired by the one used for [0], although with
notable modifications, such as:
- a SASS preprocessor and CSS compressor
- more streamlined NixOS integration tests
- cleaned up service configuration
- a few notes on how to do things better in the future

[0]: https://github.com/Nix-Security-WG/nix-security-tracker/

Apart from cloning the Nix setup, there were additional steps:
- Create an empty `src` directory, since the package requires it
- In the development shell, run `django-admin startproject panel src`

Note that while you can already do

```bash
manage migrate
manage runserver
```

the NixOS integration tests will fail, since `settings.py` needs
careful massaging to expose knobs that can be turned from our systemd
wrapper. The required changes are introduced in the next commit to make
them observable.

Noteworthy related work:

- https://github.com/sephii/django.nix

  Rather mature setup with a clean interface, uses Caddy as reverse proxy.

- https://git.dgnum.eu/mdebray/djangonix

  A work-in-progress attempt to capture more moving parts through the
  module system, in particular secrets.

- https://github.com/DavHau/django-nixos

  Out of date and somewhat simplistic, but serves as a reasonable
  example for what can be done

I chose the variant I'm intimately familiar with in order to be able to
pass on knowledge or help with maintenance. But for the future
I strongly recommend picking the good bits from the other
implementations that control complexity in static configuration parts
through Nix expressions.
2025-02-13 00:26:28 +01:00
3bbd6acf4f re-use global pins 2025-02-13 00:26:28 +01:00
84871c6ef9 docs: fix broken links 2025-02-10 15:05:21 +01:00
bac184c53d docs: fix broken link 2025-02-10 15:03:49 +01:00
1b8be1da27
keys: add contributor kiara (#97) 2025-02-04 12:54:10 +01:00
93e21f188a
Rekey secrets 2025-02-04 12:46:12 +01:00
0c56c89f74
Document adding a contributor 2025-02-04 12:45:47 +01:00
9f4e2a00b8
keys: add contributor kiara 2025-02-04 11:18:05 +01:00
12ab424a89
Rework infra to handle sharing options between resource and NixOS configuration (#96) 2025-02-03 10:06:59 +01:00
0e6c96a2be
Document the procolixVm options 2025-01-31 17:23:12 +01:00
4d00635e69
Move old procolix.vm options to new procolixVm ones 2025-01-31 17:15:12 +01:00
eaad4daa39
Cleaner resource definition 2025-01-31 16:57:21 +01:00
e0b4dd4d5b
Shorter name 2025-01-31 16:48:08 +01:00
54194cd494
Share options between resource and config 2025-01-31 16:47:33 +01:00
8cfc943297
Cleanup 2025-01-31 16:36:18 +01:00
ba97ed26d0
Get rid of useless self and providers arguments 2025-01-31 16:34:21 +01:00
564938e52d
Clean up handling of secrets in infra 2025-01-31 16:29:31 +01:00
8fa7bd4df5
Add a default deployment containing everything 2025-01-31 15:24:41 +01:00
9c85431a22
Move everything into common with better names 2025-01-31 15:22:28 +01:00
dedd70dc0e
Make vm*/default.nix resources 2025-01-31 15:19:55 +01:00
4f761bfc1f
Start building a procolixVm resource module 2025-01-31 15:08:47 +01:00
aed74dc599
Bump other flake inputs 2025-01-31 14:39:28 +01:00
1d05993127
Bump NixOps4
in particular, follow the split of `nixops4-nixos` to its own
repository.
2025-01-31 14:11:46 +01:00
1f2ea73e69
Clean up resource definition 2025-01-31 14:03:37 +01:00
232680c9bf
Document failure when running NixOps4 not from the repo's root 2025-01-31 12:15:27 +01:00
d121cd6a5b
Remove vm02117
Machine was running on the old supervisor and was decommissioned manually.
2025-01-31 11:06:23 +01:00
a7848beda0
Revert "nix flake update"
This reverts commit f7537f3e00.
2025-01-31 10:59:55 +01:00
873a1c9177
Automatically git root access to all contributors 2025-01-31 10:59:36 +01:00
d92d5f40ae added Kevin's SSH public key to the contributors (#88)
Co-authored-by: Nicolas “Niols” Jeannerod <nicolas.jeannerod@moduscreate.com>
Reviewed-on: Fediversity/Fediversity#88
Reviewed-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: kevin <kevin@procolix.com>
Co-committed-by: kevin <kevin@procolix.com>
2025-01-31 10:46:14 +01:00
f7537f3e00
nix flake update 2025-01-30 16:27:18 +01:00
004131dec6
Factorise infra resource definitions (#82) 2025-01-30 13:22:41 +01:00
5522595296
Factorise the deployment definition 2025-01-30 12:57:11 +01:00
34eb7263cc
Factorise the resource definition 2025-01-30 09:53:45 +01:00
2bb1590d54
Remove ISOs after provisioning (#81) 2025-01-29 15:36:13 +01:00
f547f451e1
Remove ISOs after provisioning 2025-01-29 15:35:49 +01:00
3f39f6ebd0
Move web server definition to infra (#67) 2025-01-29 15:34:58 +01:00
d4e1760c70
vm02117 is not the web server anymore 2025-01-29 15:34:48 +01:00
f475b1f56c
Move web server definition to infra 2025-01-29 15:34:48 +01:00
be1065c2d3
Fix paths to provisioning scripts 2025-01-27 15:26:38 +01:00
e45441f12a
Clean up section on Fediversity Proxmox 2025-01-27 15:26:38 +01:00
5aa6ca3ae6
Small clean up around VM ids 2025-01-27 11:57:29 +01:00
bdf43717fa update VPN docs to show WireGuard config on NixOS 2025-01-24 12:27:45 +01:00
42e0f42f63 Matrix documentation (#66)
Reviewed-on: Fediversity/Fediversity#66
Reviewed-by: Nicolas Jeannerod <nicolas.jeannerod@moduscreate.com>
2025-01-09 16:46:07 +01:00
94e11a362a
Added nginx configuration for Element Web. 2025-01-08 19:31:34 +01:00
4f7b1b5468
Corrected a configuration error in the handing of worker pools. 2025-01-08 19:02:22 +01:00
1c361a8092
Added a few .well-known examples. 2025-01-08 15:45:09 +01:00
d0c32f1ac6
Changed TURN documentation so we can use both legacy and Element Call. Fixed a few broken internal links. 2025-01-08 14:51:11 +01:00
d85dcefbb9
Added LiveKit cli. 2025-01-07 17:17:05 +01:00
00c660df81
Cleaned up some broken anchors. 2025-01-07 17:10:59 +01:00