Commit Graph

217 Commits

Author SHA1 Message Date
Martin Weinelt
4ca03e3a11
nixos/logrotate: allow sending signal to arbitrary processes
Various postrotate scripts send e.g. SIGHUP to processes, to have them
reload their config or reopen their logfile.
2024-09-30 13:30:38 +02:00
Martin Weinelt
2dabc4fce1
nixos/logrotate: reorder setuid syscall group
Relevant parts of @setuid are in @privileged, so we need to flip the
order around, to grant @setuid in spite of denying @privileged.
2024-09-30 13:26:14 +02:00
Martin Weinelt
d3e0a89ca6
nixos/logrotate: relax hardening
The previous hardening change restricted the unit too much, breaking
legitimate functionality of logrotate.

Unfortunately this was not covered by our NixOS test.
2024-09-29 12:29:19 +02:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Martin Weinelt
01d0b0b683
nixos/logrotate: harden systemd unit
Logrotate is a service that runs as root and moves logfiles around while
keeping ownership of these files intact. This means we can and should
severely limit the scope of what can be done during its runtime.
2024-09-09 02:53:36 +02:00
Felix Buehler
28072b63dd nixos/services.vector: remove with lib; 2024-08-30 00:30:58 +02:00
Felix Buehler
640892113a nixos/services.ulogd: remove with lib; 2024-08-30 00:30:58 +02:00
Felix Buehler
12cf354b83 nixos/services.syslogd: remove with lib; 2024-08-30 00:30:57 +02:00
Felix Buehler
b14d3ec28f nixos/services.syslog-ng: remove with lib; 2024-08-30 00:30:57 +02:00
Felix Buehler
bb1483bbc6 nixos/services.rsyslogd: remove with lib; 2024-08-30 00:30:57 +02:00
Felix Buehler
5b61b70082 nixos/services.logstash: remove with lib; 2024-08-30 00:30:57 +02:00
Felix Buehler
5ba36926e6 nixos/services.logrotate: remove with lib; 2024-08-30 00:30:57 +02:00
Felix Buehler
e3a59fb4ac nixos/services.logcheck: remove with lib; 2024-08-30 00:30:56 +02:00
Felix Buehler
5bc3fb4949 nixos/services.journalwatch: remove with lib; 2024-08-30 00:30:56 +02:00
Felix Buehler
0470d7f52f nixos/services.journalbeat: remove with lib; 2024-08-30 00:30:56 +02:00
Felix Buehler
d0885b12f2 nixos/services.heartbeat: remove with lib; 2024-08-30 00:30:56 +02:00
Felix Buehler
83ed6b4d3b nixos/services.graylog: remove with lib; 2024-08-30 00:30:56 +02:00
Felix Buehler
4e0ba37569 nixos/services.fluentd: remove with lib; 2024-08-30 00:30:55 +02:00
Felix Buehler
e2a2735d4d nixos/services.awstats: remove with lib; 2024-08-30 00:30:55 +02:00
Felix Buehler
d9a644373a nixos/services.SystemdJournal2Gelf: remove with lib; 2024-08-30 00:30:55 +02:00
Benno Bielmeier
ed904c256f nixos/graylog: add option dataDir
in order to use this nixos module with Graylog 6.0, in which

> the default value for the data_dir configuration option has been
> removed and must be specified in graylog.conf [1].
> -- https://go2docs.graylog.org/current/upgrading_graylog/upgrading_to_graylog_6.0.x.htm

The value set by default is the same as before introducing this option.
See also [1,2]

[1]: https://go2docs.graylog.org/current/setting_up_graylog/server.conf.html
[2]: https://go2docs.graylog.org/5-2/setting_up_graylog/server.conf.html
2024-07-05 01:49:12 +02:00
éclairevoyant
04548e7e1f
nixos/journalwatch: add package option 2024-05-24 19:11:54 -04:00
Pol Dellaiera
c88c954f81
Merge pull request #308335 from bbigras/promtail
nixos/promtail: check-syntax in preStart
2024-05-03 13:28:09 +02:00
Bruno Bigras
7666eadc69 nixos/promtail: check-syntax in preStart
Co-authored-by: Pol Dellaiera <pol.dellaiera@protonmail.com>
2024-05-01 21:18:28 -04:00
Birk
8b35a7cd18
nixos/logrotate: typo in option name fixed (#307788) 2024-05-01 22:45:45 +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
Leona Maroni
40d8229671
Merge pull request #302203 from flyingcircusio/logrotate-docs-priority
nixos/logrotate docs: clarify settings
2024-04-09 20:47:59 +02:00
Bjørn Forsman
a29010fe79 nixos: improve many 'enable' descriptions 2024-04-09 07:10:17 +02:00
Oliver Schmidt
694bef76b9 nixos/logrotate docs: clarify settings
I found the description text of the freeform settings a bit unclear
regarding the priority and ordering of sections:
It was not immediately clear to me that the `priority` was a NixOS
module-level sub option instead of a logrotate-native configuration
directive.

To clarify this, I extend the examples and higlight `priority` as a
module option.
2024-04-07 00:23:39 +02:00
Jade Lovelace
6c5ab28fce nixos: fix a bunch of services missing dep on network-online.target
This was done by generating a truly hilarious configuration:

rg 'services\.[^.]+\.enable\t' opts-tags | cut -f1 > allonconfig.nix

The following were not tested due to other evaluation errors. They
should probably be manually audited.
services.amule
services.castopod
services.ceph
services.chatgpt-retrieval-plugin
services.clamsmtp
services.clight
services.dante
services.dex
services.discourse
services.dwm-status
services.engelsystem
services.foundationdb
services.frigate
services.frp
services.grocy
services.guacamole-client
services.hedgedoc
services.home-assistant
services.honk
services.imaginary
services.jitsi-meet
services.kerberos_server
services.limesurvey
services.mastodon
services.mediawiki
services.mobilizon
services.moodle
services.mosquitto
services.nextcloud
services.nullmailer
services.patroni
services.pfix-srsd
services.pgpkeyserver-lite
services.postfixadmin
services.roundcube
services.schleuder
services.self-deploy
services.slskd
services.spacecookie
services.statsd
services.step-ca
services.sympa
services.tsmBackup
services.vdirsyncer
services.vikunja
services.yandex-disk
services.zabbixWeb
2024-01-19 00:11:34 -08:00
nikstur
e96cd172fb nixos/logcheck: replace activationScript via tmpfiles 2023-12-29 03:16:03 +01:00
Vincent Haupert
44522d8478 nixos/vector: align service restart policy with upstream
Restart vector 5 times within 10s on exit. The upstream systemd unit
uses the same values.
2023-12-06 19:15:11 +00:00
h7x4
79d3d59f58
treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +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
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
Adrian Pistol
1916a0cb9e syslogng: clean up build 2023-10-18 17:51:04 +02:00
Philippe Hürlimann
7ae1eab886 ulogd: add support for multiple logging stacks
fixes #244469
2023-09-18 00:16:54 +02:00
ajs124
6de832b0e5 nixos/logrotate: add extraArgs option 2023-09-05 16:04:07 +02:00
Isa
bd50b5fcf5 graylog-5_1: init at 5.1.4 2023-08-07 19:49:48 +02:00
K900
d5c292af6b
Merge pull request #197524 from f2k1de/graylog4
graylog: init at 4.0.8, 4.3.9, 5.0.2
2023-05-15 19:42:04 +03:00
Isa
c7629a78b7 graylog: let the user decide which version of graylog to use 2023-05-12 20:43:03 +02:00
Kai Norman Clasen
8989ea2778 nixos/vector: add package Option 2023-05-11 19:44:50 +02:00
happysalada
2909d9b117 vector: 0.28.1 -> 0.29.1 2023-04-28 18:58:41 -04:00
Felix Buehler
327b0cff7a treewide: use more lib.optionalString 2023-04-07 13:38:33 +02:00
Bruno Bigras
022436c47b nixos/logrotate: fix typo 2023-03-23 16:09:47 -04:00
Philippe Hürlimann
bcbedfeefc nixos/ulogd: init
Heavily based on original work by xvuko

Co-authored-by: xvuko <nix@vuko.pl>
2022-12-28 00:17:28 +01:00
figsoda
6bb0dbf91f nixos: fix typos 2022-12-17 19:31:14 -05:00
Daniel Nagy
b4674b39c1
treewide: use mkEnableOption in nixos modules 2022-11-10 09:30:00 +01:00
Dominique Martinet
665d896244 logrotate: add services.logrotate.settings example 2022-11-05 10:34:04 +09:00
Dominique Martinet
01ff1dd23f logrotate service: cleanup deprecated options 2022-11-05 10:34:03 +09:00