Commit graph

21 commits

Author SHA1 Message Date
Aliaksandr 80f12557f5
treewide: replace "yes" else "no" usages to lib.boolToYesNo 2025-10-21 16:04:34 +03:00
Grimmauld 1a1a196664
nixos/auditd: use service to ensure directory permissions 2025-09-19 11:01:44 +02:00
Grimmauld 8dd99d547d
audit: don't install broken audit-rules.service 2025-09-19 11:00:30 +02:00
Grimmauld 7d5e1d984b
nixos/auditd: use upstream unit 2025-09-11 10:06:04 +02:00
Grimmauld f063f32450
nixos/auditd: Use new default socket path
The default path of the audisp socket was chanegd in 4ade1466f9
2025-09-11 10:05:53 +02:00
nikstur 439d68b58d nixos/audit: fix journald test
Makes the audit module responsible for setting up the audit subsystem of
the kernel. The auditd module is now only responsible for setting up the
daemon.

Enable the audit subsystem early via kernelParams.

Increase the default audit backlog limit so that it works out of the box
for a normal system.

Remove a superfluous and pointless test case.
2025-08-09 15:00:41 +02:00
Grimmauld ee774bb624
nixos/auditd: add built-in plugins (default disabled) 2025-08-03 22:19:26 +02:00
Grimmauld 2c77ad7e9e
nixos/auditd: add plugin support 2025-08-03 22:19:23 +02:00
Grimmauld 51a2caecf4
nixos/auditd: support configuring service through nix 2025-08-03 22:19:20 +02:00
nikstur 50243c5d78 nixos/auditd: align with upstream
Remove config that doesn't make senes at all or on NixOS specifically.
2025-07-30 17:26:09 +02:00
h7x4 ab0564bd10
treewide: add documentation for nixos systemd units 2025-03-12 18:00:38 +01: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
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
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
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
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
pennae ef176dcf7e nixos/*: automatically convert option descriptions
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-31 16:32:53 +02:00
Nikolay Amiantov c3865335fb auditd service: make more useful
Enable kernel audit and install userspace utilities by default.
2019-06-10 18:55:11 +03:00
Christian Albrecht 93965870a8 nixos/auditd: break ordering cycle (#27577)
auditd creates an ordering cycle by adding wantedBy = [ "basic.target" ],
because of this the job job systemd-update-utmp.service/start is deleted.

Adding unitConfig.DefaultDependencies = false; to the auditd service unbreaks the cycle.

See also #11864
2017-08-01 20:45:01 +01:00
Christian Albrecht ebaff599ba nixos/auditd: init at 2.7.6 (#27261)
#11864 Support Linux audit subsystem
Add the auditd.service as NixOS module to be able to
generate profiles from /var/log/audit/audit.log
with apparmor-utils.

auditd needs the folder /var/log/audit to be present on start
so this is generated in ExecPreStart.

auditd starts with -s nochange so that effective audit processing
is managed by the audit.service.
2017-07-09 17:59:09 +01:00