Add nextcloud

Nextcloud will allow us to easily replace google docs with open source
alternatives such as Collabora Online.

Other options considered:
- Privatebin (not for collaborative document editing, we do have an instance at
  https://paste.clicks.codes/)
- Etherpad (seemed to require a nontrivial amount of setup and an old version of
  nodejs)
- Owncloud (looks good too, but Nextcloud is the offering I'm more familiar with
  as I've used instances of it before (and some friends host it!))
- Standalone Collabora Online server (would need some other WOPI host or to use
  filesystem... which, no)
- Cryptpad (I'm less familiar with it, and we don't seem to need the things
  which are its selling points)

Still TODO (for followup changes):
- Integrate with Keycloak (added in I53e33f8c7fa21220e5407d4cd75a705c8e19f9a3)
  for authentication

Change-Id: I8cf10ee09b068eb7d74cd2d5619b509eb9581f8d
8 files changed
tree: 434053387bd900d0b144061889a002f722a0d669
  1. default/
  2. homes/
  3. host/
  4. modules/
  5. packages/
  6. secrets/
  7. services/
  8. variables/
  9. .editorconfig
  10. .envrc
  11. .gitignore
  12. .sops.yaml
  13. flake.lock
  14. flake.nix
  15. LICENSE
  16. README.md
README.md

Clicks' NixFiles

Deploying

To deploy these files to our server we use deploy-rs. If you've got a flakes-enabled nix installed on your system you can run

nix run github:serokell/deploy-rs

You can also install deploy-rs to your profile, at which point you'll be able to run

deploy

Updating secrets

Secrets are stored in SOPS and deployed using scalpel.

If you have a service which needs to store secrets in its config file, please set systemd reloadTriggers and restartTriggers to automatically reload/restart the service whenever the configuration changes.

It's notable that changing the secrets will not trigger a reload/restart of the service. If you want to update the secrets without updating the rest of the configuration you currently need to manually restart the service. It's possible that this could be solved by using systemd paths to watch the files (see https://superuser.com/questions/1171751/restart-systemd-service-automatically-whenever-a-directory-changes-any-file-ins) but this is not a priority