Commit Graph

569 Commits

Author SHA1 Message Date
Maximilian Bosch
3498c5ff3c
nixos/nextcloud: build manual without warnings 2021-10-09 22:45:39 +02:00
Maximilian Bosch
1ee008fcb5
nixos/nextcloud: fixup #119638
A few minor changes to get #119638 - nextcloud: add option to set
datadir and extensions - ready:

* `cfg.datadir` now gets `cfg.home` as default to make the type
  non-nullable.
* Enhanced the `basic` test to check the behavior with a custom datadir
  that's not `/var/lib/nextcloud`.
* Fix hashes for apps in option example.
* Simplify if/else for `appstoreenable` in override config.
* Simplify a few `mapAttrsToList`-expressions in
  `nextcloud-setup.service`.
2021-10-09 22:45:31 +02:00
Maximilian Bosch
7856e40da6
nixos/nextcloud: fix wording in manual 2021-10-09 20:52:52 +02:00
Robbert Gurdeep Singh
1852212872
nixos/nextcloud: fail systemd-service if apps don't activate 2021-10-09 20:33:17 +02:00
Robbert Gurdeep Singh
18b18929d7
nixos/nextcloud: add settings to manage nextcloud apps
Note the appstoreEnable which will prevent nextcloud form updating
nix-managed apps. This is needed because nextcloud will store an other
version of the app in /var/lib/nextcloud/store-apps and it will
no longer be manageable.
2021-10-09 20:33:16 +02:00
Robbert Gurdeep Singh
7ba02a7b1e
nixos/nextcloud: add services.nextcloud.datadir setting
This option can be used to set an alternative storage location for
files and app metadata.
2021-10-09 20:33:13 +02:00
Maximilian Bosch
80404a23c9
Merge pull request #140775 from Ma27/nextcloud-docs-and-secrets
nixos/nextcloud: manual improvements & pass secrets via the environment to `nextcloud-occ`
2021-10-09 20:01:15 +02:00
Maximilian Bosch
f57bed8832
nixos/nextcloud: drop adminpass/dbpass options entirely 2021-10-08 18:30:57 +02:00
ajs124
ae53e57a7a
Merge pull request #133141 from helsinki-systems/feat/jitsi-meet-websocket
nixos/jitsi-meet: add support for xmpp-websocket
2021-10-08 16:51:00 +02:00
Maximilian Bosch
9f37d6aee0
nixos/nextcloud: put secrets into the environment of nextcloud-setup.service
The `$(</path/to/file)`-expansion appears verbatim in the cmdline of
`nextcloud-occ` which means that an unprivileged user could find
sensitive values (i.e. admin password & database password) by monitoring
`/proc/<pid>/cmdline`.

Now, these values don't appear in a command line anymore, but will be
passed as environment variables to `nextcloud-occ`.
2021-10-06 18:18:18 +02:00
Maximilian Bosch
fb40526961
nixos/nextcloud: minor manual improvements
* Linkify documentation about objectstore-feature rather than only
  mentioning it.
* Use `<literal>` where it makes sense.
* Remove unnecessary `Whether to load` from `enableImagemagick` because
  `mkEnableOption` already prepends `Whether to enable` to the given
  description.
2021-10-06 17:33:31 +02:00
Bill Ewanick
cc3b147ed1 nixos/lemmy: init
Co-authored-by: Raphael Megzari <raphael@megzari.com>
2021-10-06 21:02:51 +09:00
Maximilian Bosch
f8feb1ad27
Merge pull request #139604 from mitchmindtree/nextcloud-objectstore
nixos/nextcloud: Add option for using object storage as primary storage
2021-10-05 20:52:24 +02:00
mitchmindtree
c5d08ebee1 nixos/nextcloud: Fix ambiguity in objectstoreConfig string
Previously this was a little tricky to read and had the potential to
cause some ambiguity in string parsing.
2021-10-05 17:07:44 +10:00
Naïm Favier
2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
mitchmindtree
a539a82707 nixos/nextcloud: Account for nix_read_secret refactor in exception msg
Previously, the `nix_read_pwd` function was only used for reading the
`dbpassFile`, however it has since been refactored to handle reading
other secret files too. This fixes the message of the exception that is
thrown in the case that the file is not present so that it no longer
refers specifically to the `dbpass` file.
2021-10-03 17:29:13 +10:00
mitchmindtree
fbffaddefe nixos/nextcloud: Make objectstore.s3.useSsl explicitly true by default
This appears to match the nextcloud default behaviour observed here:

e2116e2fb2/lib/private/Files/ObjectStore/S3ConnectionTrait.php (L83)
2021-10-03 16:38:56 +10:00
mitchmindtree
b23d6a4113 nixos/nextcloud: Simplify objectstore.s3 options, remove submodule
Removes the submodule in favour of using an attrset.

Also:

- Makes better use of nix's laziness in config expansion.
- Makes use of `boolToString` where applicable.
2021-10-03 16:38:03 +10:00
mitchmindtree
03171ae31a nixos/nextcloud: Remove objectstore.s3.secret option
We should discourage users from adding secrets in a way that allows for
them to end up in the globally readable `/nix/store`. Users should use
the `objectstore.s3.secretFile` option instead.
2021-10-03 12:52:13 +10:00
mitchmindtree
1ed93ac4a1 nixos/nextcloud: Add option for using object storage as primary storage
This allows to declaratively configure an S3 class object storage as the
primary storage for the nextcloud service. Previously, this could only
be achieved by manually editing the `config.php`.

I've started testing this today with my own digitalocean nextcloud
instance, which now points to my digitalocean S3-compatible "Space" and
all appears to be working smoothly.

My motivation for this change is my recent discovery of how much cheaper
some S3-compatible object storage options are compared to digitalocean's
"Volume" options.

Implementation follows the "Simple Storage Service" instructions here:

https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html

I have neglected to implement a submodule for the OpenStack Swift
object storage as I don't personally have a use case for it or a method
to test it, however the new `nextcloud.objectstore.s3` submodule should
act as a useful guide for anyone who does wish to implement it.
2021-10-03 12:52:06 +10:00
Maximilian Bosch
cdb48d75c0
Merge pull request #140159 from Ma27/nextcloud-misc
nextcloud: misc changes
2021-10-01 21:08:31 +02:00
Maximilian Bosch
66edc1e846
nixos/nextcloud: use php8 where possible 2021-10-01 17:03:09 +02:00
Maximilian Bosch
675e262f5a
nixos/nextcloud: temp fix for MariaDB >=10.6
The MariaDB version 10.6 doesn't seem supported with current Nextcloud
versions and the test fails with the following error[1]:

    nextcloud # [   14.950034] nextcloud-setup-start[1001]: Error while trying to initialise the database: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.

According to a support-thread in upstream's Discourse[2] this is because
of a missing support so far.

Considering that we haven't received any bugreports so far - even though
the issue already exists on master - and the workaround[3] appears to
work fine, an evaluation warning for administrators should be
sufficient.

[1] https://hydra.nixos.org/build/155015223
[2] https://help.nextcloud.com/t/update-to-next-cloud-21-0-2-has-get-an-error/117028/15
[3] setting `innodb_read_only_compressed=0`
2021-10-01 15:25:31 +02:00
happysalada
8346dc04b3 pict-rs: add initial module 2021-09-30 21:32:25 +09:00
Flakebi
6ca43a69cc
dex-oidc: add module 2021-09-25 13:12:51 +02:00
Kim Lindberger
0686c40309
Merge pull request #139180 from ryantm/dev/ryantm/discourse-tmp
discourse: enable restoring backups bigger than RAM
2021-09-24 14:31:46 +02:00
Ryan Mulligan
f933c68374 discourse: enable restoring backups bigger than RAM
When restoring a backup, discourse decompresses the backup archive in
the /share/discourse/tmp dir. Before this change, it is linked to /run
which is typically backed by memory, so the backup will fail to
restore if you do not have enough memory on your system to contain the
backup. This has already happened to me on two small forums.

This moves tmp to the StateDirectory /var/lib/discourse/tmp which is
typically backed by disk.
2021-09-23 09:59:31 -07:00
Ryan Mulligan
6a9003f316 nixos/discourse: add discourse.admin.skipCreate option 2021-09-21 16:45:59 -07:00
embr
023239912c nixos/mastodon: Add configurable web- and streaming concurrency
Might as well do this while I'm at it.
2021-09-21 16:35:17 +02:00
embr
8c1e6a8598 nixos/mastodon: Fix sidekiq's DB_POOL, add configurable concurrency
The `services.mastodon` module currently hardcodes sidekiq's concurrency
to 25, but doesn't set a DB pool size, which defaults to 5 or the number
of configured web threads.

(This behaviour is very strange, and arguably a mastodon bug.)

This also makes sidekiq's concurrency configurable, because 25 is a tad
high for the hardware I'm running it on.
2021-09-21 16:35:17 +02:00
Jonas Heinrich
0dcac759f2 nixos/dokuwiki: Add support for Caddy web server 2021-09-18 23:09:21 +09:00
Jonas Heinrich
38431cf21c nixos/wordpress: caddy support 2021-09-17 19:12:21 +09:00
Guillaume Girol
3592034595
Merge pull request #133166 from symphorien/nonogroup
Don't default to nogroup for the primary group of users.
2021-09-13 18:29:21 +00:00
Guillaume Girol
bc3bca822a nixos: define the primary group of users where needed 2021-09-12 14:59:30 +02:00
Maximilian Bosch
9a52aeacc1
Merge pull request #135958 from Ma27/nextcloud-upgrade-not-found
nixos/nextcloud: add some notes for `Error: Command "upgrade" is not defined.`
2021-08-31 20:49:49 +02:00
Maximilian Bosch
767bb4e4bb
nixos/nextcloud: apply doc fixes suggested by fabaff
Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
2021-08-31 17:57:40 +02:00
Guillaume Girol
c988c752bb
Merge pull request #133133 from symphorien/tt-rss-read-only
nixos/tt-rss: make all php files read only
2021-08-29 11:33:25 +00:00
Maximilian Bosch
561418f996
nixos/nextcloud: add some notes for Error: Command "upgrade" is not defined.
This error occurs if `nextcloud-occ maintenance:install` fails and the
`upgrade` command is attempted to be executed afterwards.

Due to the nature of the installer we can't do much about it, so I guess
it makes sense to add some notes about it. The other notes in the
`Pitfalls`-section are semantically a list of different topics, so I
changed that accordingly now.

Closes #111175
2021-08-27 22:36:45 +02:00
Maximilian Bosch
eaeb4fe04e
nixos/nextcloud: remove invalid --database-table-prefix option
This doesn't work anymore and thus breaks the installation leaving a
broken `/var/lib/nextcloud`.

It isn't a big deal since we set this value in the override config
before, so the correct table-prefix is still used. In order to confirm
that, I decided to add a custom prefix to the basic test.
2021-08-27 20:21:25 +02:00
Van Tuan Vo
c8e3441961
nixos/fluidd: init fluidd service at 1.16.2 2021-08-21 23:32:52 +02:00
Finn Behrens
cc927c650b nixos/moodle: revert to php74 for xmlrpc extension 2021-08-18 19:05:48 +02:00
talyz
f8096460bd
discourse.plugins: Make the updater able to package plugins
Let the update.py script handle the initial, repetitive task of
packaging new plugins. With this in place, the plugin only needs to be
added to the list in `update-plugins` and most of the work will be
done automatically when the script is run. Metadata still needs to be
filled in manually and some packages may of course require additional
work/patching.
2021-08-17 18:21:15 +02:00
talyz
bb14315d51
discourse: Remove leftover link to unused plugins directory 2021-08-17 18:17:56 +02:00
Robert Hensing
fbafeb7ad5 treewide: runCommandNoCC -> runCommand
This has been synonymous for ~5y.
2021-08-15 17:36:41 +02:00
Benjamin Asbach
86296623c6 isso: added NixOS module to configure isso in NixOS 2021-08-09 17:42:54 -06:00
ajs124
2090318d75 nixos/jitsi-meet: add support for xmpp-websocket
instead of BOSH
2021-08-08 15:15:59 +02:00
Guillaume Girol
48619f77a4 nixos/tt-rss: make all php files read only
Fixes: #55300
2021-08-08 12:00:00 +00:00
erdnaxe
7a0c6cdd39
nixos/miniflux: systemd unit hardening (#133123) 2021-08-08 13:58:30 +02:00
Aaron Andersen
099015b2ed
Merge pull request #116578 from MatthewCroughan/node-red-service
nixos/node-red: add module
2021-07-31 22:57:26 -04:00
Guillaume Girol
256af6b742
nixos/tt-rss: fix eval 2021-07-31 15:19:00 +00:00