about summary refs log tree commit diff
path: root/nixos/modules/security
AgeCommit message (Collapse)AuthorFilesLines
2022-12-17nixos: fix typosfigsoda5-7/+7
2022-12-15nixos/pam: allow backing the motd with a fileMarkus Napierkowski1-2/+18
2022-11-14Merge pull request #199587 from lorenz/fscryptFranz Pletz1-0/+30
nixos/pam: support fscrypt login protectors
2022-11-11nixos/pam: support fscrypt login protectorsLorenz Brun1-0/+30
fscrypt can automatically unlock directories with the user's login password. To do this it ships a PAM module which reads the user's password and loads the respective keys into the user's kernel keyring. Significant inspiration was taken from the ecryptfs implementation.
2022-11-07Merge pull request #186628 from ocfox/pam_faildelayBobby Rong1-0/+22
nixos/pam: add option failDelay
2022-11-07nixos/pam: add option failDelayocfox1-0/+22
Co-authored-by: Bobby Rong <rjl931189261@126.com>
2022-11-01Merge pull request #174951 from dpausp/fix-pam-tty-auditNaïm Favier1-6/+6
2022-10-28treewide: convert fake octal ints to stringsYorick van Pelt1-4/+4
These were being cast to strings later and then reinterpreted as octal.
2022-10-26Merge pull request #194036 from gloaming/polkit-debug-logsSandro1-0/+8
2022-10-25nixos/acme: Relax syscall filter after go upgradeMartin Weinelt1-2/+2
With Go 1.19 calls to setrlimit are required for lego to run. While we could allow setrlimit alone, I think it is not unreasonable to allow @resources in general. Closes: #197513
2022-10-22nixos/pam: fix pam_tty_audit configTobias Stenzel1-6/+6
Escape the line breaks to render a valid config. Module arguments have to be at the same line or line endings have to be escaped with a backslash.
2022-10-15nixos/please: init moduleAzat Bahawi1-0/+122
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2022-10-07Merge pull request #190052 from JasonWoof/acme-exampleChristian Kögler1-5/+6
nixos/doc: fix acme dns-01 example
2022-10-06nixos/acme: Disable lego renew sleepingLucas Savva1-2/+2
Lego has a built-in mechanism for sleeping for a random amount of time before renewing a certificate. In our environment this is not only unnecessary (as our systemd timer takes care of it) but also unwanted since it slows down the execution of the systemd service encompassing it, thus also slowing down the start up of any services its depending on. Also added FixedRandomDelay to the timer for more predictability.
2022-10-06nixos/acme: Make account creds check more robustLucas Savva1-1/+2
Fixes #190493 Check if an actual key file exists. This does not completely cover the work accountHash does to ensure that a new account is registered when account related options are changed.
2022-10-06nixos/acme: Fix cert renewal with built in webserverLucas Savva1-0/+1
Fixes #191794 Lego threw a permission denied error binding to port 80. AmbientCapabilities with CAP_NET_BIND_SERVICE was required. Also added a test for this.
2022-10-02nixos/polkit: Add debug optionCraig Hall1-0/+8
2022-09-25nixos/pam: fix deprecated gnome3 referenceFabián Heredia Montiel1-1/+1
2022-09-11nixos/security/wrappers: clarify required format for capabilitiesJason Yundt1-4/+5
Before this change, the description for security.wrappers.<name>.capabilities made it seem like you could just string together the names of capabilities like this: capabilities = "CAP_SETUID,CAP_SETGID"; In reality, each item in the list must be a full-on capability clause: capabilities = "CAP_SETUID=ep,CAP_SETGID+i";
2022-09-06nixos/doc: fix acme dns-01 exampleJason Woofenden1-5/+6
Summary: fix errors with example code in the manual that shows how to set up DNS-01 verification via the acme protocol, e.g. for those who want to get wildcard certificates from Let's Encrypt. Fix syntax error in nix arrays (there should not be commas.) Fix permissions on /var/lib/secrets so it can be read by bind daemon. Without this fix bind won't start. Add the missing feature: put the generated secret into certs.secret
2022-08-31nixos/*: convert options with admonitions to MDpennae3-40/+50
rendering changes only slightly, most changes are in spacing.
2022-08-31nixos/*: md-convert hidden plaintext optionspennae1-4/+4
most of these are hidden because they're either part of a submodule that doesn't have its type rendered (eg because the submodule type is used in an either type) or because they are explicitly hidden. some of them are merely hidden from nix-doc-munge by how their option is put together.
2022-08-31nixos/*: convert internal option descriptions to MDpennae1-1/+1
we'll have to do it eventually, may as well be now.
2022-08-31nixos/*: automatically convert option descriptionspennae7-31/+31
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-31nixos/*: convert varlist-using options to MDpennae1-26/+11
there are sufficiently few variable list around, and they are sufficiently simple, that it doesn't seem helpful to add another markdown extension for them. rendering differences are small, except in the tor module: admonitions inside other blocks cannot be made to work well with mistune (and likely most other markdown processors), so those had to be shuffled a bit. we also lose paragraph breaks in the list items due to how we have to render from markdown to docbook, but once we remove docbook from the pipeline those paragraph breaks will be restored.
2022-08-31nixos/*: md-convert options with unordered listspennae2-18/+7
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-21Merge pull request #173495 from wucke13/pam-fixLassulus1-2/+2
2022-08-19nixos/*: automatically convert option docspennae1-3/+3
2022-08-19nixos/*: mark pre-existing markdown descriptions as mdDocpennae2-2/+2
2022-08-19nixos/*: use properly indented strings for option docspennae1-12/+12
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-19nixos/* eliminate inner whitespace in tags that was missed earlierpennae1-2/+1
nix-doc-munge won't match tags that contain newlines anywhere. most of these have already been removed, but a few obviously made it through.
2022-08-19nixos/*: normalize <package> to <literal>pennae1-1/+1
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-19Merge pull request #166942 from AleXoundOS/patch-1Christian Kögler1-2/+2
NixOS manual: fix ACME certificates in Nginx configuration sample
2022-08-16Merge pull request #183717 from NetaliDev/mysql-authMaximilian Bosch1-1/+29
nixos: add mysql/mariadb user authentication module
2022-08-14Merge pull request #184368 from DieracDelta/jr/wrappers-run-size-optionRobert Hensing1-1/+11
nixos/security: add size option to /run/wrappers
2022-08-14nixos/security: add size option to /run/wrappersJustin Restivo1-1/+11
2022-08-06nixos/*: automatically convert option docspennae4-23/+23
2022-08-06nixos/pam: move pam_unix to the end of the account chainNetali1-1/+4
2022-08-06nixos: add mysql/mariadb user authenticationNetali1-0/+25
2022-08-05nixos/*: normalize manpage references to single-line formpennae4-38/+13
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-03nixos/*: automatically convert option docs to MDpennae7-102/+102
once again using nix-doc-munge (https://github.com/pennae/nix-doc-munge/commit/69d080323ae27c0d8da3967c62b925a9aedb2828)
2022-08-03nixos/*: normalize link formatpennae4-30/+15
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-03nixos/*: replace <replaceable>s with «thing»pennae1-1/+1
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-03nixos/*: replace <code> in option docs with <literal>pennae3-24/+24
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-02Merge pull request #183491 from pennae/automatic-md-conversionspennae16-247/+247
treewide: automatically md-convert option descriptions
2022-08-01nixos/pam: add an option to control Kerberos PAM modulesDan Callaghan1-6/+26
Instead of enabling the PAM modules based on config.krb5.enable, introduce a new option to control the PAM modules specifically. Users may want to turn on config.krb5.enable, to get a working Kerberos client config with tools like kinit, while letting pam_sss or something else handle Kerberos password lookups.
2022-07-30treewide: automatically md-convert option descriptionspennae16-247/+247
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-27Merge pull request #182685 from pennae/invariant-option-conversionspennae2-6/+6
treewide: invariant option conversions to MD
2022-07-26Merge pull request #182379 from stigtsp/fix/pam-u2f-cueStig1-2/+2
nixos/security/pam: fix u2f options leakage
2022-07-24nixos/security: invariant option docs MD conversionspennae2-6/+6