Commit Graph

106 Commits

Author SHA1 Message Date
Aos Dabbagh
44a4c266c3 doc(livebook): Fix small spelling mistake 2024-09-16 14:54:45 -04:00
Felix Bühler
8dd85c637c
nixos/services.zammad: remove with lib; (#338051) 2024-09-02 21:42:59 +02:00
Felix Bühler
48e082adea
nixos/services.athens: remove with lib; (#338050) 2024-08-30 01:23:05 +02:00
Felix Buehler
45bc5974dd nixos/services.rstudio-server: remove with lib; 2024-08-30 00:30:45 +02:00
Felix Buehler
f65c35866a nixos/services.livebook: remove with lib; 2024-08-30 00:30:45 +02:00
Felix Buehler
df4401eac8 nixos/services.jupyterhub: remove with lib; 2024-08-30 00:30:45 +02:00
Felix Buehler
a986e3c10a nixos/services.jupyter.kernels: remove with lib; 2024-08-30 00:30:45 +02:00
Felix Buehler
5134f4b55c nixos/services.jupyter: remove with lib; 2024-08-30 00:30:44 +02:00
Felix Buehler
25ddce8617 nixos/services.hoogle: remove with lib; 2024-08-30 00:30:44 +02:00
Felix Buehler
8ddfb1375f nixos/services.distccd: remove with lib; 2024-08-30 00:30:44 +02:00
Felix Buehler
b16581f094 nixos/services.zammad: remove with lib; 2024-08-29 00:37:13 +02:00
Felix Buehler
0717502d60 nixos/services.athens: remove with lib; 2024-08-29 00:23:33 +02:00
Alexandru Scvortov
742ee97845 livebook: fix service not starting when LIVEBOOK_COOKIE was not set 2024-07-25 17:17:41 +01:00
Alexandru Scvortov
f147a306d5 livebook: add munksgaard and scvalex as maintainers 2024-07-25 17:17:41 +01:00
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Bjørn Forsman
a29010fe79 nixos: improve many 'enable' descriptions 2024-04-09 07:10:17 +02:00
Janne Heß
fcc95ff817 treewide: Fix all Nix ASTs in all markdown files
This allows for correct highlighting and maybe future automatic
formatting. The AST was verified to work with nixfmt only.
2024-03-28 09:28:12 +01:00
Janne Heß
bc77c7a973 treewide: Mark Nix blocks in markdown as Nix
This should help us with highlighting and future formatting.
2024-03-28 09:28:12 +01:00
DCsunset
38261d9556 nixos/hoogle: add extraOptions 2024-03-06 22:12:41 -05:00
V
ff990ea66a nixos/nixseparatedebuginfod: fix compatibility with Nix 2.3
Appending to options with the `extra-` prefix was added in Nix 2.4,
which makes config validation fail on this version without the guard.

Change-Id: Ie253978dbaf00b228fecc08698a3dcc01cd2d82b
2024-02-29 23:10:31 +01:00
Sandro
7fab1e2013
Merge pull request #275024 from jerith666/lorri-less-protected 2024-02-24 16:07:13 +01:00
Philip Munksgaard
1ee8e72834
livebook: Set KillMode=mixed
This will gracefully shut down the service instead of resulting in errors like
this:

```
Jan 24 10:11:11 foo livebook[981676]: 10:11:11.922 [error] GenServer :disksup terminating
Jan 24 10:11:11 foo livebook[981676]: ** (stop) {:port_died, :normal}
Jan 24 10:11:11 foo livebook[981676]: Last message: {:EXIT, #Port<0.8>, :normal}
Jan 24 10:11:11 foo livebook[981676]: 10:11:11.922 [error] GenServer :memsup terminating
Jan 24 10:11:11 foo livebook[981676]: ** (stop) {:port_died, :normal}
```
2024-01-26 20:19:49 +01:00
Philip Munksgaard
897d5670a3
livebook: Use mix release to build instead of escript
The current build of livebook does not work with the new [Livebook
Teams](https://livebook.dev/teams/) features. The problem can be observed by
running the current version of livebook, adding a new team and going to the team
page. The process will crash and the team page will show a 500 error.

The base of the problem is that the escript build method is not officially
supported. This commit changes the livebook package to use the `mix release`
workflow, which is also the one used to build the official Docker container.

Unfortunately, the binary built with `mix release` does not support command line
arguments like the `escript` binary does. Instead, users need to pass in most of
the configuration as environment variables, as documented
[here](https://hexdocs.pm/livebook/readme.html#environment-variables). As a
result, this commit also changes the Livebook service to reflect this new way of
configuring Livebook.

Finally, the Livebook release configuration specifically excludes the
ERTS (Erlang Runtime System), which means that the resulting release cannot run
without Erlang installed.

I have tested the results (both of the package and the service) locally.
2024-01-26 20:19:46 +01:00
Guillaume Girol
db0f76e8c9
Merge pull request #271030 from symphorien/nixseparatedebuginfod
nixseparatedebuginfod: init at 0.3.0, plus module and nixos test
2024-01-07 17:45:13 +01:00
Guillaume Girol
dece72548e nixseparatedebuginfod: add module and nixos test 2024-01-01 13:42:13 +01:00
Alexandru Scvortov
0ae9c34391 livebook: configurable package and extraPackages
Also fix examples to not include a semicolon in the .env file.
2023-12-25 21:47:14 +00:00
Matt McHenry
db64f7f737 lorri.service: remove ProtectHome, relax ProtectSystem
per lorri's readme:

  lorri creates an indirect garbage collection root for each .drv in
  $XDG_CACHE_HOME/lorri (~/.cache/lorri/ by default) each time it
  evaluates your project.

... so it doesn't make sense to have ProtectHome enabled for
lorri.service.  lorri also needs to be able to modify
/nix/var/nix/gcroots/per-user/, so ProtectSystem can't be 'strict';
'full' is the next strongest.

fixes:

lorri: ERRO IO error binding to socket: Read-only file system (os error 30)

bisecting this error leads to a range of unbuildable commits including
'a31429165204 Merge pull request #243242 from
RaitoBezarius/systemd-254', so it's likely that systemd update changed
the behaviour of ProtectHome somehow (though the release notes don't
have any obvious culprits).
2023-12-17 11:35:48 -05:00
Janik
7703f36fd1
Merge pull request #269469 from NetaliDev/zammad-update 2023-12-05 09:29:51 +01:00
netali
a1f6e1d6f1
nixos/zammad: update for zammad 6.1 2023-12-04 23:10:07 +01:00
Weijia Wang
feeae486de
Merge pull request #261702 from h7x4/replace-mkoption-with-mkpackageoption
treewide: use `mkPackageOption`
2023-11-30 02:49:30 +01:00
Emily Trau
77cc213d14
Merge pull request #265349 from malt3/init/athens
athens: init at 0.12.1
2023-11-29 18:28:39 +11:00
h7x4
0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
Maximilian Bosch
48459567ae nixos/postgresql: drop ensurePermissions, fix ensureUsers for postgresql15
Closes #216989

First of all, a bit of context: in PostgreSQL, newly created users don't
have the CREATE privilege on the public schema of a database even with
`ALL PRIVILEGES` granted via `ensurePermissions` which is how most of
the DB users are currently set up "declaratively"[1]. This means e.g. a
freshly deployed Nextcloud service will break early because Nextcloud
itself cannot CREATE any tables in the public schema anymore.

The other issue here is that `ensurePermissions` is a mere hack. It's
effectively a mixture of SQL code (e.g. `DATABASE foo` is relying on how
a value is substituted in a query. You'd have to parse a subset of SQL
to actually know which object are permissions granted to for a user).

After analyzing the existing modules I realized that in every case with
a single exception[2] the UNIX system user is equal to the db user is
equal to the db name and I don't see a compelling reason why people
would change that in 99% of the cases. In fact, some modules would even
break if you'd change that because the declarations of the system user &
the db user are mixed up[3].

So I decided to go with something new which restricts the ways to use
`ensure*` options rather than expanding those[4]. Effectively this means
that

* The DB user _must_ be equal to the DB name.
* Permissions are granted via `ensureDBOwnerhip` for an attribute-set in
  `ensureUsers`. That way, the user is actually the owner and can
  perform `CREATE`.
* For such a postgres user, a database must be declared in
  `ensureDatabases`.

For anything else, a custom state management should be implemented. This
can either be `initialScript`, doing it manual, outside of the module or
by implementing proper state management for postgresql[5], but the
current state of `ensure*` isn't even declarative, but a convergent tool
which is what Nix actually claims to _not_ do.

Regarding existing setups: there are effectively two options:

* Leave everything as-is (assuming that system user == db user == db
  name): then the DB user will automatically become the DB owner and
  everything else stays the same.

* Drop the `createDatabase = true;` declarations: nothing will change
  because a removal of `ensure*` statements is ignored, so it doesn't
  matter at all whether this option is kept after the first deploy (and
  later on you'd usually restore from backups anyways).

  The DB user isn't the owner of the DB then, but for an existing setup
  this is irrelevant because CREATE on the public schema isn't revoked
  from existing users (only not granted for new users).

[1] not really declarative though because removals of these statements
    are simply ignored for instance: https://github.com/NixOS/nixpkgs/issues/206467
[2] `services.invidious`: I removed the `ensure*` part temporarily
    because it IMHO falls into the category "manage the state on your
    own" (see the commit message). See also
    https://github.com/NixOS/nixpkgs/pull/265857
[3] e.g. roundcube had `"DATABASE ${cfg.database.username}" = "ALL PRIVILEGES";`
[4] As opposed to other changes that are considered a potential fix, but
    also add more things like collation for DBs or passwords that are
    _never_ touched again when changing those.
[5] As suggested in e.g. https://github.com/NixOS/nixpkgs/issues/206467
2023-11-13 17:16:25 +01:00
Malte Poll
9c5825bd27 nixos/athens: init at 0.12.1
Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2023-11-07 14:43:11 +01:00
Alexandru Scvortov
fa54eeea5c livebook: add systemd user service, test, and docs
Co-authored-by: Yt <happysalada@tuta.io>
2023-10-31 07:31:18 +00:00
Ember Keske
8c5087c1f6 zammad: link test in passthru.tests 2023-05-17 16:06:50 +02:00
Sandro
1c5ca89f42
nixos/lorri: install direnv
direnv is required to allow files to be run by lorri, so it should be installed, too.
2023-04-14 15:19:34 +02:00
Stanisław Pitucha
70073985ae nixos/gemstash: init module 2023-03-07 15:56:56 +11:00
pennae
bf4c0c1900 nixos/*: remove trailing period in mkEnableOptions
those are added by mkEnableOption, and .. is replaced to … by markdown
processing.
2023-02-08 15:23:34 +01: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
53fc887582 nixos/manual: move "edit the MD file" comments to generated XML 2023-01-10 12:34:37 +01:00
pennae
bf92eaebe4 nixos/manual: generate module chapters with md-to-db.sh 2023-01-10 10:32:00 +01:00
pennae
296ffb4f1f nixos/blackfire: convert manual chapter to MD 2023-01-10 10:31:55 +01:00
pennae
6aa4c2f9fc nixos/manual: normalize <firstterm> -> <emphasis>
they're emphasized, so we can't just throw them out.
2023-01-10 10:31:53 +01:00
pennae
22144ba269 nixos/manual: normalize <package> -> <literal>
markdown can only do <literal>, so normalize to that. without
auto-linking to a package index the distinction is not very useful anyway.
2023-01-10 10:31:52 +01:00
pennae
0715ecf936 nixos/manual: normalize <programlisting>
makes sure that program listing tags are separated from their contents
by exactly a newline character. this makes the markdown translation
easier to verify (since no new newlines need to be inserted), and
there's no rendering difference anyway.
2023-01-10 10:31:52 +01:00
Daniel Nagy
ad866e565d
treewide: switch to port type for nixos modules 2022-12-08 00:00:00 +01:00
Jaakko Luttinen
8eafc61e23
nixos/jupyter: make kernel options freeform JSON 2022-10-14 22:33:14 +03:00
Jaakko Luttinen
5b520df32f
nixos/jupyter: add env kernel option 2022-10-14 20:11:40 +03:00
pennae
1d41cff3dc nixos/*: convert straggler options to MD 2022-08-31 17:27:38 +02:00