Commit graph

798 commits

Author SHA1 Message Date
David Warde-Farley a81954b818 Fix docs. 2022-09-28 10:48:10 -04:00
David Warde-Farley c3e75d4931 Use null instead of empty string.
Per @aanderse in 7556fd7.
2022-09-28 10:48:10 -04:00
David Warde-Farley 0d5a365f61 caddy: Omit --adapter from invocations if empty string supplied
This allows specifying configuration in the natively processed Caddy JSON format.

Fixes #153142.
2022-09-28 10:48:10 -04:00
pennae 1d41cff3dc nixos/*: convert straggler options to MD 2022-08-31 17:27:38 +02:00
pennae f2ea09ecbe nixos/*: convert options with listings
minor rendering changes.
2022-08-31 17:27:36 +02:00
pennae 722b99bc0e nixos/*: convert options with admonitions to MD
rendering changes only slightly, most changes are in spacing.
2022-08-31 16:36:16 +02: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 c915b915b5 nixos/*: md-convert options with unordered lists
mostly no rendering changes. some lists (like simplelist) don't have an
exact translation to markdown, so we use a comma-separated list of
literals instead.
2022-08-31 16:32:53 +02:00
pennae 51a11254a7 nixos/*: literalDocBook -> literalMD
no change to rendered output
2022-08-27 19:18:29 +02:00
Bernardo Meurer d05ae63d23
Merge pull request #179155 from linj-fork/caddy-improve-security
nixos/caddy: improve security about acme certs
2022-08-25 10:36:10 -03:00
pennae 6039648c50 nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
pennae 7e7d68a250 nixos/*: mark pre-existing markdown descriptions as mdDoc 2022-08-19 22:40:58 +02:00
pennae b51f8036c2 nixos/*: use properly indented strings for option docs
using regular strings works well for docbook because docbook is not as
whitespace-sensitive as markdown. markdown would render all of these as
code blocks when given the chance.
2022-08-19 22:40:58 +02:00
pennae 72b507d5a2 nixos/*: convert some markdown in docbook to tags
a lot of markdown syntax has already snuck into option docs, many of it
predating the intent to migrate to markdown. we don't convert all of it
here, just that which is accompanied by docbook tags as well. the rest
can be converted by simply adding the mdDoc marker.
2022-08-19 22:40:58 +02:00
Pascal Bach b6ab2508f5
Merge pull request #187299 from superherointj/nixos-modules-minio-fix-network-issue
nixos/minio: fix startup issue
2022-08-18 21:46:43 +02:00
superherointj 89f527384b nixos/minio: fix startup issue 2022-08-18 11:52:29 -03:00
ckie 30ad2e1c12
Merge pull request #162484 from jappeace/keter-module
nixos/keter: init at 2.0.1
2022-08-18 15:44:05 +03:00
Jappie Klooster a4d72ad628
nixos/keter: init
Enable keter module

Keter is an apploader which:
1. has the old app running on a port.
2. loads a new one, and wait for that to complete
3. switches the old with the new one once the new one finished loading.

It supports more functionality but this use case
is the primary one being used by supercede.

Adds keter as a module to nixos.
Currently keter is unusable with nix,
because it relies on bundeling of a tar and uploading that to a specific folder.
These expressions automate these devops tasks,
with especially nixops in mind.
This will work with versions above 1.8

The test seems to work.
This uses a new version of keter which has good
support for status code on error pages.
We're using this config at production at supercede
so it should be fine.

Squash log:
==========

mention keter in changelog

Update generated release notes

Always restart keter on failure

This is a little bit of extra stability in case keter crashes.
Which can happen under extreme conditions (DoS attacks).

Update nixos/doc/manual/release-notes/rl-2205.section.md

Co-authored-by: ckie <25263210+ckiee@users.noreply.github.com>

Update nixos/modules/module-list.nix

Co-authored-by: ckie <25263210+ckiee@users.noreply.github.com>

Remove sanitization

don't put domain in as a string

Update nixos/tests/keter.nix

Co-authored-by: ckie <25263210+ckiee@users.noreply.github.com>

add jappie as module maintainer

Use type path instead of two seperate options

Fix generated docs

added test machinery to figure out why it's failing

Fix the test, use console output

run nixpkgs-fmt on all modules

Inline config file.

This get's rid of a lot of inderection as well.

Run nix format

remove comment

simplify executable for test

delete config file

add config for keter root

Remove after redis clause

set keter root by default to /var/lib/keter

Update nixos/modules/services/web-servers/keter/default.nix

Co-authored-by: ckie <25263210+ckiee@users.noreply.github.com>

Update nixos/modules/services/web-servers/keter/default.nix

Co-authored-by: ckie <25263210+ckiee@users.noreply.github.com>

Update nixos/modules/services/web-servers/keter/default.nix

Co-authored-by: ckie <25263210+ckiee@users.noreply.github.com>

fix nit

add newlines

add default text and move description in a long description

Delete rather obvious comment

fix release db thing

remove longDescription and put it in a comment instead

change description of mkEnalbeOption

explain what keter does by using the hackage synopsis

set domain to keterDomain and same for executable

move comment to where it's happening

fix type error

add formatting better comment

try add seperate user for keter

Revert "try add seperate user for keter"

This reverts commit d3522d36c96117335bfa072e6f453406c244e940.

Doing this breaks the setup

set default to avoid needing cap_net_bind_service

remove weird comment

use example fields

eleborated on process leakage

Update nixos/modules/services/web-servers/keter/default.nix

Co-authored-by: ckie <25263210+ckiee@users.noreply.github.com>

run nixpkgs-fmt

update docs

Fix formatting, set keter package by default

format our little nixexpr

replace '' -> " where possible

drop indent for multiline string

make description much shorter

regen docs database
2022-08-18 15:29:47 +03:00
pennae 087472b1e5 nixos/*: automatically convert option docs 2022-08-06 20:39:12 +02:00
pennae 423545fe48 nixos/*: normalize manpage references to single-line form
now nix-doc-munge will not introduce whitespace changes when it replaces
manpage references with the MD equivalent.

no change to the manpage, changes to the HTML manual are whitespace only.
2022-08-05 18:34:50 +02:00
pennae 3aebb4a2be nixos/*: normalize link format
make (almost) all links appear on only a single line, with no
unnecessary whitespace, using double quotes for attributes. this lets us
automatically convert them to markdown easily.

the few remaining links are extremely long link in a gnome module, we'll
come back to those at a later date.
2022-08-03 21:57:46 +02:00
pennae 9c8531c8a5 nixos/*: replace <replaceable>s with «thing»
we can't embed syntactic annotations of this kind in markdown code
blocks without yet another extension. replaceable is rare enough to make
this not much worth it, so we'll go with «thing» instead. the module
system already uses this format for its placeholder names in attrsOf
paths.
2022-08-03 21:08:58 +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
Winter c4665307de
Merge pull request #180148 from Luflosi/nginx-fix-listenAddresses-example
nixos/nginx: fix broken listenAddresses example
2022-07-25 17:47:00 -04:00
Luflosi 320e4dbcc3
nixos/nginx: fix broken listenAddresses example
When using the example without the square brackets, nginx fails to start:
```
nginx-pre-start: nginx: [emerg] invalid port in "::1:80" of the "listen" directive in /nix/store/xyz-nginx.conf:29
nginx-pre-start: nginx: configuration file /nix/store/xyz-nginx.conf test failed
```
2022-07-04 19:46:18 +02:00
Lin Jian d1b90cf540
nixos/caddy: force caddy to reload config in ExecReload
This patch follows an upstream commit[1].

Before this patch, if acme module is used, caddy will still use an old
cert even a new one is available. The cause is that without --force
flag, caddy will not reload an unchanged config.

Refer to that commit[1] message for more information.

[1]: 979e498d6d
2022-06-29 10:36:24 +08:00
Lin Jian f7baa65db7
nixos/caddy: improve security about acme certs
Before this patch, the caddy process has acme in its supplementary
group because of the SupplementaryGroups in its service config, which
may give it more permission than needed, is inconsistent with the
documentation of services.caddy.virtualHosts.<name>.useACMEHost and is
redundant since we have mkCertOwnershipAssertion in assertions.

This patch fixes these problems by defaulting the group of needed
certs to caddy, which is what other web servers like nginx do and
deleting SupplementaryGroups config.
2022-06-29 05:41:13 +08:00
Winter 6c53004840 nixos/nginx: allow recommended proxy settings to be enabled per location 2022-06-12 19:52:35 -04:00
ajs124 30186896ee nixos/nginx: fix SystemCallFilter for openresty 2022-05-30 11:58:28 +02:00
Madoura b18031c413
treewide/meta: Remove chiiruno and replace with Madouura (#169096)
* maintainers: remove chiiruno

* nixos/zeronet.nix: replace chiiruno with Madouura

* nixos/hydron: replace chiiruno with Madouura

* nixos/tests/bcachefs: replace chiiruno with Madouura

* lutris: replace chiiruno with Madouura

* qtchan: replace chiiruno with Madouura

* tinygo: replace chiiruno with Madouura

* vlang: replace chiiruno with Madouura

* merkletools: replace chiiruno with Madouura

* easyjson: replace chiiruno with Madouura

* quicktemplate: replace chiiruno with Madouura

* statik: replace chiiruno with Madouura

* dumb: replace chiiruno with Madouura

* sndio: replace chiiruno with Madouura

* hydron: replace chiiruno with Madouura

* edid-decode-unstable: replace chiiruno with Madouura

* tewisay: replace chiiruno with Madouura

* svt-av1: replace chiiruno with Madouura
2022-04-18 02:13:36 +03:00
Izorkin e87240e216 nixos/nginx: add extraParameters to http3 protocol 2022-04-11 22:33:12 +02:00
Izorkin c508da303b nixos/nginx: add reuseport option 2022-04-11 22:33:12 +02:00
Izorkin 660a36f173 nixos/nginx: fix http3 configuration 2022-04-11 22:33:12 +02:00
Dominique Martinet b0a04e4105 nginx/logrotate: run logrotate as nginx user 2022-04-01 07:09:27 +09:00
Dominique Martinet e92c05349c nixos/logrotate: convert to freeform
using freeform is the new standard way of using modules and should replace
extraConfig.
In particular, this will allow us to place a condition on mails
2022-04-01 07:09:26 +09:00
Sander van der Burg 43543a6bbc
Merge pull request #163716 from svanderburg/fixtomcat
nixos/tomcat: configure default group and fix broken default package …
2022-03-13 21:43:45 +01:00
Sander van der Burg d12186a601 nixos/tomcat: configure default group and fix broken default package reference
Without this fix, evaluating a NixOS configuration with Tomcat enabled and the
default settings results in the following evaluation error:

Failed assertions:
- users.users.tomcat.group is unset. This used to default to
nogroup, but this is unsafe. For example you can create a group
for this user with:
users.users.tomcat.group = "tomcat";
users.groups.tomcat = {};
2022-03-13 14:00:09 +01:00
Luke Granger-Brown 3004e58f6a nixos/pomerium: avoid blocking when renewing ACME certificates 2022-03-11 14:09:19 +00:00
Izorkin b672e4dd2c
nginxModules: add option disableIPC
The disableIPC option is required to checking enabled nginxModules
and disable the SystemCallFilter IPC filter.
2022-03-08 14:37:11 +03:00
Janne Heß e5823f77b3
Merge pull request #159187 from martinetd/logrotate
logrotate service enhancements
2022-02-23 11:24:17 +01:00
Sandro 5a57844cf6
Merge pull request #158592 from SuperSandro2000/nginx-nixos 2022-02-20 16:32:09 +01:00
Sandro a6d259faf3
Merge pull request #141650 from 06kellyjac/agate 2022-02-16 00:56:27 +01:00
Dominique Martinet c7618fbd9b nginx: add logrotate rule for nginx logs 2022-02-11 21:07:37 +09:00
ajs124 3ecddf791d nixos/shellinabox: drop 2022-02-08 18:59:47 -05:00
Sandro Jäckel ae66e2d5ec
treewide: use configured nginx package 2022-02-08 12:13:30 +01:00
06kellyjac 0a6d22c6c3 nixos/agate: init 2022-02-07 16:03:44 +00:00
Jörg Thalheim fd382c011a
Merge branch 'master' into nginx 2022-01-31 05:44:42 +01:00
Jörg Thalheim 26ea046ed7
Update nixos/modules/services/web-servers/nginx/default.nix 2022-01-31 05:43:53 +01:00
Daniel Olsen ab7e6995ac nixos/nginx: Add defaultListenAddresses option
Lets you specify the default listen address if none are listed in the vhost configuration.

Useful for hosts with more than one ip
2022-01-24 02:20:30 +01:00
Martin Weinelt f0f67400bc
Merge pull request #153942 from winterqt/acme-web-server-ownership-assertions 2022-01-11 15:03:43 +01:00