Commit Graph

15 Commits

Author SHA1 Message Date
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
Alyssa Ross
eafa1fd10d nixos/public-inbox: set ProtectHome=tmpfs
This fixes using coderepos in /home, by allowing the coderepo paths to
be bind mounted into an otherwise empty /home tmpfs.  Since this was
the usecase for making ProtectHome= overrideable, we don't need the
mkDefault any more.
2023-06-20 17:19:09 +00:00
Alyssa Ross
03216e705c nixos/public-inbox: make coderepo paths accessible 2023-06-20 17:19:09 +00:00
Alyssa Ross
68c68f39db nixos/public-inbox: remove unused indexing code
This was never run, because public-inbox-init now always initializes
Xapian.
2023-06-20 17:11:23 +00:00
Alyssa Ross
18f2be2e56 nixos/public-inbox: require that URL be non-empty
public-inbox-init doesn't work if passed an empty URL.
2023-06-17 07:57:27 +00:00
Julien Moutinho
b6ed3b8f40 nixos/public-inbox: explicit a few more freeform settings 2023-06-04 13:09:28 +00:00
Vincent Ambo
aea521150d nixos/public-inbox: fix incorrectly restrictive option type
The `freeformType` of `settings.publicinbox` in this module prevented
users from setting settings on the `publicinbox` section itself (which
is necessary for making e.g. IMAP work correctly), and only allowed
configuration of nested per-inbox sections.

In general I believe that these overly specific types which are
traditional in NixOS, and this kind of config generation, are a huge
footgun. This commit is the least invasive change that makes the
module work correctly.
2022-12-25 16:45:58 +03: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
pennae
0046b457d5 nixos/public-inbox: convert option descriptions to MD
no change to manpage or html.
2022-08-27 19:18:29 +02:00
pennae
61e93df189 nixos/*: automatically convert option docs to MD
once again using nix-doc-munge (69d080323a)
2022-08-03 22:46:41 +02:00
pennae
16102dce2f nixos/*: replace <code> in option docs with <literal>
markdown can't represent the difference without another extension and
both the html manual and the manpage render them the same, so keeping the
distinction is not very useful on its own. with the distinction removed
we can automatically convert many options that use <code> tags to markdown.

the manpage remains unchanged, html manual does not render
differently (but class names on code tags do change from "code" to "literal").
2022-08-03 21:03:23 +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
Julien Moutinho
c646d375d3 nixos/public-inbox: support enabling confinement
Add support for enabling confinement
but does not enable it by default yet
because so far no module within NixOS uses confinement
hence that would set a precedent.
2022-05-12 01:56:46 +02:00
Julien Moutinho
0e290442ba nixos/public-inbox: add tests 2022-05-12 01:56:16 +02:00
Julien Moutinho
8514800c42 nixos/public-inbox: init 2022-05-12 01:56:15 +02:00