1347 Commits

Author SHA1 Message Date
TheRealGramdalf f993ce2ffd nixos/auditd: fix mkEnableOption description 2026-07-22 10:36:47 -07:00
Grimmauld d42da8a083 nixos/account-utils: support config file 2026-07-21 21:22:14 +02:00
Eman Resu 153dc57d16 nixos/pam: Write all pam.d config in a single derivation (#525102) 2026-07-15 13:30:10 +00:00
Grimmauld 7000a4f71f nixos/apparmor: use upstream aa-teardown 2026-07-14 12:51:12 +02:00
Salva 0b7b877e9a pam: add support for oo7 2026-07-09 23:26:38 -06:00
夜坂雅 ec51ed1449 nixos/pam/u2f: add settings.{,cue_}prompt option 2026-07-01 15:38:40 +08:00
adisbladis f072535eb2 nixos/pam: Write all pam.d config in a single derivation
Calling writeText in a loop is silly when we can use a single runCommand by passing all config as structured attrs.
2026-06-29 02:32:30 +12:00
Grimmauld 58462a7e8d nixos/apparmor: fix lsm loading order (#533428) 2026-06-25 11:00:35 +00:00
Samuel Cobb bd022e3c5a nixos/apparmor: load bpf last unconditionally 2026-06-25 08:18:54 +02:00
Aaron Andersen 6986b21e85 nixos/pam: allow disabling entirely (#512541) 2026-06-24 21:27:51 +00:00
Ilan Joselevich bf58ca65b6 nixos/acme: also allow _PATH-suffixed credential files (#534035) 2026-06-24 16:55:18 +00:00
Grimmauld ce6be70e00 nixos/account-utils: init 2026-06-24 10:50:07 +02:00
Grimmauld ad462fc106 nixos/pam: introduce enableLegacySettings option 2026-06-24 10:49:40 +02:00
Grimmauld 9af57289b3 nixos/pam: allow changing pam_unix module path 2026-06-24 10:16:01 +02:00
Grimmauld 854a752851 nixos/run0: add options for persistent authentication (#533341) 2026-06-23 09:22:31 +00:00
zimward 498aab6ea8 nixos/run0: add options for persistent authentication
Co-authored-by: Grimmauld <soeren@benjos.de>
Assisted-by: languagetool 6.6
2026-06-23 08:49:45 +02:00
Florian Klink 633f52c08e nixos/acme: remove unused symbols 2026-06-21 23:47:29 +03:00
Florian Klink 78d07871f5 nixos/acme: also allow _PATH-suffixed credential files
The acmedns backend consumes a ACME_DNS_STORAGE_PATH environment
variable.

Upstream does treat this file as mutable (if you create or delete
accounts through the CLI, it would update it. We don't do this in our
module).

But the possibility for edits is probably why they didn't go with
`ACME_DNS_CONFIG` env var for the contents (as they'd be read-only), or
a `ACME_DNS_CONFIG_FILE`. (And the fact that a
`ACME_DNS_STORAGE_PATH_FILE` env var with questionable usability exists
is due to this logic being generic for most env vars).

So instead of fighting upstream over this, let's simply make our module
assertion also accept `_PATH` suffixes for `credentialFiles`.

Fixes #344684.
2026-06-21 23:47:29 +03:00
Grimmauld 471ac28cfa nixos/polkit: add RFC42 settings (#532954) 2026-06-19 18:27:13 +00:00
zimward 5e0c3907aa nixos/polkit: add RFC42 settings
Assisted-by: languagetool 6.6
2026-06-19 20:16:55 +02:00
zimward d842b18bb9 nixos/polkit: adopt by zimward 2026-06-18 13:26:30 +02:00
zimward f52355045f nixos/run0: switch to run0-sudo-shim 2026-06-17 22:07:30 +02:00
zimward 2266840d7c nixos/run0: adopt by zimward, grimmauld, kuflierl 2026-06-14 20:47:38 +02:00
Martin Weinelt 517a082acc nixos/polkit: stop if changed
We concluded this is fine, because we don't require elevation while
switching generations.

Co-Authored-By: r-vdp <ramses@well-founded.dev>
Co-Authored-By: Grimmauld <Grimmauld@grimmauld.de>
2026-06-11 20:31:49 +02:00
Martin Weinelt 45d40120be nixos/security/run0: enable guard, polkit, refactor
The module now enables polkit, which run0 requires to faciliate
elevation. This warrants guarding the config by an opt-in enable toggle.

For the options that existed prior to the enable toggle we now assert
that users need to opt into the module for them to have an effect.
2026-06-11 20:31:49 +02:00
Martin Weinelt e88efa7306 nixos/polkit: make pkexec opt-in 2026-06-11 20:31:23 +02:00
Martin Weinelt 3a8b38d4ee nixos/polkit: modernize 2026-06-11 20:31:23 +02:00
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
Sam Pointon 2c636c7616 nixos/pam: allow disabling entirely
In containers, it can be reasonable to have no interactive logins at all 
and to run the container entirely 'lights out'. In this setting, PAM is 
dead weight, and adds considerably to container image size (mostly by 
bringing other things in to the closure). However, presently, there's no 
way to get rid of it.

This change adds the coarse tool of entirely disabling PAM. There 
_could_ be a warning or even an assertion, but I reasoned that there 
might be odd cases where it's desired - and not having PAM is not 
something that entirely disables the system, so a hard assertion feels 
wrong, and there are plenty of other ways to misconfigure a system if 
you go looking for trouble. I am also trying not to get sucked in to the 
morass of reforming pam.nix more broadly to make it less cumbersome, 
hence the coarsity of the setting.
2026-05-19 12:16:16 +01: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