Commit graph

230 commits

Author SHA1 Message Date
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
Arne Keller
d7a2a10a40
graylog-5_1: remove (#358780) 2025-03-16 15:45:23 +01:00
jopejoe1
dca7e827b3
nixos: Replace custom cfg format handling with pkgs.formats (#314933) 2025-03-14 21:08:14 +01:00
Izorkin
01e8036a98
logrotate: allow access to unix socket 2025-03-06 10:41:49 +03:00
Peder Bergebakken Sundt
953f72e76e nixos/*: tag manpage references 2025-01-27 02:47:01 +01:00
Benno Bielmeier
36c0d740c6 nixos/graylog: change default package version to 6.0 2025-01-15 12:53:34 +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
nicoo
94b7b469aa nixos/promtail: Replace custom jq-based runCommand with pkgs.formats 2024-12-04 20:50:45 +00:00
Izorkin
a7c8d553ae
nixos/logrotate: allow change mode of a file 2024-11-26 18:55:41 +03:00
Yt
c0c77416ac
vector: fix service using pkgs.vector regardless package option (#354316) 2024-11-11 19:09:22 -05:00
Jenny
8db885974b
nixos/promtail: configFile for passing path as config (#322426) 2024-11-08 08:58:33 +01:00
KX
518bc9c5b3 nixos/promtail: configFile for passing path as config 2024-11-07 22:53:22 +01:00
jonboh
f81a2c1514 fix: use selected package instead of pkgs.vector 2024-11-07 21:24:21 +01:00
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