Commit graph

1105 commits

Author SHA1 Message Date
Pol Dellaiera
a3e8ba327e
Google Authenticator 2FA support over XRDP (#407736) 2025-05-28 17:57:00 +00:00
Tristan Ross
a6c170910f
nixos/security: add landlock, yama, and bpf defaults (#407748) 2025-05-24 06:37:19 -07:00
Morgan Jones
9c1564e395
nixos/tpm2: default pkcs#11 module based on abrmd config
Since there are now variants of tpm2-pkcs11 with and without ABRMD
support (for the kernel resource manager), ensure we pick the correct
default.

Fixes an accidental backwards incompatibility with the module.
2025-05-21 01:07:34 -07:00
Antonio
8331187976 Google Authenticator 2FA support over XRDP 2025-05-17 22:43:14 +02:00
Martin Weinelt
f462e2564d
acme: Add csr option (#376334) 2025-05-17 11:24:08 +02:00
Tristan Ross
22f2e258af
nixos/security: add landlock, yama, and bpf defaults 2025-05-16 20:56:19 -07:00
C0D3 M4513R
754412b4ae
acme: Add csr option
Signed-off-by: C0D3 M4513R <28912031+C0D3-M4513R@users.noreply.github.com>
2025-05-16 11:45:54 +02:00
nixpkgs-ci[bot]
c376a565f9
Merge staging-next into staging 2025-04-24 18:04:57 +00:00
arthsmn
2c88eb3331
sudo-rs: refactor module 2025-04-23 21:31:50 -03:00
Martin Weinelt
65f179f903
apparmor: 4.0.3 -> 4.1.0, rewrite (#400430) 2025-04-23 22:34:10 +02:00
Grimmauld
5467162f9a
nixos/apparmor: transfer maintenance to team 2025-04-22 23:56:45 +02:00
Grimmauld
f8a3ea075a
nixos/apparmor: don't hardcode glibc for logprof 2025-04-22 23:48:12 +02:00
Ryan Hendrickson
317c972e8a
nixos/pam: conditional enabling of services (#399051) 2025-04-20 13:23:01 -04:00
Nico Felbinger
e0d1b49a46
chore: move meta option to top level in many modules 2025-04-19 18:27:48 +02:00
Tristan Ross
b2f0ccb56b
nixos/security: init lsm option (#395855) 2025-04-18 07:12:07 -07:00
Ryan Hendrickson
2ef165538a nixos/pam: conditional enabling of services 2025-04-15 23:19:42 -04:00
Tristan Ross
6fb5b22821
nixos/apparmor: use security.lsm option 2025-04-14 23:06:54 -07:00
Tristan Ross
b8402295a4
nixos/security: init lsm option 2025-04-14 23:06:51 -07:00
Arne Keller
0bd982a343
agnos: init at 0.1.0, nixos/agnos: init (#351678) 2025-04-07 16:21:00 +02:00
Justinas Stankevicius
7757648f82 nixos/agnos: init 2025-04-06 19:53:26 +03:00
azahi
5f25aceff5
treewide: remove azahi from maintainers 2025-04-06 15:09:19 +03:00
Silvan Mosberger
374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
h7x4
ab0564bd10
treewide: add documentation for nixos systemd units 2025-03-12 18:00:38 +01:00
h7x4
405054ead6
nixos/kerberos_server: add the "get-keys" ACL permission (#337306) 2025-03-11 14:51:02 +01:00
Sandro
74ee058fc3
nixos/sudo-rs: align sudo and sudo-rs config (#386423) 2025-03-10 16:51:43 +01:00
shelvacu
1a4575f9db
nixos/modules: Add security.pki.caBundle option and make all services use it for CA bundles (#352244)
Previously some modules used `config.environment.etc."ssl/certs/ca-certificates.crt".source`, some used `"/etc/ssl/certs/ca-certificates.crt"`, and some used `"${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"`. These were all bad in one way or another:

- `config.environment.etc."ssl/certs/ca-certificates.crt".source` relies on `source` being set; if `text` is set instead this breaks, introducing a weird undocumented requirement
- `"/etc/ssl/certs/ca-certificates.crt"` is probably okay but very un-nix. It's a magic string, and the path doesn't change when the file changes (and so you can't trigger service reloads, for example, when the contents change in a new system activation)
- `"${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"` silently doesn't include the options from `security.pki`

Co-authored-by: Shelvacu <git@shelvacu.com>
2025-03-08 08:41:08 +00:00
r-vdp
4e17c9546f
nixos/sudo-rs: align sudo and sudo-rs config
Since the latest release, sudo-rs supports all what we need
2025-03-02 17:42:18 +01:00
K900
b157c03c40
nixos/tests/acme: Refactor test suite (#378705) 2025-02-26 10:29:20 +03:00
K900
62b5275700
nixos/acme: Refactor setup process (#355087) 2025-02-26 10:29:09 +03:00
Lucas Savva
229640ed3a nixos/tests/acme: Refactor test suite
Split tests up based on certain use cases:

- http01-builtin: Tests most functionality of the core module, such
 as the systemd and hashing components, whilst utilising lego's built
 in http01 resolution mechanis.
- dns01: Tests only that DNS01 renewal works as expected.
- nginx: Tests nginx compatability
- httpd: Tests httpd compatability
- caddy: Tests caddy compatability
2025-02-22 23:58:29 +00:00
Lucas Savva
84af416af6 nixos/acme: Refactor setup process
Over time, we added a lot of setup services to the ACME module, namely:

- acme-selfsigned-ca.service: Creates the selfsigned CA certificates
 used to generate selfsigned certs for each configured cert.
- acme-fixperms.service: Ensures permissions correctness on certs after
 system configuration changes.
- acme-lockfiles.service: Create lockfiles used to implement
 maxConcurrentRenewals.

These numerous setup services complicated the dependency chain for any
cert renewal, and also made it difficult to track responsibility for
specific setup steps, for example, creating /var/lib/acme or setting
permissions of shared folders.

This change proposes a new acme-setup.service which encapsulates the
functionality of the previous 3 services into one. The service is still
defined in 3 separate chunks (using lib.mkMerge) which allows us to
keep a logical separation between each step and preserve some
optionality in the features.

The result is a generally simplified definition of systemd unit
dependencies and an obvious entrypoint for future setup extensions.
2025-02-22 21:14:56 +00:00
Maximilian Bosch
dda82d9eef
Merge: nixos/acme: fix account creation service ordering (#355054) 2025-02-19 21:17:41 +01:00
Nessdoor
f500ae084a nixos/kerberos_server: disallow combining "all" with policies != "get-keys" 2025-02-14 19:47:14 +01:00
Nessdoor
00a8c125b0 nixos/kerberos_server: add the "get-keys" ACL permission 2025-02-13 02:18:18 +01:00
Aleksana
ece0ac9a7f
nixos/wrappers: add per-wrapper enable option (#376196) 2025-02-12 20:02:52 +08:00
Aleksana
9f741786ca
docs: removed internal security.wrapperDir (#376606) 2025-02-12 11:06:39 +08:00
Peder Bergebakken Sundt
953f72e76e nixos/*: tag manpage references 2025-01-27 02:47:01 +01:00
Andrew Voynov
d62ea22c2b
docs: removed internal security.wrapperDir 2025-01-25 10:30:16 +03:00
Patrick Steinhardt
d267ea8717 nixos/wrappers: add per-wrapper enable option
While it is possible to globally enable or disable security wrappers, it
isn't possible to disable only a subset of them. Consequently, users
will have to overwrite the security wrappers completely and re-add the
desired subset in case they want to disable a subset of those set up by
the NixOS modules.

Address this usecase by adding a new per-wrapper enable option.
2025-01-23 19:56:06 +01:00
Nick Cao
885e9e8474
nixos/pam: update u2f authfile description (#371381) 2025-01-15 09:45:25 -05:00
Aaron Andersen
b6fe803517
nixos/pam: fixup refactor 2025-01-08 17:51:22 -05:00
oluceps
03b400b595
nixos/pam: update u2f authfile description 2025-01-06 17:57:51 +08:00
K900
764be63348
nixos/acme: fix cert ownership assert message (#362271) 2024-12-18 10:49:58 +03:00
Grimmauld
e87b9b1f3e
nixos/apparmor: profile activation tristate and profile path support 2024-12-16 15:32:42 +01:00
Grimmauld
4d07e306ad
nixos/apparmor: Format 2024-12-16 15:31:30 +01:00
nicoo
f6c5531461
nixos: Don't set !allowSubstitutes (#314664)
It is set by `runCommandLocal` and prevents fetching the build output
from `cache.nixos.org` or another trusted substituter.
2024-12-12 18:26:24 +00:00
Arne Keller
1a0bc2c68d
nixos/rtkit: Add option for rtkit-daemon command-line args (#299696) 2024-12-11 23:00:50 +01:00
Bjørn Forsman
886de305c8 nixos/rtkit: mention pipewire in docstring
I don't know the reason for rtkit only getting enabled by
hardware.pulseaudio.enable and not services.pipewire.enable, as they
both use it to get real-time priority, but we can at least help users by
mentioning pipewire in the rtkit option.
2024-12-11 20:52:13 +01:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Felix Buehler
5c7e172a28 nixos/security.sudo: remove with lib; 2024-12-08 13:21:49 +01:00