1319 Commits

Author SHA1 Message Date
nikstur
9841bd4eb6 nixos/security/wrappers: add more context to enableWrappers description (#527948) 2026-06-04 17:28:01 +00:00
nikstur
f59623d121 nixos/security/wrappers: add more context to enableWrappers description 2026-06-04 15:25:23 +02:00
Jennifer Graul
f5df55072b nixos/pam_mount: migrate to fuse3
Part of #526161
2026-06-01 17:01:36 +02:00
zowoq
1dfd9599a9 nixos/dhparams: remove (#524658) 2026-05-31 02:04:24 +00:00
adisbladis
4eb838f5d2 nixos/pam: Refactor with an eye for performance
This moves up some variables in scope, changes iteration patterns & and eliminates use of `lib.pipe`.
2026-05-28 14:30:14 +12:00
Martin Weinelt
94a36f74d0 nixos/dhparams: remove
This module was deprecated in 26.05 and is being removed in 26.11.

Generating your own dhparams has been obsoleted by RFC 7919 (2016).

DHE itself has been obsoleted by ECHDE (RFC8422, 2018) and Hybrid PQ
(draft-ietf-tls-ecdhe-mlkem, 2026) key exchanges.

TLS 1.3 (RFC8446, 2018) stopped defining any DHE cipher suites and lists
this as a major difference from TLS 1.2.
2026-05-27 03:19:26 +02:00
dram
42de2da71a Revert "nixos/security: warn if wrappers are disabled and wrappers are defined" 2026-05-26 22:40:17 +08:00
dram
eae2be7609 nixos/security: warn if wrappers are disabled and wrappers are defined (#519464) 2026-05-21 07:50:57 +00:00
Alyssa Ross
9488f36f15 nixos/i18n: fix eval for non-glibc systems (e.g. musl) (#514825) 2026-05-18 09:42:55 +00:00
znmz
ff1f398de0 treewide: fix typos in all markdown files 2026-05-17 13:02:47 +03:00
Martin Weinelt
8eff708f20 nixos/acme: improve webroot handling (#510615) 2026-05-13 13:59:17 +00:00
Doron Behar
a881ed82b6 nixos/security: assert normal users are disabled with wrappers 2026-05-13 12:40:55 +03:00
Doron Behar
993a731a57 nixos/security: warn if wrappers are disabled and wrappers are defined
Fixes #518955.
2026-05-12 18:51:01 +03:00
Colin
cce4239d68 nixos/i18n: fix eval for non-glibc systems (e.g. musl)
`pkgs.glibcLocales` is null for musl systems, so
`options.i18n.glibcLocales` needs to also be nullable.
otherwise, the `.override` and subsequence path interpolations
fail for non-gnu systems.
2026-05-07 17:35:58 +00:00
Sandro
0046a994e9 nixos/pam: rename updateWtmp to lastlog.enable, add silent option (#501540) 2026-05-06 23:00:35 +00:00
andre4ik3
3b2061fddb nixos/pam: rename updateWtmp to lastlog.enable, add silent option 2026-05-05 15:09:34 +00:00
Robert Hensing
04b6aa5544 nixos/*: remove unused let bindings (#515686) 2026-05-04 13:12:07 +00:00
Oliver Schmidt
fa11a7841c nixos/dhparams: fix module name typo in warning
Follow-up to #513396
2026-05-04 15:01:25 +02:00
Michael Daniels
2e87c2f8f4 nixos/*: remove unused let bindings
Generated using deadnix (with some manual work); split from #514611.
2026-05-01 20:39:14 -04:00
Martin Weinelt
95a3a84e48 nixos/dhparams: deprecate, schedule removal
Generating your own dhparams has been obsoleted by RFC 7919 (2016).

DHE itself has been obsoleted by ECHDE (RFC8422, 2018) and Hybrid PQ
(draft-ietf-tls-ecdhe-mlkem, 2026) key exchanges.

TLS 1.3 (RFC8446, 2018) stopped defining any DHE cipher suites and lists
this as a major difference from TLS 1.2.
2026-04-25 18:10:38 +02:00
Arian van Putten
7fbd9aa057 nixos/acme: fix incorrectly using mkRenamedOptionModule in submodule (#512107) 2026-04-22 11:30:06 +00:00
Andrew Marshall
7c34ac4769 nixos/acme: fix incorrectly using mkRenamedOptionModule in submodule
Per https://github.com/NixOS/nixpkgs/issues/96006, this does not work as
expected.

The warning trace will be emitted regardless of whether the option is
set, rendering it pointless. It does not work at the top-level either
(i.e. as `"security" "acme" "defaults" "credentialsFile"`), As such,
remove it entirely.
2026-04-21 10:47:22 -04:00
Majiir Paktu
9d5a303cfb nixos/pam: filter include/substack paths from apparmor mr rules 2026-04-19 12:09:31 -04:00
Linus Heckemann
d25d639031 nixos/acme: remove scripted webroot creation
Situations where systemd-tmpfiles rules aren't applied but
acme-$name.service is rerun are quite unlikely, so it should be fine to
remove the mkdir completely.
2026-04-16 16:42:01 +02:00
Linus Heckemann
a86d6ed9b1 nixos/acme: make webroot world-readable at creation
Up to now, the webroot mechanism wasn't usable without extra steps
when the certificate was not intended for the web server. In my case,
I wanted to obtain a certificate for use in other services from a
private CA, but validate via a webroot served by nginx. The (sensibly!)
restrictive umask of acme-$name.service led to the webroot being created
with o-rx permissions, which meant that nginx could not serve the
webroot and the certificate could not be obtained.

This retains the mkdir invocation as a best-effort attempt to create the
webroot if for example the state has been cleared since systemd-tmpfiles
setup, but relies primarily on systemd-tmpfiles to create the webroots
with appropriate permissions.
2026-04-16 16:36:29 +02:00
Paul Haerle
5aa9012bb3 nixos: replace 'text' with structured PAM rules (#420889) 2026-04-14 21:22:07 +00:00
Majiir Paktu
2fb68fdb50 nixos/pam: add u2f.control option 2026-04-11 22:12:44 -04:00
Majiir Paktu
d0ea24542d nixos/pam: rename u2fAuth -> u2f.enable 2026-04-11 22:07:56 -04:00
Majiir Paktu
4b864991aa nixos: replace 'text' with structured PAM rules
Several modules define whole PAM service rule stacks by overwriting the
default value of the 'text' option. Instead, we disable useDefaultRules
for these services and declare a new set of rules using the 'rules'
option. This option is considered experimental and hidden from users,
but it is supported for use within nixpkgs.
2026-04-10 21:42:11 -04:00
Majiir Paktu
ab27ce1f96 nixos/pam: extract autoOrderRules to utils
This function is used to convert an ordered list of rules into an
attrset of rules with reasonable 'order' values. This reduces
boilerplate to define 'order' and makes it simple to switch how ordering
is managed in the future.
2026-04-10 20:55:34 -04:00
Majiir Paktu
a6144954c6 nixos/pam: add assertion for autoOrderRules 2026-04-10 20:47:24 -04:00
Majiir Paktu
6954501f53 nixos/pam: add useDefaultRules option
This option is enabled by default to preserve the current behavior when
a new service is declared. Users may disable this option to more easily
create a service without any rules. In nixpkgs, we can use this option
to eliminate usage of the 'text' option where the entire service rule
stack is replaced.
2026-04-10 20:47:24 -04:00
Majiir Paktu
e778520f71 nixos: use full path to PAM modules
PAM rules with non-absolute module paths are rejected when apparmor is
used. In general, it helps (aside from readability) for all the module
paths to be absolute, especially when the user overrides the PAM
package.
2026-04-10 20:47:24 -04:00
ChaosAttractor
c96dbd9d92 polkit: fix polkit-agent-helper@ sandbox for pam_zfs_key 2026-04-06 01:36:44 +08:00
K900
7ca0184c7b Merge remote-tracking branch 'origin/master' into staging-nixos 2026-04-02 10:10:52 +03:00
Philip Taron
f3648de497 polkit: fix polkit-agent-helper@ sandbox for pam_u2f
polkit 127 switched to socket activation with a systemd unit for
polkit-agent-helper that uses PrivateDevices=yes and ProtectHome=yes.
This breaks pam_u2f (and potentially other PAM modules that interact
with hardware), because:

- PrivateDevices=yes creates a private /dev without hidraw devices,
  so FIDO tokens are inaccessible
- ProtectHome=yes blocks reading ~/.config/Yubico/u2f_keys
- StandardError=inherit causes polkit agents to misinterpret PAM
  diagnostic output as protocol errors, resulting in tight
  re-execution loops

Fix by overriding these properties in the polkit module:
- StandardError=journal unconditionally (benefits all PAM modules)
- PrivateDevices/DeviceAllow/ProtectHome when pam_u2f is enabled

Co-authored-by: Victor Luft <victor@luft.io>
2026-04-01 16:50:18 -07:00
Edward Tjörnhammar
f4e551c350 Add PAM support to SLURM (#384285) 2026-03-28 14:34:54 +00:00
Ameer Taweel
4a1cb93b5f nixos/apparmor: fix short path literals 2026-03-25 00:02:44 +02:00
Franz Pletz
3f66adff44 nixos/acme: drop email requirement (#489983) 2026-03-22 11:53:08 +00:00
Franz Pletz
941dfcd183 nixos/acme: add compat for IP SANs to minica fallback (#479212) 2026-03-22 11:38:37 +00:00
Franz Pletz
fa020b792e nixos/acme: default to dynamic renewal days (#479209) 2026-03-22 11:36:48 +00:00
Edward Tjörnhammar
72ec3724b5 nixos/pam: add slurm_pam(_adopt) support 2026-03-14 17:20:35 +01:00
Silvan Mosberger
046203875c ci: module maintainer review requests; nixos/modules: init meta.teams (#499596) 2026-03-13 17:51:21 +00:00
Janne Heß
e91b6d2274 nixos/acme: Make the maximum jitter configurable (#479084) 2026-03-13 17:29:09 +00:00
Silvan Mosberger
b513ab8192 Reapply "ci: module maintainer review requests; nixos/modules: init meta.teams"
This reverts commit 2cc2e0225f.
2026-03-13 16:53:28 +01:00
Martin Weinelt
633ede5af6 nixos/acme: default to dynamic renewal days
With Lego since 4.25.0 instead of --days we can pass --dynamic to pick
the renewal date based on a fraction of its total validity duration.

This provides a reasonable default that accomodates varying certificate
validy durations we're going to be seeing through the profile option and
LE's plans to reduce the default validity duration in multiple steps down
to 45 days in 2028.

This changes changes the default valid duration to null to enable dynamic
renewal calculation. To that end the expiration skip function gained the
ability to calculate the total and remaining duration and to apply the
correct remainder based on the certificates total duration.
2026-03-09 23:47:12 +01:00
Adam C. Stephens
c130e17a9e nixos/shadow: use su from sudo-rs when enabled (#495216) 2026-03-07 23:27:43 +00:00
Silvan Mosberger
2cc2e0225f Revert "ci: module maintainer review requests; nixos/modules: init meta.teams" 2026-03-06 08:41:24 +01:00
Fernando Rodrigues
943ba5b1a5 ci: module maintainer review requests; nixos/modules: init meta.teams (#488014) 2026-03-06 05:21:38 +00:00
Theo
a542077c12 freeipa: Add support for subUIDs and subGIDs (#492892) 2026-03-03 17:31:19 -05:00