Commit graph

1150 commits

Author SHA1 Message Date
Felix Buehler 011b094cdd nixos/security.chromiumSuidSandbox: remove with lib; 2024-12-08 13:21:48 +01:00
Felix Buehler 8d0fd73946 nixos/security.pki: remove with lib; 2024-12-08 13:21:48 +01:00
Masum Reza c584da6436
Apparmor: Adopt package, nixos module and nixos tests (#359817) 2024-12-08 09:56:55 +05:30
Thomas Gerbet 6dadace420
nixos/wrapper: pass trusted argv[0] to the privileged executable (#285588) 2024-12-07 11:54:27 +01:00
Rodney Lorrimar e2139b903b
nixos/rtkit: Add option for rtkit-daemon command-line args 2024-12-06 12:43:54 +08:00
ThinkChaos 1e8e314fdb
nixos/acme: fix cert ownership assert message
Handle the case where a service has no `User` defined in the message
in addition to the assertion itself.
2024-12-05 20:38:45 -05:00
Colin ca5f6df0c2
nixos/pam: replace apparmor warnings with assertions (#332119) 2024-12-04 19:06:22 +00:00
misuzu f608d1b3bc
nixos/acme: fix cert ownership assert for string SupplementaryGroups (#356064) 2024-12-01 16:31:01 +02:00
Grimmauld ceaeeb47cb
nixos/apparmor: adopt 2024-11-29 19:38:20 +01:00
Felix Buehler 3c80b14a81 nixos/security.please: remove with lib; 2024-11-27 22:26:57 +01:00
Felix Buehler a62e66394b nixos/security.audit: remove with lib; 2024-11-27 22:26:57 +01:00
Felix Buehler 236ed7869d nixos/security.apparmor: remove with lib; 2024-11-27 22:26:57 +01:00
Franz Pletz 6473ecdc08
nixos/acme: Set /var/lib/acme permissions to 755 (#353659) 2024-11-27 14:51:32 +01:00
Malte Voos d9bf91700e nixos/acme: make address families in systemd service less restrictive
This change is to support LEGO's capability to spawn an external process that
solves the DNS-01 challenge. In particular, this enables a setup where LEGO
runs a shell script that uses nsd-control to add an appropriate zone to a
local NSD instance.
2024-11-19 01:40:59 +01:00
ThinkChaos b2e7be76ba
nixos/acme: fix cert ownership assert for string SupplementaryGroups 2024-11-14 19:19:46 -05:00
John Titor 53712fa4a1
nixos/soteria: init module 2024-11-14 23:23:20 +05:30
K900 871087c18d
nixos/acme: do not limit credentials functionality to DNS/S3 config (#348344) 2024-11-11 01:43:53 +03:00
ThinkChaos b69074099e
Merge branch 'NixOS:master' into fix/acme-account-ordering 2024-11-10 15:13:31 -05:00
ThinkChaos 2f52ab637c
nixos/acme: fix account creation service ordering
If the chosen leader was an HTTP service, then the web server would be
both before and after the server.
2024-11-09 14:29:05 -05:00
K900 0453fe2395
{apache,caddy,nginx}: not "before" ACME certs using DNS validation (#336412) 2024-11-08 18:50:28 +03:00
ThinkChaos 1bd7f1374d
nixos/acme: use non deprecated CLI flag for dnsPropagationCheck 2024-11-07 20:19:12 -05:00
ThinkChaos 3c2e82337d
nixos/web-servers: assert ACME cert access via service user and groups
Allows giving access using SupplementaryGroups.
2024-11-07 20:19:12 -05:00
Yuriy Taraday 64a6e8292a nixos/acme: Set /var/lib/acme permissions to 755
It was being created with the default home permissions of 700, and then
set to 755 at runtime by something either some script or systemd as
part of service startup.

It worked fine without sysusers, but when it's enabed with:

    systemd.sysusers.enable = true;

systemd-tmpfiles is resetting permissions on each activation, which
breaks, for example, nginx reload, because it cannot load certificates
anymore, because it doesn't have any access to `/var/lib/acme`.

Fix this by setting `homeMode = "755";` explicitely so that it's set to
the final value from the beginning.
2024-11-04 16:04:56 +01:00
github-actions[bot] a0e96c5d1c
Merge master into staging-next 2024-10-29 06:05:06 +00:00
Sandro Jäckel 1a6638aeb1
nixos/ca: fix description formatting
Right now most of the text is treated as a code block
2024-10-28 15:03:11 +01:00
Fabián Heredia Montiel 34b62f7c47 Merge remote-tracking branch 'origin/master' into staging-next 2024-10-27 16:10:56 -06:00
Aleksana a56b4f3e50
nixos/wrappers: add enable switch (#350233) 2024-10-27 18:34:01 +08:00
nikstur 7fad2c2e39 nixos/wrappers: add enable switch
Add enable switch to make it possible to disable all wrappers but then
also re-enable all at once by forcing the option to be true.

By default the wrappers are enabled and thus the default behaviour
doesn't change.
2024-10-21 14:41:17 +02:00
github-actions[bot] 8164a7aa6d
Merge master into staging-next 2024-10-21 00:14:52 +00:00
Piotr Dobrowolski 6e6fc7ca26
nixos/acme: do not limit credentials functionality to DNS/S3 config 2024-10-13 22:48:14 +02:00
github-actions[bot] 144082b47e
Merge staging-next into staging 2024-10-10 18:05:19 +00:00
Mikael Voss 7b3261b5a6
nixos/pam: Strip config in documentation and messages
config can be assumed as the options root and is therefore redundant.
2024-10-10 16:07:36 +02:00
Franz Pletz 262f0e36d5
nixos/pam: add pam_rssh support (#336609) 2024-10-10 15:11:28 +02:00
github-actions[bot] 483deb3a04
Merge staging-next into staging 2024-10-04 12:06:05 +00:00
h7x4 d783411040
nixos: improve systemd slice names (#345990) 2024-10-04 12:08:36 +02:00
github-actions[bot] ae87c79207
Merge staging-next into staging 2024-10-03 18:05:09 +00:00
Bjørn Forsman 48908e5b86 nixos: improve systemd slice names
Following
https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#Description=,
update slice names to be short, descriptive and capitalized.
2024-10-02 20:24:13 +02:00
Peder Bergebakken Sundt 3100acba08 treewide: \xc2\xa0 ->
I have no idea what this escape sequence even is, but it breaks the nix parser with cryptic errors if not used in a comment.
A friend let me know MacOS is prone to input weird spaces, not sure if that is the source.

Candidates were located and created with:

    chr="$(echo -e '\xc2\xa0')"; rg -F "$chr" -l | xe sd -F "$chr" " "

There are some examples left, most being example output from `tree` in various markdown documents, some patches which we can't really touch, and `pkgs/tools/nix/nixos-render-docs/src/tests/test_commonmark.py` which I'm not sure if should be addressed
2024-10-02 15:33:06 +02:00
oxalica f534f74249
nixos/security/wrappers: fix fuse path 2024-09-30 15:26:51 -04:00
Felix Buehler b0d554537c nixos/security.pam: remove with lib; 2024-09-15 10:43:46 +02:00
Felix Buehler c99cbe65c4 nixos/security: remove with lib; 2024-09-15 10:43:46 +02:00
Mikael Voss 972976d903
nixos/pam: add pam_rssh support 2024-09-13 13:04:39 +02:00
Peder Bergebakken Sundt c3dabc54aa
security/dhparams: shellcheck fixes (#340492) 2024-09-13 02:52:09 +02:00
phaer 37cf9cbb22
security/dhparams: shellcheck fixes 2024-09-08 12:31:15 +02:00
phaer 22794b93e0
security/acme: shellcheck fixes 2024-09-08 12:29:58 +02:00
Felix Bühler d7a108054a
nixos/security.acme: remove with lib; (#339101) 2024-09-06 00:08:41 +02:00
r-vdp 38d73e0c07
auditd: add a dependency on systemd-tmpfiles-setup
This is needed so that:
- users have been created (when using systemd-sysusers or userborn)
- /run and /var/run exist
2024-09-05 10:05:18 +02:00
Felix Buehler 03a0f9debe nixos/security.acme: remove with lib; 2024-09-05 00:28:18 +02:00
r-vdp 544c97226d
auditd: remove with lib 2024-09-04 10:00:07 +02:00
r-vdp 0cb37347c6
auditd: format with nixfmt 2024-09-04 10:00:07 +02:00
Philip Taron 117f3ceb51
treewide/nixos: remove with lib; part 1 (#335603) 2024-08-29 15:42:04 -07:00
Felix Buehler 9856183d59 nixos/security.polkit: remove with lib; 2024-08-30 00:30:38 +02:00
Felix Buehler 9dfb6b691d nixos/security.sudo-rs: remove with lib; 2024-08-30 00:10:54 +02:00
Colin 0a58f69255 nixos/pam: replace apparmor warnings with assertions
see <https://github.com/NixOS/nixpkgs/pull/314791> for details.
2024-08-25 19:43:50 +00:00
Felix Buehler e32ec19edf nixos/security.pam: remove with lib; 2024-08-22 00:19:00 +02:00
Sandro Jäckel 96790120df
nixos/pam: fix writeFile no longer taking null as an argument warning
> evaluation warning: pkgs.writeText "motd": The second argument should be a string, but it's a null instead, which is deprecated. Use `toString` to convert the value to a string first.
2024-08-09 14:20:47 +02:00
Pratham Patel 4074853391
nixos/pam: kwallet: add the forceRun option 2024-08-01 09:51:31 +05:30
Colin 7306423158
nixos/pam: fully-qualify modulePath
this ensures PAM users always get the intended version of a module when
multiple versions of the same module exist on a system.

most packages which consume `pam` and link against `libpam.so` do so only
to access its API, and not because they care about the specific
`pam_<xyz>.so` modules provided by that `pam`. but when specifying
modules by name only, PAM-capable applications may well load the
`pam_<xyz>.so` from the `pam` they were compiled against instead of the
pam declared in `security.pam.package`. by fully qualifying `modulePath`
we ensure that users can actually swap out pam modules without rebuilding
the world.
2024-07-30 23:53:58 +05:30
Colin 7511ed266c
nixos/pam: add security.pam.package option
this can be used to swap out which pam package is actually used by the
system for things like `pam_limits`, `pam_tty_audit`, etc, without forcing
a mass rebuild the way an overlay would.
2024-07-30 23:53:57 +05:30
Sigmanificient 6dd44107ac treewide: remove unused lib (and other) arguments 2024-07-26 11:18:09 +02:00
Masum Reza 13da3c09fb
Merge pull request #327499 from max-privatevoid/pam-kanidm-package-option
nixos/pam: use Kanidm's package option
2024-07-24 09:24:09 +05:30
Arian van Putten 8afba669e2 nixos/wrappers: use normal mount for /run/wrappers
We want to get rid of specialFileSystems / earlyMountScript eventually and
there is no need to run this before systemd anymore now that
the wrappers themselves are set up in a systemd unit since https://github.com/NixOS/nixpkgs/pull/263203

Also this is needed to make soft-reboot work. We want to make sure
that we remount /run/wrappers with the nosuid bit removed on soft-reboot
but because @earlyMountScript@ happens in initrd, this wouldn't happen
2024-07-20 16:07:43 +02:00
Max 1dd44eaf67 nixos/pam: use Kanidm's package option 2024-07-16 00:39:03 +02:00
novenary fcccfb9e48 nixos/pam/u2f: implement RFC0042
This module has a lot of options, so it's a good candidate for freeform
settings.
2024-07-05 17:07:02 +03:00
Jan Tojnar 1369411184 gnome-keyring: Move from gnome scope to top-level
It is on the way out.
2024-07-01 09:35:26 +02:00
Artturin 1ecc3cd35b
Merge pull request #322194 from Artturin/polkitaddpackageoption
nixos/polkit: Add package option
2024-06-26 12:42:38 +03:00
Sandro 33f83c6252
Merge pull request #316977 from eclairevoyant/fix-mkEnableOption
treewide: fix mkEnableOption usage
2024-06-25 22:42:16 +02:00
Artturin b61e0ff19b nixos/polkit: Add package option
Overlaying polkit results in a lot of rebuilds thus it makes sense to
add a package option.

Assists in using the patch needed to fix https://www.github.com/NixOS/nixpkgs/issues/18012
2024-06-24 17:55:41 +03:00
Benjamin Staffin 4530b8f72f
nixos/ipa: Lower default sssd debug_level (#310662)
debug_level 65510 (0x3f7f0) is _extremely_ verbose, far more than one
would want in normal operation.  Setting these in the default config
also makes it difficult to override in a user config.  Anyone who needs
greater verbosity can add these options to their own sssd config, or
adjust them at runtime with `sssctl debug-level`.
2024-06-22 11:31:18 -04:00
Benjamin Staffin e93ccda887
nixos/ipa: Make ipa_hostname configurable (#321588)
Some sites put hosts in domains outside of the IPA server's default
domain, so this needs to be user-configurable.  The default is to use
the system's FQDN if it is configured, otherwise fallback to the
previous default behaviour of assuming the IPA's server's domain.
2024-06-22 11:29:54 -04:00
h7x4 d8ddf6fb6d
Merge pull request #287611 from h7x4/nixos-module-fixup-kerberos-server
nixos/kerberos_server: use krb format generator, plus misc cleanup
2024-06-14 17:04:55 +02:00
éclairevoyant 7d8742da87
treewide: fix mkEnableOption usage 2024-06-14 02:41:42 -04:00
h7x4 195d155a1c
nixos/kerberos_server: use krb format generator, plus misc cleanup
- Introduce more possible options by using the krb format generator.
- Enforce package choice is using a correct package.
- Use meta attribute to decide implementation, allows for overriding the
  package.
- Make necessary changes to the format, to allow for multiple ACL files in
  heimdal.
- Add systemd target and slice for both implementations.
- Move state to `/var/lib`
- Add documentation
2024-06-08 23:29:53 +02:00
Stéphan Kochen d1f07e6382 nixos/acme: allow setting security.acme.defaults.server = null to keep old accounts directory
The accounts directory is based on the hash of the settings.

https://github.com/NixOS/nixpkgs/pull/270221 changed the  default of
security.acme.defaults.server from null to the default letsencrypt URL
however as an unwanted side effect this means the accounts directory
changes and the ACME module will create a new a new account.

This can cause issues with people using CAA records that pin the
account ID or people who have datacenter-scale NixOS deployments

We allow setting this option to null again for people who want
to keep the old account and migrate at their own leisure.

Fixes https://github.com/NixOS/nixpkgs/issues/316608

Co-authored-by: Arian van Putten <arian.vanputten@gmail.com>
2024-06-04 20:09:46 +02:00
aszlig e4bd1e8f92
nixos/confinement: Use prio 100 for RootDirectory
One of the module that already supports the systemd-confinement module
is public-inbox. However with the changes to support DynamicUser and
ProtectSystem, the module will now fail at runtime if confinement is
enabled (it's optional and you'll need to override it via another
module).

The reason is that the RootDirectory is set to /var/empty in the
public-inbox module, which doesn't work well with the InaccessiblePaths
directive we now use to support DynamicUser/ProtectSystem.

To make this issue more visible, I decided to just change the priority
of the RootDirectory option definiton the default override priority so
that whenever another different option is defined, we'll get a conflict
at evaluation time.

Signed-off-by: aszlig <aszlig@nix.build>
2024-05-13 00:40:41 +02:00
aszlig 0a9cecc35a
nixos/systemd-confinement: Make / read-only
Our more thorough parametrised tests uncovered that with the changes for
supporting DynamicUser, we now have the situation that for static users
the root directory within the confined environment is now writable for
the user in question.

This is obviously not what we want and I'd consider that a regression.
However while discussing this with @ju1m and my suggestion being to
set TemporaryFileSystem to "/" (as we had previously), they had an even
better idea[1]:

> The goal is to deny write access to / to non-root users,
>
>   * TemporaryFileSystem=/ gives us that through the ownership of / by
>     root (instead of the service's user inherited from
>     RuntimeDirectory=).
>   * ProtectSystem=strict gives us that by mounting / read-only (while
>     keeping its ownership to the service's user).
>
> To avoid the incompatibilities of TemporaryFileSystem=/ mentioned
> above, I suggest to mount / read-only in all cases with
> ReadOnlyPaths = [ "+/" ]:
>
>   ...
>
> I guess this would require at least two changes to the current tests:
>
>   1. to no longer expect root to be able to write to some paths (like
>      /bin) (at least not without first remounting / in read-write
>      mode).
>   2. to no longer expect non-root users to fail to write to certain
>      paths with a "permission denied" error code, but with a
>      "read-only file system" error code.

I like the solution with ReadOnlyPaths even more because it further
reduces the attack surface if the user is root. In chroot-only mode this
is especially useful, since if there are no other bind-mounted paths
involved in the unit configuration, the whole file system within the
confined environment is read-only.

[1]: https://github.com/NixOS/nixpkgs/pull/289593#discussion_r1586794215

Signed-off-by: aszlig <aszlig@nix.build>
2024-05-13 00:40:40 +02:00
Julien Moutinho 0a5542c766
nixos/systemd-confinement: support ProtectSystem=/DynamicUser=
See https://discourse.nixos.org/t/hardening-systemd-services/17147/14
2024-05-13 00:40:25 +02:00
Thomas Gerbet deed6fb8f3
Merge pull request #277626 from nbraud/nixos/pam/ssh-agent-auth-31611-fix
nixos/pam: Use secure default for `sshAgentAuth.authorizedKeysFiles`
2024-04-28 09:24:38 +02:00
Vir Chaudhury 4ca92fb6ec nixos/isolate: init module 2024-04-22 10:19:09 +08:00
Victor Engmark c11815167f nixos/duosec: Split mkdir mode into chmod command for clarity
As recommended by ShellCheck
<https://github.com/koalaman/shellcheck/wiki/SC2174>.
2024-04-22 01:40:55 +10:00
stuebinm 6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Bjørn Forsman a29010fe79 nixos: improve many 'enable' descriptions 2024-04-09 07:10:17 +02:00
Noah S-C 5c4858ad7b
More specific link to tag spec
Co-authored-by: Aleksana <alexander.huang.y@gmail.com>
2024-04-03 17:52:28 +01:00
Noah Santschi-Cooney 1a5acce391
nixos/sudo: update command options enum for newer sudo version
The enum of allowed command options (NOPASSWD, NOEXEC etc) had not been updated when bumping sudo version.
MAIL/NOMAIL were added in [1.8.13](https://www.sudo.ws/releases/legacy/#1.8.13), FOLLOW/NOFOLLOW were added in [1.8.15](https://www.sudo.ws/releases/legacy/#1.8.15) and INTERCEPT/NOINTERCEPT in [1.9.8](https://www.sudo.ws/releases/stable/#1.9.8)
2024-04-02 15:15:53 +01:00
Janne Heß fcc95ff817 treewide: Fix all Nix ASTs in all markdown files
This allows for correct highlighting and maybe future automatic
formatting. The AST was verified to work with nixfmt only.
2024-03-28 09:28:12 +01:00
Nick Cao cee0d0bac7
nixos/pam: use services.fprintd.package for fprintd rule 2024-03-22 20:14:49 -04:00
Adam C. Stephens b52452f8c7
Merge pull request #291951 from amarshall/zfs-pkgs-renaming
zfs: rename zfsStable -> zfs_2_2; zfsUnstable -> zfs_unstable; remove enableUnstable option in favor of package
2024-03-01 10:09:12 -05:00
K900 8be79e54c5 nixos/pam/kwallet: rename option, allow setting package 2024-02-28 18:49:33 +03:00
Andrew Marshall 2e36c49949 nixos/pam: Do not incorrectly use zfs.enableUnstable in assertion
`zfs.enableUnstable` only has an effect if `zfs.enabled = true`, so only
require `zfs.enabled` to be true here.
2024-02-27 18:46:00 -05:00
Ryan Lahfa d9e7a2a88a
Merge pull request #286857 from RaitoBezarius/cacerts
nixos/security/ca: enable support for compatibility bundles
2024-02-11 19:44:02 +01:00
Raito Bezarius 19159a2349 nixos/security/ca: enable support for compatibility bundles
Certain software stacks have no support for OpenSSL non-standard PEM format and will fail to use
our NixOS CA bundle.

For this, it is necessary to fallback on a 'compatibility' bundle which will contain no additional
trust rules.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-02-11 17:51:00 +01:00
Raito Bezarius 2d78f55438 pam_usb, nixos/pam-usb: drop
`security.pam.usb` is broken anyway and upstream has abandoned the software.
2024-02-08 02:59:45 +01:00
Sandro 4494fcaab7
nixos/acme: default to lets encrypt production URL instead of null, mention lets encrypt staging URI (#270221) 2024-02-06 01:51:09 +01:00
Alois Wohlschlager f7d21be1d3
nixos/wrapper: pass trusted argv[0] to the privileged executable
Vulnerabilities caused by argv[0] mishandling in privileged code keep coming
up, recently CVE-2021-4034 in polkit and CVE-2023-6246 in glibc. On the other
hand, legitimate handling of argv[0] is mostly limited to logging and
multiplexing different functionality depending on the basename of the link (an
example for the latter is sudo/sudoedit).
On NixOS, by far the most common source of untrusted argv[0] to privileged
processes should be the wrapper, and it is not used for multiplexing (separate
wrappers are used instead). So we always pass the path of the wrapped program
as argv[0]. Obsolete mitigations for older argv[0]-based issues are deleted.
2024-02-03 18:10:50 +01:00
Rhys Davies d102910f47
nixos/pam: Add pam_intune 2024-02-02 10:01:52 +13:00
Pierre Bourdon 3484985991
Merge pull request #285587 from edef1c/wrapper-cve-2023-6246
nixos/modules/security/wrappers: limit argv0 to 512 bytes
2024-02-01 19:18:45 +01:00
edef b4c9840652 nixos/modules/security/wrappers: limit argv0 to 512 bytes
This mitigates CVE-2023-6246, crucially without a mass-rebuild.

Change-Id: I762a0d489ade88dafd3775d54a09f555dc8c2527
2024-02-01 18:16:55 +00:00
Adam Stephens 75ec325cb9
nixos/pam: remove pam_cgfs
pam_cgfs is a cgroups-v1 pam module. Verified with upstream that
this module no longer necessary on cgroups-v2 systems.
2024-01-31 17:19:23 -05:00
éclairevoyant b43dcaf48f
nixos/acme: fix assertion for renamed option 2024-01-19 16:28:56 -05:00
mian | mian fbe9d95ed9
fix semi-colon missing 2024-01-18 16:31:54 +08:00
nicoo bd6966bc4a nixos/pam: Secure default for sshAgentAuth.authorizedKeysFiles
Closes #31611
2024-01-12 13:39:08 +00:00
Peder Bergebakken Sundt dff635f38d
Merge pull request #243169 from 2xsaiko/outgoing/krb5
nixos/krb5: cleanup, fix and RFC42-ify
2024-01-10 21:06:15 +01:00
nicoo 0e5c95035d nixos/pam: Fix use of renamed enableSSHAgentAuth option 2024-01-08 18:13:46 +00:00
Maciej Krüger b5b2f6bec4
Merge pull request #277620 from nbraud/nixos/pam/ssh-agent-auth-31611
nixos/pam: Add option for ssh-agent auth's trusted authorized_keys files
2024-01-08 17:42:02 +01:00
Maciej Krüger c931d73fba
Merge pull request #276499 from nbraud/nixos/pam/ssh-agent-auth
nixos/pam: Add assertion for SSH-agent auth
2024-01-07 13:54:27 +01:00
nicoo 2eac5106f1 nixos/sudo: Remove unused enableSSHAgentAuth let-binding 2024-01-04 17:30:09 +00:00
nicoo 9ed1423dcf nixos/pam: Warn on insecure sshAgentAuth configurations 2024-01-04 17:30:09 +00:00
nicoo 822c0a86bd nixos/pam: Add sshAgentAuth.authorizedKeysFiles option 2024-01-03 14:49:36 +00:00
nicoo a46ea51ca3 nixos/pam: Rename option enableSSHAgentAuth to sshAgentAuth.enable 2024-01-03 14:49:36 +00:00
Maciej Krüger 4f9e98905e
nixos/auditd: fix typo
Would otherwise fail with

```
       error: A definition for option `systemd.services.auditd.conflicts."[definition 1-entry 1]"' is not of type `string matching the pattern [a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)'. Definition values:
       - In `/nix/store/x2khl2yx0vz2i357x7mz5xm1kagql8ag-source/nixos/modules/security/auditd.nix': "shutdown.target "
```
2024-01-01 17:28:46 +01:00
nicoo 607679c6d3 nixos/pam: Assert that authorizedKeysFiles is non-empty when using pam_ssh_agent_auth 2023-12-30 22:19:38 +00:00
nikstur d0014a531e nixos/wrappers: order service after sysusers service 2023-12-29 03:41:45 +01:00
nikstur 65ff518a0d nixos/ipa: replace activationScript
Replaced with a dedicated systemd service.
2023-12-29 03:41:45 +01:00
nikstur c9569af3e0
Merge pull request #271326 from philiptaron/shutdown.target
treewide: depend on `shutdown.target` if `DefaultDependencies=no` in almost every case
2023-12-27 08:33:26 +01:00
Sandro Jäckel 35ca689119
nixos/wrapper: add basename of the wrapped program to the wrappers name to easily identify it
Also fix the comment with test instructions
2023-12-24 20:36:12 +01:00
nicoo 1e9e8a0db0 nixos/sudo-rs: Removed unused let-binding
Leftover from bcc2d1238a
2023-12-24 13:58:08 +00:00
Marco Rebhan 5ee94c0170
nixos/krb5: add h7x4 as maintainer 2023-12-21 11:38:22 +01:00
Marco Rebhan a4a9be35f4
nixos/krb5: add myself as maintainer for module & tests 2023-12-21 11:38:18 +01:00
Marco Rebhan fed77d1705
nixos/krb5: move to security.krb5 2023-12-21 11:35:26 +01:00
pennae 90c53f5341
Merge pull request #270224 from SuperSandro2000/patch-2
nixos/acme: add syntax highlighting to code blocks
2023-12-11 09:03:32 +01:00
Sandro 5a64fb2799
nixos/acme: add syntax highlighting to code blocks 2023-12-10 19:59:22 +01:00
Philip Taron a7a5b2eca1
nixos/suid-sgid-wrappers: ensure correct ordering w.r.t. shutdown.target 2023-11-30 15:03:56 -08:00
Philip Taron d7ab46ed87
nixos/duosec: ensure correct ordering w.r.t. shutdown.target 2023-11-30 15:02:51 -08:00
Philip Taron 407ef67228
nixos/auditd: ensure correct ordering w.r.t. shutdown.target
This looks like it's got a few other idiosyncrasies, but I'll leave it
alone for now.
2023-11-30 15:00:39 -08:00
Philip Taron 454f3cb58d
nixos/apparmor: ensure correct ordering w.r.t. shutdown.target 2023-11-30 14:57:59 -08:00
Weijia Wang feeae486de
Merge pull request #261702 from h7x4/replace-mkoption-with-mkpackageoption
treewide: use `mkPackageOption`
2023-11-30 02:49:30 +01:00
h7x4 0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
nicoo bcc2d1238a nixos/sudo-rs: Move support for pam_ssh_agent_auth(8) to PAM's NixOS module
Similar to delroth's suggestion in #262790.
2023-11-25 14:11:25 +00:00
nicoo f5d059b1f5 nixos/sudo-rs: Clarify security.sudo-rs.enable's description 2023-11-25 14:11:24 +00:00
nicoo 46aaa5be70 nixos/sudo-rs: Refactor option definitions 2023-11-25 14:11:24 +00:00
nicoo 03db94319a nixos/sudo-rs: refactor processing of cfg.extraRules 2023-11-25 14:11:24 +00:00
nicoo 9b0a63c2fe nixos/sudo-rs: Fix bug putting the wrong version of sudo in environment.systemPackages 2023-11-25 14:11:24 +00:00
nicoo 165b600f01 nixos/sudo-rs: Drop checks for sudo implementation 2023-11-25 14:11:23 +00:00
nicoo cd42b18a2c nixos/sudo-rs: uniformize ssh-agent auth behaviour with security.sudo 2023-11-25 14:11:23 +00:00
nicoo b05648b541 nixos/sudo-rs: Simplify activation 2023-11-25 14:11:23 +00:00
ners ed31e0235e treewide: replace broken udev paths with systemd 2023-11-21 15:09:38 +01:00
Léo Gaspard b1c25de57b
nixos/acme: do not eat Let's Encrypt's request limits if misconfigured on first try (#266155) 2023-11-14 20:29:50 +01:00
nicoo d5a8e667d2 nixos/sudo: Update assertion message 2023-11-14 12:25:55 +00:00
Maciej Krüger 9c61d268a7
Merge pull request #265727 from nbraud/nixos/sudo-rs/google_oslogin 2023-11-11 18:09:39 +01:00
Anthony Roussel e30f48be94
treewide: fix redirected and broken URLs
Using the script in maintainers/scripts/update-redirected-urls.sh
2023-11-11 10:49:01 +01:00
Yureka b0206f9bf9 nixos/sudo: enable by default
The default was accidentally changed to false in #262790
2023-11-10 03:30:39 +01:00
nicoo b942382216 nixos/sudo: refactor processing of cfg.extraRules 2023-11-08 19:41:39 +00:00
nicoo 1852b67bc6 nixos/sudo: Make the default rules' options configurable 2023-11-08 19:41:39 +00:00
nicoo 93011e31bd nixos/sudo: Handle root's default rule through extraRules
This makes things more uniform; moreover, users can now inject rules before this.
2023-11-08 19:41:39 +00:00
nicoo 77ed368b20 nixos/sudo: Refactor option definitions 2023-11-08 19:41:38 +00:00
nicoo 19e1420e13 nixos/sudo: Move support for pam_ssh_agent_auth(8) to PAM's NixOS module 2023-11-08 19:41:37 +00:00
nicoo 9259a8d279 nixos/google_oslogin: Handle sudo-rs too 2023-11-05 20:40:12 +00:00
nicoo ad92951579 nixos/sudo: Don't include empty sections
This makes the generated sudoers a touch easier to read.
2023-11-05 17:23:41 +00:00
Maximilian Bosch 225d785e7d
Merge pull request #263475 from nbraud/nixos/sudo-bugfix
nixos/sudo: fix `security.sudo.package`
2023-11-03 11:26:03 +01:00
Linus Heckemann 8670794565
Merge pull request #263203 from nikstur/replace-activation
Replace simple activationScripts
2023-10-28 10:17:15 +02:00