Commit Graph

25 Commits

Author SHA1 Message Date
h7x4
79d3d59f58
treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
Niklas Hambüchen
65a471717c plausible, nixos/plausible: Add listenAddress option.
This changes

* the plausible HTTP web server

to be listening on localhost only, explicitly.

This makes Plausible have an explicit safe default configuration,
like all other networked services in NixOS.

For background discussion, see: https://github.com/NixOS/nixpkgs/issues/130244

As per my upstream Plausible contribution
(https://github.com/plausible/analytics/pull/1190)
Plausible >= 1.5 also defaults to listening to localhost only;
nevertheless, this default should be stated explicitly in nixpkgs
for easier review and independence from upstream changes, and
a NixOS user must be able to configure the
`listenAddress`, as there are valid use cases for that.

Also, disable

* the Erlang Beam VM inter-node RPC port
* the Erlang EPMD port

because Plausible does not use them (see added comment).
This is done by setting `RELEASE_DISTRIBUTION=none`.

Thus, this commit also removes the NixOS setting `releaseCookiePath`,
because it now has no effect.
2023-11-14 10:51:16 +01:00
Peder Bergebakken Sundt
a9d001fd4a
Merge pull request #260877 from moritzrickert/plausible-registration-invite-only
nixos/plausible: add invite only registrations
2023-10-27 23:49:49 +02:00
Moritz Rickert
09794b1ee4 nixos/plausible: add invite only registrations 2023-10-26 16:54:25 +02:00
Maximilian Bosch
2ee12a93de treewide: remove myself (ma27) from a few packages
It's time again, I guess :>

Main motivation is to stop being pinged about software that I maintained
for work now that I'm about to switch jobs. There's no point in pinging
me to review/test updates or to debug issues in e.g. the Atlassian stack
or on mailman since I use neither personally.

But there's also a bunch of other stuff that I stopped using personally. While
at it I realized that I'm still maintainer of a few tests & modules related to
packages I stopped maintaining in the past already.
2023-10-18 15:47:20 -03:00
Robert Schütz
c4244c7aa3 plausible: 1.5.1 -> 2.0.0
Changelog: https://github.com/plausible/analytics/blob/v2.0.0/CHANGELOG.md

Co-authored-by: Kirill Radzikhovskyy <kirillrdy@gmail.com>
2023-09-08 15:29:21 -07:00
Salar Rahmanian
e8210b2aac plausible: 1.4.4 -> 1.5.1 2023-09-08 20:54:05 +00:00
Raito Bezarius
d7e721f614 plausible: fix admin user password seed and SMTP passwords
LoadCredential was misused as it is not building any environment variable,
it is the responsibility of our preStart to do it so
Plausible's script can pick it up.
2023-07-02 17:03:53 +02:00
tyxieblub
efde50d9f5 nixos/plausible: add package option 2023-04-17 21:20:03 +02:00
pennae
0a6e6cf7e6 nixos/manual: render module chapters with nixos-render-docs
this converts meta.doc into an md pointer, not an xml pointer. since we
no longer need xml for manual chapters we can also remove support for
manual chapters from md-to-db.sh

since pandoc converts smart quotes to docbook quote elements and our
nixos-render-docs does not we lose this distinction in the rendered
output. that's probably not that bad, our stylesheet didn't make use of
this anyway (and pre-23.05 versions of the chapters didn't use quote
elements either).

also updates the nixpkgs manual to clarify that option docs support all
extensions (although it doesn't support headings at all, so heading
anchors don't work by extension).
2023-01-27 20:07:34 +01:00
pennae
ef176dcf7e nixos/*: automatically convert option descriptions
conversions were done using https://github.com/pennae/nix-doc-munge
using (probably) rev f34e145 running

    nix-doc-munge nixos/**/*.nix
    nix-doc-munge --import nixos/**/*.nix

the tool ensures that only changes that could affect the generated
manual *but don't* are committed, other changes require manual review
and are discarded.
2022-08-31 16:32:53 +02:00
Sandro
d478d8be71
Merge pull request #186674 from aopom/plausible-service-after-clickhouse 2022-08-21 03:46:35 +02:00
pennae
6039648c50 nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
pennae
8f8e101527 nixos/*: normalize <package> to <literal>
this renders the same in the manpage and a little more clearly in the
html manual. in the manpage there continues to be no distinction from
regular text, the html manual gets code-type markup (which was probably
the intention for most of these uses anyway).
2022-08-19 22:40:58 +02:00
ppom
565a729f7c make plausible service start after clickhouse service
Plausible fails on start because clickhouse is not ready,
when clickhouse has low CPU available, eg.
```nix
{systemd.services.clickhouse.serviceConfig.CPUWeight = 20;}
```

Fixed with
```nix
{systemd.services.plausible.after = [ "clickhouse.service" ];}
```
2022-08-14 17:09:05 +02:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Maximilian Bosch
e211c94b94
plausible: 1.4.0 -> 1.4.3
ChangeLog: https://github.com/plausible/analytics/blob/v1.4.3/CHANGELOG.md#unreleased

Also makes the option `services.plausible.releaseCookiePath` mandatory[1]: since Elixir
1.13 the `RELEASE_COOKIE` env-var *must* be set, otherwise the startup
fails[2]. Since we drop `$out/releases/COOKIE` in the `fixupPhase` of
`mixRelease` and Elixir seems to always attempt to generate such a
file[3], I figured it's reasonable to just make it mandatory now.

Closes #155575

[1] https://nixos.org/manual/nixos/stable/options.html#opt-services.plausible.releaseCookiePath
[2] f24eb2c1ef /
    https://github.com/elixir-lang/elixir/issues/11114
[3] https://hexdocs.pm/mix/Mix.Tasks.Release.html, see `:cookie`
2022-01-25 17:19:49 +01:00
happysalada
aff0f5792b plausible: add remote connection with iex 2021-11-09 08:15:53 -05:00
happysalada
9c71958cfa plausible: use loadcredentials
plausible: service fixes, remove console attempt

plausible: fix yarn.nix call
2021-11-06 09:15:19 -04:00
Niklas Hambüchen
ea182cdb99 nixos/plausible: docs: Mention caveate of baseUrl 2021-07-14 03:28:57 +00:00
Niklas Hambüchen
8613698df0 nixos/plausible: Fix shell scripting errors.
See https://github.com/NixOS/nixpkgs/pull/124055/files#r668271575
2021-07-13 04:05:05 +02:00
Maximilian Bosch
cc88797ce0 plausible: minor polishing 2021-06-02 19:21:31 +09:00
Maximilian Bosch
6bc72cdd4a plausiblew: cleanup build & update script 2021-06-02 19:21:31 +09:00
Maximilian Bosch
02b15d0f5b plausible: first review fix iteration
* Most significant is probably the patching necessary to run plausible
  with postgres without superuser privilege. This change includes:
  * updating ecto_sql to 3.6 where `CREATE DATABASE` is only executed if
    it doesn't exist[1].
  * patching a migration to only modify the `users.email` column (to use
    `citext` rather than creating the extension. `plausible-postgres`
    takes care of that).
* Correctly declare dependencies in systemd.
* A few minor fixes.

[1] 051baf669e
2021-06-02 19:21:31 +09:00
Maximilian Bosch
b06ea1146c plausible: init at 1.3.0 2021-06-02 19:21:31 +09:00