Commit Graph

41 Commits

Author SHA1 Message Date
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
Franz Pletz
35c015ff91
nixos/ntpd-rs: fix metrics service 2024-01-17 15:06:20 +01:00
Franz Pletz
9707745cf8
nixos/ntpd-rs: init 2024-01-14 17:34:42 +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
Adrian Pistol
b30601bba2 nixos/chrony: Add missing rtcsync assertion.
Due to a lot of rebasing, I dropped my added assertion in #259405. This is important.
2023-11-19 09:08:26 -06:00
Adrian Pistol
7a1d45811e nixos/chrony: Let Chrony control/track RTC drift 2023-11-15 15:09:22 -06: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
Franz Pletz
c13c1412bf
nixos/chrony: add enableMemoryLocking option
Fixes #222629.
2023-08-10 03:03:53 +02:00
Ben Wolsieffer
b92dae961c nixos/chrony: allow @chown syscall set
The module was allowing specific chown syscalls, which is brittle because
there are several and different ones are used by glibc on different
architectures. For example, fchownat was already added to the allowlist for
aarch64, while on armv6l chrony crashes because chown32 is not in the
allowlist.

systemd provides the @chown syscall set, which includes all the chown
syscalls and avoids this brittleness. I believe the syscalls would all be
equivalent from an attacker's perspective, so there is unlikely to be any
security impact.
2023-03-12 18:10:56 -05:00
Izorkin
59dbe319ce nixos/gitea: update SystemCallFilter 2023-01-31 10:08:32 -06:00
Izorkin
48ecda0962 nixos/chrony: disable PrivateDevices setting 2023-01-31 10:08:32 -06:00
Izorkin
b943fb24b7 chrony: update sandboxing options 2023-01-03 07:04:55 -06:00
Artturin
f4ea1208ec treewide: *Flags convert to list from str
*Flags implies a list

slightly relevant:
> stdenv: start deprecating non-list configureFlags https://github.com/NixOS/nixpkgs/pull/173172

the makeInstalledTests function in `nixos/tests/installed-tests/default.nix` isn't available outside of nixpkgs so
it's not a breaking change
2022-10-10 15:30:59 +03: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
pennae
61e93df189 nixos/*: automatically convert option docs to MD
once again using nix-doc-munge (69d080323a)
2022-08-03 22:46:41 +02:00
pennae
694d5b19d3 nixos/*: replace </para><para> with double linebreaks
our xslt already replaces double line breaks with a paragraph close and
reopen. not using explicit para tags lets nix-doc-munge convert more
descriptions losslessly.

only whitespace changes to generated documents, except for two
strongswan options gaining paragraph two breaks they arguably should've
had anyway.
2022-08-03 20:39:21 +02:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
pennae
2512455639 nixos/*: add trivial defaultText for options with simple defaults 2021-12-02 22:35:04 +01:00
Naïm Favier
2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
Guillaume Girol
615db90f3d nixos/openntpd, nixos/ntp: define group, fix after #133166 2021-09-18 14:42:08 +02:00
Martin Weinelt
611bc7c23b
Merge pull request #111692 from lopsided98/chrony-initstepslew-types
nixos/chrony: split the initstepslew attrset into options
2021-08-08 15:03:06 +02:00
Poscat
6e3cecf1f7
nixos/chrony: wait for dns services to start up before starting 2021-08-06 21:03:55 +08:00
Ben Wolsieffer
6f4e6cd819 nixos/chrony: split the initstepslew attrset into options
Add explicit options for initstepslew.enabled and initstepslew.threshold, rather
than using an attrset.
2021-02-02 19:26:47 -05:00
Fritz Otlinghaus
31345193f0
nixos/chrony: add types 2021-01-24 13:50:35 +01:00
Anderson Torres
0f31f03f22
Merge pull request #108578 from ctem/feature/chrony
nixos/chrony: add support for Network Time Security (NTS) authentication
2021-01-22 09:36:08 -03:00
Scriptkiddi
1572940688
networking, chrony, ntpd, timesyncd: add timeServers option type 2021-01-20 10:54:24 +01:00
Ctem
54778551d6
nixos/chrony: add option to change package 2021-01-06 20:05:05 +09:00
Ctem
2aec205bd2
nixos/chrony: add option to change state directory 2021-01-06 20:04:50 +09:00
Ctem
2e131e1f45
nixos/chrony: add option to choose between two commonly used server directive options 2021-01-06 20:04:41 +09:00
Ctem
9550d865e9
nixos/chrony: add option to enable NTS authentication 2021-01-06 20:04:20 +09:00
Ricardo M. Correia
48f8b85e1c nixos/chrony: fix owner of chrony drift file
It had become owned by root due to #97546.
2020-11-02 21:41:49 +01:00
Kevin Cox
57b9d5c144
chrony: Create state directory with correct owner.
Fixes https://github.com/NixOS/nixpkgs/issues/97546
2020-09-09 15:48:48 -04:00
Dominik Xaver Hörl
0412bde942 treewide: add bool type to enable options, or make use of mkEnableOption
Add missing type information to manually specified enable options or replace them by mkEnableOption where appropriate.
2020-04-21 08:55:36 +02:00
Florian Klink
f25a301a0a nixos/chrony: move to StateDirectory and tmpfiles.d 2020-04-03 00:34:18 +02:00
adisbladis
63c35a9c28
services.ntpd: Add extraConfig parameter 2020-03-12 14:44:59 +00:00
rnhmjoj
1d61efb7f1 treewide: use attrs instead of list for types.loaOf options 2020-01-06 10:39:18 -05:00
Austin Seipp
5a1ae55bbc nixos/chrony: keep in foreground
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-09-12 11:45:51 -05:00
Austin Seipp
b8bda8cb4f nixos/chrony: remove redundant 'initstepslew.servers' option
This option was added in 6336048c58 but it
is essentially a complete duplicate of the existing cfg.servers and
there seems to be no reason to keep maintaining it.

Furthermore, it requires annoying duplication if you try to do option
merging, e.g. merging in sets into your configuration.nix that add
`services.chrony.initstepslew` options will overwrite the servers option
unless you keep it, but that means you just have to duplicate
config.networking.timeServers again anyway which is an implementation
detail!

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-09-12 11:45:51 -05:00
Austin Seipp
83180ea41f nixos/chrony: set iburst for ntp servers
'iburst' allows chrony to make very quick adjustments to the clock by
doing a couple rapid measurements outside of the default 'minpoll'
option. This helps improve rapid time adjustment at boot, and is enabled
by default.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-09-12 11:45:51 -05:00
Austin Seipp
f0ad5ebdfb nixos/{chrony,ntpd,openntpd}: add myself as maintainer
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-09-12 11:45:51 -05:00
Austin Seipp
a61e94329f nixos: shuffle all ntp services into their own dir
This is reckless, ill-advised, pointless, and I will be scorned for it,
but it makes me feel a lot better.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-09-12 11:45:51 -05:00