Commit Graph
100 Commits
Author SHA1 Message Date
talyz b423efaeeb nixos/discourse: Assert deployed PostgreSQL version
Assert that the PostgreSQL version being deployed is the one used
upstream. Allow the user to override this assertion, since it's not
always possible or preferable to use the recommended one.

(cherry picked from commit 544adbfcab2e92c2fe5774cae67f2edf165eb97e)
2021-05-28 22:16:10 -07:00
talyz ce5587e7bb discourse: 2.6.5 -> 2.7.0
(cherry picked from commit 42b8e7685d5fe5280f8f6101a6d19016b92f3a5c)
2021-05-28 22:16:10 -07:00
Kim Lindberger df25a8867f Merge pull request #124138 from talyz/21.05-php-iconv-errno
[21.05] php74.extensions.iconv: fix error signalling
2021-05-23 17:48:31 +02:00
Kim Lindberger 1693374dbd synergy: 1.11.1 -> 1.13.1.41 (#123359) 2021-05-23 01:55:42 +02:00
talyz 2d8a870813 keycloak.tests: Test HTTPS support 2021-05-21 13:09:43 +02:00
talyz ba00b0946e nixos/keycloak: Split certificatePrivateKeyBundle into two options
Instead of requiring the user to bundle the certificate and private
key into a single file, provide separate options for them. This is
more in line with most other modules.
2021-05-21 13:09:38 +02:00
talyz dbf91bc2f1 nixos/keycloak: keycloak.database* -> keycloak.database.*
Move all database options to their own group / attribute. This makes
the configuration clearer and brings it in line with most other modern
modules.
2021-05-21 13:09:32 +02:00
talyz 83e406e97a nixos/keycloak: frontendUrl always needs to be suffixed with /
In some places, Keycloak expects the frontendUrl to end with `/`, so
let's make sure it always does.
2021-05-21 13:09:25 +02:00
talyz 58614f8416 nixos/keycloak: Add myself to maintainers 2021-05-21 13:09:19 +02:00
talyz d748c86389 nixos/keycloak: Improve readablility by putting executables in PATH 2021-05-21 13:09:14 +02:00
talyz 8309368e4c nixos/keycloak: Set umask before copying sensitive files
`install` copies the files before setting their mode, so there could
be a breif window where the secrets are readable by other users
without a strict umask.
2021-05-21 13:09:09 +02:00
talyz c2bebf4ee2 nixos/keycloak: Improve bash error handling 2021-05-21 13:09:03 +02:00
talyz d6727d28e1 nixos/keycloak: Set the postgresql database password securely
Feeding `psql` the password on the command line leaks it through the
`psql` process' `/proc/<pid>/cmdline` file. Using `echo` to put the
command in a file and then feeding `psql` the file should work around
this, since `echo` is a bash builtin and thus shouldn't spawn a new
process.
2021-05-21 13:08:53 +02:00
Kim Lindberger f131787bb6 Merge pull request #121708 from talyz/replace-secret
treewide: Replace uses of `replace-literal` with `replace-secret` to avoid leaking secrets
2021-05-19 09:34:51 +02:00
talyz 380b52c737 nixos/keycloak: Use replace-secret to avoid leaking secrets
Using `replace-literal` to insert secrets leaks the secrets through
the `replace-literal` process' `/proc/<pid>/cmdline`
file. `replace-secret` solves this by reading the secret straight from
the file instead, which also simplifies the code a bit.
2021-05-19 09:32:28 +02:00
talyz 88b76d5ef9 nixos/mpd: Use replace-secret to avoid leaking secrets
Using `replace-literal` to insert secrets leaks the secrets through
the `replace-literal` process' `/proc/<pid>/cmdline`
file. `replace-secret` solves this by reading the secret straight from
the file instead.
2021-05-19 09:32:22 +02:00
talyz 3a29b7bf5b nixos/mpdscribble: Use replace-secret to avoid leaking secrets
Using `replace-literal` to insert secrets leaks the secrets through
the `replace-literal` process' `/proc/<pid>/cmdline`
file. `replace-secret` solves this by reading the secret straight from
the file instead, which also simplifies the code a bit.
2021-05-19 09:32:17 +02:00
talyz 7842e89bfc nixos/gitlab: Use replace-secret to avoid leaking secrets
Using `replace-literal` to insert secrets leaks the secrets through
the `replace-literal` process' `/proc/<pid>/cmdline`
file. `replace-secret` solves this by reading the secret straight from
the file instead, which also simplifies the code a bit.
2021-05-19 09:32:12 +02:00
talyz 38398fade1 nixos/discourse: Use replace-secret to avoid leaking secrets
Using `replace-literal` to insert secrets leaks the secrets through
the `replace-literal` process' `/proc/<pid>/cmdline`
file. `replace-secret` solves this by reading the secret straight from
the file instead, which also simplifies the code a bit.
2021-05-19 09:32:06 +02:00
talyz 27f8f6956a replace-secret: Init
Add a small utility script which securely replaces secrets in
files. Doing this with `sed`, `replace-literal` or similar utilities
leaks the secrets through the spawned process' `/proc/<pid>/cmdline` file.
2021-05-19 09:32:00 +02:00
talyz 5926b95fbe webkitgtk: Fix bubblewrap opengl-driver path
If `/run/opengl-driver/lib` is in `LD_LIBRARY_PATH`, bwrap will try to
mount it into the already bind mounted `/run/opengl-driver`. To
prevent this, we instead specify the subpaths of `/run/opengl-driver`
we're interested in.

Also, use the correct path for i686 builds.
2021-05-10 13:05:48 +02:00
Kim Lindberger eeece47a52 Merge pull request #121985 from r-ryantm/auto-update/keycloak
keycloak: 12.0.4 -> 13.0.0
2021-05-07 13:11:44 +02:00
talyz 360abc8e2a v8: Fix darwin build 2021-05-07 11:57:58 +02:00
talyz 8f83860a0a keycloak.tests: Make sure databaseUsername is either ignored...
...or used correctly.
2021-05-04 19:27:08 +02:00
talyz deb58f6486 nixos/keycloak: Document how to use a custom local database 2021-05-04 19:27:08 +02:00
talyz fdf6bb5b95 Revert "nixos/keycloak: use db username in db init scripts"
This reverts commit d9e18f4e7f.

This change is broken, since it doesn't configure the proper database
username in keycloak when provisioning a local database with a custom
username. Its intended behavior is also potentially confusing and
dangerous, so rather than fixing it, let's revert to the old one.
2021-05-04 19:27:08 +02:00
Kim Lindberger fdd6ca8fce Merge pull request #118898 from talyz/gitlab-memory-bloat
nixos/gitlab: Add options to tame GitLab's memory usage somewhat
2021-04-30 16:58:30 +02:00
Kim Lindberger abecdfea73 Merge pull request #120833 from talyz/pipewire-0.3.26
pipewire: 0.3.25 -> 0.3.26
2021-04-29 18:46:35 +02:00
Kim Lindberger 3bed46e4b9 Merge pull request #114175 from eyJhb/php-phpdbg-disable
php: fixed not being able to disable phpdbgSupport
2021-04-28 10:46:47 +02:00
Kim Lindberger e50164a7ce Merge pull request #113201 from talyz/gitlab-db-key-base-patch
gitlab: Add patch for db_key_base length bug, fix descriptions
2021-04-27 19:25:43 +02:00
talyz 1215bd4ea9 Revert "nixos/tests/gitlab: add 32 byte secrets"
This reverts commit d6e0d38b84.

We need shorter secrets to continue working, since the earlier
recommendation was too short and there's no way to rotate the them.
2021-04-27 18:08:59 +02:00
talyz 7a67a2d1a8 gitlab: Add patch for db_key_base length bug, fix descriptions
The upstream recommended minimum length for db_key_base is 30 bytes,
which our option descriptions repeated. Recently, however, upstream
has, in many places, moved to using aes-256-gcm, which requires a key
of exactly 32 bytes. To allow for shorter keys, the upstream code pads
the key in some places. However, in many others, it just truncates the
key if it's too long, leaving it too short if it was to begin
with. This adds a patch that fixes this and updates the descriptions
to recommend a key of at least 32 characters.

See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/53602
2021-04-27 17:49:43 +02:00
talyz fb86d324d1 pipewire: Add update script 2021-04-27 16:50:22 +02:00
talyz 6edd102013 pipewire: Fix tests 2021-04-27 12:41:35 +02:00
talyz 24320ba1dd pipewire: 0.3.25 -> 0.3.26 2021-04-27 12:41:30 +02:00
Kim Lindberger 37f49597e3 Merge pull request #118861 from talyz/gitlab-shell-fix
gitlab-shell: 13.15.1 -> 13.17.0
2021-04-16 16:17:58 +02:00
Kim Lindberger 7124e24a47 Merge pull request #119596 from talyz/discourse-2.6.5
discourse: 2.6.3 -> 2.6.5, module fixes
2021-04-16 16:06:47 +02:00
talyz 7310dd0da8 nixos/discourse: Fix plugin linking
When linking multiple plugins, the `ln` runs need to be separated by
newlines..

Fixes #119584.
2021-04-16 14:21:07 +02:00
talyz 515fb48312 nixos/discourse: Fail on file errors
Bash doesn't handle subshell errors properly if the result is used as
input to a command. To cause the services to fail when the files can't
be read, we need to assign the value to a variable, then export it
separately.
2021-04-16 14:21:01 +02:00
talyz 2db1ae068d discourse: 2.6.3 -> 2.6.5 2021-04-16 14:20:56 +02:00
Kim Lindberger 59917dc3a9 Merge pull request #119427 from talyz/tengine-modules
tengine: Add modules to passthru
2021-04-14 17:42:01 +02:00
talyz 4aab79918e tengine: Add passthru.tests 2021-04-14 16:56:54 +02:00
talyz 1ef95a8c5f nginx: Add all the nginx tests to passthru.tests 2021-04-14 16:39:35 +02:00
talyz 06dee38345 Revert "nixos/nginx: fix eval for tengine"
This reverts commit 2d3200e010.
2021-04-14 16:34:10 +02:00
talyz fd10431871 tengine: Add modules to passthru
Follow the interface of the `nginx` package and expose the enabled
modules. This is used in the `nginx` module to enable the
`additionalModules` option.
2021-04-14 16:14:28 +02:00
Kim Lindberger 2111e0cde8 Merge pull request #119114 from bkchr/bkchr-lorri-1.4.0
lorri: 1.3.1 -> 1.4.0
2021-04-12 09:39:41 +02:00
talyz 6389170b39 nixos/gitlab: Set MALLOC_ARENA_MAX to "2"
This should reduce memory fragmentation drastically and is recommended
by both the Puma and the Sidekiq author. It's also the default value
for Ruby deployments on Heroku.
2021-04-10 10:49:31 +02:00
talyz 306fc0648b nixos/gitlab: Add Sidekiq MemoryKiller support
Restart sidekiq automatically when it consumes too much memory. See
https://docs.gitlab.com/ee/administration/operations/sidekiq_memory_killer.html
for details.
2021-04-10 10:49:24 +02:00
talyz 6230936be2 nixos/gitlab: Add options to control puma worker and threads numbers 2021-04-10 10:49:18 +02:00
talyz 7377a1dfa6 gitlab-shell: 13.15.1 -> 13.17.0
Only the version had been updated previously, not the hashes and
patches.
2021-04-09 00:36:32 +02:00
Kim Lindberger 5a1bd5ff66 Merge pull request #116074 from talyz/discourse
discourse: Add package and NixOS module
2021-04-08 14:19:49 +02:00
talyz 9b30cda2f6 gitlab: 13.9.4 -> 13.10.2 2021-04-07 23:23:24 +02:00
Kim Lindberger bb91e5307b Merge pull request #118715 from petabyteboy/feature/gitlab-invalid-backup
nixos/gitlab: do not set backup.upload by default
2021-04-07 09:30:53 +02:00
talyz bc26a46943 rl-2105: Add Discourse module note 2021-04-05 13:56:02 +02:00
talyz 642854055c nixos/discourse: Add NixOS manual entry 2021-04-05 13:55:57 +02:00
talyz 5138941ad3 discourse: Add updater script 2021-04-05 13:55:52 +02:00
talyz 3c7df2a3cb nixos/discourse: Add test 2021-04-05 13:55:44 +02:00
talyz 8dddb70bb9 nixos/discourse: Init 2021-04-05 13:54:25 +02:00
talyz 1d3715d375 discourse-mail-receiver: Init at 4.0.7 2021-04-05 13:54:14 +02:00
talyz 4d8c8f4722 discourse: init at 2.6.3 2021-04-05 13:54:06 +02:00
talyz 46d935a4ce nixos/nginx: Add an option to specify additional third-party modules 2021-04-04 13:44:36 +02:00
Kim Lindberger 11ac9ab827 Merge pull request #118154 from talyz/pipewire-media-session-fixes
nixos/pipewire: Use formats.json, stricter typing and break up extremely long lines
2021-04-01 23:00:20 +02:00
talyz 2a3c276b53 nixos/pipewire: Use formats.json, stricter typing, line breaks
The upstream pipewire config is written in an almost, but not quite
JSON format. The parser accepts standard JSON, though, so we don't
need to write our file in the same nonstandard version.

The typing for all config options is changed from `types.attrs`, which
behaves poorly when the option is set from multiple locations, to the
formats.json-type.

Also, rewrite some very long one-liners for improved readability.
2021-04-01 12:08:29 +02:00
talyz 7b2d97cc2d pipewire: Add JSON parser patch 2021-04-01 12:08:24 +02:00
Kim Lindberger bd3ecdc3cd Merge pull request #114362 from talyz/gitlab-backups
nixos/gitlab: Introduce automatic backups
2021-03-30 20:16:20 +02:00
talyz abba76a3b9 nixos/gitlab: Document automatic backups 2021-03-30 19:15:33 +02:00
talyz 7b5cbde81f nixos/gitlab: Gitlab -> GitLab 2021-03-30 19:13:43 +02:00
talyz 35582c5af7 gitlab.tests: Test backup and restore
Test the automatic backup and restore functionality by backing up the
instance after running the initial tests, stopping GitLab and removing
all state, running the restore rake task, then running the tests
again, but without pushing data.
2021-03-30 19:13:37 +02:00
talyz 3fb04ca505 nixos/gitlab: Introduce automatic backup support
Add support for automatically backing up GitLab state, both locally
and to remote locations.
2021-03-30 19:13:31 +02:00
talyz 30cae53dbb v8: 7.4.255 -> 8.4.255 2021-03-29 15:25:17 +02:00
Kim Lindberger 06e36f5275 Merge pull request #114924 from r-ryantm/auto-update/keycloak
keycloak: 12.0.3 -> 12.0.4
2021-03-03 10:44:33 +01:00
Kim Lindberger 8eea5d0fbd Merge pull request #114592 from etu/php-minor-fixes
php: various fixes
2021-03-02 09:41:15 +01:00
Kim Lindberger e72375464b Merge pull request #113635 from talyz/gitlab-improvements
nixos/gitlab: Clean config dir, switch to puma, split PreStart script and more
2021-03-01 13:37:53 +01:00
talyz ca725e7fcd nixos/gitlab: Add gitlab.target
To make it easier to start and stop all GitLab services, introduce
`gitlab.target` which wants all services (meaning they will start with
it) and which all services are part of (meaning they will stop with
it).
2021-02-26 19:54:23 +01:00
talyz f38c601b54 nixosTests.gitlab: Test pages and mailroom service start
Make sure that the `gitlab-pages` and `gitlab-mailroom` services at
least start.
2021-02-26 19:54:11 +01:00
talyz 9d4e76dd46 nixos/gitlab: Make gitlab.service's PreStart into two new services
Make the config initialization script run in gitlab.service's PreStart
section into two new services, `gitlab-config.service` and
`gitlab-db-config.service`. Other services can then depend on the
config scripts they need instead of unnecessarily depending on
`gitlab.service`. This makes the reason for the configured service
dependencies much clearer and should also reduce the restart time of
the `gitlab` service quite a lot, when triggered manually.

Also, set up stricter service dependencies, using `bindsTo`, to ensure
that if a service fails or is stopped, its dependants are also
stopped. For example, if we're using the `postgresql` service and it's
stopped, `gitlab.service` and `gitlab-sidekiq.service`, which depend on
it to function, should also be stopped.
2021-02-26 19:54:05 +01:00
talyz 53d9ec83ff nixos/gitlab: postgresql: Make PSQL a function, run as superUser
A function is more appropriate for this use. See
http://mywiki.wooledge.org/BashFAQ/050 for reference.

Also, we don't need to run the service as root: since we essentially
run all commands as `services.postgresql.superUser` anyway, the whole
service can just run as that user instead.
2021-02-24 18:32:31 +01:00
talyz 2b3800b9c7 nixos/gitlab: Change default SMTP port, enable postfix only if used
Change the default SMTP port to `25`, to better match the default
address `localhost`. This gets rid of some error outputs in the test,
where it fails to connect to localhost:465.

Also, don't enable postfix by default unless it's actually useful to
us.
2021-02-24 18:32:24 +01:00
talyz f8ab43ef7b nixos/gitlab: Switch from unicorn to puma
Puma is the new upstream default server since GitLab 13.
2021-02-24 18:31:30 +01:00
talyz 2ec397ff9f nixos/gitlab: Clean up the config dir more thoroughly
This removes all the subdirectories in `config` on start.

From one version of GitLab to the next, the files in the `config`
directory changes. Since we're only overwriting the existing files
with ones from the repo, cruft sometimes gets left behind,
occationally causing issues.

Ideally, all configuration put in the `config` directory is declared
by NixOS options and we could just remove the whole directory on
start, but I'm not sure if that's the case. It would also require a
little bit of additional rework and testing. The subdirectories,
however, should seldom contain user configuration and the ones that
frequently does, `initializers`, is already removed on start.
2021-02-24 18:31:24 +01:00
Kim Lindberger 5f30f9adcc Merge pull request #113357 from r-ryantm/auto-update/keycloak
keycloak: 12.0.2 -> 12.0.3
2021-02-20 11:22:53 +01:00
talyz 95f96de78e gce/fetch-ssh-keys: Put script in separate file, use PrivateTmp...
...check the script with shfmt and shellcheck + some other minor
refactoring.
2021-02-19 15:17:12 +01:00
talyz 6c32f248d0 php.extensions.xmlreader: Add internal dependency on dom 2021-01-30 16:41:14 +01:00
Kim Lindberger ed8d40ca94 Merge pull request #110632 from austinbutler/nomachine-client-7
nomachine-client: 6.12.3 -> 7.0.211
2021-01-28 10:04:15 +01:00
talyz dd6ebb7871 google-compute-config: Reintroduce fetch-ssh-keys
Reintroduce the `fetch-ssh-keys` service so that GCE images that work
with NixOps can once again be built. Also, reformat the code a bit.

The service was removed in 88570538b3,
likely due to a comment saying it should be removed. It was still
needed for images to work with NixOps, however, and probably needed to
be replaced or rewritten rather than removed.
2021-01-25 14:14:00 +01:00
talyz 95ab0eda16 bindfs: 1.14.8 -> 1.14.9 2021-01-25 12:37:19 +01:00
Kim Lindberger 2632551494 Merge pull request #110689 from talyz/fish-foreign-env-function-path
nixos/fish: Fix foreign-env function path
2021-01-24 14:37:08 +01:00
talyz 6230ff7dd8 nixos/fish: Fix foreign-env function path 2021-01-24 13:41:37 +01:00
talyz 2887549800 updater-emacs: Add missing pkgs in path to withPackages 2021-01-23 21:35:10 +01:00
talyz 923adfe5ca krita: 4.4.1 -> 4.4.2
We can re-enable parallel building, since the bug causing intermittent
build issues is now fixed. See
https://bugs.kde.org/show_bug.cgi?id=431226 for more information.

Closes #35359.
2021-01-23 10:59:37 +01:00
talyz 8ed9987894 nixos/gnome3: Note the reintroduction of epiphany in release notes 2021-01-05 16:27:20 +01:00
talyz 6a12654363 Revert "nixos/gnome3: don't put epiphany in favorite apps"
This reverts commit 70dc25abd9.
2021-01-05 16:12:37 +01:00
talyz 39cce2f144 Revert "nixos/gnome3: don't install epiphany default"
This reverts commit 13b192749c, since
https://github.com/NixOS/nixpkgs/issues/98819 is now fixed.
2021-01-05 16:12:31 +01:00
talyz 0f0d5c0c49 profiles/hardened: Add note about potential instability
Enabling the profile can lead to hard-to-debug issues, which should be
warned about in addition to the cost in features and performance.

See https://github.com/NixOS/nixpkgs/issues/108262 for an example.
2021-01-04 16:03:29 +01:00
Kim Lindberger ee5a73f5ac Merge pull request #107839 from collares/update-emacs2nix
emacs2nix: update to fix locale issues and a missing elpa package
2020-12-30 21:30:08 +01:00
talyz 4c68c3837a webkitgtk: Add /run/opengl-driver to bubblewrap bind mounts
Without access to the `/run/opengl-driver` directory, webkit fails to
create an EGL context, since it can't identify a suitable EGL
vendor. This results in a blank window and the following error output:

Cannot get default EGL display: EGL_BAD_PARAMETER
Cannot create EGL context: invalid display (last error: EGL_SUCCESS)
2020-12-23 18:51:50 +01:00
Kim Lindberger d5b146418e Merge pull request #103146 from talyz/keepassxc-networking
keepassxc: Enable networking by default
2020-11-17 23:31:06 +01:00
talyz cfdeea41e6 keepassxc: Enable networking by default
Upstream builds with it enabled, as do other distros.
2020-11-08 16:40:23 +01:00
Kim Lindberger 966791f447 Merge pull request #102948 from talyz/keycloak-11.0.3
keycloak: 11.0.2 -> 11.0.3
2020-11-05 19:50:12 +01:00
talyz 23b43eb476 keycloak: 11.0.2 -> 11.0.3 2020-11-05 18:39:44 +01:00