diff --git a/third_party/nixpkgs/.editorconfig b/third_party/nixpkgs/.editorconfig
index cd80125745..8d54e327b9 100644
--- a/third_party/nixpkgs/.editorconfig
+++ b/third_party/nixpkgs/.editorconfig
@@ -17,6 +17,10 @@ end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
+# We want readFile .version to return the version without a newline.
+[.version]
+insert_final_newline = false
+
# see https://nixos.org/nixpkgs/manual/#chap-conventions
# Match json/lockfiles/markdown/nix/perl/python/ruby/shell/docbook files, set indent to spaces
diff --git a/third_party/nixpkgs/.git-blame-ignore-revs b/third_party/nixpkgs/.git-blame-ignore-revs
index b7da3c84fc..219efb6e2a 100644
--- a/third_party/nixpkgs/.git-blame-ignore-revs
+++ b/third_party/nixpkgs/.git-blame-ignore-revs
@@ -102,3 +102,6 @@ fb0e5be84331188a69b3edd31679ca6576edb75a
# systemd: break too long lines of Nix code
67643f8ec84bef1482204709073e417c9f07eb87
+
+# {pkgs/development/cuda-modules,pkgs/test/cuda,pkgs/top-level/cuda-packages.nix}: reformat all CUDA files with nixfmt-rfc-style 2023-03-01
+802a1b4d3338f24cbc4efd704616654456d75a94
diff --git a/third_party/nixpkgs/.github/CODEOWNERS b/third_party/nixpkgs/.github/CODEOWNERS
index 278e11ce68..7ddc221d21 100644
--- a/third_party/nixpkgs/.github/CODEOWNERS
+++ b/third_party/nixpkgs/.github/CODEOWNERS
@@ -55,7 +55,7 @@
/pkgs/pkgs-lib/formats/hocon @h7x4
# pkgs/by-name
-/pkgs/test/nixpkgs-check-by-name @infinisil
+/pkgs/test/check-by-name @infinisil
/pkgs/by-name/README.md @infinisil
/pkgs/top-level/by-name-overlay.nix @infinisil
/.github/workflows/check-by-name.yml @infinisil
@@ -131,13 +131,13 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @raitobezarius @ma27
/pkgs/development/interpreters/python/hooks @FRidh @jonringer
# Haskell
-/doc/languages-frameworks/haskell.section.md @cdepillabout @sternenseemann @maralorn @ncfavier
-/maintainers/scripts/haskell @cdepillabout @sternenseemann @maralorn @ncfavier
-/pkgs/development/compilers/ghc @cdepillabout @sternenseemann @maralorn @ncfavier
-/pkgs/development/haskell-modules @cdepillabout @sternenseemann @maralorn @ncfavier
-/pkgs/test/haskell @cdepillabout @sternenseemann @maralorn @ncfavier
-/pkgs/top-level/release-haskell.nix @cdepillabout @sternenseemann @maralorn @ncfavier
-/pkgs/top-level/haskell-packages.nix @cdepillabout @sternenseemann @maralorn @ncfavier
+/doc/languages-frameworks/haskell.section.md @sternenseemann @maralorn @ncfavier
+/maintainers/scripts/haskell @sternenseemann @maralorn @ncfavier
+/pkgs/development/compilers/ghc @sternenseemann @maralorn @ncfavier
+/pkgs/development/haskell-modules @sternenseemann @maralorn @ncfavier
+/pkgs/test/haskell @sternenseemann @maralorn @ncfavier
+/pkgs/top-level/release-haskell.nix @sternenseemann @maralorn @ncfavier
+/pkgs/top-level/haskell-packages.nix @sternenseemann @maralorn @ncfavier
# Perl
/pkgs/development/interpreters/perl @stigtsp @zakame @dasJ
@@ -159,7 +159,6 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @raitobezarius @ma27
# C compilers
/pkgs/development/compilers/gcc
-/pkgs/development/compilers/llvm @RaitoBezarius
/pkgs/development/compilers/emscripten @raitobezarius
/doc/languages-frameworks/emscripten.section.md @raitobezarius
@@ -186,17 +185,17 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
/lib/licenses.nix @alyssais
# Qt
-/pkgs/development/libraries/qt-5 @NixOS/qt-kde
-/pkgs/development/libraries/qt-6 @NixOS/qt-kde
+/pkgs/development/libraries/qt-5 @K900 @NickCao @SuperSandro2000 @ttuegel
+/pkgs/development/libraries/qt-6 @K900 @NickCao @SuperSandro2000 @ttuegel
# KDE / Plasma 5
-/pkgs/applications/kde @NixOS/qt-kde
-/pkgs/desktops/plasma-5 @NixOS/qt-kde
-/pkgs/development/libraries/kde-frameworks @NixOS/qt-kde
+/pkgs/applications/kde @K900 @NickCao @SuperSandro2000 @ttuegel
+/pkgs/desktops/plasma-5 @K900 @NickCao @SuperSandro2000 @ttuegel
+/pkgs/development/libraries/kde-frameworks @K900 @NickCao @SuperSandro2000 @ttuegel
# KDE / Plasma 6
-/pkgs/kde @NixOS/qt-kde
-/maintainers/scripts/kde @NixOS/qt-kde
+/pkgs/kde @K900 @NickCao @SuperSandro2000 @ttuegel
+/maintainers/scripts/kde @K900 @NickCao @SuperSandro2000 @ttuegel
# PostgreSQL and related stuff
/pkgs/servers/sql/postgresql @thoughtpolice @marsam
@@ -204,10 +203,6 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
/nixos/modules/services/databases/postgresql.nix @thoughtpolice
/nixos/tests/postgresql.nix @thoughtpolice
-# Linux kernel
-/pkgs/os-specific/linux/kernel @raitobezarius
-/pkgs/top-level/linux-kernels.nix @raitobezarius
-
# Hardened profile & related modules
/nixos/modules/profiles/hardened.nix @joachifm
/nixos/modules/security/hidepid.nix @joachifm
@@ -237,10 +232,12 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
/nixos/modules/services/networking/babeld.nix @mweinelt
/nixos/modules/services/networking/kea.nix @mweinelt
/nixos/modules/services/networking/knot.nix @mweinelt
+nixos/modules/services/networking/networkmanager.nix @Janik-Haag
/nixos/modules/services/monitoring/prometheus/exporters/kea.nix @mweinelt
/nixos/tests/babeld.nix @mweinelt
/nixos/tests/kea.nix @mweinelt
/nixos/tests/knot.nix @mweinelt
+/nixos/tests/networking/* @Janik-Haag
# Web servers
/doc/packages/nginx.section.md @raitobezarius
@@ -301,7 +298,7 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
# GNOME
/pkgs/desktops/gnome @jtojnar
-/pkgs/desktops/gnome/extensions @piegamesde @jtojnar
+/pkgs/desktops/gnome/extensions @jtojnar
/pkgs/build-support/make-hardcode-gsettings-patch @jtojnar
# Cinnamon
@@ -359,3 +356,21 @@ nixos/tests/zfs.nix @raitobezarius
nixos/modules/services/continuous-integration/buildbot @Mic92 @zowoq
nixos/tests/buildbot.nix @Mic92 @zowoq
pkgs/development/tools/continuous-integration/buildbot @Mic92 @zowoq
+
+# Pretix
+pkgs/by-name/pr/pretix/ @mweinelt
+nixos/modules/services/web-apps/pretix.nix @mweinelt
+nixos/tests/web-apps/pretix.nix @mweinelt
+
+# incus/lxc/lxd
+nixos/maintainers/scripts/lxd/ @adamcstephens
+nixos/modules/virtualisation/incus.nix @adamcstephens
+nixos/modules/virtualisation/lxc* @adamcstephens
+nixos/modules/virtualisation/lxd* @adamcstephens
+nixos/tests/incus/ @adamcstephens
+nixos/tests/lxd/ @adamcstephens
+pkgs/by-name/in/incus/ @adamcstephens
+pkgs/by-name/lx/lxc* @adamcstephens
+pkgs/by-name/lx/lxd* @adamcstephens
+pkgs/os-specific/linux/lxc/ @adamcstephens
+
diff --git a/third_party/nixpkgs/.github/PULL_REQUEST_TEMPLATE.md b/third_party/nixpkgs/.github/PULL_REQUEST_TEMPLATE.md
index 40ea13f131..7b68fbd77b 100644
--- a/third_party/nixpkgs/.github/PULL_REQUEST_TEMPLATE.md
+++ b/third_party/nixpkgs/.github/PULL_REQUEST_TEMPLATE.md
@@ -19,7 +19,7 @@ For new packages please briefly describe the package or provide a link to its ho
- [ ] `sandbox = true`
- [ ] Tested, as applicable:
- [NixOS test(s)](https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests) (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
- - and/or [package tests](https://nixos.org/manual/nixpkgs/unstable/#sec-package-tests)
+ - and/or [package tests](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-tests)
- or, for functions and "core" functionality, tests in [lib/tests](https://github.com/NixOS/nixpkgs/blob/master/lib/tests) or [pkgs/test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/test)
- made sure NixOS tests are [linked](https://nixos.org/manual/nixpkgs/unstable/#ssec-nixos-tests-linking) to the relevant packages
- [ ] Tested compilation of all packages that depend on this change using `nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"`. Note: all changes have to be committed, also see [nixpkgs-review usage](https://github.com/Mic92/nixpkgs-review#usage)
@@ -38,7 +38,7 @@ Reviewing helps to reduce the average time-to-merge for everyone.
Thanks a lot if you do!
List of open PRs: https://github.com/NixOS/nixpkgs/pulls
-Reviewing guidelines: https://nixos.org/manual/nixpkgs/unstable/#chap-reviewing-contributions
+Reviewing guidelines: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#reviewing-contributions
-->
---
diff --git a/third_party/nixpkgs/.github/labeler.yml b/third_party/nixpkgs/.github/labeler.yml
index c3e834b0e7..d7adc601e5 100644
--- a/third_party/nixpkgs/.github/labeler.yml
+++ b/third_party/nixpkgs/.github/labeler.yml
@@ -1,216 +1,371 @@
"6.topic: agda":
- - doc/languages-frameworks/agda.section.md
- - nixos/tests/agda.nix
- - pkgs/build-support/agda/**/*
- - pkgs/development/libraries/agda/**/*
- - pkgs/top-level/agda-packages.nix
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/agda.section.md
+ - nixos/tests/agda.nix
+ - pkgs/build-support/agda/**/*
+ - pkgs/development/libraries/agda/**/*
+ - pkgs/top-level/agda-packages.nix
"6.topic: cinnamon":
- - pkgs/desktops/cinnamon/**/*
- - nixos/modules/services/x11/desktop-managers/cinnamon.nix
- - nixos/tests/cinnamon.nix
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - pkgs/desktops/cinnamon/**/*
+ - nixos/modules/services/x11/desktop-managers/cinnamon.nix
+ - nixos/tests/cinnamon.nix
"6.topic: emacs":
- - nixos/modules/services/editors/emacs.nix
- - nixos/modules/services/editors/emacs.xml
- - nixos/tests/emacs-daemon.nix
- - pkgs/applications/editors/emacs/elisp-packages/**/*
- - pkgs/applications/editors/emacs/**/*
- - pkgs/build-support/emacs/**/*
- - pkgs/top-level/emacs-packages.nix
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - nixos/modules/services/editors/emacs.nix
+ - nixos/modules/services/editors/emacs.xml
+ - nixos/tests/emacs-daemon.nix
+ - pkgs/applications/editors/emacs/elisp-packages/**/*
+ - pkgs/applications/editors/emacs/**/*
+ - pkgs/build-support/emacs/**/*
+ - pkgs/top-level/emacs-packages.nix
"6.topic: Enlightenment DE":
- - nixos/modules/services/x11/desktop-managers/enlightenment.nix
- - pkgs/desktops/enlightenment/**/*
- - pkgs/development/python-modules/python-efl/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - nixos/modules/services/x11/desktop-managers/enlightenment.nix
+ - pkgs/desktops/enlightenment/**/*
+ - pkgs/development/python-modules/python-efl/*
"6.topic: erlang":
- - doc/languages-frameworks/beam.section.md
- - pkgs/development/beam-modules/**/*
- - pkgs/development/interpreters/elixir/**/*
- - pkgs/development/interpreters/erlang/**/*
- - pkgs/development/tools/build-managers/rebar/**/*
- - pkgs/development/tools/build-managers/rebar3/**/*
- - pkgs/development/tools/erlang/**/*
- - pkgs/top-level/beam-packages.nix
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/beam.section.md
+ - pkgs/development/beam-modules/**/*
+ - pkgs/development/interpreters/elixir/**/*
+ - pkgs/development/interpreters/erlang/**/*
+ - pkgs/development/tools/build-managers/rebar/**/*
+ - pkgs/development/tools/build-managers/rebar3/**/*
+ - pkgs/development/tools/erlang/**/*
+ - pkgs/top-level/beam-packages.nix
"6.topic: fetch":
- - pkgs/build-support/fetch*/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - pkgs/build-support/fetch*/**/*
"6.topic: flakes":
- - '**/flake.nix'
- - lib/systems/flake-systems.nix
- - nixos/modules/config/nix-flakes.nix
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - '**/flake.nix'
+ - lib/systems/flake-systems.nix
+ - nixos/modules/config/nix-flakes.nix
"6.topic: GNOME":
- - doc/languages-frameworks/gnome.section.md
- - nixos/modules/services/desktops/gnome/**/*
- - nixos/modules/services/x11/desktop-managers/gnome.nix
- - nixos/tests/gnome-xorg.nix
- - nixos/tests/gnome.nix
- - pkgs/desktops/gnome/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/gnome.section.md
+ - nixos/modules/services/desktops/gnome/**/*
+ - nixos/modules/services/x11/desktop-managers/gnome.nix
+ - nixos/tests/gnome-xorg.nix
+ - nixos/tests/gnome.nix
+ - pkgs/desktops/gnome/**/*
"6.topic: golang":
- - doc/languages-frameworks/go.section.md
- - pkgs/build-support/go/**/*
- - pkgs/development/compilers/go/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/go.section.md
+ - pkgs/build-support/go/**/*
+ - pkgs/development/compilers/go/**/*
"6.topic: haskell":
- - doc/languages-frameworks/haskell.section.md
- - maintainers/scripts/haskell/**/*
- - pkgs/development/compilers/ghc/**/*
- - pkgs/development/haskell-modules/**/*
- - pkgs/development/tools/haskell/**/*
- - pkgs/test/haskell/**/*
- - pkgs/top-level/haskell-packages.nix
- - pkgs/top-level/release-haskell.nix
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/haskell.section.md
+ - maintainers/scripts/haskell/**/*
+ - pkgs/development/compilers/ghc/**/*
+ - pkgs/development/haskell-modules/**/*
+ - pkgs/development/tools/haskell/**/*
+ - pkgs/test/haskell/**/*
+ - pkgs/top-level/haskell-packages.nix
+ - pkgs/top-level/release-haskell.nix
+
+"6.topic: julia":
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/julia.section.md
+ - pkgs/development/compilers/julia/**/*
+ - pkgs/development/julia-modules/**/*
"6.topic: jupyter":
- - pkgs/development/python-modules/jupyter*/**/*
- - pkgs/development/python-modules/mkdocs-jupyter/*
- - nixos/modules/services/development/jupyter/**/*
- - pkgs/applications/editors/jupyter-kernels/**/*
- - pkgs/applications/editors/jupyter/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - pkgs/development/python-modules/jupyter*/**/*
+ - pkgs/development/python-modules/mkdocs-jupyter/*
+ - nixos/modules/services/development/jupyter/**/*
+ - pkgs/applications/editors/jupyter-kernels/**/*
+ - pkgs/applications/editors/jupyter/**/*
"6.topic: kernel":
- - pkgs/build-support/kernel/**/*
- - pkgs/os-specific/linux/kernel/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - pkgs/build-support/kernel/**/*
+ - pkgs/os-specific/linux/kernel/**/*
"6.topic: lib":
- - lib/**
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - lib/**
"6.topic: lua":
- - pkgs/development/interpreters/lua-5/**/*
- - pkgs/development/interpreters/luajit/**/*
- - pkgs/development/lua-modules/**/*
- - pkgs/top-level/lua-packages.nix
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - pkgs/development/tools/misc/luarocks/*
+ - pkgs/development/interpreters/lua-5/**/*
+ - pkgs/development/interpreters/luajit/**/*
+ - pkgs/development/lua-modules/**/*
+ - pkgs/top-level/lua-packages.nix
"6.topic: Lumina DE":
- - nixos/modules/services/x11/desktop-managers/lumina.nix
- - pkgs/desktops/lumina/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - nixos/modules/services/x11/desktop-managers/lumina.nix
+ - pkgs/desktops/lumina/**/*
"6.topic: LXQt":
- - nixos/modules/services/x11/desktop-managers/lxqt.nix
- - pkgs/desktops/lxqt/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - nixos/modules/services/x11/desktop-managers/lxqt.nix
+ - pkgs/desktops/lxqt/**/*
"6.topic: mate":
- - nixos/modules/services/x11/desktop-managers/mate.nix
- - nixos/tests/mate.nix
- - pkgs/desktops/mate/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - nixos/modules/services/x11/desktop-managers/mate.nix
+ - nixos/tests/mate.nix
+ - pkgs/desktops/mate/**/*
"6.topic: module system":
- - lib/modules.nix
- - lib/types.nix
- - lib/options.nix
- - lib/tests/modules.sh
- - lib/tests/modules/**
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - lib/modules.nix
+ - lib/types.nix
+ - lib/options.nix
+ - lib/tests/modules.sh
+ - lib/tests/modules/**
"6.topic: nixos":
- - nixos/**/*
- - pkgs/os-specific/linux/nixos-rebuild/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - nixos/**/*
+ - pkgs/os-specific/linux/nixos-rebuild/**/*
"6.topic: nim":
- - doc/languages-frameworks/nim.section.md
- - pkgs/development/compilers/nim/*
- - pkgs/development/nim-packages/**/*
- - pkgs/top-level/nim-packages.nix
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/nim.section.md
+ - pkgs/development/compilers/nim/*
+ - pkgs/development/nim-packages/**/*
+ - pkgs/top-level/nim-packages.nix
"6.topic: nodejs":
- - doc/languages-frameworks/javascript.section.md
- - pkgs/build-support/node/**/*
- - pkgs/development/node-packages/**/*
- - pkgs/development/tools/yarn/*
- - pkgs/development/tools/yarn2nix-moretea/**/*
- - pkgs/development/web/nodejs/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/javascript.section.md
+ - pkgs/build-support/node/**/*
+ - pkgs/development/node-packages/**/*
+ - pkgs/development/tools/yarn/*
+ - pkgs/development/tools/yarn2nix-moretea/**/*
+ - pkgs/development/web/nodejs/*
"6.topic: ocaml":
- - doc/languages-frameworks/ocaml.section.md
- - pkgs/development/compilers/ocaml/**/*
- - pkgs/development/compilers/reason/**/*
- - pkgs/development/ocaml-modules/**/*
- - pkgs/development/tools/ocaml/**/*
- - pkgs/top-level/ocaml-packages.nix
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/ocaml.section.md
+ - pkgs/development/compilers/ocaml/**/*
+ - pkgs/development/compilers/reason/**/*
+ - pkgs/development/ocaml-modules/**/*
+ - pkgs/development/tools/ocaml/**/*
+ - pkgs/top-level/ocaml-packages.nix
"6.topic: pantheon":
- - nixos/modules/services/desktops/pantheon/**/*
- - nixos/modules/services/x11/desktop-managers/pantheon.nix
- - nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix
- - nixos/tests/pantheon.nix
- - pkgs/desktops/pantheon/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - nixos/modules/services/desktops/pantheon/**/*
+ - nixos/modules/services/x11/desktop-managers/pantheon.nix
+ - nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix
+ - nixos/tests/pantheon.nix
+ - pkgs/desktops/pantheon/**/*
+
+"6.topic: php":
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/php.section.md
+ - pkgs/build-support/php/**/*
+ - pkgs/development/interpreters/php/*
+ - pkgs/development/php-packages/**/*
+ - pkgs/test/php/default.nix
+ - pkgs/top-level/php-packages.nix
"6.topic: policy discussion":
- - .github/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - .github/**/*
"6.topic: printing":
- - nixos/modules/services/printing/cupsd.nix
- - pkgs/misc/cups/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - nixos/modules/services/printing/cupsd.nix
+ - pkgs/misc/cups/**/*
"6.topic: python":
- - doc/languages-frameworks/python.section.md
- - pkgs/development/interpreters/python/**/*
- - pkgs/development/python-modules/**/*
- - pkgs/top-level/python-packages.nix
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/python.section.md
+ - pkgs/development/interpreters/python/**/*
+ - pkgs/development/python-modules/**/*
+ - pkgs/top-level/python-packages.nix
"6.topic: qt/kde":
- - doc/languages-frameworks/qt.section.md
- - nixos/modules/services/x11/desktop-managers/plasma5.nix
- - nixos/tests/plasma5.nix
- - pkgs/applications/kde/**/*
- - pkgs/desktops/plasma-5/**/*
- - pkgs/development/libraries/kde-frameworks/**/*
- - pkgs/development/libraries/qt-5/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/qt.section.md
+ - nixos/modules/services/x11/desktop-managers/plasma5.nix
+ - nixos/tests/plasma5.nix
+ - pkgs/applications/kde/**/*
+ - pkgs/desktops/plasma-5/**/*
+ - pkgs/development/libraries/kde-frameworks/**/*
+ - pkgs/development/libraries/qt-5/**/*
"6.topic: ruby":
- - doc/languages-frameworks/ruby.section.md
- - pkgs/development/interpreters/ruby/**/*
- - pkgs/development/ruby-modules/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/ruby.section.md
+ - pkgs/development/interpreters/ruby/**/*
+ - pkgs/development/ruby-modules/**/*
"6.topic: rust":
- - doc/languages-frameworks/rust.section.md
- - pkgs/build-support/rust/**/*
- - pkgs/development/compilers/rust/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/rust.section.md
+ - pkgs/build-support/rust/**/*
+ - pkgs/development/compilers/rust/**/*
"6.topic: stdenv":
- - pkgs/stdenv/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - pkgs/stdenv/**/*
"6.topic: steam":
- - pkgs/games/steam/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - pkgs/games/steam/**/*
"6.topic: systemd":
- - pkgs/os-specific/linux/systemd/**/*
- - nixos/modules/system/boot/systemd*/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - pkgs/os-specific/linux/systemd/**/*
+ - nixos/modules/system/boot/systemd*/**/*
"6.topic: TeX":
- - doc/languages-frameworks/texlive.section.md
- - pkgs/test/texlive/**
- - pkgs/tools/typesetting/tex/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/texlive.section.md
+ - pkgs/test/texlive/**
+ - pkgs/tools/typesetting/tex/**/*
+
+"6.topic: testing":
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ # NOTE: Let's keep the scope limited to test frameworks that are
+ # *developed in this repo*;
+ # - not individual tests
+ # - not packages for test frameworks
+ - nixos/lib/testing/**
+ - nixos/lib/test-driver/**
+ - nixos/tests/nixos-test-driver/**
+ - nixos/lib/testing-python.nix # legacy
+ - nixos/tests/make-test-python.nix # legacy
+ # lib/debug.nix has a test framework (runTests) but it's not the main focus
"6.topic: vim":
- - doc/languages-frameworks/vim.section.md
- - pkgs/applications/editors/vim/**/*
- - pkgs/applications/editors/vim/plugins/**/*
- - nixos/modules/programs/neovim.nix
- - pkgs/applications/editors/neovim/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/languages-frameworks/vim.section.md
+ - pkgs/applications/editors/vim/**/*
+ - pkgs/applications/editors/vim/plugins/**/*
+ - nixos/modules/programs/neovim.nix
+ - pkgs/applications/editors/neovim/**/*
"6.topic: vscode":
- - pkgs/applications/editors/vscode/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - pkgs/applications/editors/vscode/**/*
"6.topic: xfce":
- - nixos/doc/manual/configuration/xfce.xml
- - nixos/modules/services/x11/desktop-managers/xfce.nix
- - nixos/tests/xfce.nix
- - pkgs/desktops/xfce/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - nixos/doc/manual/configuration/xfce.xml
+ - nixos/modules/services/x11/desktop-managers/xfce.nix
+ - nixos/tests/xfce.nix
+ - pkgs/desktops/xfce/**/*
"6.topic: zig":
- - pkgs/development/compilers/zig/**/*
- - doc/hooks/zig.section.md
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - pkgs/development/compilers/zig/**/*
+ - doc/hooks/zig.section.md
"8.has: changelog":
- - nixos/doc/manual/release-notes/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - nixos/doc/manual/release-notes/**/*
"8.has: documentation":
- - doc/**/*
- - nixos/doc/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - doc/**/*
+ - nixos/doc/**/*
"8.has: module (update)":
- - nixos/modules/**/*
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - nixos/modules/**/*
diff --git a/third_party/nixpkgs/.github/workflows/backport.yml b/third_party/nixpkgs/.github/workflows/backport.yml
index c49eeac5a2..d4e91e6a2a 100644
--- a/third_party/nixpkgs/.github/workflows/backport.yml
+++ b/third_party/nixpkgs/.github/workflows/backport.yml
@@ -20,11 +20,11 @@ jobs:
if: github.repository_owner == 'NixOS' && github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith('backport', github.event.label.name))
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+ - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Create backport PRs
- uses: korthout/backport-action@08bafb375e6e9a9a2b53a744b987e5d81a133191 # v2.1.1
+ uses: korthout/backport-action@ef20d86abccbac3ee3a73cb2efbdc06344c390e5 # v2.5.0
with:
# Config README: https://github.com/korthout/backport-action#backport-action
copy_labels_pattern: 'severity:\ssecurity'
diff --git a/third_party/nixpkgs/.github/workflows/basic-eval.yml b/third_party/nixpkgs/.github/workflows/basic-eval.yml
index a0cd990ebc..04e74f774c 100644
--- a/third_party/nixpkgs/.github/workflows/basic-eval.yml
+++ b/third_party/nixpkgs/.github/workflows/basic-eval.yml
@@ -18,12 +18,12 @@ jobs:
runs-on: ubuntu-latest
# we don't limit this action to only NixOS repo since the checks are cheap and useful developer feedback
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- - uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
+ - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
+ - uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
- uses: cachix/cachix-action@18cf96c7c98e048e10a83abd92116114cd8504be # v14
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
# explicit list of supportedSystems is needed until aarch64-darwin becomes part of the trunk jobset
- - run: nix-build pkgs/top-level/release.nix -A tarball.nixpkgs-basic-release-checks --arg supportedSystems '[ "aarch64-darwin" "aarch64-linux" "x86_64-linux" "x86_64-darwin" ]'
+ - run: nix-build pkgs/top-level/release.nix -A release-checks --arg supportedSystems '[ "aarch64-darwin" "aarch64-linux" "x86_64-linux" "x86_64-darwin" ]'
diff --git a/third_party/nixpkgs/.github/workflows/check-by-name.yml b/third_party/nixpkgs/.github/workflows/check-by-name.yml
index 94875e67b6..bdc223e3d3 100644
--- a/third_party/nixpkgs/.github/workflows/check-by-name.yml
+++ b/third_party/nixpkgs/.github/workflows/check-by-name.yml
@@ -1,11 +1,9 @@
# Checks pkgs/by-name (see pkgs/by-name/README.md)
-# using the nixpkgs-check-by-name tool (see pkgs/test/nixpkgs-check-by-name)
+# using the nixpkgs-check-by-name tool (see https://github.com/NixOS/nixpkgs-check-by-name)
#
-# When you make changes to this workflow, also update pkgs/test/nixpkgs-check-by-name/scripts/run-local.sh adequately
+# When you make changes to this workflow, also update pkgs/test/check-by-name/run-local.sh adequately
name: Check pkgs/by-name
-# The tool is pinned to a pre-built version on Hydra,
-# see pkgs/test/nixpkgs-check-by-name/scripts/README.md
on:
# Using pull_request_target instead of pull_request avoids having to approve first time contributors
pull_request_target:
@@ -24,8 +22,7 @@ permissions:
jobs:
check:
- # This is x86_64-linux, for which the tool is always prebuilt on the nixos-* channels,
- # as specified in nixos/release-combined.nix
+ # This needs to be x86_64-linux, because we depend on the tooling being pre-built in the GitHub releases
runs-on: ubuntu-latest
# This should take 1 minute at most, but let's be generous.
# The default of 6 hours is definitely too long
@@ -87,7 +84,7 @@ jobs:
exit 1
fi
echo "mergedSha=$mergedSha" >> "$GITHUB_ENV"
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+ - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
# pull_request_target checks out the base branch by default
ref: ${{ env.mergedSha }}
@@ -98,13 +95,16 @@ jobs:
base=$(mktemp -d)
git worktree add "$base" "$(git rev-parse HEAD^1)"
echo "base=$base" >> "$GITHUB_ENV"
- - uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
+ - uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
- name: Fetching the pinned tool
- # Update the pinned version using pkgs/test/nixpkgs-check-by-name/scripts/update-pinned-tool.sh
+ # Update the pinned version using pkgs/test/check-by-name/update-pinned-tool.sh
run: |
- # Get the direct /nix/store path from the pin to avoid having to evaluate Nixpkgs
- toolPath=$(jq -r '."ci-path"' pkgs/test/nixpkgs-check-by-name/scripts/pinned-tool.json)
- # This asks the substituter for the path, which should be there because Hydra will have pre-built and pushed it
+ # The pinned version of the tooling to use
+ toolVersion=$(' -iAP nixfmt-rfc-style"
+ - name: Check that Nix files are formatted according to the RFC style
+ # Each environment variable beginning with NIX_FMT_PATHS_ is a list of
+ # paths to check with nixfmt.
+ env:
+ # Format paths related to the Nixpkgs CUDA ecosystem.
+ NIX_FMT_PATHS_CUDA: |
+ pkgs/development/cuda-modules
+ pkgs/test/cuda
+ pkgs/top-level/cuda-packages.nix
+ # Iterate over all environment variables beginning with NIX_FMT_PATHS_.
+ run: |
+ for env_var in "${!NIX_FMT_PATHS_@}"; do
+ readarray -t paths <<< "${!env_var}"
+ if [[ "${paths[*]}" == "" ]]; then
+ echo "Error: $env_var is empty."
+ exit 1
+ fi
+ echo "Checking paths: ${paths[@]}"
+ if ! nixfmt --check "${paths[@]}"; then
+ echo "Error: nixfmt failed."
+ exit 1
+ fi
+ done
diff --git a/third_party/nixpkgs/.github/workflows/editorconfig.yml b/third_party/nixpkgs/.github/workflows/editorconfig.yml
index 6b151d45be..168e5bccae 100644
--- a/third_party/nixpkgs/.github/workflows/editorconfig.yml
+++ b/third_party/nixpkgs/.github/workflows/editorconfig.yml
@@ -24,11 +24,11 @@ jobs:
- name: print list of changed files
run: |
cat "$HOME/changed_files"
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+ - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- - uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
+ - uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
with:
# nixpkgs commit is pinned so that it doesn't break
# editorconfig-checker 2.4.0
diff --git a/third_party/nixpkgs/.github/workflows/labels.yml b/third_party/nixpkgs/.github/workflows/labels.yml
index 4dc690e88b..2912e64c11 100644
--- a/third_party/nixpkgs/.github/workflows/labels.yml
+++ b/third_party/nixpkgs/.github/workflows/labels.yml
@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
if: "github.repository_owner == 'NixOS' && !contains(github.event.pull_request.title, '[skip treewide]')"
steps:
- - uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 # v4.3.0
+ - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: true
diff --git a/third_party/nixpkgs/.github/workflows/manual-nixos.yml b/third_party/nixpkgs/.github/workflows/manual-nixos.yml
index c9c2451a9d..2ad0917205 100644
--- a/third_party/nixpkgs/.github/workflows/manual-nixos.yml
+++ b/third_party/nixpkgs/.github/workflows/manual-nixos.yml
@@ -14,11 +14,11 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+ - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- - uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
+ - uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
@@ -26,6 +26,6 @@ jobs:
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci
- signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
+ authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Building NixOS manual
run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true nixos/release.nix -A manual.x86_64-linux
diff --git a/third_party/nixpkgs/.github/workflows/manual-nixpkgs.yml b/third_party/nixpkgs/.github/workflows/manual-nixpkgs.yml
index d9a425a494..b56d89eccd 100644
--- a/third_party/nixpkgs/.github/workflows/manual-nixpkgs.yml
+++ b/third_party/nixpkgs/.github/workflows/manual-nixpkgs.yml
@@ -9,17 +9,18 @@ on:
paths:
- 'doc/**'
- 'lib/**'
+ - 'pkgs/tools/nix/nixdoc/**'
jobs:
nixpkgs:
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+ - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- - uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
+ - uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
@@ -27,6 +28,6 @@ jobs:
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci
- signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
+ authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Building Nixpkgs manual
run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true pkgs/top-level/release.nix -A manual -A manual.tests
diff --git a/third_party/nixpkgs/.github/workflows/nix-parse.yml b/third_party/nixpkgs/.github/workflows/nix-parse.yml
index e625cca93c..da2e942414 100644
--- a/third_party/nixpkgs/.github/workflows/nix-parse.yml
+++ b/third_party/nixpkgs/.github/workflows/nix-parse.yml
@@ -24,12 +24,12 @@ jobs:
if [[ -s "$HOME/changed_files" ]]; then
echo "CHANGED_FILES=$HOME/changed_files" > "$GITHUB_ENV"
fi
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+ - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
if: ${{ env.CHANGED_FILES && env.CHANGED_FILES != '' }}
- - uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
+ - uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Parse all changed or added nix files
diff --git a/third_party/nixpkgs/.github/workflows/periodic-merge-24h.yml b/third_party/nixpkgs/.github/workflows/periodic-merge-24h.yml
index bd7aadfbad..6adada59c5 100644
--- a/third_party/nixpkgs/.github/workflows/periodic-merge-24h.yml
+++ b/third_party/nixpkgs/.github/workflows/periodic-merge-24h.yml
@@ -41,7 +41,7 @@ jobs:
into: staging-23.11
name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+ - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f # 1.4.0
diff --git a/third_party/nixpkgs/.github/workflows/periodic-merge-6h.yml b/third_party/nixpkgs/.github/workflows/periodic-merge-6h.yml
index 61a489ad71..6f188ee28d 100644
--- a/third_party/nixpkgs/.github/workflows/periodic-merge-6h.yml
+++ b/third_party/nixpkgs/.github/workflows/periodic-merge-6h.yml
@@ -39,7 +39,7 @@ jobs:
into: staging
name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+ - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f # 1.4.0
diff --git a/third_party/nixpkgs/.github/workflows/update-terraform-providers.yml b/third_party/nixpkgs/.github/workflows/update-terraform-providers.yml
index 108c0590d6..9b7ec5cc59 100644
--- a/third_party/nixpkgs/.github/workflows/update-terraform-providers.yml
+++ b/third_party/nixpkgs/.github/workflows/update-terraform-providers.yml
@@ -16,8 +16,8 @@ jobs:
if: github.repository_owner == 'NixOS' && github.ref == 'refs/heads/master' # ensure workflow_dispatch only runs on master
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- - uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
+ - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
+ - uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: setup
@@ -46,7 +46,7 @@ jobs:
run: |
git clean -f
- name: create PR
- uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
+ uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2
with:
body: |
Automatic update by [update-terraform-providers](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/update-terraform-providers.yml) action.
diff --git a/third_party/nixpkgs/.gitignore b/third_party/nixpkgs/.gitignore
index f0807473f0..2753c90738 100644
--- a/third_party/nixpkgs/.gitignore
+++ b/third_party/nixpkgs/.gitignore
@@ -11,12 +11,12 @@ outputs/
result-*
result
repl-result-*
+tags
!pkgs/development/python-modules/result
/doc/NEWS.html
/doc/NEWS.txt
/doc/manual.html
/doc/manual.pdf
-/result
/source/
.version-suffix
diff --git a/third_party/nixpkgs/CONTRIBUTING.md b/third_party/nixpkgs/CONTRIBUTING.md
index 115dd993ea..4b1a12362f 100644
--- a/third_party/nixpkgs/CONTRIBUTING.md
+++ b/third_party/nixpkgs/CONTRIBUTING.md
@@ -557,7 +557,7 @@ Names of files and directories should be in lowercase, with dashes between words
```nix
foo {
- arg = ...;
+ arg = <...>;
}
```
@@ -566,14 +566,14 @@ Names of files and directories should be in lowercase, with dashes between words
```nix
foo
{
- arg = ...;
+ arg = <...>;
}
```
Also fine is
```nix
- foo { arg = ...; }
+ foo { arg = <...>; }
```
if it's a short call.
@@ -581,41 +581,45 @@ Names of files and directories should be in lowercase, with dashes between words
- In attribute sets or lists that span multiple lines, the attribute names or list elements should be aligned:
```nix
- # A long list.
- list = [
- elem1
- elem2
- elem3
- ];
+ {
+ # A long list.
+ list = [
+ elem1
+ elem2
+ elem3
+ ];
- # A long attribute set.
- attrs = {
- attr1 = short_expr;
- attr2 =
- if true then big_expr else big_expr;
- };
+ # A long attribute set.
+ attrs = {
+ attr1 = short_expr;
+ attr2 =
+ if true then big_expr else big_expr;
+ };
- # Combined
- listOfAttrs = [
- {
- attr1 = 3;
- attr2 = "fff";
- }
- {
- attr1 = 5;
- attr2 = "ggg";
- }
- ];
+ # Combined
+ listOfAttrs = [
+ {
+ attr1 = 3;
+ attr2 = "fff";
+ }
+ {
+ attr1 = 5;
+ attr2 = "ggg";
+ }
+ ];
+ }
```
- Short lists or attribute sets can be written on one line:
```nix
- # A short list.
- list = [ elem1 elem2 elem3 ];
+ {
+ # A short list.
+ list = [ elem1 elem2 elem3 ];
- # A short set.
- attrs = { x = 1280; y = 1024; };
+ # A short set.
+ attrs = { x = 1280; y = 1024; };
+ }
```
- Breaking in the middle of a function argument can give hard-to-read code, like
@@ -649,7 +653,7 @@ Names of files and directories should be in lowercase, with dashes between words
```nix
{ arg1, arg2 }:
assert system == "i686-linux";
- stdenv.mkDerivation { ...
+ stdenv.mkDerivation { /* ... */ }
```
not
@@ -657,41 +661,41 @@ Names of files and directories should be in lowercase, with dashes between words
```nix
{ arg1, arg2 }:
assert system == "i686-linux";
- stdenv.mkDerivation { ...
+ stdenv.mkDerivation { /* ... */ }
```
- Function formal arguments are written as:
```nix
- { arg1, arg2, arg3 }:
+ { arg1, arg2, arg3 }: { /* ... */ }
```
but if they don't fit on one line they're written as:
```nix
{ arg1, arg2, arg3
- , arg4, ...
- , # Some comment...
- argN
- }:
+ , arg4
+ # Some comment...
+ , argN
+ }: { }
```
- Functions should list their expected arguments as precisely as possible. That is, write
```nix
- { stdenv, fetchurl, perl }: ...
+ { stdenv, fetchurl, perl }: <...>
```
instead of
```nix
- args: with args; ...
+ args: with args; <...>
```
or
```nix
- { stdenv, fetchurl, perl, ... }: ...
+ { stdenv, fetchurl, perl, ... }: <...>
```
For functions that are truly generic in the number of arguments (such as wrappers around `mkDerivation`) that have some required arguments, you should write them using an `@`-pattern:
@@ -700,7 +704,7 @@ Names of files and directories should be in lowercase, with dashes between words
{ stdenv, doCoverageAnalysis ? false, ... } @ args:
stdenv.mkDerivation (args // {
- ... if doCoverageAnalysis then "bla" else "" ...
+ foo = if doCoverageAnalysis then "bla" else "";
})
```
@@ -710,32 +714,40 @@ Names of files and directories should be in lowercase, with dashes between words
args:
args.stdenv.mkDerivation (args // {
- ... if args ? doCoverageAnalysis && args.doCoverageAnalysis then "bla" else "" ...
+ foo = if args ? doCoverageAnalysis && args.doCoverageAnalysis then "bla" else "";
})
```
- Unnecessary string conversions should be avoided. Do
```nix
- rev = version;
+ {
+ rev = version;
+ }
```
instead of
```nix
- rev = "${version}";
+ {
+ rev = "${version}";
+ }
```
- Building lists conditionally _should_ be done with `lib.optional(s)` instead of using `if cond then [ ... ] else null` or `if cond then [ ... ] else [ ]`.
```nix
- buildInputs = lib.optional stdenv.isDarwin iconv;
+ {
+ buildInputs = lib.optional stdenv.isDarwin iconv;
+ }
```
instead of
```nix
- buildInputs = if stdenv.isDarwin then [ iconv ] else null;
+ {
+ buildInputs = if stdenv.isDarwin then [ iconv ] else null;
+ }
```
As an exception, an explicit conditional expression with null can be used when fixing a important bug without triggering a mass rebuild.
diff --git a/third_party/nixpkgs/README.md b/third_party/nixpkgs/README.md
index 5e616eff2f..5e6a8c5483 100644
--- a/third_party/nixpkgs/README.md
+++ b/third_party/nixpkgs/README.md
@@ -1,9 +1,10 @@
-
-
-
-
-
+
+
+
+
+
+
@@ -13,7 +14,7 @@
[Nixpkgs](https://github.com/nixos/nixpkgs) is a collection of over
-80,000 software packages that can be installed with the
+100,000 software packages that can be installed with the
[Nix](https://nixos.org/nix/) package manager. It also implements
[NixOS](https://nixos.org/nixos/), a purely-functional Linux distribution.
@@ -28,8 +29,8 @@
* [Discourse Forum](https://discourse.nixos.org/)
* [Matrix Chat](https://matrix.to/#/#community:nixos.org)
* [NixOS Weekly](https://weekly.nixos.org/)
-* [Community-maintained wiki](https://nixos.wiki/)
-* [Community-maintained list of ways to get in touch](https://nixos.wiki/wiki/Get_In_Touch#Chat) (Discord, Telegram, IRC, etc.)
+* [Official wiki](https://wiki.nixos.org/)
+* [Community-maintained list of ways to get in touch](https://wiki.nixos.org/wiki/Get_In_Touch#Chat) (Discord, Telegram, IRC, etc.)
# Other Project Repositories
diff --git a/third_party/nixpkgs/doc/README.md b/third_party/nixpkgs/doc/README.md
index 1e9305d040..41afc090b3 100644
--- a/third_party/nixpkgs/doc/README.md
+++ b/third_party/nixpkgs/doc/README.md
@@ -106,12 +106,12 @@ This is a warning
The following are supported:
-- [`caution`](https://tdg.docbook.org/tdg/5.0/caution.html)
-- [`important`](https://tdg.docbook.org/tdg/5.0/important.html)
-- [`note`](https://tdg.docbook.org/tdg/5.0/note.html)
-- [`tip`](https://tdg.docbook.org/tdg/5.0/tip.html)
-- [`warning`](https://tdg.docbook.org/tdg/5.0/warning.html)
-- [`example`](https://tdg.docbook.org/tdg/5.0/example.html)
+- `caution`
+- `important`
+- `note`
+- `tip`
+- `warning`
+- `example`
Example admonitions require a title to work.
If you don't provide one, the manual won't be built.
diff --git a/third_party/nixpkgs/doc/anchor-use.js b/third_party/nixpkgs/doc/anchor-use.js
new file mode 100644
index 0000000000..a45c4e2be6
--- /dev/null
+++ b/third_party/nixpkgs/doc/anchor-use.js
@@ -0,0 +1,3 @@
+document.addEventListener('DOMContentLoaded', function(event) {
+ anchors.add('h1[id]:not(div.note h1, div.warning h1, div.tip h1, div.caution h1, div.important h1), h2[id]:not(div.note h2, div.warning h2, div.tip h2, div.caution h2, div.important h2), h3[id]:not(div.note h3, div.warning h3, div.tip h3, div.caution h3, div.important h3), h4[id]:not(div.note h4, div.warning h4, div.tip h4, div.caution h4, div.important h4), h5[id]:not(div.note h5, div.warning h5, div.tip h5, div.caution h5, div.important h5), h6[id]:not(div.note h6, div.warning h6, div.tip h6, div.caution h6, div.important h6)');
+});
diff --git a/third_party/nixpkgs/doc/anchor.min.js b/third_party/nixpkgs/doc/anchor.min.js
new file mode 100644
index 0000000000..00f80c058f
--- /dev/null
+++ b/third_party/nixpkgs/doc/anchor.min.js
@@ -0,0 +1,9 @@
+// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
+//
+// AnchorJS - v5.0.0 - 2023-01-18
+// https://www.bryanbraun.com/anchorjs/
+// Copyright (c) 2023 Bryan Braun; Licensed MIT
+//
+// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
+!function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(globalThis,function(){"use strict";return function(A){function u(A){A.icon=Object.prototype.hasOwnProperty.call(A,"icon")?A.icon:"",A.visible=Object.prototype.hasOwnProperty.call(A,"visible")?A.visible:"hover",A.placement=Object.prototype.hasOwnProperty.call(A,"placement")?A.placement:"right",A.ariaLabel=Object.prototype.hasOwnProperty.call(A,"ariaLabel")?A.ariaLabel:"Anchor",A.class=Object.prototype.hasOwnProperty.call(A,"class")?A.class:"",A.base=Object.prototype.hasOwnProperty.call(A,"base")?A.base:"",A.truncate=Object.prototype.hasOwnProperty.call(A,"truncate")?Math.floor(A.truncate):64,A.titleText=Object.prototype.hasOwnProperty.call(A,"titleText")?A.titleText:""}function d(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new TypeError("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],u(this.options),this.add=function(A){var e,t,o,i,n,s,a,r,l,c,h,p=[];if(u(this.options),0!==(e=d(A=A||"h2, h3, h4, h5, h6")).length){for(null===document.head.querySelector("style.anchorjs")&&((A=document.createElement("style")).className="anchorjs",A.appendChild(document.createTextNode("")),void 0===(h=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(A):document.head.insertBefore(A,h),A.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",A.sheet.cssRules.length),A.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",A.sheet.cssRules.length),A.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",A.sheet.cssRules.length),A.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',A.sheet.cssRules.length)),h=document.querySelectorAll("[id]"),t=[].map.call(h,function(A){return A.id}),i=0;i\]./()*\\\n\t\b\v\u00A0]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),A=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||A||!1}}});
+// @license-end
diff --git a/third_party/nixpkgs/doc/build-helpers/fetchers.chapter.md b/third_party/nixpkgs/doc/build-helpers/fetchers.chapter.md
index ad2378fd0e..cb37dca06d 100644
--- a/third_party/nixpkgs/doc/build-helpers/fetchers.chapter.md
+++ b/third_party/nixpkgs/doc/build-helpers/fetchers.chapter.md
@@ -1,88 +1,681 @@
# Fetchers {#chap-pkgs-fetchers}
Building software with Nix often requires downloading source code and other files from the internet.
-To this end, Nixpkgs provides *fetchers*: functions to obtain remote sources via various protocols and services.
+To this end, we use functions that we call _fetchers_, which obtain remote sources via various protocols and services.
+
+Nix provides built-in fetchers such as [`builtins.fetchTarball`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchTarball).
+Nixpkgs provides its own fetchers, which work differently:
-Nixpkgs fetchers differ from built-in fetchers such as [`builtins.fetchTarball`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchTarball):
- A built-in fetcher will download and cache files at evaluation time and produce a [store path](https://nixos.org/manual/nix/stable/glossary#gloss-store-path).
- A Nixpkgs fetcher will create a ([fixed-output](https://nixos.org/manual/nix/stable/glossary#gloss-fixed-output-derivation)) [derivation](https://nixos.org/manual/nix/stable/language/derivations), and files are downloaded at build time.
+ A Nixpkgs fetcher will create a ([fixed-output](https://nixos.org/manual/nix/stable/glossary#gloss-fixed-output-derivation)) [derivation](https://nixos.org/manual/nix/stable/glossary#gloss-derivation), and files are downloaded at build time.
- Built-in fetchers will invalidate their cache after [`tarball-ttl`](https://nixos.org/manual/nix/stable/command-ref/conf-file#conf-tarball-ttl) expires, and will require network activity to check if the cache entry is up to date.
- Nixpkgs fetchers only re-download if the specified hash changes or the store object is not otherwise available.
+ Nixpkgs fetchers only re-download if the specified hash changes or the store object is not available.
- Built-in fetchers do not use [substituters](https://nixos.org/manual/nix/stable/command-ref/conf-file#conf-substituters).
Derivations produced by Nixpkgs fetchers will use any configured binary cache transparently.
-This significantly reduces the time needed to evaluate the entirety of Nixpkgs, and allows [Hydra](https://nixos.org/hydra) to retain and re-distribute sources used by Nixpkgs in the [public binary cache](https://cache.nixos.org).
-For these reasons, built-in fetchers are not allowed in Nixpkgs source code.
+This significantly reduces the time needed to evaluate Nixpkgs, and allows [Hydra](https://nixos.org/hydra) to retain and re-distribute sources used by Nixpkgs in the [public binary cache](https://cache.nixos.org).
+For these reasons, Nix's built-in fetchers are not allowed in Nixpkgs.
-The following table shows an overview of the differences:
+The following table summarises the differences:
| Fetchers | Download | Output | Cache | Re-download when |
|-|-|-|-|-|
| `builtins.fetch*` | evaluation time | store path | `/nix/store`, `~/.cache/nix` | `tarball-ttl` expires, cache miss in `~/.cache/nix`, output store object not in local store |
| `pkgs.fetch*` | build time | derivation | `/nix/store`, substituters | output store object not available |
+:::{.tip}
+`pkgs.fetchFrom*` helpers retrieve _snapshots_ of version-controlled sources, as opposed to the entire version history, which is more efficient.
+`pkgs.fetchgit` by default also has the same behaviour, but can be changed through specific attributes given to it.
+:::
+
## Caveats {#chap-pkgs-fetchers-caveats}
-The fact that the hash belongs to the Nix derivation output and not the file itself can lead to confusion.
-For example, consider the following fetcher:
+Because Nixpkgs fetchers are fixed-output derivations, an [output hash](https://nixos.org/manual/nix/stable/language/advanced-attributes#adv-attr-outputHash) has to be specified, usually indirectly through a `hash` attribute.
+This hash refers to the derivation output, which can be different from the remote source itself!
+
+This has the following implications that you should be aware of:
+
+- Use Nix (or Nix-aware) tooling to produce the output hash.
+
+- When changing any fetcher parameters, always update the output hash.
+ Use one of the methods from [](#sec-pkgs-fetchers-updating-source-hashes).
+ Otherwise, existing store objects that match the output hash will be re-used rather than fetching new content.
+
+ :::{.note}
+ A similar problem arises while testing changes to a fetcher's implementation.
+ If the output of the derivation already exists in the Nix store, test failures can go undetected.
+ The [`invalidateFetcherByDrvHash`](#tester-invalidateFetcherByDrvHash) function helps prevent reusing cached derivations.
+ :::
+
+## Updating source hashes {#sec-pkgs-fetchers-updating-source-hashes}
+
+There are several ways to obtain the hash corresponding to a remote source.
+Unless you understand how the fetcher you're using calculates the hash from the downloaded contents, you should use [the fake hash method](#sec-pkgs-fetchers-updating-source-hashes-fakehash-method).
+
+1. []{#sec-pkgs-fetchers-updating-source-hashes-fakehash-method} The fake hash method: In your package recipe, set the hash to one of
+
+ - `""`
+ - `lib.fakeHash`
+ - `lib.fakeSha256`
+ - `lib.fakeSha512`
+
+ Attempt to build, extract the calculated hashes from error messages, and put them into the recipe.
+
+ :::{.warning}
+ You must use one of these four fake hashes and not some arbitrarily-chosen hash.
+ See [](#sec-pkgs-fetchers-secure-hashes) for details.
+ :::
+
+ :::{.example #ex-fetchers-update-fod-hash}
+ # Update source hash with the fake hash method
+
+ Consider the following recipe that produces a plain file:
+
+ ```nix
+ { fetchurl }:
+ fetchurl {
+ url = "https://raw.githubusercontent.com/NixOS/nixpkgs/23.05/.version";
+ hash = "sha256-ZHl1emidXVojm83LCVrwULpwIzKE/mYwfztVkvpruOM=";
+ }
+ ```
+
+ A common mistake is to update a fetcher parameter, such as `url`, without updating the hash:
+
+ ```nix
+ { fetchurl }:
+ fetchurl {
+ url = "https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version";
+ hash = "sha256-ZHl1emidXVojm83LCVrwULpwIzKE/mYwfztVkvpruOM=";
+ }
+ ```
+
+ **This will produce the same output as before!**
+ Set the hash to an empty string:
+
+ ```nix
+ { fetchurl }:
+ fetchurl {
+ url = "https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version";
+ hash = "";
+ }
+ ```
+
+ When building the package, use the error message to determine the correct hash:
+
+ ```shell
+ $ nix-build
+ (some output removed for clarity)
+ error: hash mismatch in fixed-output derivation '/nix/store/7yynn53jpc93l76z9zdjj4xdxgynawcw-version.drv':
+ specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
+ got: sha256-BZqI7r0MNP29yGH5+yW2tjU9OOpOCEvwWKrWCv5CQ0I=
+ error: build of '/nix/store/bqdjcw5ij5ymfbm41dq230chk9hdhqff-version.drv' failed
+ ```
+ :::
+
+2. Prefetch the source with [`nix-prefetch- `](https://search.nixos.org/packages?buckets={%22package_attr_set%22%3A[%22No%20package%20set%22]%2C%22package_license_set%22%3A[]%2C%22package_maintainers_set%22%3A[]%2C%22package_platforms%22%3A[]}&query=nix-prefetch), where `` is one of
+
+ - `url`
+ - `git`
+ - `hg`
+ - `cvs`
+ - `bzr`
+ - `svn`
+
+ The hash is printed to stdout.
+
+3. Prefetch by package source (with `nix-prefetch-url '' -A .src`, where `` is package attribute name).
+ The hash is printed to stdout.
+
+ This works well when you've upgraded the existing package version and want to find out new hash, but is useless if the package can't be accessed by attribute or the package has multiple sources (`.srcs`, architecture-dependent sources, etc).
+
+4. Upstream hash: use it when upstream provides `sha256` or `sha512`.
+ Don't use it when upstream provides `md5`, compute `sha256` instead.
+
+ A little nuance is that `nix-prefetch-*` tools produce hashes with the `nix32` encoding (a Nix-specific base32 adaptation), but upstream usually provides hexadecimal (`base16`) encoding.
+ Fetchers understand both formats.
+ Nixpkgs does not standardise on any one format.
+
+ You can convert between hash formats with [`nix-hash`](https://nixos.org/manual/nix/stable/command-ref/nix-hash).
+
+5. Extract the hash from a local source archive with `sha256sum`.
+ Use `nix-prefetch-url file:///path/to/archive` if you want the custom Nix `base32` hash.
+
+## Obtaining hashes securely {#sec-pkgs-fetchers-secure-hashes}
+
+It's always a good idea to avoid Man-in-the-Middle (MITM) attacks when downloading source contents.
+Otherwise, you could unknowingly download malware instead of the intended source, and instead of the actual source hash, you'll end up using the hash of malware.
+Here are security considerations for this scenario:
+
+- `http://` URLs are not secure to prefetch hashes.
+
+- Upstream hashes should be obtained via a secure protocol.
+
+- `https://` URLs give you more protections when using `nix-prefetch-*` or for upstream hashes.
+
+- `https://` URLs are secure when using the [fake hash method](#sec-pkgs-fetchers-updating-source-hashes-fakehash-method) *only if* you use one of the listed fake hashes.
+ If you use any other hash, the download will be exposed to MITM attacks even if you use HTTPS URLs.
+
+ In more concrete terms, if you use any other hash, the [`--insecure` flag](https://curl.se/docs/manpage.html#-k) will be passed to the underlying call to `curl` when downloading content.
+
+[]{#fetchurl}
+## `fetchurl` {#sec-pkgs-fetchers-fetchurl}
+
+`fetchurl` returns a [fixed-output derivation](https://nixos.org/manual/nix/stable/glossary.html#gloss-fixed-output-derivation) which downloads content from a given URL and stores the unaltered contents within the Nix store.
+
+It uses {manpage}`curl(1)` internally, and allows its behaviour to be modified by specifying a few attributes in the argument to `fetchurl` (see the documentation for attributes `curlOpts`, `curlOptsList`, and `netrcPhase`).
+
+The resulting [store path](https://nixos.org/manual/nix/stable/store/store-path) is determined by the hash given to `fetchurl`, and also the `name` (or `pname` and `version`) values.
+
+If neither `name` nor `pname` and `version` are specified when calling `fetchurl`, it will default to using the [basename](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-baseNameOf) of `url` or the first element of `urls`.
+If `pname` and `version` are specified, `fetchurl` will use those values and will ignore `name`, even if it is also specified.
+
+### Inputs {#sec-pkgs-fetchers-fetchurl-inputs}
+
+`fetchurl` requires an attribute set with the following attributes:
+
+`url` (String; _optional_)
+: The URL to download from.
+
+ :::{.note}
+ Either `url` or `urls` must be specified, but not both.
+ :::
+
+ All URLs of the format [specified here](https://curl.se/docs/url-syntax.html#rfc-3986-plus) are supported.
+
+ _Default value:_ `""`.
+
+`urls` (List of String; _optional_)
+: A list of URLs, specifying download locations for the same content.
+ Each URL will be tried in order until one of them succeeds with some content or all of them fail.
+ See [](#ex-fetchers-fetchurl-nixpkgs-version-multiple-urls) to understand how this attribute affects the behaviour of `fetchurl`.
+
+ :::{.note}
+ Either `url` or `urls` must be specified, but not both.
+ :::
+
+ _Default value:_ `[]`.
+
+`hash` (String; _optional_)
+: Hash of the derivation output of `fetchurl`, following the format for integrity metadata as defined by [SRI](https://www.w3.org/TR/SRI/).
+ For more information, see [](#chap-pkgs-fetchers-caveats).
+
+ :::{.note}
+ It is recommended that you use the `hash` attribute instead of the other hash-specific attributes that exist for backwards compatibility.
+
+ If `hash` is not specified, you must specify `outputHash` and `outputHashAlgo`, or one of `sha512`, `sha256`, or `sha1`.
+ :::
+
+ _Default value:_ `""`.
+
+`outputHash` (String; _optional_)
+: Hash of the derivation output of `fetchurl` in the format expected by Nix.
+ See [the documentation on the Nix manual](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-outputHash) for more information about its format.
+
+ :::{.note}
+ It is recommended that you use the `hash` attribute instead.
+
+ If `outputHash` is specified, you must also specify `outputHashAlgo`.
+ :::
+
+ _Default value:_ `""`.
+
+`outputHashAlgo` (String; _optional_)
+: Algorithm used to generate the value specified in `outputHash`.
+ See [the documentation on the Nix manual](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-outputHashAlgo) for more information about the values it supports.
+
+ :::{.note}
+ It is recommended that you use the `hash` attribute instead.
+
+ The value specified in `outputHashAlgo` will be ignored if `outputHash` isn't also specified.
+ :::
+
+ _Default value:_ `""`.
+
+`sha1` (String; _optional_)
+: SHA-1 hash of the derivation output of `fetchurl` in the format expected by Nix.
+ See [the documentation on the Nix manual](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-outputHash) for more information about its format.
+
+ :::{.note}
+ It is recommended that you use the `hash` attribute instead.
+ :::
+
+ _Default value:_ `""`.
+
+`sha256` (String; _optional_)
+: SHA-256 hash of the derivation output of `fetchurl` in the format expected by Nix.
+ See [the documentation on the Nix manual](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-outputHash) for more information about its format.
+
+ :::{.note}
+ It is recommended that you use the `hash` attribute instead.
+ :::
+
+ _Default value:_ `""`.
+
+`sha512` (String; _optional_)
+: SHA-512 hash of the derivation output of `fetchurl` in the format expected by Nix.
+ See [the documentation on the Nix manual](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-outputHash) for more information about its format.
+
+ :::{.note}
+ It is recommended that you use the `hash` attribute instead.
+ :::
+
+ _Default value:_ `""`.
+
+`name` (String; _optional_)
+: The symbolic name of the downloaded file when saved in the Nix store.
+ See [the `fetchurl` overview](#sec-pkgs-fetchers-fetchurl) for details on how the name of the file is decided.
+
+ _Default value:_ `""`.
+
+`pname` (String; _optional_)
+: A base name, which will be combined with `version` to form the symbolic name of the downloaded file when saved in the Nix store.
+ See [the `fetchurl` overview](#sec-pkgs-fetchers-fetchurl) for details on how the name of the file is decided.
+
+ :::{.note}
+ If `pname` is specified, you must also specify `version`, otherwise `fetchurl` will ignore the value of `pname`.
+ :::
+
+ _Default value:_ `""`.
+
+`version` (String; _optional_)
+: A version, which will be combined with `pname` to form the symbolic name of the downloaded file when saved in the Nix store.
+ See [the `fetchurl` overview](#sec-pkgs-fetchers-fetchurl) for details on how the name of the file is decided.
+
+ _Default value:_ `""`.
+
+`recursiveHash` (Boolean; _optional_) []{#sec-pkgs-fetchers-fetchurl-inputs-recursiveHash}
+: If set to `true`, will signal to Nix that the hash given to `fetchurl` was calculated using the `"recursive"` mode.
+ See [the documentation on the Nix manual](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-outputHashMode) for more information about the existing modes.
+
+ By default, `fetchurl` uses `"recursive"` mode when the `executable` attribute is set to `true`, so you don't need to specify `recursiveHash` in this case.
+
+ _Default value:_ `false`.
+
+`executable` (Boolean; _optional_)
+: If `true`, sets the executable bit on the downloaded file.
+
+ _Default value_: `false`.
+
+`downloadToTemp` (Boolean; _optional_) []{#sec-pkgs-fetchers-fetchurl-inputs-downloadToTemp}
+: If `true`, saves the downloaded file to a temporary location instead of the expected Nix store location.
+ This is useful when used in conjunction with `postFetch` attribute, otherwise `fetchurl` will not produce any meaningful output.
+
+ The location of the downloaded file will be set in the `$downloadedFile` variable, which should be used by the script in the `postFetch` attribute.
+ See [](#ex-fetchers-fetchurl-nixpkgs-version-postfetch) to understand how to work with this attribute.
+
+ _Default value:_ `false`.
+
+`postFetch` (String; _optional_)
+: Script executed after the file has been downloaded successfully, and before `fetchurl` finishes running.
+ Useful for post-processing, to check or transform the file in some way.
+ See [](#ex-fetchers-fetchurl-nixpkgs-version-postfetch) to understand how to work with this attribute.
+
+ _Default value:_ `""`.
+
+`netrcPhase` (String or Null; _optional_)
+: Script executed to create a {manpage}`netrc(5)` file to be used with {manpage}`curl(1)`.
+ The script should create the `netrc` file (note that it does not begin with a ".") in the directory it's currently running in (`$PWD`).
+
+ The script is executed during the setup done by `fetchurl` before it runs any of its code to download the specified content.
+
+ :::{.note}
+ If specified, `fetchurl` will automatically alter its invocation of {manpage}`curl(1)` to use the `netrc` file, so you don't need to add anything to `curlOpts` or `curlOptsList`.
+ :::
+
+ :::{.caution}
+ Since `netrcPhase` needs to be specified in your source Nix code, any secrets that you put directly in it will be world-readable by design (both in your source code, and when the derivation gets created in the Nix store).
+
+ If you want to avoid this behaviour, see the documentation of `netrcImpureEnvVars` for an alternative way of dealing with these secrets.
+ :::
+
+ _Default value_: `null`.
+
+`netrcImpureEnvVars` (List of String; _optional_)
+: If specified, `fetchurl` will add these environment variable names to the list of [impure environment variables](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-impureEnvVars), which will be passed from the environment of the calling user to the builder running the `fetchurl` code.
+
+ This is useful when used with `netrcPhase` to hide any secrets that are used in it, because the script in `netrcPhase` only needs to reference the environment variables with the secrets in them instead.
+ However, note that these are called _impure_ variables for a reason:
+ the environment that starts the build needs to have these variables declared for everything to work properly, which means that additional setup is required outside what Nix controls.
+
+ _Default value:_ `[]`.
+
+`curlOpts` (String; _optional_)
+: If specified, this value will be appended to the invocation of {manpage}`curl(1)` when downloading the URL(s) given to `fetchurl`.
+ Multiple arguments can be separated by spaces normally, but values with whitespaces will be interpreted as multiple arguments (instead of a single value), even if the value is escaped.
+ See `curlOptsList` for a way to pass values with whitespaces in them.
+
+ _Default value:_ `""`.
+
+`curlOptsList` (List of String; _optional_)
+: If specified, each element of this list will be passed as an argument to the invocation of {manpage}`curl(1)` when downloading the URL(s) given to `fetchurl`.
+ This allows passing values that contain spaces, with no escaping needed.
+
+ _Default value:_ `[]`.
+
+`showURLs` (Boolean; _optional_)
+: If set to `true`, this will stop `fetchurl` from downloading anything at all.
+ Instead, it will output a list of all the URLs it would've used to download the content (after resolving `mirror://` URLs, for example).
+ This is useful for debugging.
+
+ _Default value:_ `false`.
+
+`meta` (Attribute Set; _optional_)
+: Specifies any [meta-attributes](#chap-meta) for the derivation returned by `fetchurl`.
+
+ _Default value:_ `{}`.
+
+`passthru` (Attribute Set; _optional_)
+: Specifies any extra [passthru](#var-stdenv-passthru) attributes for the derivation returned by `fetchurl`.
+ Note that `fetchurl` defines [passthru attributes of its own](#ssec-pkgs-fetchers-fetchurl-passthru-outputs).
+ Attributes specified in `passthru` can override the default attributes returned by `fetchurl`.
+
+ _Default value:_ `{}`.
+
+`preferLocalBuild` (Boolean; _optional_)
+: This is the same attribute as [defined in the Nix manual](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-preferLocalBuild).
+ It is `true` by default because making a remote machine download the content just duplicates network traffic (since the local machine might download the results from the derivation anyway), but this could be useful in cases where network access is restricted on local machines.
+
+ _Default value:_ `true`.
+
+`nativeBuildInputs` (List of Attribute Set; _optional_)
+: Additional packages needed to download the content.
+ This is useful if you need extra packages for `postFetch` or `netrcPhase`, for example.
+ Has the same semantics as in [](#var-stdenv-nativeBuildInputs).
+ See [](#ex-fetchers-fetchurl-nixpkgs-version-postfetch) to understand how this can be used with `postFetch`.
+
+ _Default value:_ `[]`.
+
+### Passthru outputs {#ssec-pkgs-fetchers-fetchurl-passthru-outputs}
+
+`fetchurl` also defines its own [`passthru`](#var-stdenv-passthru) attributes:
+
+`url` (String)
+
+: The same `url` attribute passed in the argument to `fetchurl`.
+
+### Examples {#ssec-pkgs-fetchers-fetchurl-examples}
+
+:::{.example #ex-fetchers-fetchurl-nixpkgs-version}
+# Using `fetchurl` to download a file
+
+The following package downloads a small file from a URL and shows the most common way to use `fetchurl`:
```nix
+{ fetchurl }:
fetchurl {
- url = "http://www.example.org/hello-1.0.tar.gz";
- hash = "sha256-lTeyxzJNQeMdu1IVdovNMtgn77jRIhSybLdMbTkf2Ww=";
-};
-```
-
-A common mistake is to update a fetcher’s URL, or a version parameter, without updating the hash.
-
-```nix
-fetchurl {
- url = "http://www.example.org/hello-1.1.tar.gz";
- hash = "sha256-lTeyxzJNQeMdu1IVdovNMtgn77jRIhSybLdMbTkf2Ww=";
-};
-```
-
-**This will reuse the old contents**.
-Remember to invalidate the hash argument, in this case by setting the `hash` attribute to an empty string.
-
-```nix
-fetchurl {
- url = "http://www.example.org/hello-1.1.tar.gz";
- hash = "";
-};
-```
-
-Use the resulting error message to determine the correct hash.
-
-```
-error: hash mismatch in fixed-output derivation '/path/to/my.drv':
- specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
- got: sha256-lTeyxzJNQeMdu1IVdovNMtgn77jRIhSybLdMbTkf2Ww=
-```
-
-A similar problem arises while testing changes to a fetcher's implementation. If the output of the derivation already exists in the Nix store, test failures can go undetected. The [`invalidateFetcherByDrvHash`](#tester-invalidateFetcherByDrvHash) function helps prevent reusing cached derivations.
-
-## `fetchurl` and `fetchzip` {#fetchurl}
-
-Two basic fetchers are `fetchurl` and `fetchzip`. Both of these have two required arguments, a URL and a hash. The hash is typically `hash`, although many more hash algorithms are supported. Nixpkgs contributors are currently recommended to use `hash`. This hash will be used by Nix to identify your source. A typical usage of `fetchurl` is provided below.
-
-```nix
-{ stdenv, fetchurl }:
-
-stdenv.mkDerivation {
- name = "hello";
- src = fetchurl {
- url = "http://www.example.org/hello.tar.gz";
- hash = "sha256-BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB=";
- };
+ url = "https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version";
+ hash = "sha256-BZqI7r0MNP29yGH5+yW2tjU9OOpOCEvwWKrWCv5CQ0I=";
}
```
-The main difference between `fetchurl` and `fetchzip` is in how they store the contents. `fetchurl` will store the unaltered contents of the URL within the Nix store. `fetchzip` on the other hand, will decompress the archive for you, making files and directories directly accessible in the future. `fetchzip` can only be used with archives. Despite the name, `fetchzip` is not limited to .zip files and can also be used with any tarball.
+After building the package, the file will be downloaded and place into the Nix store:
-Additional parameters to `fetchurl`:
-- `downloadToTemp`: Defaults to `false`. If `true`, saves the source to `$downloadedFile`, to be used in conjunction with `postFetch`
-- `postFetch`: Shell code executed after the file has been fetched successfully. Use it for postprocessing, to check or transform the file.
+```shell
+$ nix-build
+(output removed for clarity)
+/nix/store/4g9y3x851wqrvim4zcz5x2v3zivmsq8n-version
+
+$ cat /nix/store/4g9y3x851wqrvim4zcz5x2v3zivmsq8n-version
+23.11
+```
+:::
+
+:::{.example #ex-fetchers-fetchurl-nixpkgs-version-multiple-urls}
+# Using `fetchurl` to download a file with multiple possible URLs
+
+The following package adapts [](#ex-fetchers-fetchurl-nixpkgs-version) to use multiple URLs.
+The first URL was crafted to intentionally return an error to illustrate how `fetchurl` will try multiple URLs until it finds one that works (or all URLs fail).
+
+```nix
+{ fetchurl }:
+fetchurl {
+ urls = [
+ "https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/does-not-exist"
+ "https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version"
+ ];
+ hash = "sha256-BZqI7r0MNP29yGH5+yW2tjU9OOpOCEvwWKrWCv5CQ0I=";
+}
+```
+
+After building the package, both URLs will be used to download the file:
+
+```shell
+$ nix-build
+(some output removed for clarity)
+trying https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/does-not-exist
+(some output removed for clarity)
+curl: (22) The requested URL returned error: 404
+
+trying https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version
+(some output removed for clarity)
+/nix/store/n9asny31z32q7sdw6a8r1gllrsfy53kl-does-not-exist
+
+$ cat /nix/store/n9asny31z32q7sdw6a8r1gllrsfy53kl-does-not-exist
+23.11
+```
+
+However, note that the name of the file was derived from the first URL (this is further explained in [the `fetchurl` overview](#sec-pkgs-fetchers-fetchurl)).
+To ensure the result will have the same name regardless of which URLs are used, we can modify the package:
+
+```nix
+{ fetchurl }:
+fetchurl {
+ name = "nixpkgs-version";
+ urls = [
+ "https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/does-not-exist"
+ "https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version"
+ ];
+ hash = "sha256-BZqI7r0MNP29yGH5+yW2tjU9OOpOCEvwWKrWCv5CQ0I=";
+}
+```
+
+After building the package, the result will have the name we specified:
+
+```shell
+$ nix-build
+(output removed for clarity)
+/nix/store/zczb6wl3al6jm9sm5h3pr6nqn0i5ji9z-nixpkgs-version
+```
+:::
+
+:::{.example #ex-fetchers-fetchurl-nixpkgs-version-postfetch}
+# Manipulating the content downloaded by `fetchurl`
+
+It might be useful to manipulate the content downloaded by `fetchurl` directly in its derivation.
+In this example, we'll adapt [](#ex-fetchers-fetchurl-nixpkgs-version) to append the result of running the `hello` package to the contents we download, purely to illustrate how to manipulate the content.
+
+```nix
+{ fetchurl, hello, lib }:
+fetchurl {
+ url = "https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version";
+
+ nativeBuildInputs = [ hello ];
+
+ downloadToTemp = true;
+ postFetch = ''
+ ${lib.getExe hello} >> $downloadedFile
+ mv $downloadedFile $out
+ '';
+
+ hash = "sha256-ceooQQYmDx5+0nfg40uU3NNI2yKrixP7HZ/xLZUNv+w=";
+}
+```
+
+After building the package, the resulting file will have "Hello, world!" appended to it:
+
+```shell
+$ nix-build
+(output removed for clarity)
+/nix/store/ifi6pp7q0ag5h7c5v9h1c1c7bhd10c7f-version
+
+$ cat /nix/store/ifi6pp7q0ag5h7c5v9h1c1c7bhd10c7f-version
+23.11
+Hello, world!
+```
+
+Note that the `hash` specified in the package is different than the hash specified in [](#ex-fetchers-fetchurl-nixpkgs-version), because the contents of the output have changed (even though the actual file that was downloaded is the same).
+See [](#chap-pkgs-fetchers-caveats) for more details on how to work with the `hash` attribute when the output changes.
+:::
+
+## `fetchzip` {#sec-pkgs-fetchers-fetchzip}
+
+Returns a [fixed-output derivation](https://nixos.org/manual/nix/stable/glossary.html#gloss-fixed-output-derivation) which downloads an archive from a given URL and decompresses it.
+
+Despite its name, `fetchzip` is not limited to `.zip` files but can also be used with [various compressed tarball formats](#tar-files) by default.
+This can extended by specifying additional attributes, see [](#ex-fetchers-fetchzip-rar-archive) to understand how to do that.
+
+### Inputs {#sec-pkgs-fetchers-fetchzip-inputs}
+
+`fetchzip` requires an attribute set, and most attributes are passed to the underlying call to [`fetchurl`](#sec-pkgs-fetchers-fetchurl).
+
+The attributes below are treated differently by `fetchzip` when compared to what `fetchurl` expects:
+
+`name` (String; _optional_)
+: Works as defined in `fetchurl`, but has a different default value than `fetchurl`.
+
+ _Default value:_ `"source"`.
+
+`nativeBuildInputs` (List of Attribute Set; _optional_)
+: Works as defined in `fetchurl`, but it is also augmented by `fetchzip` to include packages to deal with additional archives (such as `.zip`).
+
+ _Default value:_ `[]`.
+
+`postFetch` (String; _optional_)
+: Works as defined in `fetchurl`, but it is also augmented with the code needed to make `fetchzip` work.
+
+ :::{.caution}
+ It is only safe to modify files in `$out` in `postFetch`.
+ Consult the implementation of `fetchzip` for anything more involved.
+ :::
+
+ _Default value:_ `""`.
+
+`stripRoot` (Boolean; _optional_)
+: If `true`, the decompressed contents are moved one level up the directory tree.
+
+ This is useful for archives that decompress into a single directory which commonly includes some values that change with time, such as version numbers.
+ When this is the case (and `stripRoot` is `true`), `fetchzip` will remove this directory and make the decompressed contents available in the top-level directory.
+
+ [](#ex-fetchers-fetchzip-simple-striproot) shows what this attribute does.
+
+ This attribute is **not** passed through to `fetchurl`.
+
+ _Default value:_ `true`.
+
+`extension` (String or Null; _optional_)
+: If set, the archive downloaded by `fetchzip` will be renamed to a filename with the extension specified in this attribute.
+
+ This is useful when making `fetchzip` support additional types of archives, because the implementation may use the extension of an archive to determine whether they can decompress it.
+ If the URL you're using to download the contents doesn't end with the extension associated with the archive, use this attribute to fix the filename of the archive.
+
+ This attribute is **not** passed through to `fetchurl`.
+
+ _Default value:_ `null`.
+
+`recursiveHash` (Boolean; _optional_)
+: Works [as defined in `fetchurl`](#sec-pkgs-fetchers-fetchurl-inputs-recursiveHash), but its default value is different than for `fetchurl`.
+
+ _Default value:_ `true`.
+
+`downloadToTemp` (Boolean; _optional_)
+: Works [as defined in `fetchurl`](#sec-pkgs-fetchers-fetchurl-inputs-downloadToTemp), but its default value is different than for `fetchurl`.
+
+ _Default value:_ `true`.
+
+`extraPostFetch` **DEPRECATED**
+: This attribute is deprecated.
+ Please use `postFetch` instead.
+
+ This attribute is **not** passed through to `fetchurl`.
+
+### Examples {#sec-pkgs-fetchers-fetchzip-examples}
+
+::::{.example #ex-fetchers-fetchzip-simple-striproot}
+# Using `fetchzip` to output contents directly
+
+The following recipe shows how to use `fetchzip` to decompress a `.tar.gz` archive:
+
+```nix
+{ fetchzip }:
+fetchzip {
+ url = "https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0.tar.gz";
+ hash = "sha256-3ABYlME9R8klcpJ7MQpyFEFwHmxDDEzIYBqu/CpDYmg=";
+}
+```
+
+This archive has all its contents in a directory named `patchelf-0.18.0`.
+This means that after decompressing, you'd have to enter this directory to see the contents of the archive.
+However, `fetchzip` makes this easier through the attribute `stripRoot` (enabled by default).
+
+After building the recipe, the derivation output will show all the files in the archive at the top level:
+
+```shell
+$ nix-build
+(output removed for clarity)
+/nix/store/1b7h3fvmgrcddvs0m299hnqxlgli1yjw-source
+
+$ ls /nix/store/1b7h3fvmgrcddvs0m299hnqxlgli1yjw-source
+aclocal.m4 completions configure.ac m4 Makefile.in patchelf.spec README.md tests
+build-aux configure COPYING Makefile.am patchelf.1 patchelf.spec.in src version
+```
+
+If `stripRoot` is set to `false`, the derivation output will be the decompressed archive as-is:
+
+```nix
+{ fetchzip }:
+fetchzip {
+ url = "https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0.tar.gz";
+ hash = "sha256-uv3FuKE4DqpHT3yfE0qcnq0gYjDNQNKZEZt2+PUAneg=";
+ stripRoot = false;
+}
+```
+
+:::{.caution}
+The hash changed!
+Whenever changing attributes of a Nixpkgs fetcher, [remember to invalidate the hash](#chap-pkgs-fetchers-caveats), otherwise you won't get the results you're expecting!
+:::
+
+After building the recipe:
+
+```shell
+$ nix-build
+(output removed for clarity)
+/nix/store/2hy5bxw7xgbgxkn0i4x6hjr8w3dbx16c-source
+
+$ ls /nix/store/2hy5bxw7xgbgxkn0i4x6hjr8w3dbx16c-source
+patchelf-0.18.0
+```
+::::
+
+::::{.example #ex-fetchers-fetchzip-rar-archive}
+# Using `fetchzip` to decompress a `.rar` file
+
+The `unrar` package provides a [setup hook](#ssec-setup-hooks) to decompress `.rar` archives during the [unpack phase](#ssec-unpack-phase), which can be used with `fetchzip` to decompress those archives:
+
+```nix
+{ fetchzip, unrar }:
+fetchzip {
+ url = "https://archive.org/download/SpaceCadet_Plus95/Space_Cadet.rar";
+ hash = "sha256-fC+zsR8BY6vXpUkVd6i1jF0IZZxVKVvNi6VWCKT+pA4=";
+ stripRoot = false;
+ nativeBuildInputs = [ unrar ];
+}
+```
+
+Since this particular `.rar` file doesn't put its contents in a directory inside the archive, `stripRoot` must be set to `false`.
+
+After building the recipe, the derivation output will show the decompressed files:
+
+```shell
+$ nix-build
+(output removed for clarity)
+/nix/store/zpn7knxfva6rfjja2gbb4p3l9w1f0d36-source
+
+$ ls /nix/store/zpn7knxfva6rfjja2gbb4p3l9w1f0d36-source
+FONT.DAT PINBALL.DAT PINBALL.EXE PINBALL2.MID TABLE.BMP WMCONFIG.EXE
+MSCREATE.DIR PINBALL.DOC PINBALL.MID Sounds WAVEMIX.INF
+```
+::::
## `fetchpatch` {#fetchpatch}
@@ -123,7 +716,7 @@ Here is an example of `fetchDebianPatch` in action:
buildPythonPackage rec {
pname = "pysimplesoap";
version = "1.16.2";
- src = ...;
+ src = <...>;
patches = [
(fetchDebianPatch {
@@ -134,7 +727,7 @@ buildPythonPackage rec {
})
];
- ...
+ # ...
}
```
@@ -243,7 +836,7 @@ This is a useful last-resort workaround for license restrictions that prohibit r
If the requested file is present in the Nix store, the resulting derivation will not be built, because its expected output is already available.
Otherwise, the builder will run, but fail with a message explaining to the user how to provide the file. The following code, for example:
-```
+```nix
requireFile {
name = "jdk-${version}_linux-x64_bin.tar.gz";
url = "https://www.oracle.com/java/technologies/javase-jdk11-downloads.html";
@@ -262,11 +855,15 @@ or
***
```
+
+This function should only be used by non-redistributable software with an unfree license that we need to require the user to download manually.
+It produces packages that cannot be built automatically.
+
## `fetchtorrent` {#fetchtorrent}
`fetchtorrent` expects two arguments. `url` which can either be a Magnet URI (Magnet Link) such as `magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c` or an HTTP URL pointing to a `.torrent` file. It can also take a `config` argument which will craft a `settings.json` configuration file and give it to `transmission`, the underlying program that is performing the fetch. The available config options for `transmission` can be found [here](https://github.com/transmission/transmission/blob/main/docs/Editing-Configuration-Files.md#options)
-```
+```nix
{ fetchtorrent }:
fetchtorrent {
diff --git a/third_party/nixpkgs/doc/build-helpers/images.md b/third_party/nixpkgs/doc/build-helpers/images.md
index 5596784bfa..033891fcef 100644
--- a/third_party/nixpkgs/doc/build-helpers/images.md
+++ b/third_party/nixpkgs/doc/build-helpers/images.md
@@ -6,7 +6,6 @@ This chapter describes tools for creating various types of images.
images/appimagetools.section.md
images/dockertools.section.md
images/ocitools.section.md
-images/snaptools.section.md
images/portableservice.section.md
images/makediskimage.section.md
images/binarycache.section.md
diff --git a/third_party/nixpkgs/doc/build-helpers/images/dockertools.section.md b/third_party/nixpkgs/doc/build-helpers/images/dockertools.section.md
index 001d569529..527e623e78 100644
--- a/third_party/nixpkgs/doc/build-helpers/images/dockertools.section.md
+++ b/third_party/nixpkgs/doc/build-helpers/images/dockertools.section.md
@@ -1177,6 +1177,7 @@ dockerTools.buildImage {
hello
dockerTools.binSh
];
+}
```
After building the image and loading it in Docker, we can create a container based on it and enter a shell inside the container.
diff --git a/third_party/nixpkgs/doc/build-helpers/images/snaptools.section.md b/third_party/nixpkgs/doc/build-helpers/images/snaptools.section.md
deleted file mode 100644
index 259fa1b061..0000000000
--- a/third_party/nixpkgs/doc/build-helpers/images/snaptools.section.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# pkgs.snapTools {#sec-pkgs-snapTools}
-
-`pkgs.snapTools` is a set of functions for creating Snapcraft images. Snap and Snapcraft is not used to perform these operations.
-
-## The makeSnap Function {#ssec-pkgs-snapTools-makeSnap-signature}
-
-`makeSnap` takes a single named argument, `meta`. This argument mirrors [the upstream `snap.yaml` format](https://docs.snapcraft.io/snap-format) exactly.
-
-The `base` should not be specified, as `makeSnap` will force set it.
-
-Currently, `makeSnap` does not support creating GUI stubs.
-
-## Build a Hello World Snap {#ssec-pkgs-snapTools-build-a-snap-hello}
-
-The following expression packages GNU Hello as a Snapcraft snap.
-
-``` {#ex-snapTools-buildSnap-hello .nix}
-let
- inherit (import { }) snapTools hello;
-in snapTools.makeSnap {
- meta = {
- name = "hello";
- summary = hello.meta.description;
- description = hello.meta.longDescription;
- architectures = [ "amd64" ];
- confinement = "strict";
- apps.hello.command = "${hello}/bin/hello";
- };
-}
-```
-
-`nix-build` this expression and install it with `snap install ./result --dangerous`. `hello` will now be the Snapcraft version of the package.
-
-## Build a Graphical Snap {#ssec-pkgs-snapTools-build-a-snap-firefox}
-
-Graphical programs require many more integrations with the host. This example uses Firefox as an example because it is one of the most complicated programs we could package.
-
-``` {#ex-snapTools-buildSnap-firefox .nix}
-let
- inherit (import { }) snapTools firefox;
-in snapTools.makeSnap {
- meta = {
- name = "nix-example-firefox";
- summary = firefox.meta.description;
- architectures = [ "amd64" ];
- apps.nix-example-firefox = {
- command = "${firefox}/bin/firefox";
- plugs = [
- "pulseaudio"
- "camera"
- "browser-support"
- "avahi-observe"
- "cups-control"
- "desktop"
- "desktop-legacy"
- "gsettings"
- "home"
- "network"
- "mount-observe"
- "removable-media"
- "x11"
- ];
- };
- confinement = "strict";
- };
-}
-```
-
-`nix-build` this expression and install it with `snap install ./result --dangerous`. `nix-example-firefox` will now be the Snapcraft version of the Firefox package.
-
-The specific meaning behind plugs can be looked up in the [Snapcraft interface documentation](https://docs.snapcraft.io/supported-interfaces).
diff --git a/third_party/nixpkgs/doc/build-helpers/special/checkpoint-build.section.md b/third_party/nixpkgs/doc/build-helpers/special/checkpoint-build.section.md
index f60afe801e..a1ce5608f2 100644
--- a/third_party/nixpkgs/doc/build-helpers/special/checkpoint-build.section.md
+++ b/third_party/nixpkgs/doc/build-helpers/special/checkpoint-build.section.md
@@ -9,13 +9,17 @@ However, we can tell Nix explicitly what the previous build state was, by repres
To change a normal derivation to a checkpoint based build, these steps must be taken:
- apply `prepareCheckpointBuild` on the desired derivation, e.g.
```nix
-checkpointArtifacts = (pkgs.checkpointBuildTools.prepareCheckpointBuild pkgs.virtualbox);
+{
+ checkpointArtifacts = (pkgs.checkpointBuildTools.prepareCheckpointBuild pkgs.virtualbox);
+}
```
- change something you want in the sources of the package, e.g. use a source override:
```nix
-changedVBox = pkgs.virtualbox.overrideAttrs (old: {
- src = path/to/vbox/sources;
-});
+{
+ changedVBox = pkgs.virtualbox.overrideAttrs (old: {
+ src = path/to/vbox/sources;
+ });
+}
```
- use `mkCheckpointBuild changedVBox checkpointArtifacts`
- enjoy shorter build times
diff --git a/third_party/nixpkgs/doc/build-helpers/testers.chapter.md b/third_party/nixpkgs/doc/build-helpers/testers.chapter.md
index 35f9290ecb..b734cbbbd4 100644
--- a/third_party/nixpkgs/doc/build-helpers/testers.chapter.md
+++ b/third_party/nixpkgs/doc/build-helpers/testers.chapter.md
@@ -14,11 +14,13 @@ If the `moduleNames` argument is omitted, `hasPkgConfigModules` will use `meta.p
# Check that `pkg-config` modules are exposed using default values
```nix
-passthru.tests.pkg-config = testers.hasPkgConfigModules {
- package = finalAttrs.finalPackage;
-};
+{
+ passthru.tests.pkg-config = testers.hasPkgConfigModules {
+ package = finalAttrs.finalPackage;
+ };
-meta.pkgConfigModules = [ "libfoo" ];
+ meta.pkgConfigModules = [ "libfoo" ];
+}
```
:::
@@ -28,10 +30,12 @@ meta.pkgConfigModules = [ "libfoo" ];
# Check that `pkg-config` modules are exposed using explicit module names
```nix
-passthru.tests.pkg-config = testers.hasPkgConfigModules {
- package = finalAttrs.finalPackage;
- moduleNames = [ "libfoo" ];
-};
+{
+ passthru.tests.pkg-config = testers.hasPkgConfigModules {
+ package = finalAttrs.finalPackage;
+ moduleNames = [ "libfoo" ];
+ };
+}
```
:::
@@ -55,7 +59,9 @@ The default argument to the command is `--version`, and the version to be checke
This example will run the command `hello --version`, and then check that the version of the `hello` package is in the output of the command.
```nix
-passthru.tests.version = testers.testVersion { package = hello; };
+{
+ passthru.tests.version = testers.testVersion { package = hello; };
+}
```
:::
@@ -70,13 +76,15 @@ This means that an output like "leetcode 0.4.21" would fail the tests, and an ou
A common usage of the `version` attribute is to specify `version = "v${version}"`.
```nix
-version = "0.4.2";
+{
+ version = "0.4.2";
-passthru.tests.version = testers.testVersion {
- package = leetcode-cli;
- command = "leetcode -V";
- version = "leetcode ${version}";
-};
+ passthru.tests.version = testers.testVersion {
+ package = leetcode-cli;
+ command = "leetcode -V";
+ version = "leetcode ${version}";
+ };
+}
```
:::
@@ -116,7 +124,7 @@ runCommand "example" {
grep -F 'failing though' $failed/testBuildFailure.log
[[ 3 = $(cat $failed/testBuildFailure.exit) ]]
touch $out
-'';
+''
```
:::
@@ -193,12 +201,14 @@ once to get a derivation hash, and again to produce the final fixed output deriv
# Prevent nix from reusing the output of a fetcher
```nix
-tests.fetchgit = testers.invalidateFetcherByDrvHash fetchgit {
- name = "nix-source";
- url = "https://github.com/NixOS/nix";
- rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
- hash = "sha256-7DszvbCNTjpzGRmpIVAWXk20P0/XTrWZ79KSOGLrUWY=";
-};
+{
+ tests.fetchgit = testers.invalidateFetcherByDrvHash fetchgit {
+ name = "nix-source";
+ url = "https://github.com/NixOS/nix";
+ rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
+ hash = "sha256-7DszvbCNTjpzGRmpIVAWXk20P0/XTrWZ79KSOGLrUWY=";
+ };
+}
```
:::
diff --git a/third_party/nixpkgs/doc/build-helpers/trivial-build-helpers.chapter.md b/third_party/nixpkgs/doc/build-helpers/trivial-build-helpers.chapter.md
index 384e250350..4f2754903f 100644
--- a/third_party/nixpkgs/doc/build-helpers/trivial-build-helpers.chapter.md
+++ b/third_party/nixpkgs/doc/build-helpers/trivial-build-helpers.chapter.md
@@ -7,7 +7,9 @@ Like [`stdenv.mkDerivation`](#sec-using-stdenv), each of these build helpers cre
`runCommand :: String -> AttrSet -> String -> Derivation`
-`runCommand name drvAttrs buildCommand` returns a derivation that is built by running the specified shell commands.
+The result of `runCommand name drvAttrs buildCommand` is a derivation that is built by running the specified shell commands.
+
+By default `runCommand` runs in a stdenv with no compiler environment, whereas [`runCommandCC`](#trivial-builder-runCommandCC) uses the default stdenv, `pkgs.stdenv`.
`name :: String`
: The name that Nix will append to the store path in the same way that `stdenv.mkDerivation` uses its `name` attribute.
@@ -74,12 +76,14 @@ If you need to refer to the resulting files somewhere else in a Nix expression,
For example, if the file destination is a directory:
```nix
-my-file = writeTextFile {
- name = "my-file";
- text = ''
- Contents of File
- '';
- destination = "/share/my-file";
+{
+ my-file = writeTextFile {
+ name = "my-file";
+ text = ''
+ Contents of File
+ '';
+ destination = "/share/my-file";
+ };
}
```
@@ -88,10 +92,111 @@ Remember to append "/share/my-file" to the resulting store path when using it el
```nix
writeShellScript "evaluate-my-file.sh" ''
cat ${my-file}/share/my-file
-'';
+''
```
::::
+### `makeDesktopItem` {#trivial-builder-makeDesktopItem}
+
+Write an [XDG desktop file](https://specifications.freedesktop.org/desktop-entry-spec/1.4/) to the Nix store.
+
+This function is usually used to add desktop items to a package through the `copyDesktopItems` hook.
+
+`makeDesktopItem` adheres to version 1.4 of the specification.
+
+#### Inputs {#trivial-builder-makeDesktopItem-inputs}
+
+`makeDesktopItem` takes an attribute set that accepts most values from the [XDG specification](https://specifications.freedesktop.org/desktop-entry-spec/1.4/ar01s06.html).
+
+All recognised keys from the specification are supported with the exception of the "Hidden" field. The keys are converted into camelCase format, but correspond 1:1 to their equivalent in the specification: `genericName`, `noDisplay`, `comment`, `icon`, `onlyShowIn`, `notShowIn`, `dbusActivatable`, `tryExec`, `exec`, `path`, `terminal`, `mimeTypes`, `categories`, `implements`, `keywords`, `startupNotify`, `startupWMClass`, `url`, `prefersNonDefaultGPU`.
+
+The "Version" field is hardcoded to the version `makeDesktopItem` currently adheres to.
+
+The following fields are either required, are of a different type than in the specification, carry specific default values, or are additional fields supported by `makeDesktopItem`:
+
+`name` (String)
+
+: The name of the desktop file in the Nix store.
+
+`type` (String; _optional_)
+
+: Default value: `"Application"`
+
+`desktopName` (String)
+
+: Corresponds to the "Name" field of the specification.
+
+`actions` (List of Attribute set; _optional_)
+
+: A list of attribute sets {name, exec?, icon?}
+
+`extraConfig` (Attribute set; _optional_)
+
+: Additional key/value pairs to be added verbatim to the desktop file. Attributes need to be prefixed with 'X-'.
+
+#### Examples {#trivial-builder-makeDesktopItem-examples}
+
+::: {.example #ex-makeDesktopItem}
+# Usage 1 of `makeDesktopItem`
+
+Write a desktop file `/nix/store//my-program.desktop` to the Nix store.
+
+```nix
+{makeDesktopItem}:
+makeDesktopItem {
+ name = "my-program";
+ desktopName = "My Program";
+ genericName = "Video Player";
+ noDisplay = false;
+ comment = "Cool video player";
+ icon = "/path/to/icon";
+ onlyShowIn = [ "KDE" ];
+ dbusActivatable = true;
+ tryExec = "my-program";
+ exec = "my-program --someflag";
+ path = "/some/working/path";
+ terminal = false;
+ actions.example = {
+ name = "New Window";
+ exec = "my-program --new-window";
+ icon = "/some/icon";
+ };
+ mimeTypes = [ "video/mp4" ];
+ categories = [ "Utility" ];
+ implements = [ "org.my-program" ];
+ keywords = [ "Video" "Player" ];
+ startupNotify = false;
+ startupWMClass = "MyProgram";
+ prefersNonDefaultGPU = false;
+ extraConfig.X-SomeExtension = "somevalue";
+}
+```
+
+:::
+
+::: {.example #ex2-makeDesktopItem}
+# Usage 2 of `makeDesktopItem`
+
+Override the `hello` package to add a desktop item.
+
+```nix
+{ copyDesktopItems
+, hello
+, makeDesktopItem }:
+
+hello.overrideAttrs {
+ nativeBuildInputs = [ copyDesktopItems ];
+
+ desktopItems = [(makeDesktopItem {
+ name = "hello";
+ desktopName = "Hello";
+ exec = "hello";
+ })];
+}
+```
+
+:::
+
### `writeTextFile` {#trivial-builder-writeTextFile}
Write a text file to the Nix store.
@@ -153,6 +258,12 @@ Write a text file to the Nix store.
Default: `true`
+`derivationArgs` (Attribute set, _optional_)
+
+: Extra arguments to pass to the underlying call to `stdenv.mkDerivation`.
+
+ Default: `{}`
+
The resulting store path will include some variation of the name, and it will be a file unless `destination` is used, in which case it will be a directory.
::: {.example #ex-writeTextFile}
@@ -178,7 +289,7 @@ writeTextFile {
};
allowSubstitutes = true;
preferLocalBuild = false;
-};
+}
```
:::
@@ -242,7 +353,7 @@ Write the string `Contents of File` to `/nix/store/`:
writeText "my-file"
''
Contents of File
- '';
+ ''
```
:::
@@ -282,7 +393,7 @@ Write the string `Contents of File` to `/nix/store//share/my-file`:
writeTextDir "share/my-file"
''
Contents of File
- '';
+ ''
```
:::
@@ -324,7 +435,7 @@ Write the string `Contents of File` to `/nix/store/` and make the fi
writeScript "my-file"
''
Contents of File
- '';
+ ''
```
:::
@@ -366,7 +477,7 @@ The store path will include the the name, and it will be a directory.
writeScriptBin "my-script"
''
echo "hi"
- '';
+ ''
```
:::
@@ -379,7 +490,7 @@ writeTextFile {
echo "hi"
'';
executable = true;
- destination = "bin/my-script"
+ destination = "bin/my-script";
}
```
@@ -410,7 +521,7 @@ This function is almost exactly like [](#trivial-builder-writeScript), except th
writeShellScript "my-script"
''
echo "hi"
- '';
+ ''
```
:::
@@ -453,7 +564,7 @@ This function is a combination of [](#trivial-builder-writeShellScript) and [](#
writeShellScriptBin "my-script"
''
echo "hi"
- '';
+ ''
```
:::
@@ -467,7 +578,7 @@ writeTextFile {
echo "hi"
'';
executable = true;
- destination = "bin/my-script"
+ destination = "bin/my-script";
}
```
@@ -549,19 +660,23 @@ This creates a derivation with a directory structure like the following:
## `writeReferencesToFile` {#trivial-builder-writeReferencesToFile}
-Writes the closure of transitive dependencies to a file.
+Deprecated. Use [`writeClosure`](#trivial-builder-writeClosure) instead.
-This produces the equivalent of `nix-store -q --requisites`.
+## `writeClosure` {#trivial-builder-writeClosure}
+
+Given a list of [store paths](https://nixos.org/manual/nix/stable/glossary#gloss-store-path) (or string-like expressions coercible to store paths), write their collective [closure](https://nixos.org/manual/nix/stable/glossary#gloss-closure) to a text file.
+
+The result is equivalent to the output of `nix-store -q --requisites`.
For example,
```nix
-writeReferencesToFile (writeScriptBin "hi" ''${hello}/bin/hello'')
+writeClosure [ (writeScriptBin "hi" ''${hello}/bin/hello'') ]
```
produces an output path `/nix/store/-runtime-deps` containing
-```nix
+```
/nix/store/-hello-2.10
/nix/store/-hi
/nix/store/-libidn2-2.3.0
@@ -587,7 +702,7 @@ writeDirectReferencesToFile (writeScriptBin "hi" ''${hello}/bin/hello'')
produces an output path `/nix/store/-runtime-references` containing
-```nix
+```
/nix/store/-hello-2.10
```
diff --git a/third_party/nixpkgs/doc/default.nix b/third_party/nixpkgs/doc/default.nix
index bcbc20b9f9..76aba1a03e 100644
--- a/third_party/nixpkgs/doc/default.nix
+++ b/third_party/nixpkgs/doc/default.nix
@@ -122,16 +122,17 @@ in pkgs.stdenv.mkDerivation {
${pkgs.documentation-highlighter}/mono-blue.css \
${pkgs.documentation-highlighter}/loader.js
- cp -t out ./overrides.css ./style.css
+ cp -t out ./style.css ./anchor.min.js ./anchor-use.js
nixos-render-docs manual html \
--manpage-urls ./manpage-urls.json \
--revision ${pkgs.lib.trivial.revisionWithDefault (pkgs.rev or "master")} \
--stylesheet style.css \
- --stylesheet overrides.css \
--stylesheet highlightjs/mono-blue.css \
--script ./highlightjs/highlight.pack.js \
--script ./highlightjs/loader.js \
+ --script ./anchor.min.js \
+ --script ./anchor-use.js \
--toc-depth 1 \
--section-toc-depth 1 \
manual.md \
diff --git a/third_party/nixpkgs/doc/functions/generators.section.md b/third_party/nixpkgs/doc/functions/generators.section.md
index 8b3ae6843a..dbfc302a3a 100644
--- a/third_party/nixpkgs/doc/functions/generators.section.md
+++ b/third_party/nixpkgs/doc/functions/generators.section.md
@@ -6,8 +6,9 @@ All generators follow a similar call interface: `generatorName configFunctions d
Generators can be fine-tuned to produce exactly the file format required by your application/service. One example is an INI-file format which uses `: ` as separator, the strings `"yes"`/`"no"` as boolean values and requires all string values to be quoted:
```nix
-with lib;
let
+ inherit (lib) generators isString;
+
customToINI = generators.toINI {
# specifies how to format a key/value pair
mkKeyValue = generators.mkKeyValueDefault {
diff --git a/third_party/nixpkgs/doc/functions/nix-gitignore.section.md b/third_party/nixpkgs/doc/functions/nix-gitignore.section.md
index 8eb4081d28..8532ab68ac 100644
--- a/third_party/nixpkgs/doc/functions/nix-gitignore.section.md
+++ b/third_party/nixpkgs/doc/functions/nix-gitignore.section.md
@@ -7,27 +7,30 @@
`pkgs.nix-gitignore` exports a number of functions, but you'll most likely need either `gitignoreSource` or `gitignoreSourcePure`. As their first argument, they both accept either 1. a file with gitignore lines or 2. a string with gitignore lines, or 3. a list of either of the two. They will be concatenated into a single big string.
```nix
-{ pkgs ? import {} }:
+{ pkgs ? import {} }: {
- nix-gitignore.gitignoreSource [] ./source
+ src = nix-gitignore.gitignoreSource [] ./source;
# Simplest version
- nix-gitignore.gitignoreSource "supplemental-ignores\n" ./source
+ src = nix-gitignore.gitignoreSource "supplemental-ignores\n" ./source;
# This one reads the ./source/.gitignore and concats the auxiliary ignores
- nix-gitignore.gitignoreSourcePure "ignore-this\nignore-that\n" ./source
+ src = nix-gitignore.gitignoreSourcePure "ignore-this\nignore-that\n" ./source;
# Use this string as gitignore, don't read ./source/.gitignore.
- nix-gitignore.gitignoreSourcePure ["ignore-this\nignore-that\n", ~/.gitignore] ./source
+ src = nix-gitignore.gitignoreSourcePure ["ignore-this\nignore-that\n" ~/.gitignore] ./source;
# It also accepts a list (of strings and paths) that will be concatenated
# once the paths are turned to strings via readFile.
+}
```
These functions are derived from the `Filter` functions by setting the first filter argument to `(_: _: true)`:
```nix
-gitignoreSourcePure = gitignoreFilterSourcePure (_: _: true);
-gitignoreSource = gitignoreFilterSource (_: _: true);
+{
+ gitignoreSourcePure = gitignoreFilterSourcePure (_: _: true);
+ gitignoreSource = gitignoreFilterSource (_: _: true);
+}
```
Those filter functions accept the same arguments the `builtins.filterSource` function would pass to its filters, thus `fn: gitignoreFilterSourcePure fn ""` should be extensionally equivalent to `filterSource`. The file is blacklisted if it's blacklisted by either your filter or the gitignoreFilter.
@@ -35,7 +38,9 @@ Those filter functions accept the same arguments the `builtins.filterSource` fun
If you want to make your own filter from scratch, you may use
```nix
-gitignoreFilter = ign: root: filterPattern (gitignoreToPatterns ign) root;
+{
+ gitignoreFilter = ign: root: filterPattern (gitignoreToPatterns ign) root;
+}
```
## gitignore files in subdirectories {#sec-pkgs-nix-gitignore-usage-recursive}
@@ -43,7 +48,9 @@ gitignoreFilter = ign: root: filterPattern (gitignoreToPatterns ign) root;
If you wish to use a filter that would search for .gitignore files in subdirectories, just like git does by default, use this function:
```nix
-gitignoreFilterRecursiveSource = filter: patterns: root:
-# OR
-gitignoreRecursiveSource = gitignoreFilterSourcePure (_: _: true);
+{
+ # gitignoreFilterRecursiveSource = filter: patterns: root:
+ # OR
+ gitignoreRecursiveSource = gitignoreFilterSourcePure (_: _: true);
+}
```
diff --git a/third_party/nixpkgs/doc/hooks/breakpoint.section.md b/third_party/nixpkgs/doc/hooks/breakpoint.section.md
index 424a9424b5..b7f1979586 100644
--- a/third_party/nixpkgs/doc/hooks/breakpoint.section.md
+++ b/third_party/nixpkgs/doc/hooks/breakpoint.section.md
@@ -3,7 +3,9 @@
This hook will make a build pause instead of stopping when a failure happens. It prevents nix from cleaning up the build environment immediately and allows the user to attach to a build environment using the `cntr` command. Upon build error it will print instructions on how to use `cntr`, which can be used to enter the environment for debugging. Installing cntr and running the command will provide shell access to the build sandbox of failed build. At `/var/lib/cntr` the sandboxed filesystem is mounted. All commands and files of the system are still accessible within the shell. To execute commands from the sandbox use the cntr exec subcommand. `cntr` is only supported on Linux-based platforms. To use it first add `cntr` to your `environment.systemPackages` on NixOS or alternatively to the root user on non-NixOS systems. Then in the package that is supposed to be inspected, add `breakpointHook` to `nativeBuildInputs`.
```nix
-nativeBuildInputs = [ breakpointHook ];
+{
+ nativeBuildInputs = [ breakpointHook ];
+}
```
When a build failure happens there will be an instruction printed that shows how to attach with `cntr` to the build sandbox.
diff --git a/third_party/nixpkgs/doc/hooks/installShellFiles.section.md b/third_party/nixpkgs/doc/hooks/installShellFiles.section.md
index 2567098116..834c6a37df 100644
--- a/third_party/nixpkgs/doc/hooks/installShellFiles.section.md
+++ b/third_party/nixpkgs/doc/hooks/installShellFiles.section.md
@@ -7,19 +7,21 @@ The `installManPage` function takes one or more paths to manpages to install. Th
The `installShellCompletion` function takes one or more paths to shell completion files. By default it will autodetect the shell type from the completion file extension, but you may also specify it by passing one of `--bash`, `--fish`, or `--zsh`. These flags apply to all paths listed after them (up until another shell flag is given). Each path may also have a custom installation name provided by providing a flag `--name NAME` before the path. If this flag is not provided, zsh completions will be renamed automatically such that `foobar.zsh` becomes `_foobar`. A root name may be provided for all paths using the flag `--cmd NAME`; this synthesizes the appropriate name depending on the shell (e.g. `--cmd foo` will synthesize the name `foo.bash` for bash and `_foo` for zsh). The path may also be a fifo or named fd (such as produced by `<(cmd)`), in which case the shell and name must be provided.
```nix
-nativeBuildInputs = [ installShellFiles ];
-postInstall = ''
- installManPage doc/foobar.1 doc/barfoo.3
- # explicit behavior
- installShellCompletion --bash --name foobar.bash share/completions.bash
- installShellCompletion --fish --name foobar.fish share/completions.fish
- installShellCompletion --zsh --name _foobar share/completions.zsh
- # implicit behavior
- installShellCompletion share/completions/foobar.{bash,fish,zsh}
- # using named fd
- installShellCompletion --cmd foobar \
- --bash <($out/bin/foobar --bash-completion) \
- --fish <($out/bin/foobar --fish-completion) \
- --zsh <($out/bin/foobar --zsh-completion)
-'';
+{
+ nativeBuildInputs = [ installShellFiles ];
+ postInstall = ''
+ installManPage doc/foobar.1 doc/barfoo.3
+ # explicit behavior
+ installShellCompletion --bash --name foobar.bash share/completions.bash
+ installShellCompletion --fish --name foobar.fish share/completions.fish
+ installShellCompletion --zsh --name _foobar share/completions.zsh
+ # implicit behavior
+ installShellCompletion share/completions/foobar.{bash,fish,zsh}
+ # using named fd
+ installShellCompletion --cmd foobar \
+ --bash <($out/bin/foobar --bash-completion) \
+ --fish <($out/bin/foobar --fish-completion) \
+ --zsh <($out/bin/foobar --zsh-completion)
+ '';
+}
```
diff --git a/third_party/nixpkgs/doc/hooks/mpi-check-hook.section.md b/third_party/nixpkgs/doc/hooks/mpi-check-hook.section.md
index 586ee2cc7c..c182c4cc61 100644
--- a/third_party/nixpkgs/doc/hooks/mpi-check-hook.section.md
+++ b/third_party/nixpkgs/doc/hooks/mpi-check-hook.section.md
@@ -12,13 +12,14 @@ Example:
```nix
{ mpiCheckPhaseHook, mpi, ... }:
+ {
+ # ...
- ...
-
- nativeCheckInputs = [
- openssh
- mpiCheckPhaseHook
- ];
+ nativeCheckInputs = [
+ openssh
+ mpiCheckPhaseHook
+ ];
+ }
```
diff --git a/third_party/nixpkgs/doc/languages-frameworks/agda.section.md b/third_party/nixpkgs/doc/languages-frameworks/agda.section.md
index cb1f12eec2..33fffc60c8 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/agda.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/agda.section.md
@@ -114,7 +114,7 @@ This can be overridden by a different version of `ghc` as follows:
```nix
agda.withPackages {
- pkgs = [ ... ];
+ pkgs = [ /* ... */ ];
ghc = haskell.compiler.ghcHEAD;
}
```
@@ -180,6 +180,7 @@ To add an Agda package to `nixpkgs`, the derivation should be written to `pkgs/d
```nix
{ mkDerivation, standard-library, fetchFromGitHub }:
+{}
```
Note that the derivation function is called with `mkDerivation` set to `agdaPackages.mkDerivation`, therefore you
@@ -193,7 +194,7 @@ mkDerivation {
version = "1.5.0";
pname = "iowa-stdlib";
- src = ...
+ src = <...>;
libraryFile = "";
libraryName = "IAL-1.3";
diff --git a/third_party/nixpkgs/doc/languages-frameworks/android.section.md b/third_party/nixpkgs/doc/languages-frameworks/android.section.md
index 6f9717ca09..1c5687f8eb 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/android.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/android.section.md
@@ -104,18 +104,20 @@ pull from:
repo.json to the Nix store based on the given repository XMLs.
```nix
-repoXmls = {
- packages = [ ./xml/repository2-1.xml ];
- images = [
- ./xml/android-sys-img2-1.xml
- ./xml/android-tv-sys-img2-1.xml
- ./xml/android-wear-sys-img2-1.xml
- ./xml/android-wear-cn-sys-img2-1.xml
- ./xml/google_apis-sys-img2-1.xml
- ./xml/google_apis_playstore-sys-img2-1.xml
- ];
- addons = [ ./xml/addon2-1.xml ];
-};
+{
+ repoXmls = {
+ packages = [ ./xml/repository2-1.xml ];
+ images = [
+ ./xml/android-sys-img2-1.xml
+ ./xml/android-tv-sys-img2-1.xml
+ ./xml/android-wear-sys-img2-1.xml
+ ./xml/android-wear-cn-sys-img2-1.xml
+ ./xml/google_apis-sys-img2-1.xml
+ ./xml/google_apis_playstore-sys-img2-1.xml
+ ];
+ addons = [ ./xml/addon2-1.xml ];
+ };
+}
```
When building the above expression with:
diff --git a/third_party/nixpkgs/doc/languages-frameworks/beam.section.md b/third_party/nixpkgs/doc/languages-frameworks/beam.section.md
index 992149090c..3653cdb337 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/beam.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/beam.section.md
@@ -117,6 +117,7 @@ If there are git dependencies.
- From the mix_deps.nix file, remove the dependencies that had git versions and pass them as an override to the import function.
```nix
+{
mixNixDeps = import ./mix.nix {
inherit beamPackages lib;
overrides = (final: prev: {
@@ -138,8 +139,9 @@ If there are git dependencies.
# you can re-use the same beamDeps argument as generated
beamDeps = with final; [ prometheus ];
};
- });
-};
+ });
+ };
+}
```
You will need to run the build process once to fix the hash to correspond to your new git src.
@@ -153,11 +155,13 @@ Practical steps
- start with the following argument to mixRelease
```nix
+{
mixFodDeps = fetchMixDeps {
pname = "mix-deps-${pname}";
inherit src version;
hash = lib.fakeHash;
};
+}
```
The first build will complain about the hash value, you can replace with the suggested value after that.
diff --git a/third_party/nixpkgs/doc/languages-frameworks/bower.section.md b/third_party/nixpkgs/doc/languages-frameworks/bower.section.md
index fceb6aaccb..20c142dad5 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/bower.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/bower.section.md
@@ -28,7 +28,7 @@ buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
(fetchbower "angular" "1.5.3" "~1.5.0" "1749xb0firxdra4rzadm4q9x90v6pzkbd7xmcyjk6qfza09ykk9y")
(fetchbower "bootstrap" "3.3.6" "~3.3.6" "1vvqlpbfcy0k5pncfjaiskj3y6scwifxygfqnw393sjfxiviwmbv")
(fetchbower "jquery" "2.2.2" "1.9.1 - 2" "10sp5h98sqwk90y4k6hbdviwqzvzwqf47r3r51pakch5ii2y7js1")
-];
+]; }
```
Using the `bower2nix` command line arguments, the output can be redirected to a file. A name like `bower-packages.nix` would be fine.
@@ -42,11 +42,13 @@ The function is implemented in [pkgs/development/bower-modules/generic/default.n
### Example buildBowerComponents {#ex-buildBowerComponents}
```nix
-bowerComponents = buildBowerComponents {
- name = "my-web-app";
- generated = ./bower-packages.nix; # note 1
- src = myWebApp; # note 2
-};
+{
+ bowerComponents = buildBowerComponents {
+ name = "my-web-app";
+ generated = ./bower-packages.nix; # note 1
+ src = myWebApp; # note 2
+ };
+}
```
In ["buildBowerComponents" example](#ex-buildBowerComponents) the following arguments are of special significance to the function:
diff --git a/third_party/nixpkgs/doc/languages-frameworks/chicken.section.md b/third_party/nixpkgs/doc/languages-frameworks/chicken.section.md
index 72c2642a64..16b00b3f5b 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/chicken.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/chicken.section.md
@@ -13,10 +13,12 @@ done in the typical Nix fashion. For example, to include support for [SRFI
might write:
```nix
+{
buildInputs = [
chicken
chickenPackages.chickenEggs.srfi-189
];
+}
```
Both `chicken` and its eggs have a setup hook which configures the environment
@@ -67,12 +69,12 @@ let
chickenEggs = super.chickenEggs.overrideScope' (eggself: eggsuper: {
srfi-180 = eggsuper.srfi-180.overrideAttrs {
# path to a local copy of srfi-180
- src = ...
+ src = <...>;
};
});
});
in
# Here, `myChickenPackages.chickenEggs.json-rpc`, which depends on `srfi-180` will use
# the local copy of `srfi-180`.
-# ...
+<...>
```
diff --git a/third_party/nixpkgs/doc/languages-frameworks/coq.section.md b/third_party/nixpkgs/doc/languages-frameworks/coq.section.md
index 6ca1997083..fdc824781c 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/coq.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/coq.section.md
@@ -55,17 +55,18 @@ Here is a simple package example. It is a pure Coq library, thus it depends on C
```nix
{ lib, mkCoqDerivation, version ? null
, coq, mathcomp, mathcomp-finmap, mathcomp-bigenough }:
-with lib; mkCoqDerivation {
+
+mkCoqDerivation {
/* namePrefix leads to e.g. `name = coq8.11-mathcomp1.11-multinomials-1.5.2` */
namePrefix = [ "coq" "mathcomp" ];
pname = "multinomials";
owner = "math-comp";
inherit version;
- defaultVersion = with versions; switch [ coq.version mathcomp.version ] [
- { cases = [ (range "8.7" "8.12") "1.11.0" ]; out = "1.5.2"; }
- { cases = [ (range "8.7" "8.11") (range "1.8" "1.10") ]; out = "1.5.0"; }
- { cases = [ (range "8.7" "8.10") (range "1.8" "1.10") ]; out = "1.4"; }
- { cases = [ "8.6" (range "1.6" "1.7") ]; out = "1.1"; }
+ defaultVersion = with lib.versions; lib.switch [ coq.version mathcomp.version ] [
+ { cases = [ (range "8.7" "8.12") (isEq "1.11") ]; out = "1.5.2"; }
+ { cases = [ (range "8.7" "8.11") (range "1.8" "1.10") ]; out = "1.5.0"; }
+ { cases = [ (range "8.7" "8.10") (range "1.8" "1.10") ]; out = "1.4"; }
+ { cases = [ (isEq "8.6") (range "1.6" "1.7") ]; out = "1.1"; }
] null;
release = {
"1.5.2".sha256 = "15aspf3jfykp1xgsxf8knqkxv8aav2p39c2fyirw7pwsfbsv2c4s";
@@ -84,7 +85,7 @@ with lib; mkCoqDerivation {
meta = {
description = "A Coq/SSReflect Library for Monoidal Rings and Multinomials";
- license = licenses.cecill-c;
+ license = lib.licenses.cecill-c;
};
}
```
diff --git a/third_party/nixpkgs/doc/languages-frameworks/crystal.section.md b/third_party/nixpkgs/doc/languages-frameworks/crystal.section.md
index b97e75a58d..9953f35704 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/crystal.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/crystal.section.md
@@ -33,22 +33,26 @@ crystal.buildCrystalPackage rec {
# Insert the path to your shards.nix file here
shardsFile = ./shards.nix;
- ...
+ # ...
}
```
This won't build anything yet, because we haven't told it what files build. We can specify a mapping from binary names to source files with the `crystalBinaries` attribute. The project's compilation instructions should show this. For Mint, the binary is called "mint", which is compiled from the source file `src/mint.cr`, so we'll specify this as follows:
```nix
+{
crystalBinaries.mint.src = "src/mint.cr";
# ...
+}
```
Additionally you can override the default `crystal build` options (which are currently `--release --progress --no-debug --verbose`) with
```nix
+{
crystalBinaries.mint.options = [ "--release" "--verbose" ];
+}
```
Depending on the project, you might need additional steps to get it to compile successfully. In Mint's case, we need to link against openssl, so in the end the Nix file looks as follows:
diff --git a/third_party/nixpkgs/doc/languages-frameworks/cuda.section.md b/third_party/nixpkgs/doc/languages-frameworks/cuda.section.md
index 11c86e375c..9791018c7f 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/cuda.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/cuda.section.md
@@ -16,24 +16,28 @@ To use one or more CUDA packages in an expression, give the expression a `cudaPa
, cudaSupport ? config.cudaSupport
, cudaPackages ? { }
, ...
-}:
+}: {}
```
When using `callPackage`, you can choose to pass in a different variant, e.g.
when a different version of the toolkit suffices
```nix
-mypkg = callPackage { cudaPackages = cudaPackages_11_5; }
+{
+ mypkg = callPackage { cudaPackages = cudaPackages_11_5; };
+}
```
If another version of say `cudnn` or `cutensor` is needed, you can override the
package set to make it the default. This guarantees you get a consistent package
set.
```nix
-mypkg = let
- cudaPackages = cudaPackages_11_5.overrideScope (final: prev: {
- cudnn = prev.cudnn_8_3;
- }});
-in callPackage { inherit cudaPackages; };
+{
+ mypkg = let
+ cudaPackages = cudaPackages_11_5.overrideScope (final: prev: {
+ cudnn = prev.cudnn_8_3;
+ });
+ in callPackage { inherit cudaPackages; };
+}
```
The CUDA NVCC compiler requires flags to determine which hardware you
@@ -144,4 +148,4 @@ All new projects should use the CUDA redistributables available in [`cudaPackage
| Find libraries | `configurePhase` | Missing dependency on a `dev` output | Add the missing dependency | The `dev` output typically contain CMake configuration files |
| Find libraries | `buildPhase` or `patchelf` | Missing dependency on a `lib` or `static` output | Add the missing dependency | The `lib` or `static` output typically contain the libraries |
-In the scenario you are unable to run the resulting binary: this is arguably the most complicated as it could be any combination of the previous reasons. This type of failure typically occurs when a library attempts to load or open a library it depends on that it does not declare in its `DT_NEEDED` section. As a first step, ensure that dependencies are patched with [`cudaPackages.autoAddOpenGLRunpath`](https://search.nixos.org/packages?channel=unstable&type=packages&query=cudaPackages.autoAddOpenGLRunpath). Failing that, try running the application with [`nixGL`](https://github.com/guibou/nixGL) or a similar wrapper tool. If that works, it likely means that the application is attempting to load a library that is not in the `RPATH` or `RUNPATH` of the binary.
+In the scenario you are unable to run the resulting binary: this is arguably the most complicated as it could be any combination of the previous reasons. This type of failure typically occurs when a library attempts to load or open a library it depends on that it does not declare in its `DT_NEEDED` section. As a first step, ensure that dependencies are patched with [`cudaPackages.autoAddDriverRunpath`](https://search.nixos.org/packages?channel=unstable&type=packages&query=cudaPackages.autoAddDriverRunpath). Failing that, try running the application with [`nixGL`](https://github.com/guibou/nixGL) or a similar wrapper tool. If that works, it likely means that the application is attempting to load a library that is not in the `RPATH` or `RUNPATH` of the binary.
diff --git a/third_party/nixpkgs/doc/languages-frameworks/cuelang.section.md b/third_party/nixpkgs/doc/languages-frameworks/cuelang.section.md
index 86304208aa..70329b15fd 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/cuelang.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/cuelang.section.md
@@ -26,7 +26,7 @@ Cuelang schemas are similar to JSON, here is a quick cheatsheet:
Nixpkgs provides a `pkgs.writeCueValidator` helper, which will write a validation script based on the provided Cuelang schema.
Here is an example:
-```
+```nix
pkgs.writeCueValidator
(pkgs.writeText "schema.cue" ''
#Def1: {
@@ -42,7 +42,7 @@ pkgs.writeCueValidator
`document` : match your input data against this fragment of structure or definition, e.g. you may use the same schema file but different documents based on the data you are validating.
Another example, given the following `validator.nix` :
-```
+```nix
{ pkgs ? import {} }:
let
genericValidator = version:
diff --git a/third_party/nixpkgs/doc/languages-frameworks/dhall.section.md b/third_party/nixpkgs/doc/languages-frameworks/dhall.section.md
index 83567ab17a..8d85c9f1da 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/dhall.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/dhall.section.md
@@ -187,6 +187,7 @@ wish to specify `source = true` for all Dhall packages, then you can amend the
Dhall overlay like this:
```nix
+{
dhallOverrides = self: super: {
# Enable source for all Dhall packages
buildDhallPackage =
@@ -194,6 +195,7 @@ Dhall overlay like this:
true = self.callPackage ./true.nix { };
};
+}
```
… and now the Prelude will contain the fully decoded result of interpreting
@@ -429,22 +431,26 @@ $ dhall-to-nixpkgs github https://github.com/dhall-lang/dhall-lang.git \
the Prelude globally for all packages, like this:
```nix
+{
dhallOverrides = self: super: {
true = self.callPackage ./true.nix { };
Prelude = self.callPackage ./Prelude.nix { };
};
+}
```
… or selectively overriding the Prelude dependency for just the `true` package,
like this:
```nix
+{
dhallOverrides = self: super: {
true = self.callPackage ./true.nix {
Prelude = self.callPackage ./Prelude.nix { };
};
};
+}
```
## Overrides {#ssec-dhall-overrides}
@@ -454,11 +460,13 @@ You can override any of the arguments to `buildDhallGitHubPackage` or
For example, suppose we wanted to selectively enable `source = true` just for the Prelude. We can do that like this:
```nix
+{
dhallOverrides = self: super: {
Prelude = super.Prelude.overridePackage { source = true; };
- …
+ # ...
};
+}
```
[semantic-integrity-checks]: https://docs.dhall-lang.org/tutorials/Language-Tour.html#installing-packages
diff --git a/third_party/nixpkgs/doc/languages-frameworks/dlang.section.md b/third_party/nixpkgs/doc/languages-frameworks/dlang.section.md
new file mode 100644
index 0000000000..6e9edefc5e
--- /dev/null
+++ b/third_party/nixpkgs/doc/languages-frameworks/dlang.section.md
@@ -0,0 +1,69 @@
+# D (Dlang) {#dlang}
+
+Nixpkgs provides multiple D compilers such as `ldc`, `dmd` and `gdc`.
+These can be used like any other package during build time.
+
+However, Nixpkgs provides a build helper for compiling packages using the `dub` package manager.
+
+Here's an example:
+```nix
+{
+ lib,
+ buildDubPackage,
+ fetchFromGitHub,
+ ncurses,
+ zlib,
+}:
+
+buildDubPackage rec {
+ pname = "btdu";
+ version = "0.5.1";
+
+ src = fetchFromGitHub {
+ owner = "CyberShadow";
+ repo = "btdu";
+ rev = "v${version}";
+ hash = "sha256-3sSZq+5UJH02IO0Y1yL3BLHDb4lk8k6awb5ZysBQciE=";
+ };
+
+ # generated by dub-to-nix, see below
+ dubLock = ./dub-lock.json;
+
+ buildInputs = [
+ ncurses
+ zlib
+ ];
+
+ installPhase = ''
+ runHook preInstall
+ install -Dm755 btdu -t $out/bin
+ runHook postInstall
+ '';
+}
+```
+
+Note that you need to define `installPhase` because `dub` doesn't know where files should go in `$out`.
+
+Also note that running `dub test` is disabled by default. You can enable it by setting `doCheck = true`.
+
+## Lockfiles {#dub-lockfiles}
+Nixpkgs has its own lockfile format for `dub` dependencies, because `dub`'s official "lockfile" format (`dub.selections.json`) is not hash based.
+
+A lockfile can be generated using the `dub-to-nix` helper package.
+* Firstly, install `dub-to-nix` into your shell session by running `nix-shell -p dub-to-nix`
+* Then navigate to the root of the source of the program you want to package
+* Finally, run `dub-to-nix` and it will print the lockfile to stdout. You could pipe stdout into a text file or just copy the output manually into a file.
+
+## `buildDubPackage` parameters {#builddubpackage-parameters}
+
+The `buildDubPackage` function takes an attrset of parameters that are passed on to `stdenv.mkDerivation`.
+
+The following parameters are specific to `buildDubPackage`:
+
+* `dubLock`: A lockfile generated by `dub-to-nix` from the source of the package. Can be either a path to the file, or an attrset already parsed with `lib.importJSON`.
+ The latter useful if the package uses `dub` dependencies not already in the lockfile. (e.g. if the package calls `dub run some-dub-package` manually)
+* `dubBuildType ? "release"`: The build type to pass to `dub build` as a value for the `--build=` flag.
+* `dubFlags ? []`: The flags to pass to `dub build` and `dub test`.
+* `dubBuildFlags ? []`: The flags to pass to `dub build`.
+* `dubTestFlags ? []`: The flags to pass to `dub test`.
+* `compiler ? ldc`: The D compiler to be used by `dub`.
diff --git a/third_party/nixpkgs/doc/languages-frameworks/dotnet.section.md b/third_party/nixpkgs/doc/languages-frameworks/dotnet.section.md
index 7987aa4163..a4e9d6cf9a 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/dotnet.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/dotnet.section.md
@@ -134,7 +134,7 @@ Here is an example `default.nix`, using some of the previously discussed argumen
{ lib, buildDotnetModule, dotnetCorePackages, ffmpeg }:
let
- referencedProject = import ../../bar { ... };
+ referencedProject = import ../../bar { /* ... */ };
in buildDotnetModule rec {
pname = "someDotnetApplication";
version = "0.1";
@@ -210,11 +210,11 @@ buildDotnetGlobalTool {
nugetSha256 = "sha256-ZG2HFyKYhVNVYd2kRlkbAjZJq88OADe3yjxmLuxXDUo=";
- meta = with lib; {
+ meta = {
homepage = "https://cmd.petabridge.com/index.html";
changelog = "https://cmd.petabridge.com/articles/RELEASE_NOTES.html";
- license = licenses.unfree;
- platforms = platforms.linux;
+ license = lib.licenses.unfree;
+ platforms = lib.platforms.linux;
};
}
```
@@ -236,7 +236,7 @@ the packages inside the `out` directory.
$ nuget-to-nix out > deps.nix
```
Which `nuget-to-nix` will generate an output similar to below
-```
+```nix
{ fetchNuGet }: [
(fetchNuGet { pname = "FosterFramework"; version = "0.1.15-alpha"; sha256 = "0pzsdfbsfx28xfqljcwy100xhbs6wyx0z1d5qxgmv3l60di9xkll"; })
(fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "8.0.1"; sha256 = "1gjz379y61ag9whi78qxx09bwkwcznkx2mzypgycibxk61g11da1"; })
diff --git a/third_party/nixpkgs/doc/languages-frameworks/gnome.section.md b/third_party/nixpkgs/doc/languages-frameworks/gnome.section.md
index 5208f1013c..e158cea0e5 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/gnome.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/gnome.section.md
@@ -47,6 +47,7 @@ When an application uses icons, an icon theme should be available in `XDG_DATA_D
In the rare case you need to use icons from dependencies (e.g. when an app forces an icon theme), you can use the following to pick them up:
```nix
+{
buildInputs = [
pantheon.elementary-icon-theme
];
@@ -56,6 +57,7 @@ In the rare case you need to use icons from dependencies (e.g. when an app force
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
)
'';
+}
```
To avoid costly file system access when locating icons, GTK, [as well as Qt](https://woboq.com/blog/qicon-reads-gtk-icon-cache-in-qt57.html), can rely on `icon-theme.cache` files from the themes' top-level directories. These files are generated using `gtk-update-icon-cache`, which is expected to be run whenever an icon is added or removed to an icon theme (typically an application icon into `hicolor` theme) and some programs do indeed run this after icon installation. However, since packages are installed into their own prefix by Nix, this would lead to conflicts. For that reason, `gtk3` provides a [setup hook](#ssec-gnome-hooks-gtk-drop-icon-theme-cache) that will clean the file from installation. Since most applications only ship their own icon that will be loaded on start-up, it should not affect them too much. On the other hand, icon themes are much larger and more widely used so we need to cache them. Because we recommend installing icon themes globally, we will generate the cache files from all packages in a profile using a NixOS module. You can enable the cache generation using `gtk.iconCache.enable` option if your desktop environment does not already do that.
@@ -85,22 +87,26 @@ If your application uses [GStreamer](https://gstreamer.freedesktop.org/) or [Gri
Given the requirements above, the package expression would become messy quickly:
```nix
-preFixup = ''
- for f in $(find $out/bin/ $out/libexec/ -type f -executable); do
- wrapProgram "$f" \
- --prefix GIO_EXTRA_MODULES : "${getLib dconf}/lib/gio/modules" \
- --prefix XDG_DATA_DIRS : "$out/share" \
- --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${name}" \
- --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \
- --prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
- --prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" [ pango json-glib ]}"
- done
-'';
+{
+ preFixup = ''
+ for f in $(find $out/bin/ $out/libexec/ -type f -executable); do
+ wrapProgram "$f" \
+ --prefix GIO_EXTRA_MODULES : "${getLib dconf}/lib/gio/modules" \
+ --prefix XDG_DATA_DIRS : "$out/share" \
+ --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${name}" \
+ --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \
+ --prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
+ --prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" [ pango json-glib ]}"
+ done
+ '';
+}
```
-Fortunately, there is [`wrapGAppsHook`]{#ssec-gnome-hooks-wrapgappshook}. It works in conjunction with other setup hooks that populate environment variables, and it will then wrap all executables in `bin` and `libexec` directories using said variables.
+Fortunately, there is [`wrapGAppsHook`]{#ssec-gnome-hooks-wrapgappshook}. It works in conjunction with other setup hooks that populate environment variables, and it will then wrap all executables in `bin` and `libexec` directories using said variables. For convenience, it also adds `dconf.lib` for a GIO module implementing a GSettings backend using `dconf`, `gtk3` for GSettings schemas, and `librsvg` for GdkPixbuf loader to the closure.
-For convenience, it also adds `dconf.lib` for a GIO module implementing a GSettings backend using `dconf`, `gtk3` for GSettings schemas, and `librsvg` for GdkPixbuf loader to the closure. There is also [`wrapGAppsHook4`]{#ssec-gnome-hooks-wrapgappshook4}, which replaces GTK 3 with GTK 4. And in case you are packaging a program without a graphical interface, you might want to use [`wrapGAppsNoGuiHook`]{#ssec-gnome-hooks-wrapgappsnoguihook}, which runs the same script as `wrapGAppsHook` but does not bring `gtk3` and `librsvg` into the closure.
+There is also [`wrapGAppsHook4`]{#ssec-gnome-hooks-wrapgappshook4}, which replaces GTK 3 with GTK 4. Instead of `wrapGAppsHook`, this should be used for all GTK4 applications.
+
+In case you are packaging a program without a graphical interface, you might want to use [`wrapGAppsNoGuiHook`]{#ssec-gnome-hooks-wrapgappsnoguihook}, which runs the same script as `wrapGAppsHook` but does not bring `gtk3` and `librsvg` into the closure.
- `wrapGAppsHook` itself will add the package’s `share` directory to `XDG_DATA_DIRS`.
@@ -121,14 +127,16 @@ For convenience, it also adds `dconf.lib` for a GIO module implementing a GSetti
You can also pass additional arguments to `makeWrapper` using `gappsWrapperArgs` in `preFixup` hook:
```nix
-preFixup = ''
- gappsWrapperArgs+=(
- # Thumbnailers
- --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
- --prefix XDG_DATA_DIRS : "${librsvg}/share"
- --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
- )
-'';
+{
+ preFixup = ''
+ gappsWrapperArgs+=(
+ # Thumbnailers
+ --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
+ --prefix XDG_DATA_DIRS : "${librsvg}/share"
+ --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
+ )
+ '';
+}
```
## Updating GNOME packages {#ssec-gnome-updating}
@@ -159,7 +167,7 @@ python3.pkgs.buildPythonApplication {
nativeBuildInputs = [
wrapGAppsHook
gobject-introspection
- ...
+ # ...
];
dontWrapGApps = true;
@@ -181,7 +189,7 @@ mkDerivation {
nativeBuildInputs = [
wrapGAppsHook
qmake
- ...
+ # ...
];
dontWrapGApps = true;
diff --git a/third_party/nixpkgs/doc/languages-frameworks/go.section.md b/third_party/nixpkgs/doc/languages-frameworks/go.section.md
index 7f151c7612..2f4cb0326a 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/go.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/go.section.md
@@ -38,24 +38,26 @@ The `buildGoModule` function accepts the following parameters in addition to the
The following is an example expression using `buildGoModule`:
```nix
-pet = buildGoModule rec {
- pname = "pet";
- version = "0.3.4";
+{
+ pet = buildGoModule rec {
+ pname = "pet";
+ version = "0.3.4";
- src = fetchFromGitHub {
- owner = "knqyf263";
- repo = "pet";
- rev = "v${version}";
- hash = "sha256-Gjw1dRrgM8D3G7v6WIM2+50r4HmTXvx0Xxme2fH9TlQ=";
- };
+ src = fetchFromGitHub {
+ owner = "knqyf263";
+ repo = "pet";
+ rev = "v${version}";
+ hash = "sha256-Gjw1dRrgM8D3G7v6WIM2+50r4HmTXvx0Xxme2fH9TlQ=";
+ };
- vendorHash = "sha256-ciBIR+a1oaYH+H1PcC8cD8ncfJczk1IiJ8iYNM+R6aA=";
+ vendorHash = "sha256-ciBIR+a1oaYH+H1PcC8cD8ncfJczk1IiJ8iYNM+R6aA=";
- meta = with lib; {
- description = "Simple command-line snippet manager, written in Go";
- homepage = "https://github.com/knqyf263/pet";
- license = licenses.mit;
- maintainers = with maintainers; [ kalbasit ];
+ meta = {
+ description = "Simple command-line snippet manager, written in Go";
+ homepage = "https://github.com/knqyf263/pet";
+ license = lib.licenses.mit;
+ maintainers = with lib.maintainers; [ kalbasit ];
+ };
};
}
```
@@ -72,20 +74,22 @@ In the following is an example expression using `buildGoPackage`, the following
- `goDeps` is where the Go dependencies of a Go program are listed as a list of package source identified by Go import path. It could be imported as a separate `deps.nix` file for readability. The dependency data structure is described below.
```nix
-deis = buildGoPackage rec {
- pname = "deis";
- version = "1.13.0";
+{
+ deis = buildGoPackage rec {
+ pname = "deis";
+ version = "1.13.0";
- goPackagePath = "github.com/deis/deis";
+ goPackagePath = "github.com/deis/deis";
- src = fetchFromGitHub {
- owner = "deis";
- repo = "deis";
- rev = "v${version}";
- hash = "sha256-XCPD4LNWtAd8uz7zyCLRfT8rzxycIUmTACjU03GnaeM=";
+ src = fetchFromGitHub {
+ owner = "deis";
+ repo = "deis";
+ rev = "v${version}";
+ hash = "sha256-XCPD4LNWtAd8uz7zyCLRfT8rzxycIUmTACjU03GnaeM=";
+ };
+
+ goDeps = ./deps.nix;
};
-
- goDeps = ./deps.nix;
}
```
@@ -138,6 +142,7 @@ Many attributes [controlling the build phase](#variables-controlling-the-build-p
- [`patchFlags`](#var-stdenv-patchFlags)
- [`postPatch`](#var-stdenv-postPatch)
- [`preBuild`](#var-stdenv-preBuild)
+- `env`: useful for passing down variables such as `GOWORK`.
To control test execution of the build derivation, the following attributes are of interest:
@@ -153,10 +158,12 @@ A string list of flags to pass to the Go linker tool via the `-ldflags` argument
The most common use case for this argument is to make the resulting executable aware of its own version by injecting the value of string variable using the `-X` flag. For example:
```nix
+{
ldflags = [
"-X main.Version=${version}"
"-X main.Commit=${version}"
];
+}
```
### `tags` {#var-go-tags}
@@ -164,16 +171,20 @@ The most common use case for this argument is to make the resulting executable a
A string list of [Go build tags (also called build constraints)](https://pkg.go.dev/cmd/go#hdr-Build_constraints) that are passed via the `-tags` argument of `go build`. These constraints control whether Go files from the source should be included in the build. For example:
```nix
+{
tags = [
"production"
"sqlite"
];
+}
```
Tags can also be set conditionally:
```nix
+{
tags = [ "production" ] ++ lib.optionals withSqlite [ "sqlite" ];
+}
```
### `deleteVendor` {#var-go-deleteVendor}
@@ -188,10 +199,12 @@ Many Go projects keep the main package in a `cmd` directory.
Following example could be used to only build the example-cli and example-server binaries:
```nix
-subPackages = [
- "cmd/example-cli"
- "cmd/example-server"
-];
+{
+ subPackages = [
+ "cmd/example-cli"
+ "cmd/example-server"
+ ];
+}
```
### `excludedPackages` {#var-go-excludedPackages}
@@ -213,10 +226,12 @@ on a per package level using build tags (`tags`). In case CGO is disabled, these
When a Go program depends on C libraries, place those dependencies in `buildInputs`:
```nix
+{
buildInputs = [
libvirt
libxml2
];
+}
```
`CGO_ENABLED` defaults to `1`.
@@ -245,15 +260,18 @@ This is done with the [`-skip` or `-run`](https://pkg.go.dev/cmd/go#hdr-Testing_
For example, only a selection of tests could be run with:
```nix
+{
# -run and -skip accept regular expressions
checkFlags = [
"-run=^Test(Simple|Fast)$"
];
+}
```
If a larger amount of tests should be skipped, the following pattern can be used:
```nix
+{
checkFlags =
let
# Skip tests that require network access
@@ -264,6 +282,7 @@ If a larger amount of tests should be skipped, the following pattern can be used
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
+}
```
To disable tests altogether, set `doCheck = false;`.
diff --git a/third_party/nixpkgs/doc/languages-frameworks/haskell.section.md b/third_party/nixpkgs/doc/languages-frameworks/haskell.section.md
index bec72cb3c0..5d7796b554 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/haskell.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/haskell.section.md
@@ -113,7 +113,7 @@ Each of those compiler versions has a corresponding attribute set built using
it. However, the non-standard package sets are not tested regularly and, as a
result, contain fewer working packages. The corresponding package set for GHC
9.4.5 is `haskell.packages.ghc945`. In fact `haskellPackages` is just an alias
-for `haskell.packages.ghc927`:
+for `haskell.packages.ghc964`:
```console
$ nix-env -f '' -qaP -A haskell.packages.ghc927
@@ -1020,6 +1020,11 @@ failing because of e.g. a syntax error in the Haddock documentation.
: Sets `doCheck` to `false` for `drv`. Useful if a package has a broken,
flaky or otherwise problematic test suite breaking the build.
+`dontCheckIf condition drv`
+: Sets `doCheck` to `false` for `drv`, but only if `condition` applies.
+Otherwise it's a no-op. Useful to conditionally disable tests for a package
+without interfering with previous overrides or default values.
+
diff --git a/third_party/nixpkgs/doc/languages-frameworks/idris.section.md b/third_party/nixpkgs/doc/languages-frameworks/idris.section.md
index 447a3e7bb8..0fa8288257 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/idris.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/idris.section.md
@@ -93,11 +93,11 @@ build-idris-package {
hash = "sha256-h28F9EEPuvab6zrfeE+0k1XGQJGwINnsJEG8yjWIl7w=";
};
- meta = with lib; {
+ meta = {
description = "Idris YAML lib";
homepage = "https://github.com/Heather/Idris.Yaml";
- license = licenses.mit;
- maintainers = [ maintainers.brainrape ];
+ license = lib.licenses.mit;
+ maintainers = [ lib.maintainers.brainrape ];
};
}
```
@@ -134,9 +134,9 @@ For example you could set
```nix
build-idris-package {
- idrisBuildOptions = [ "--log" "1" "--verbose" ]
+ idrisBuildOptions = [ "--log" "1" "--verbose" ];
- ...
+ # ...
}
```
diff --git a/third_party/nixpkgs/doc/languages-frameworks/index.md b/third_party/nixpkgs/doc/languages-frameworks/index.md
index 67107fb5b6..920e5e7bd4 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/index.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/index.md
@@ -14,6 +14,7 @@ cuda.section.md
cuelang.section.md
dart.section.md
dhall.section.md
+dlang.section.md
dotnet.section.md
emscripten.section.md
gnome.section.md
diff --git a/third_party/nixpkgs/doc/languages-frameworks/java.section.md b/third_party/nixpkgs/doc/languages-frameworks/java.section.md
index 371bdf6323..6d56ffcd45 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/java.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/java.section.md
@@ -4,12 +4,31 @@ Ant-based Java packages are typically built from source as follows:
```nix
stdenv.mkDerivation {
- name = "...";
- src = fetchurl { ... };
+ pname = "...";
+ version = "...";
- nativeBuildInputs = [ jdk ant ];
+ src = fetchurl { /* ... */ };
- buildPhase = "ant";
+ nativeBuildInputs = [
+ ant
+ jdk
+ stripJavaArchivesHook # removes timestamp metadata from jar files
+ ];
+
+ buildPhase = ''
+ runHook preBuild
+ ant # build the project using ant
+ runHook postBuild
+ '';
+
+ installPhase = ''
+ runHook preInstall
+
+ # copy generated jar file(s) to an appropriate location in $out
+ install -Dm644 build/foo.jar $out/share/java/foo.jar
+
+ runHook postInstall
+ '';
}
```
@@ -17,6 +36,10 @@ Note that `jdk` is an alias for the OpenJDK (self-built where available,
or pre-built via Zulu). Platforms with OpenJDK not (yet) in Nixpkgs
(`Aarch32`, `Aarch64`) point to the (unfree) `oraclejdk`.
+Also note that not using `stripJavaArchivesHook` will likely cause the
+generated `.jar` files to be non-deterministic, which is not optimal.
+Using it, however, does not always guarantee reproducibility.
+
JAR files that are intended to be used by other packages should be
installed in `$out/share/java`. JDKs have a stdenv setup hook that add
any JARs in the `share/java` directories of the build inputs to the
@@ -25,8 +48,10 @@ installs a JAR named `foo.jar` in its `share/java` directory, and
another package declares the attribute
```nix
-buildInputs = [ libfoo ];
-nativeBuildInputs = [ jdk ];
+{
+ buildInputs = [ libfoo ];
+ nativeBuildInputs = [ jdk ];
+}
```
then `CLASSPATH` will be set to
@@ -39,13 +64,15 @@ If your Java package provides a program, you need to generate a wrapper
script to run it using a JRE. You can use `makeWrapper` for this:
```nix
-nativeBuildInputs = [ makeWrapper ];
+{
+ nativeBuildInputs = [ makeWrapper ];
-installPhase = ''
- mkdir -p $out/bin
- makeWrapper ${jre}/bin/java $out/bin/foo \
- --add-flags "-cp $out/share/java/foo.jar org.foo.Main"
-'';
+ installPhase = ''
+ mkdir -p $out/bin
+ makeWrapper ${jre}/bin/java $out/bin/foo \
+ --add-flags "-cp $out/share/java/foo.jar org.foo.Main"
+ '';
+}
```
Since the introduction of the Java Platform Module System in Java 9,
@@ -69,16 +96,18 @@ let
something = (pkgs.something.override { jre = my_jre; });
other = (pkgs.other.override { jre = my_jre; });
in
- ...
+ <...>
```
You can also specify what JDK your JRE should be based on, for example
selecting a 'headless' build to avoid including a link to GTK+:
```nix
-my_jre = pkgs.jre_minimal.override {
- jdk = jdk11_headless;
-};
+{
+ my_jre = pkgs.jre_minimal.override {
+ jdk = jdk11_headless;
+ };
+}
```
Note all JDKs passthru `home`, so if your application requires
@@ -93,7 +122,9 @@ It is possible to use a different Java compiler than `javac` from the
OpenJDK. For instance, to use the GNU Java Compiler:
```nix
-nativeBuildInputs = [ gcj ant ];
+{
+ nativeBuildInputs = [ gcj ant ];
+}
```
Here, Ant will automatically use `gij` (the GNU Java Runtime) instead of
diff --git a/third_party/nixpkgs/doc/languages-frameworks/javascript.section.md b/third_party/nixpkgs/doc/languages-frameworks/javascript.section.md
index 5d2a6413e1..f706f92c66 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/javascript.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/javascript.section.md
@@ -4,11 +4,14 @@
This contains instructions on how to package javascript applications.
-The various tools available will be listed in the [tools-overview](#javascript-tools-overview). Some general principles for packaging will follow. Finally some tool specific instructions will be given.
+The various tools available will be listed in the [tools-overview](#javascript-tools-overview).
+Some general principles for packaging will follow.
+Finally some tool specific instructions will be given.
## Getting unstuck / finding code examples {#javascript-finding-examples}
-If you find you are lacking inspiration for packing javascript applications, the links below might prove useful. Searching online for prior art can be helpful if you are running into solved problems.
+If you find you are lacking inspiration for packaging javascript applications, the links below might prove useful.
+Searching online for prior art can be helpful if you are running into solved problems.
### Github {#javascript-finding-examples-github}
@@ -30,23 +33,29 @@ The following principles are given in order of importance with potential excepti
It is often not documented which node version is used upstream, but if it is, try to use the same version when packaging.
-This can be a problem if upstream is using the latest and greatest and you are trying to use an earlier version of node. Some cryptic errors regarding V8 may appear.
+This can be a problem if upstream is using the latest and greatest and you are trying to use an earlier version of node.
+Some cryptic errors regarding V8 may appear.
### Try to respect the package manager originally used by upstream (and use the upstream lock file) {#javascript-upstream-package-manager}
-A lock file (package-lock.json, yarn.lock...) is supposed to make reproducible installations of node_modules for each tool.
+A lock file (package-lock.json, yarn.lock...) is supposed to make reproducible installations of `node_modules` for each tool.
-Guidelines of package managers, recommend to commit those lock files to the repos. If a particular lock file is present, it is a strong indication of which package manager is used upstream.
+Guidelines of package managers, recommend to commit those lock files to the repos.
+If a particular lock file is present, it is a strong indication of which package manager is used upstream.
-It's better to try to use a Nix tool that understand the lock file. Using a different tool might give you hard to understand error because different packages have been installed. An example of problems that could arise can be found [here](https://github.com/NixOS/nixpkgs/pull/126629). Upstream use NPM, but this is an attempt to package it with `yarn2nix` (that uses yarn.lock).
+It's better to try to use a Nix tool that understand the lock file.
+Using a different tool might give you hard to understand error because different packages have been installed.
+An example of problems that could arise can be found [here](https://github.com/NixOS/nixpkgs/pull/126629).
+Upstream use npm, but this is an attempt to package it with `yarn2nix` (that uses yarn.lock).
-Using a different tool forces to commit a lock file to the repository. Those files are fairly large, so when packaging for nixpkgs, this approach does not scale well.
+Using a different tool forces to commit a lock file to the repository.
+Those files are fairly large, so when packaging for nixpkgs, this approach does not scale well.
Exceptions to this rule are:
- When you encounter one of the bugs from a Nix tool. In each of the tool specific instructions, known problems will be detailed. If you have a problem with a particular tool, then it's best to try another tool, even if this means you will have to recreate a lock file and commit it to nixpkgs. In general `yarn2nix` has less known problems and so a simple search in nixpkgs will reveal many yarn.lock files committed.
-- Some lock files contain particular version of a package that has been pulled off NPM for some reason. In that case, you can recreate upstream lock (by removing the original and `npm install`, `yarn`, ...) and commit this to nixpkgs.
-- The only tool that supports workspaces (a feature of NPM that helps manage sub-directories with different package.json from a single top level package.json) is `yarn2nix`. If upstream has workspaces you should try `yarn2nix`.
+- Some lock files contain particular version of a package that has been pulled off npm for some reason. In that case, you can recreate upstream lock (by removing the original and `npm install`, `yarn`, ...) and commit this to nixpkgs.
+- The only tool that supports workspaces (a feature of npm that helps manage sub-directories with different package.json from a single top level package.json) is `yarn2nix`. If upstream has workspaces you should try `yarn2nix`.
### Try to use upstream package.json {#javascript-upstream-package-json}
@@ -67,28 +76,36 @@ Exceptions to this rule are:
when you need to override a package.json. It's nice to use the one from the upstream source and do some explicit override. Here is an example:
```nix
- patchedPackageJSON = final.runCommand "package.json" { } ''
- ${jq}/bin/jq '.version = "0.4.0" |
- .devDependencies."@jsdoc/cli" = "^0.2.5"
- ${sonar-src}/package.json > $out
- '';
+ {
+ patchedPackageJSON = final.runCommand "package.json" { } ''
+ ${jq}/bin/jq '.version = "0.4.0" |
+ .devDependencies."@jsdoc/cli" = "^0.2.5"
+ ${sonar-src}/package.json > $out
+ '';
+ }
```
You will still need to commit the modified version of the lock files, but at least the overrides are explicit for everyone to see.
### Using node_modules directly {#javascript-using-node_modules}
-Each tool has an abstraction to just build the node_modules (dependencies) directory. You can always use the `stdenv.mkDerivation` with the node_modules to build the package (symlink the node_modules directory and then use the package build command). The node_modules abstraction can be also used to build some web framework frontends. For an example of this see how [plausible](https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/web-apps/plausible/default.nix) is built. `mkYarnModules` to make the derivation containing node_modules. Then when building the frontend you can just symlink the node_modules directory.
+Each tool has an abstraction to just build the node_modules (dependencies) directory.
+You can always use the `stdenv.mkDerivation` with the node_modules to build the package (symlink the node_modules directory and then use the package build command).
+The node_modules abstraction can be also used to build some web framework frontends.
+For an example of this see how [plausible](https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/web-apps/plausible/default.nix) is built. `mkYarnModules` to make the derivation containing node_modules.
+Then when building the frontend you can just symlink the node_modules directory.
## Javascript packages inside nixpkgs {#javascript-packages-nixpkgs}
-The [pkgs/development/node-packages](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/node-packages) folder contains a generated collection of [NPM packages](https://npmjs.com/) that can be installed with the Nix package manager.
+The [pkgs/development/node-packages](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/node-packages) folder contains a generated collection of [npm packages](https://npmjs.com/) that can be installed with the Nix package manager.
-As a rule of thumb, the package set should only provide _end user_ software packages, such as command-line utilities. Libraries should only be added to the package set if there is a non-NPM package that requires it.
+As a rule of thumb, the package set should only provide _end user_ software packages, such as command-line utilities.
+Libraries should only be added to the package set if there is a non-npm package that requires it.
-When it is desired to use NPM libraries in a development project, use the `node2nix` generator directly on the `package.json` configuration file of the project.
+When it is desired to use npm libraries in a development project, use the `node2nix` generator directly on the `package.json` configuration file of the project.
-The package set provides support for the official stable Node.js versions. The latest stable LTS release in `nodePackages`, as well as the latest stable current release in `nodePackages_latest`.
+The package set provides support for the official stable Node.js versions.
+The latest stable LTS release in `nodePackages`, as well as the latest stable current release in `nodePackages_latest`.
If your package uses native addons, you need to examine what kind of native build system it uses. Here are some examples:
@@ -96,18 +113,21 @@ If your package uses native addons, you need to examine what kind of native buil
- `node-gyp-builder`
- `node-pre-gyp`
-After you have identified the correct system, you need to override your package expression while adding in build system as a build input. For example, `dat` requires `node-gyp-build`, so we override its expression in [pkgs/development/node-packages/overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/node-packages/overrides.nix):
+After you have identified the correct system, you need to override your package expression while adding in build system as a build input.
+For example, `dat` requires `node-gyp-build`, so we override its expression in [pkgs/development/node-packages/overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/node-packages/overrides.nix):
```nix
+ {
dat = prev.dat.override (oldAttrs: {
buildInputs = [ final.node-gyp-build pkgs.libtool pkgs.autoconf pkgs.automake ];
meta = oldAttrs.meta // { broken = since "12"; };
});
+ }
```
### Adding and Updating Javascript packages in nixpkgs {#javascript-adding-or-updating-packages}
-To add a package from NPM to nixpkgs:
+To add a package from npm to nixpkgs:
1. Modify [pkgs/development/node-packages/node-packages.json](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/node-packages/node-packages.json) to add, update or remove package entries to have it included in `nodePackages` and `nodePackages_latest`.
2. Run the script:
@@ -134,7 +154,7 @@ To add a package from NPM to nixpkgs:
For more information about the generation process, consult the [README.md](https://github.com/svanderburg/node2nix) file of the `node2nix` tool.
-To update NPM packages in nixpkgs, run the same `generate.sh` script:
+To update npm packages in nixpkgs, run the same `generate.sh` script:
```sh
./pkgs/development/node-packages/generate.sh
@@ -159,7 +179,8 @@ git config --global url."https://github.com/".insteadOf git://github.com/
### buildNpmPackage {#javascript-buildNpmPackage}
-`buildNpmPackage` allows you to package npm-based projects in Nixpkgs without the use of an auto-generated dependencies file (as used in [node2nix](#javascript-node2nix)). It works by utilizing npm's cache functionality -- creating a reproducible cache that contains the dependencies of a project, and pointing npm to it.
+`buildNpmPackage` allows you to package npm-based projects in Nixpkgs without the use of an auto-generated dependencies file (as used in [node2nix](#javascript-node2nix)).
+It works by utilizing npm's cache functionality -- creating a reproducible cache that contains the dependencies of a project, and pointing npm to it.
Here's an example:
@@ -184,16 +205,18 @@ buildNpmPackage rec {
NODE_OPTIONS = "--openssl-legacy-provider";
- meta = with lib; {
+ meta = {
description = "A modern web UI for various torrent clients with a Node.js backend and React frontend";
homepage = "https://flood.js.org";
- license = licenses.gpl3Only;
- maintainers = with maintainers; [ winter ];
+ license = lib.licenses.gpl3Only;
+ maintainers = with lib.maintainers; [ winter ];
};
}
```
-In the default `installPhase` set by `buildNpmPackage`, it uses `npm pack --json --dry-run` to decide what files to install in `$out/lib/node_modules/$name/`, where `$name` is the `name` string defined in the package's `package.json`. Additionally, the `bin` and `man` keys in the source's `package.json` are used to decide what binaries and manpages are supposed to be installed. If these are not defined, `npm pack` may miss some files, and no binaries will be produced.
+In the default `installPhase` set by `buildNpmPackage`, it uses `npm pack --json --dry-run` to decide what files to install in `$out/lib/node_modules/$name/`, where `$name` is the `name` string defined in the package's `package.json`.
+Additionally, the `bin` and `man` keys in the source's `package.json` are used to decide what binaries and manpages are supposed to be installed.
+If these are not defined, `npm pack` may miss some files, and no binaries will be produced.
#### Arguments {#javascript-buildNpmPackage-arguments}
@@ -233,6 +256,37 @@ sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
It returns a derivation with all `package-lock.json` dependencies downloaded into `$out/`, usable as an npm cache.
+#### importNpmLock {#javascript-buildNpmPackage-importNpmLock}
+
+`importNpmLock` is a Nix function that requires the following optional arguments:
+
+- `npmRoot`: Path to package directory containing the source tree
+- `package`: Parsed contents of `package.json`
+- `packageLock`: Parsed contents of `package-lock.json`
+- `pname`: Package name
+- `version`: Package version
+
+It returns a derivation with a patched `package.json` & `package-lock.json` with all dependencies resolved to Nix store paths.
+
+This function is analogous to using `fetchNpmDeps`, but instead of specifying `hash` it uses metadata from `package.json` & `package-lock.json`.
+
+Note that `npmHooks.npmConfigHook` cannot be used with `importNpmLock`. You will instead need to use `importNpmLock.npmConfigHook`:
+
+```nix
+{ buildNpmPackage, importNpmLock }:
+
+buildNpmPackage {
+ pname = "hello";
+ version = "0.1.0";
+
+ npmDeps = importNpmLock {
+ npmRoot = ./.;
+ };
+
+ npmConfigHook = importNpmLock.npmConfigHook;
+}
+```
+
### corepack {#javascript-corepack}
This package puts the corepack wrappers for pnpm and yarn in your PATH, and they will honor the `packageManager` setting in the `package.json`.
@@ -253,8 +307,8 @@ See `node2nix` [docs](https://github.com/svanderburg/node2nix) for more info.
#### Pitfalls {#javascript-node2nix-pitfalls}
- If upstream package.json does not have a "version" attribute, `node2nix` will crash. You will need to add it like shown in [the package.json section](#javascript-upstream-package-json).
-- `node2nix` has some [bugs](https://github.com/svanderburg/node2nix/issues/238) related to working with lock files from NPM distributed with `nodejs_16`.
-- `node2nix` does not like missing packages from NPM. If you see something like `Cannot resolve version: vue-loader-v16@undefined` then you might want to try another tool. The package might have been pulled off of NPM.
+- `node2nix` has some [bugs](https://github.com/svanderburg/node2nix/issues/238) related to working with lock files from npm distributed with `nodejs_16`.
+- `node2nix` does not like missing packages from npm. If you see something like `Cannot resolve version: vue-loader-v16@undefined` then you might want to try another tool. The package might have been pulled off of npm.
### yarn2nix {#javascript-yarn2nix}
@@ -265,10 +319,12 @@ You will need at least a `yarn.lock` file. If upstream does not have one you nee
If the downloaded files contain the `package.json` and `yarn.lock` files they can be used like this:
```nix
-offlineCache = fetchYarnDeps {
- yarnLock = src + "/yarn.lock";
- hash = "....";
-};
+{
+ offlineCache = fetchYarnDeps {
+ yarnLock = src + "/yarn.lock";
+ hash = "....";
+ };
+}
```
#### mkYarnPackage {#javascript-yarn2nix-mkYarnPackage}
@@ -278,33 +334,41 @@ offlineCache = fetchYarnDeps {
It's important to use the `--offline` flag. For example if you script is `"build": "something"` in `package.json` use:
```nix
-buildPhase = ''
- export HOME=$(mktemp -d)
- yarn --offline build
-'';
+{
+ buildPhase = ''
+ export HOME=$(mktemp -d)
+ yarn --offline build
+ '';
+}
```
-The dist phase is also trying to build a binary, the only way to override it is with:
+The `distPhase` is packing the package's dependencies in a tarball using `yarn pack`. You can disable it using:
```nix
-distPhase = "true";
+{
+ doDist = false;
+}
```
The configure phase can sometimes fail because it makes many assumptions which may not always apply. One common override is:
```nix
-configurePhase = ''
- ln -s $node_modules node_modules
-'';
+{
+ configurePhase = ''
+ ln -s $node_modules node_modules
+ '';
+}
```
or if you need a writeable node_modules directory:
```nix
-configurePhase = ''
- cp -r $node_modules node_modules
- chmod +w node_modules
-'';
+{
+ configurePhase = ''
+ cp -r $node_modules node_modules
+ chmod +w node_modules
+ '';
+}
```
#### mkYarnModules {#javascript-yarn2nix-mkYarnModules}
@@ -344,12 +408,14 @@ mkYarnPackage rec {
- Having trouble with `node-gyp`? Try adding these lines to the `yarnPreBuild` steps:
```nix
- yarnPreBuild = ''
- mkdir -p $HOME/.node-gyp/${nodejs.version}
- echo 9 > $HOME/.node-gyp/${nodejs.version}/installVersion
- ln -sfv ${nodejs}/include $HOME/.node-gyp/${nodejs.version}
- export npm_config_nodedir=${nodejs}
- '';
+ {
+ yarnPreBuild = ''
+ mkdir -p $HOME/.node-gyp/${nodejs.version}
+ echo 9 > $HOME/.node-gyp/${nodejs.version}/installVersion
+ ln -sfv ${nodejs}/include $HOME/.node-gyp/${nodejs.version}
+ export npm_config_nodedir=${nodejs}
+ '';
+ }
```
- The `echo 9` steps comes from this answer:
diff --git a/third_party/nixpkgs/doc/languages-frameworks/lisp.section.md b/third_party/nixpkgs/doc/languages-frameworks/lisp.section.md
index 09193093b0..73f20436c7 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/lisp.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/lisp.section.md
@@ -45,7 +45,7 @@ $ sbcl
Also one can create a `pkgs.mkShell` environment in `shell.nix`/`flake.nix`:
-```
+```nix
let
sbcl' = sbcl.withPackages (ps: [ ps.alexandria ]);
in mkShell {
@@ -55,10 +55,12 @@ in mkShell {
Such a Lisp can be now used e.g. to compile your sources:
-```
-buildPhase = ''
- ${sbcl'}/bin/sbcl --load my-build-file.lisp
-''
+```nix
+{
+ buildPhase = ''
+ ${sbcl'}/bin/sbcl --load my-build-file.lisp
+ '';
+}
```
## Importing packages from Quicklisp {#lisp-importing-packages-from-quicklisp}
@@ -173,7 +175,7 @@ into the package scope with `withOverrides`.
A package defined outside Nixpkgs using `buildASDFSystem` can be woven into the
Nixpkgs-provided scope like this:
-```
+```nix
let
alexandria = sbcl.buildASDFSystem rec {
pname = "alexandria";
@@ -199,7 +201,7 @@ new package with different parameters.
Example of overriding `alexandria`:
-```
+```nix
sbcl.pkgs.alexandria.overrideLispAttrs (oldAttrs: rec {
version = "1.4";
src = fetchFromGitLab {
@@ -225,7 +227,7 @@ vice versa.
To package slashy systems, use `overrideLispAttrs`, like so:
-```
+```nix
ecl.pkgs.alexandria.overrideLispAttrs (oldAttrs: {
systems = oldAttrs.systems ++ [ "alexandria/tests" ];
lispLibs = oldAttrs.lispLibs ++ [ ecl.pkgs.rt ];
@@ -290,7 +292,7 @@ derivation.
This example wraps CLISP:
-```
+```nix
wrapLisp {
pkg = clisp;
faslExt = "fas";
diff --git a/third_party/nixpkgs/doc/languages-frameworks/lua.section.md b/third_party/nixpkgs/doc/languages-frameworks/lua.section.md
index 23c40409ea..87bf7ce885 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/lua.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/lua.section.md
@@ -1,8 +1,8 @@
-# User’s Guide to Lua Infrastructure {#users-guide-to-lua-infrastructure}
+# Lua {#lua}
-## Using Lua {#using-lua}
+## Using Lua {#lua-userguide}
-### Overview of Lua {#overview-of-lua}
+### Overview of Lua {#lua-overview}
Several versions of the Lua interpreter are available: luajit, lua 5.1, 5.2, 5.3.
The attribute `lua` refers to the default interpreter, it is also possible to refer to specific versions, e.g. `lua5_2` refers to Lua 5.2.
@@ -17,6 +17,9 @@ The main package set contains aliases to these package sets, e.g.
`luaPackages` refers to `lua5_1.pkgs` and `lua52Packages` to
`lua5_2.pkgs`.
+Note that nixpkgs patches the non-luajit interpreters to avoid referring to
+`/usr` and have `;;` (a [placeholder](https://www.lua.org/manual/5.1/manual.html#pdf-package.path) replaced with the default LUA_PATH) work correctly.
+
### Installing Lua and packages {#installing-lua-and-packages}
#### Lua environment defined in separate `.nix` file {#lua-environment-defined-in-separate-.nix-file}
@@ -87,6 +90,7 @@ final: prev:
pname = "luarocks-nix";
src = /home/my_luarocks/repository;
});
+ };
};
luaPackages = lua.pkgs;
@@ -118,7 +122,7 @@ Again, it is possible to launch the interpreter from the shell.
The Lua interpreter has the attribute `pkgs` which contains all Lua libraries for that specific interpreter.
-## Developing with Lua {#developing-with-lua}
+## Developing with lua {#lua-developing}
Now that you know how to get a working Lua environment with Nix, it is time
to go forward and start actually developing with Lua. There are two ways to
@@ -154,7 +158,9 @@ You can develop your package as you usually would, just don't forget to wrap it
within a `toLuaModule` call, for instance
```nix
-mynewlib = toLuaModule ( stdenv.mkDerivation { ... });
+{
+ mynewlib = toLuaModule ( stdenv.mkDerivation { /* ... */ });
+}
```
There is also the `buildLuaPackage` function that can be used when lua modules
@@ -182,24 +188,26 @@ Each interpreter has the following attributes:
The `buildLuarocksPackage` function is implemented in `pkgs/development/interpreters/lua-5/build-luarocks-package.nix`
The following is an example:
```nix
-luaposix = buildLuarocksPackage {
- pname = "luaposix";
- version = "34.0.4-1";
+{
+ luaposix = buildLuarocksPackage {
+ pname = "luaposix";
+ version = "34.0.4-1";
- src = fetchurl {
- url = "https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/luaposix-34.0.4-1.src.rock";
- hash = "sha256-4mLJG8n4m6y4Fqd0meUDfsOb9RHSR0qa/KD5KCwrNXs=";
- };
- disabled = (luaOlder "5.1") || (luaAtLeast "5.4");
- propagatedBuildInputs = [ bit32 lua std_normalize ];
+ src = fetchurl {
+ url = "https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/luaposix-34.0.4-1.src.rock";
+ hash = "sha256-4mLJG8n4m6y4Fqd0meUDfsOb9RHSR0qa/KD5KCwrNXs=";
+ };
+ disabled = (luaOlder "5.1") || (luaAtLeast "5.4");
+ propagatedBuildInputs = [ bit32 lua std_normalize ];
- meta = with lib; {
- homepage = "https://github.com/luaposix/luaposix/";
- description = "Lua bindings for POSIX";
- maintainers = with maintainers; [ vyp lblasc ];
- license.fullName = "MIT/X11";
+ meta = {
+ homepage = "https://github.com/luaposix/luaposix/";
+ description = "Lua bindings for POSIX";
+ maintainers = with lib.maintainers; [ vyp lblasc ];
+ license.fullName = "MIT/X11";
+ };
};
-};
+}
```
The `buildLuarocksPackage` delegates most tasks to luarocks:
@@ -234,30 +242,20 @@ The `lua.withPackages` takes a function as an argument that is passed the set of
Using the `withPackages` function, the previous example for the luafilesystem environment can be written like this:
```nix
-with import {};
-
lua.withPackages (ps: [ps.luafilesystem])
```
`withPackages` passes the correct package set for the specific interpreter version as an argument to the function. In the above example, `ps` equals `luaPackages`.
-But you can also easily switch to using `lua5_2`:
+But you can also easily switch to using `lua5_1`:
```nix
-with import {};
-
-lua5_2.withPackages (ps: [ps.lua])
+lua5_1.withPackages (ps: [ps.lua])
```
-Now, `ps` is set to `lua52Packages`, matching the version of the interpreter.
+Now, `ps` is set to `lua5_1.pkgs`, matching the version of the interpreter.
-### Possible Todos {#possible-todos}
-
-* export/use version specific variables such as `LUA_PATH_5_2`/`LUAROCKS_CONFIG_5_2`
-* let luarocks check for dependencies via exporting the different rocktrees in temporary config
-
-### Lua Contributing guidelines {#lua-contributing-guidelines}
+### Lua Contributing guidelines {#lua-contributing}
Following rules should be respected:
-* Make sure libraries build for all Lua interpreters.
* Commit names of Lua libraries should reflect that they are Lua libraries, so write for example `luaPackages.luafilesystem: 1.11 -> 1.12`.
diff --git a/third_party/nixpkgs/doc/languages-frameworks/maven.section.md b/third_party/nixpkgs/doc/languages-frameworks/maven.section.md
index b86733a758..e56beb1025 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/maven.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/maven.section.md
@@ -34,13 +34,13 @@ maven.buildMavenPackage rec {
--add-flags "-jar $out/share/jd-cli/jd-cli.jar"
'';
- meta = with lib; {
+ meta = {
description = "Simple command line wrapper around JD Core Java Decompiler project";
homepage = "https://github.com/intoolswetrust/jd-cli";
- license = licenses.gpl3Plus;
- maintainers = with maintainers; [ majiir ];
+ license = lib.licenses.gpl3Plus;
+ maintainers = with lib.maintainers; [ majiir ];
};
-}:
+}
```
This package calls `maven.buildMavenPackage` to do its work. The primary difference from `stdenv.mkDerivation` is the `mvnHash` variable, which is a hash of all of the Maven dependencies.
diff --git a/third_party/nixpkgs/doc/languages-frameworks/ocaml.section.md b/third_party/nixpkgs/doc/languages-frameworks/ocaml.section.md
index cbdc64bf5d..44f514e90a 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/ocaml.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/ocaml.section.md
@@ -92,6 +92,7 @@ buildDunePackage rec {
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ sternenseemann ];
};
+}
```
Here is a second example, this time using a source archive generated with `dune-release`. It is a good idea to use this archive when it is available as it will usually contain substituted variables such as a `%%VERSION%%` field. This library does not depend on any other OCaml library and no tests are run after building it.
@@ -110,11 +111,11 @@ buildDunePackage rec {
hash = "sha256-d5/3KUBAWRj8tntr4RkJ74KWW7wvn/B/m1nx0npnzyc=";
};
- meta = with lib; {
+ meta = {
homepage = "https://github.com/flowtype/ocaml-wtf8";
description = "WTF-8 is a superset of UTF-8 that allows unpaired surrogates.";
- license = licenses.mit;
- maintainers = [ maintainers.eqyiel ];
+ license = lib.licenses.mit;
+ maintainers = [ lib.maintainers.eqyiel ];
};
}
```
diff --git a/third_party/nixpkgs/doc/languages-frameworks/perl.section.md b/third_party/nixpkgs/doc/languages-frameworks/perl.section.md
index c188e22811..4ef6d173a1 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/perl.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/perl.section.md
@@ -34,23 +34,27 @@ Nixpkgs provides a function `buildPerlPackage`, a generic package builder functi
Perl packages from CPAN are defined in [pkgs/top-level/perl-packages.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix) rather than `pkgs/all-packages.nix`. Most Perl packages are so straight-forward to build that they are defined here directly, rather than having a separate function for each package called from `perl-packages.nix`. However, more complicated packages should be put in a separate file, typically in `pkgs/development/perl-modules`. Here is an example of the former:
```nix
-ClassC3 = buildPerlPackage rec {
- pname = "Class-C3";
- version = "0.21";
- src = fetchurl {
- url = "mirror://cpan/authors/id/F/FL/FLORA/${pname}-${version}.tar.gz";
- hash = "sha256-/5GE5xHT0uYGOQxroqj6LMU7CtKn2s6vMVoSXxL4iK4=";
+{
+ ClassC3 = buildPerlPackage rec {
+ pname = "Class-C3";
+ version = "0.21";
+ src = fetchurl {
+ url = "mirror://cpan/authors/id/F/FL/FLORA/${pname}-${version}.tar.gz";
+ hash = "sha256-/5GE5xHT0uYGOQxroqj6LMU7CtKn2s6vMVoSXxL4iK4=";
+ };
};
-};
+}
```
Note the use of `mirror://cpan/`, and the `pname` and `version` in the URL definition to ensure that the `pname` attribute is consistent with the source that we’re actually downloading. Perl packages are made available in `all-packages.nix` through the variable `perlPackages`. For instance, if you have a package that needs `ClassC3`, you would typically write
```nix
-foo = import ../path/to/foo.nix {
- inherit stdenv fetchurl ...;
- inherit (perlPackages) ClassC3;
-};
+{
+ foo = import ../path/to/foo.nix {
+ inherit stdenv fetchurl /* ... */;
+ inherit (perlPackages) ClassC3;
+ };
+}
```
in `all-packages.nix`. You can test building a Perl package as follows:
@@ -91,17 +95,19 @@ buildPerlPackage rec {
Dependencies on other Perl packages can be specified in the `buildInputs` and `propagatedBuildInputs` attributes. If something is exclusively a build-time dependency, use `buildInputs`; if it’s (also) a runtime dependency, use `propagatedBuildInputs`. For instance, this builds a Perl module that has runtime dependencies on a bunch of other modules:
```nix
-ClassC3Componentised = buildPerlPackage rec {
- pname = "Class-C3-Componentised";
- version = "1.0004";
- src = fetchurl {
- url = "mirror://cpan/authors/id/A/AS/ASH/${pname}-${version}.tar.gz";
- hash = "sha256-ASO9rV/FzJYZ0BH572Fxm2ZrFLMZLFATJng1NuU4FHc=";
+{
+ ClassC3Componentised = buildPerlPackage rec {
+ pname = "Class-C3-Componentised";
+ version = "1.0004";
+ src = fetchurl {
+ url = "mirror://cpan/authors/id/A/AS/ASH/${pname}-${version}.tar.gz";
+ hash = "sha256-ASO9rV/FzJYZ0BH572Fxm2ZrFLMZLFATJng1NuU4FHc=";
+ };
+ propagatedBuildInputs = [
+ ClassC3 ClassInspector TestException MROCompat
+ ];
};
- propagatedBuildInputs = [
- ClassC3 ClassInspector TestException MROCompat
- ];
-};
+}
```
On Darwin, if a script has too many `-Idir` flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the `shortenPerlShebang` function from the `postInstall` phase:
@@ -109,20 +115,22 @@ On Darwin, if a script has too many `-Idir` flags in its first line (its “sheb
```nix
{ lib, stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
-ImageExifTool = buildPerlPackage {
- pname = "Image-ExifTool";
- version = "12.50";
+{
+ ImageExifTool = buildPerlPackage {
+ pname = "Image-ExifTool";
+ version = "12.50";
- src = fetchurl {
- url = "https://exiftool.org/${pname}-${version}.tar.gz";
- hash = "sha256-vOhB/FwQMC8PPvdnjDvxRpU6jAZcC6GMQfc0AH4uwKg=";
+ src = fetchurl {
+ url = "https://exiftool.org/${pname}-${version}.tar.gz";
+ hash = "sha256-vOhB/FwQMC8PPvdnjDvxRpU6jAZcC6GMQfc0AH4uwKg=";
+ };
+
+ nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang;
+ postInstall = lib.optionalString stdenv.isDarwin ''
+ shortenPerlShebang $out/bin/exiftool
+ '';
};
-
- nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang;
- postInstall = lib.optionalString stdenv.isDarwin ''
- shortenPerlShebang $out/bin/exiftool
- '';
-};
+}
```
This will remove the `-I` flags from the shebang line, rewrite them in the `use lib` form, and put them on the next line instead. This function can be given any number of Perl scripts as arguments; it will modify them in-place.
diff --git a/third_party/nixpkgs/doc/languages-frameworks/php.section.md b/third_party/nixpkgs/doc/languages-frameworks/php.section.md
index 154d8174f9..c1493588a6 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/php.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/php.section.md
@@ -97,7 +97,7 @@ let
myPhp = php.withExtensions ({ all, ... }: with all; [ imagick opcache ]);
in {
services.phpfpm.pools."foo".phpPackage = myPhp;
-};
+}
```
```nix
@@ -108,7 +108,7 @@ let
};
in {
services.phpfpm.pools."foo".phpPackage = myPhp;
-};
+}
```
#### Example usage with `nix-shell` {#ssec-php-user-guide-installing-with-extensions-nix-shell}
@@ -149,7 +149,7 @@ php.override {
extensions = prev.extensions // {
mysqlnd = prev.extensions.mysqlnd.overrideAttrs (attrs: {
patches = attrs.patches or [] ++ [
- …
+ # ...
];
});
};
diff --git a/third_party/nixpkgs/doc/languages-frameworks/pkg-config.section.md b/third_party/nixpkgs/doc/languages-frameworks/pkg-config.section.md
index 75cbdaeb6f..e5a2b85b65 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/pkg-config.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/pkg-config.section.md
@@ -12,18 +12,18 @@ Additionally, the [`validatePkgConfig` setup hook](https://nixos.org/manual/nixp
A good example of all these things is zlib:
-```
+```nix
{ pkg-config, testers, ... }:
stdenv.mkDerivation (finalAttrs: {
- ...
+ /* ... */
nativeBuildInputs = [ pkg-config validatePkgConfig ];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
- ...
+ /* ... */
pkgConfigModules = [ "zlib" ];
};
})
diff --git a/third_party/nixpkgs/doc/languages-frameworks/python.section.md b/third_party/nixpkgs/doc/languages-frameworks/python.section.md
index 6634dced6e..3b73733330 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/python.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/python.section.md
@@ -7,7 +7,6 @@
| Package | Aliases | Interpreter |
|------------|-----------------|-------------|
| python27 | python2, python | CPython 2.7 |
-| python38 | | CPython 3.8 |
| python39 | | CPython 3.9 |
| python310 | | CPython 3.10 |
| python311 | python3 | CPython 3.11 |
@@ -60,7 +59,6 @@ sets are
* `pkgs.python27Packages`
* `pkgs.python3Packages`
-* `pkgs.python38Packages`
* `pkgs.python39Packages`
* `pkgs.python310Packages`
* `pkgs.python311Packages`
@@ -76,8 +74,9 @@ and the aliases
#### `buildPythonPackage` function {#buildpythonpackage-function}
-The `buildPythonPackage` function is implemented in
-`pkgs/development/interpreters/python/mk-python-derivation.nix`
+The `buildPythonPackage` function has its name binding in
+`pkgs/development/interpreters/python/python-packages-base.nix` and is
+implemented in `pkgs/development/interpreters/python/mk-python-derivation.nix`
using setup hooks.
The following is an example:
@@ -132,12 +131,12 @@ buildPythonPackage rec {
hypothesis
];
- meta = with lib; {
+ meta = {
changelog = "https://github.com/pytest-dev/pytest/releases/tag/${version}";
description = "Framework for writing tests";
homepage = "https://github.com/pytest-dev/pytest";
- license = licenses.mit;
- maintainers = with maintainers; [ domenkozar lovek323 madjar lsix ];
+ license = lib.licenses.mit;
+ maintainers = with lib.maintainers; [ domenkozar lovek323 madjar lsix ];
};
}
```
@@ -255,17 +254,19 @@ The next example shows a non trivial overriding of the `blas` implementation to
be used through out all of the Python package set:
```nix
-python3MyBlas = pkgs.python3.override {
- packageOverrides = self: super: {
- # We need toPythonModule for the package set to evaluate this
- blas = super.toPythonModule(super.pkgs.blas.override {
- blasProvider = super.pkgs.mkl;
- });
- lapack = super.toPythonModule(super.pkgs.lapack.override {
- lapackProvider = super.pkgs.mkl;
- });
+{
+ python3MyBlas = pkgs.python3.override {
+ packageOverrides = self: super: {
+ # We need toPythonModule for the package set to evaluate this
+ blas = super.toPythonModule(super.pkgs.blas.override {
+ blasProvider = super.pkgs.mkl;
+ });
+ lapack = super.toPythonModule(super.pkgs.lapack.override {
+ lapackProvider = super.pkgs.mkl;
+ });
+ };
};
-};
+}
```
This is particularly useful for numpy and scipy users who want to gain speed with other blas implementations.
@@ -314,7 +315,7 @@ python3Packages.buildPythonApplication rec {
python-daemon
];
- meta = with lib; {
+ meta = {
# ...
};
}
@@ -323,7 +324,9 @@ python3Packages.buildPythonApplication rec {
This is then added to `all-packages.nix` just as any other application would be.
```nix
-luigi = callPackage ../applications/networking/cluster/luigi { };
+{
+ luigi = callPackage ../applications/networking/cluster/luigi { };
+}
```
Since the package is an application, a consumer doesn't need to care about
@@ -343,7 +346,9 @@ the attribute in `python-packages.nix`, and the `toPythonApplication` shall be
applied to the reference:
```nix
-youtube-dl = with python3Packages; toPythonApplication youtube-dl;
+{
+ youtube-dl = with python3Packages; toPythonApplication youtube-dl;
+}
```
#### `toPythonModule` function {#topythonmodule-function}
@@ -355,10 +360,12 @@ bindings should be made available from `python-packages.nix`. The
modifications.
```nix
-opencv = toPythonModule (pkgs.opencv.override {
- enablePython = true;
- pythonPackages = self;
-});
+{
+ opencv = toPythonModule (pkgs.opencv.override {
+ enablePython = true;
+ pythonPackages = self;
+ });
+}
```
Do pay attention to passing in the right Python version!
@@ -490,40 +497,6 @@ are used in [`buildPythonPackage`](#buildpythonpackage-function).
with the `pipInstallHook`.
- `unittestCheckHook` will run tests with `python -m unittest discover`. See [example usage](#using-unittestcheckhook).
-### Development mode {#development-mode}
-
-Development or editable mode is supported. To develop Python packages
-[`buildPythonPackage`](#buildpythonpackage-function) has additional logic inside `shellPhase` to run `pip
-install -e . --prefix $TMPDIR/`for the package.
-
-Warning: `shellPhase` is executed only if `setup.py` exists.
-
-Given a `default.nix`:
-
-```nix
-with import {};
-
-python3Packages.buildPythonPackage {
- name = "myproject";
- buildInputs = with python3Packages; [ pyramid ];
-
- src = ./.;
-}
-```
-
-Running `nix-shell` with no arguments should give you the environment in which
-the package would be built with `nix-build`.
-
-Shortcut to setup environments with C headers/libraries and Python packages:
-
-```shell
-nix-shell -p python3Packages.pyramid zlib libjpeg git
-```
-
-::: {.note}
-There is a boolean value `lib.inNixShell` set to `true` if nix-shell is invoked.
-:::
-
## User Guide {#user-guide}
### Using Python {#using-python}
@@ -860,8 +833,7 @@ Above, we were mostly just focused on use cases and what to do to get started
creating working Python environments in nix.
Now that you know the basics to be up and running, it is time to take a step
-back and take a deeper look at how Python packages are packaged on Nix. Then,
-we will look at how you can use development mode with your code.
+back and take a deeper look at how Python packages are packaged on Nix.
#### Python library packages in Nixpkgs {#python-library-packages-in-nixpkgs}
@@ -901,12 +873,12 @@ buildPythonPackage rec {
"toolz.dicttoolz"
];
- meta = with lib; {
+ meta = {
changelog = "https://github.com/pytoolz/toolz/releases/tag/${version}";
homepage = "https://github.com/pytoolz/toolz";
description = "List processing tools and functional utilities";
- license = licenses.bsd3;
- maintainers = with maintainers; [ fridh ];
+ license = lib.licenses.bsd3;
+ maintainers = with lib.maintainers; [ fridh ];
};
}
```
@@ -1036,12 +1008,12 @@ buildPythonPackage rec {
pytest
];
- meta = with lib; {
+ meta = {
changelog = "https://github.com/blaze/datashape/releases/tag/${version}";
homepage = "https://github.com/ContinuumIO/datashape";
description = "A data description language";
- license = licenses.bsd2;
- maintainers = with maintainers; [ fridh ];
+ license = lib.licenses.bsd2;
+ maintainers = with lib.maintainers; [ fridh ];
};
}
```
@@ -1086,12 +1058,12 @@ buildPythonPackage rec {
libxslt
];
- meta = with lib; {
+ meta = {
changelog = "https://github.com/lxml/lxml/releases/tag/lxml-${version}";
description = "Pythonic binding for the libxml2 and libxslt libraries";
homepage = "https://lxml.de";
- license = licenses.bsd3;
- maintainers = with maintainers; [ sjourdois ];
+ license = lib.licenses.bsd3;
+ maintainers = with lib.maintainers; [ sjourdois ];
};
}
```
@@ -1157,12 +1129,12 @@ buildPythonPackage rec {
# Tests cannot import pyfftw. pyfftw works fine though.
doCheck = false;
- meta = with lib; {
+ meta = {
changelog = "https://github.com/pyFFTW/pyFFTW/releases/tag/v${version}";
description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms";
homepage = "http://hgomersall.github.com/pyFFTW";
- license = with licenses; [ bsd2 bsd3 ];
- maintainers = with maintainers; [ fridh ];
+ license = with lib.licenses; [ bsd2 bsd3 ];
+ maintainers = with lib.maintainers; [ fridh ];
};
}
```
@@ -1198,7 +1170,8 @@ a good indication that the package is not in a valid state.
Pytest is the most common test runner for python repositories. A trivial
test run would be:
-```
+```nix
+{
nativeCheckInputs = [ pytest ];
checkPhase = ''
runHook preCheck
@@ -1207,6 +1180,7 @@ test run would be:
runHook postCheck
'';
+}
```
However, many repositories' test suites do not translate well to nix's build
@@ -1214,7 +1188,8 @@ sandbox, and will generally need many tests to be disabled.
To filter tests using pytest, one can do the following:
-```
+```nix
+{
nativeCheckInputs = [ pytest ];
# avoid tests which need additional data or touch network
checkPhase = ''
@@ -1224,6 +1199,7 @@ To filter tests using pytest, one can do the following:
runHook postCheck
'';
+}
```
`--ignore` will tell pytest to ignore that file or directory from being
@@ -1249,7 +1225,8 @@ when a package may need many items disabled to run the test suite.
Using the example above, the analogous `pytestCheckHook` usage would be:
-```
+```nix
+{
nativeCheckInputs = [
pytestCheckHook
];
@@ -1269,12 +1246,14 @@ Using the example above, the analogous `pytestCheckHook` usage would be:
disabledTestPaths = [
"tests/test_failing.py"
];
+}
```
This is especially useful when tests need to be conditionally disabled,
for example:
-```
+```nix
+{
disabledTests = [
# touches network
"download"
@@ -1286,6 +1265,7 @@ for example:
# can fail when building with other packages
"socket"
];
+}
```
Trying to concatenate the related strings to disable tests in a regular
@@ -1299,20 +1279,24 @@ all packages have test suites that can be run easily, and some have none at all.
To help ensure the package still works, [`pythonImportsCheck`](#using-pythonimportscheck) can attempt to import
the listed modules.
-```
+```nix
+{
pythonImportsCheck = [
"requests"
"urllib"
];
+}
```
roughly translates to:
-```
+```nix
+{
postCheck = ''
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
python -c "import requests; import urllib"
'';
+}
```
However, this is done in its own phase, and not dependent on whether [`doCheck = true;`](#var-stdenv-doCheck).
@@ -1343,7 +1327,8 @@ pkg3>=1.0,<=2.0
we can do:
-```
+```nix
+{
nativeBuildInputs = [
pythonRelaxDepsHook
];
@@ -1354,6 +1339,7 @@ we can do:
pythonRemoveDeps = [
"pkg2"
];
+}
```
which would result in the following `requirements.txt` file:
@@ -1366,9 +1352,11 @@ pkg3
Another option is to pass `true`, that will relax/remove all dependencies, for
example:
-```
+```nix
+{
nativeBuildInputs = [ pythonRelaxDepsHook ];
pythonRelaxDeps = true;
+}
```
which would result in the following `requirements.txt` file:
@@ -1393,7 +1381,8 @@ work with any of the [existing hooks](#setup-hooks).
`unittestCheckHook` is a hook which will substitute the setuptools `test` command for a [`checkPhase`](#ssec-check-phase) which runs `python -m unittest discover`:
-```
+```nix
+{
nativeCheckInputs = [
unittestCheckHook
];
@@ -1401,6 +1390,7 @@ work with any of the [existing hooks](#setup-hooks).
unittestFlagsArray = [
"-s" "tests" "-v"
];
+}
```
#### Using sphinxHook {#using-sphinxhook}
@@ -1410,7 +1400,8 @@ using the popular Sphinx documentation generator.
It is setup to automatically find common documentation source paths and
render them using the default `html` style.
-```
+```nix
+{
outputs = [
"out"
"doc"
@@ -1419,13 +1410,15 @@ render them using the default `html` style.
nativeBuildInputs = [
sphinxHook
];
+}
```
The hook will automatically build and install the artifact into the
`doc` output, if it exists. It also provides an automatic diversion
for the artifacts of the `man` builder into the `man` target.
-```
+```nix
+{
outputs = [
"out"
"doc"
@@ -1437,58 +1430,22 @@ for the artifacts of the `man` builder into the `man` target.
"singlehtml"
"man"
];
+}
```
Overwrite `sphinxRoot` when the hook is unable to find your
documentation source root.
-```
+```nix
+{
# Configure sphinxRoot for uncommon paths
sphinxRoot = "weird/docs/path";
+}
```
The hook is also available to packages outside the python ecosystem by
referencing it using `sphinxHook` from top-level.
-### Develop local package {#develop-local-package}
-
-As a Python developer you're likely aware of [development mode](http://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode)
-(`python setup.py develop`); instead of installing the package this command
-creates a special link to the project code. That way, you can run updated code
-without having to reinstall after each and every change you make. Development
-mode is also available. Let's see how you can use it.
-
-In the previous Nix expression the source was fetched from a url. We can also
-refer to a local source instead using `src = ./path/to/source/tree;`
-
-If we create a `shell.nix` file which calls [`buildPythonPackage`](#buildpythonpackage-function), and if `src`
-is a local source, and if the local source has a `setup.py`, then development
-mode is activated.
-
-In the following example, we create a simple environment that has a Python 3.11
-version of our package in it, as well as its dependencies and other packages we
-like to have in the environment, all specified with `dependencies`.
-
-```nix
-with import {};
-with python311Packages;
-
-buildPythonPackage rec {
- name = "mypackage";
- src = ./path/to/package/source;
- dependencies = [
- pytest
- numpy
- ];
- propagatedBuildInputs = [
- pkgs.libsndfile
- ];
-}
-```
-
-It is important to note that due to how development mode is implemented on Nix
-it is not possible to have multiple packages simultaneously in development mode.
-
### Organising your packages {#organising-your-packages}
So far we discussed how you can use Python on Nix, and how you can develop with
@@ -1532,12 +1489,12 @@ buildPythonPackage rec {
wheel
];
- meta = with lib; {
+ meta = {
changelog = "https://github.com/pytoolz/toolz/releases/tag/${version}";
homepage = "https://github.com/pytoolz/toolz/";
description = "List processing tools and functional utilities";
- license = licenses.bsd3;
- maintainers = with maintainers; [ fridh ];
+ license = lib.licenses.bsd3;
+ maintainers = with lib.maintainers; [ fridh ];
};
}
```
@@ -1828,6 +1785,7 @@ folder and not downloaded again.
If you need to change a package's attribute(s) from `configuration.nix` you could do:
```nix
+{
nixpkgs.config.packageOverrides = super: {
python3 = super.python3.override {
packageOverrides = python-self: python-super: {
@@ -1842,6 +1800,7 @@ If you need to change a package's attribute(s) from `configuration.nix` you coul
};
};
};
+}
```
`python3Packages.twisted` is now globally overridden.
@@ -1854,11 +1813,13 @@ To modify only a Python package set instead of a whole Python derivation, use
this snippet:
```nix
+{
myPythonPackages = python3Packages.override {
overrides = self: super: {
- twisted = ...;
+ twisted = <...>;
};
- }
+ };
+}
```
### How to override a Python package using overlays? {#how-to-override-a-python-package-using-overlays}
@@ -1894,7 +1855,7 @@ final: prev: {
(
python-final: python-prev: {
foo = python-prev.foo.overridePythonAttrs (oldAttrs: {
- ...
+ # ...
});
}
)
@@ -1921,7 +1882,7 @@ The Python interpreters are by default not built with optimizations enabled, bec
the builds are in that case not reproducible. To enable optimizations, override the
interpreter of interest, e.g using
-```
+```nix
let
pkgs = import ./. {};
mypython = pkgs.python3.override {
@@ -1939,17 +1900,21 @@ Some packages define optional dependencies for additional features. With
`extras-require`, while PEP 621 calls these `optional-dependencies`.
```nix
-optional-dependencies = {
- complete = [ distributed ];
-};
+{
+ optional-dependencies = {
+ complete = [ distributed ];
+ };
+}
```
and letting the package requiring the extra add the list to its dependencies
```nix
-dependencies = [
- ...
-] ++ dask.optional-dependencies.complete;
+{
+ dependencies = [
+ # ...
+ ] ++ dask.optional-dependencies.complete;
+}
```
This method is using `passthru`, meaning that changing `optional-dependencies` of a package won't cause it to rebuild.
@@ -2016,6 +1981,10 @@ example of such a situation is when `py.test` is used.
* Tests that attempt to access `$HOME` can be fixed by using the following
work-around before running tests (e.g. `preCheck`): `export HOME=$(mktemp -d)`
+* Compiling with Cython causes tests to fail with a `ModuleNotLoadedError`.
+ This can be fixed with two changes in the derivation: 1) replacing `pytest` with
+ `pytestCheckHook` and 2) adding a `preCheck` containing `cd $out` to run
+ tests within the built output.
## Contributing {#contributing}
diff --git a/third_party/nixpkgs/doc/languages-frameworks/qt.section.md b/third_party/nixpkgs/doc/languages-frameworks/qt.section.md
index 1edceb53cf..dcec4b6fff 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/qt.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/qt.section.md
@@ -12,7 +12,7 @@ an extra indirection.
## Nix expression for a Qt package (default.nix) {#qt-default-nix}
```nix
-{ stdenv, lib, qt6, wrapQtAppsHook }:
+{ stdenv, qt6 }:
stdenv.mkDerivation {
pname = "myapp";
@@ -23,10 +23,12 @@ stdenv.mkDerivation {
}
```
+The same goes for Qt 5 where libraries and tools are under `libsForQt5`.
+
Any Qt package should include `wrapQtAppsHook` in `nativeBuildInputs`, or explicitly set `dontWrapQtApps` to bypass generating the wrappers.
::: {.note}
-Graphical Linux applications should also include `qtwayland` in `buildInputs`, to ensure the Wayland platform plugin is available.
+Qt 6 graphical applications should also include `qtwayland` in `buildInputs` on Linux (but not on platforms e.g. Darwin, where `qtwayland` is not available), to ensure the Wayland platform plugin is available.
This may become default in the future, see [NixOS/nixpkgs#269674](https://github.com/NixOS/nixpkgs/pull/269674).
:::
diff --git a/third_party/nixpkgs/doc/languages-frameworks/ruby.section.md b/third_party/nixpkgs/doc/languages-frameworks/ruby.section.md
index 9527395de5..7dede6944a 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/ruby.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/ruby.section.md
@@ -124,11 +124,13 @@ mkShell { buildInputs = [ gems (lowPrio gems.wrappedRuby) ]; }
Sometimes a Gemfile references other files. Such as `.ruby-version` or vendored gems. When copying the Gemfile to the nix store we need to copy those files alongside. This can be done using `extraConfigPaths`. For example:
```nix
+{
gems = bundlerEnv {
name = "gems-for-some-project";
gemdir = ./.;
extraConfigPaths = [ "${./.}/.ruby-version" ];
};
+}
```
### Gem-specific configurations and workarounds {#gem-specific-configurations-and-workarounds}
diff --git a/third_party/nixpkgs/doc/languages-frameworks/rust.section.md b/third_party/nixpkgs/doc/languages-frameworks/rust.section.md
index 76ac7b6cb2..8a1007b7bb 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/rust.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/rust.section.md
@@ -3,10 +3,12 @@
To install the rust compiler and cargo put
```nix
-environment.systemPackages = [
- rustc
- cargo
-];
+{
+ environment.systemPackages = [
+ rustc
+ cargo
+ ];
+}
```
into your `configuration.nix` or bring them into scope with `nix-shell -p rustc cargo`.
@@ -35,10 +37,10 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-jtBw4ahSl88L0iuCXxQgZVm1EcboWRJMNtjxLVTtzts=";
- meta = with lib; {
+ meta = {
description = "A fast line-oriented regex search tool, similar to ag and ack";
homepage = "https://github.com/BurntSushi/ripgrep";
- license = licenses.unlicense;
+ license = lib.licenses.unlicense;
maintainers = [];
};
}
@@ -51,7 +53,9 @@ preferred over `cargoSha256` which was used for traditional Nix SHA-256 hashes.
For example:
```nix
+{
cargoHash = "sha256-l1vL2ZdtDRxSGvP0X/l3nMw8+6WF67KPutJEzUROjg8=";
+}
```
Exception: If the application has cargo `git` dependencies, the `cargoHash`/`cargoSha256`
@@ -67,13 +71,17 @@ then be taken from the failed build. A fake hash can be used for
`cargoHash` as follows:
```nix
+{
cargoHash = lib.fakeHash;
+}
```
For `cargoSha256` you can use:
```nix
+{
cargoSha256 = lib.fakeSha256;
+}
```
Per the instructions in the [Cargo Book](https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html)
@@ -162,9 +170,11 @@ doesn't add a `Cargo.lock` to your `src`, and a `Cargo.lock` is still
required to build a rust package. A simple fix is to use:
```nix
-postPatch = ''
- ln -s ${./Cargo.lock} Cargo.lock
-'';
+{
+ postPatch = ''
+ ln -s ${./Cargo.lock} Cargo.lock
+ '';
+}
```
The output hash of each dependency that uses a git source must be
@@ -409,7 +419,7 @@ the `cargoPatches` attribute to update or add it.
```nix
rustPlatform.buildRustPackage rec {
- (...)
+ # ...
cargoPatches = [
# a patch file to add/update Cargo.lock in the source code
./add-Cargo.lock.patch
@@ -433,10 +443,12 @@ containing `Cargo.toml` and `Cargo.lock`, `fetchCargoTarball`
can be used as follows:
```nix
-cargoDeps = rustPlatform.fetchCargoTarball {
- inherit src;
- hash = "sha256-BoHIN/519Top1NUBjpB/oEMqi86Omt3zTQcXFWqrek0=";
-};
+{
+ cargoDeps = rustPlatform.fetchCargoTarball {
+ inherit src;
+ hash = "sha256-BoHIN/519Top1NUBjpB/oEMqi86Omt3zTQcXFWqrek0=";
+ };
+}
```
The `src` attribute is required, as well as a hash specified through
@@ -458,23 +470,27 @@ function does not require a hash (unless git dependencies are used)
and fetches every dependency as a separate fixed-output derivation.
`importCargoLock` can be used as follows:
-```
-cargoDeps = rustPlatform.importCargoLock {
- lockFile = ./Cargo.lock;
-};
+```nix
+{
+ cargoDeps = rustPlatform.importCargoLock {
+ lockFile = ./Cargo.lock;
+ };
+}
```
If the `Cargo.lock` file includes git dependencies, then their output
hashes need to be specified since they are not available through the
lock file. For example:
-```
-cargoDeps = rustPlatform.importCargoLock {
- lockFile = ./Cargo.lock;
- outputHashes = {
- "rand-0.8.3" = "0ya2hia3cn31qa8894s3av2s8j5bjwb6yq92k0jsnlx7jid0jwqa";
+```nix
+{
+ cargoDeps = rustPlatform.importCargoLock {
+ lockFile = ./Cargo.lock;
+ outputHashes = {
+ "rand-0.8.3" = "0ya2hia3cn31qa8894s3av2s8j5bjwb6yq92k0jsnlx7jid0jwqa";
+ };
};
-};
+}
```
If you do not specify an output hash for a git dependency, building
@@ -651,6 +667,66 @@ buildPythonPackage rec {
}
```
+#### Rust package built with `meson` {#rust-package-built-with-meson}
+
+Some projects, especially GNOME applications, are built with the Meson Build System instead of calling Cargo directly. Using `rustPlatform.buildRustPackage` may successfully build the main program, but related files will be missing. Instead, you need to set up Cargo dependencies with `fetchCargoTarball` and `cargoSetupHook` and leave the rest to Meson. `rust` and `cargo` are still needed in `nativeBuildInputs` for Meson to use.
+
+```nix
+{ lib
+, stdenv
+, fetchFromGitLab
+, meson
+, ninja
+, pkg-config
+, rustPlatform
+, rustc
+, cargo
+, wrapGAppsHook4
+, blueprint-compiler
+, libadwaita
+, libsecret
+, tracker
+}:
+
+stdenv.mkDerivation rec {
+ pname = "health";
+ version = "0.95.0";
+
+ src = fetchFromGitLab {
+ domain = "gitlab.gnome.org";
+ owner = "World";
+ repo = "health";
+ rev = version;
+ hash = "sha256-PrNPprSS98yN8b8yw2G6hzTSaoE65VbsM3q7FVB4mds=";
+ };
+
+ cargoDeps = rustPlatform.fetchCargoTarball {
+ inherit src;
+ name = "${pname}-${version}";
+ hash = "sha256-8fa3fa+sFi5H+49B5sr2vYPkp9C9s6CcE0zv4xB8gww=";
+ };
+
+ nativeBuildInputs = [
+ meson
+ ninja
+ pkg-config
+ rustPlatform.cargoSetupHook
+ rustc
+ cargo
+ wrapGAppsHook4
+ blueprint-compiler
+ ];
+
+ buildInputs = [
+ libadwaita
+ libsecret
+ tracker
+ ];
+
+ # ...
+}
+```
+
## `buildRustCrate`: Compiling Rust crates using Nix instead of Cargo {#compiling-rust-crates-using-nix-instead-of-cargo}
### Simple operation {#simple-operation}
@@ -732,27 +808,27 @@ general. A number of other parameters can be overridden:
- The version of `rustc` used to compile the crate:
```nix
- (hello {}).override { rust = pkgs.rust; };
+ (hello {}).override { rust = pkgs.rust; }
```
- Whether to build in release mode or debug mode (release mode by
default):
```nix
- (hello {}).override { release = false; };
+ (hello {}).override { release = false; }
```
- Whether to print the commands sent to `rustc` when building
(equivalent to `--verbose` in cargo:
```nix
- (hello {}).override { verbose = false; };
+ (hello {}).override { verbose = false; }
```
- Extra arguments to be passed to `rustc`:
```nix
- (hello {}).override { extraRustcOpts = "-Z debuginfo=2"; };
+ (hello {}).override { extraRustcOpts = "-Z debuginfo=2"; }
```
- Phases, just like in any other derivation, can be specified using
@@ -768,7 +844,7 @@ general. A number of other parameters can be overridden:
preConfigure = ''
echo "pub const PATH=\"${hi.out}\";" >> src/path.rs"
'';
- };
+ }
```
### Setting Up `nix-shell` {#setting-up-nix-shell}
@@ -903,8 +979,8 @@ with import
};
let
rustPlatform = makeRustPlatform {
- cargo = rust-bin.stable.latest.minimal;
- rustc = rust-bin.stable.latest.minimal;
+ cargo = rust-bin.selectLatestNightlyWith (toolchain: toolchain.default);
+ rustc = rust-bin.selectLatestNightlyWith (toolchain: toolchain.default);
};
in
@@ -923,11 +999,11 @@ rustPlatform.buildRustPackage rec {
doCheck = false;
- meta = with lib; {
+ meta = {
description = "A fast line-oriented regex search tool, similar to ag and ack";
homepage = "https://github.com/BurntSushi/ripgrep";
- license = with licenses; [ mit unlicense ];
- maintainers = with maintainers; [];
+ license = with lib.licenses; [ mit unlicense ];
+ maintainers = with lib.maintainers; [];
};
}
```
diff --git a/third_party/nixpkgs/doc/languages-frameworks/swift.section.md b/third_party/nixpkgs/doc/languages-frameworks/swift.section.md
index 213d444f49..88d98deeb2 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/swift.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/swift.section.md
@@ -112,13 +112,17 @@ stdenv.mkDerivation rec {
If you'd like to build a different configuration than `release`:
```nix
-swiftpmBuildConfig = "debug";
+{
+ swiftpmBuildConfig = "debug";
+}
```
It is also possible to provide additional flags to `swift build`:
```nix
-swiftpmFlags = [ "--disable-dead-strip" ];
+{
+ swiftpmFlags = [ "--disable-dead-strip" ];
+}
```
The default `buildPhase` already passes `-j` for parallel building.
@@ -132,7 +136,9 @@ Including `swiftpm` in your `nativeBuildInputs` also provides a default
`checkPhase`, but it must be enabled with:
```nix
-doCheck = true;
+{
+ doCheck = true;
+}
```
This essentially runs: `swift test -c release`
@@ -147,13 +153,15 @@ them, we need to make them writable.
A special function `swiftpmMakeMutable` is available to replace the symlink
with a writable copy:
-```
-configurePhase = generated.configure ++ ''
- # Replace the dependency symlink with a writable copy.
- swiftpmMakeMutable swift-crypto
- # Now apply a patch.
- patch -p1 -d .build/checkouts/swift-crypto -i ${./some-fix.patch}
-'';
+```nix
+{
+ configurePhase = generated.configure ++ ''
+ # Replace the dependency symlink with a writable copy.
+ swiftpmMakeMutable swift-crypto
+ # Now apply a patch.
+ patch -p1 -d .build/checkouts/swift-crypto -i ${./some-fix.patch}
+ '';
+}
```
## Considerations for custom build tools {#ssec-swift-considerations-for-custom-build-tools}
diff --git a/third_party/nixpkgs/doc/languages-frameworks/texlive.section.md b/third_party/nixpkgs/doc/languages-frameworks/texlive.section.md
index 01b59f6f34..b6fb1099a4 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/texlive.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/texlive.section.md
@@ -181,11 +181,11 @@ let
runHook postInstall
'';
- meta = with lib; {
+ meta = {
description = "A LaTeX2e class for overhead transparencies";
- license = licenses.unfreeRedistributable;
- maintainers = with maintainers; [ veprbl ];
- platforms = platforms.all;
+ license = lib.licenses.unfreeRedistributable;
+ maintainers = with lib.maintainers; [ veprbl ];
+ platforms = lib.platforms.all;
};
};
diff --git a/third_party/nixpkgs/doc/languages-frameworks/vim.section.md b/third_party/nixpkgs/doc/languages-frameworks/vim.section.md
index 1f3727f552..69031ccbd3 100644
--- a/third_party/nixpkgs/doc/languages-frameworks/vim.section.md
+++ b/third_party/nixpkgs/doc/languages-frameworks/vim.section.md
@@ -219,9 +219,11 @@ After running the updater, if nvim-treesitter received an update, also run [`nvi
Some plugins require overrides in order to function properly. Overrides are placed in [overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix). Overrides are most often required when a plugin requires some dependencies, or extra steps are required during the build process. For example `deoplete-fish` requires both `deoplete-nvim` and `vim-fish`, and so the following override was added:
```nix
-deoplete-fish = super.deoplete-fish.overrideAttrs(old: {
- dependencies = with super; [ deoplete-nvim vim-fish ];
-});
+{
+ deoplete-fish = super.deoplete-fish.overrideAttrs(old: {
+ dependencies = with super; [ deoplete-nvim vim-fish ];
+ });
+}
```
Sometimes plugins require an override that must be changed when the plugin is updated. This can cause issues when Vim plugins are auto-updated but the associated override isn't updated. For these plugins, the override should be written so that it specifies all information required to install the plugin, and running `./update.py` doesn't change the derivation for the plugin. Manually updating the override is required to update these types of plugins. An example of such a plugin is `LanguageClient-neovim`.
@@ -264,8 +266,10 @@ pwntester/octo.nvim,,
You can then reference the generated vim plugins via:
```nix
-myVimPlugins = pkgs.vimPlugins.extend (
- (pkgs.callPackage ./generated.nix {})
-);
+{
+ myVimPlugins = pkgs.vimPlugins.extend (
+ (pkgs.callPackage ./generated.nix {})
+ );
+}
```
diff --git a/third_party/nixpkgs/doc/manpage-urls.json b/third_party/nixpkgs/doc/manpage-urls.json
index 2cc03af436..e878caf042 100644
--- a/third_party/nixpkgs/doc/manpage-urls.json
+++ b/third_party/nixpkgs/doc/manpage-urls.json
@@ -320,5 +320,7 @@
"login.defs(5)": "https://man.archlinux.org/man/login.defs.5",
"unshare(1)": "https://man.archlinux.org/man/unshare.1.en",
"nix-shell(1)": "https://nixos.org/manual/nix/stable/command-ref/nix-shell.html",
- "mksquashfs(1)": "https://man.archlinux.org/man/extra/squashfs-tools/mksquashfs.1.en"
+ "mksquashfs(1)": "https://man.archlinux.org/man/extra/squashfs-tools/mksquashfs.1.en",
+ "curl(1)": "https://curl.se/docs/manpage.html",
+ "netrc(5)": "https://man.cx/netrc"
}
diff --git a/third_party/nixpkgs/doc/overrides.css b/third_party/nixpkgs/doc/overrides.css
deleted file mode 100644
index 73901a3f54..0000000000
--- a/third_party/nixpkgs/doc/overrides.css
+++ /dev/null
@@ -1,22 +0,0 @@
-.docbook .xref img[src^=images\/callouts\/],
-.screen img,
-.programlisting img,
-.literallayout img,
-.synopsis img {
- width: 1em;
-}
-
-.calloutlist img {
- width: 1.5em;
-}
-
-.prompt,
-.screen img,
-.programlisting img,
-.literallayout img,
-.synopsis img {
- -moz-user-select: none;
- -webkit-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
diff --git a/third_party/nixpkgs/doc/packages/darwin-builder.section.md b/third_party/nixpkgs/doc/packages/darwin-builder.section.md
index 3a547de537..ca8519c5bf 100644
--- a/third_party/nixpkgs/doc/packages/darwin-builder.section.md
+++ b/third_party/nixpkgs/doc/packages/darwin-builder.section.md
@@ -81,7 +81,7 @@ $ sudo launchctl kickstart -k system/org.nixos.nix-daemon
## Example flake usage {#sec-darwin-builder-example-flake}
-```
+```nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-22.11-darwin";
@@ -153,7 +153,8 @@ you may use it to build a modified remote builder with additional storage or mem
To do this, you just need to set the `virtualisation.darwin-builder.*` parameters as
in the example below and rebuild.
-```
+```nix
+ {
darwin-builder = nixpkgs.lib.nixosSystem {
system = linuxSystem;
modules = [
@@ -166,6 +167,8 @@ in the example below and rebuild.
virtualisation.darwin-builder.workingDirectory = "/var/lib/darwin-builder";
}
];
+ };
+ }
```
You may make any other changes to your VM in this attribute set. For example,
diff --git a/third_party/nixpkgs/doc/packages/eclipse.section.md b/third_party/nixpkgs/doc/packages/eclipse.section.md
index e19510e131..acf34b5757 100644
--- a/third_party/nixpkgs/doc/packages/eclipse.section.md
+++ b/third_party/nixpkgs/doc/packages/eclipse.section.md
@@ -13,11 +13,13 @@ Once an Eclipse variant is installed, it can be run using the `eclipse` command,
If you prefer to install plugins in a more declarative manner, then Nixpkgs also offer a number of Eclipse plugins that can be installed in an _Eclipse environment_. This type of environment is created using the function `eclipseWithPlugins` found inside the `nixpkgs.eclipses` attribute set. This function takes as argument `{ eclipse, plugins ? [], jvmArgs ? [] }` where `eclipse` is a one of the Eclipse packages described above, `plugins` is a list of plugin derivations, and `jvmArgs` is a list of arguments given to the JVM running the Eclipse. For example, say you wish to install the latest Eclipse Platform with the popular Eclipse Color Theme plugin and also allow Eclipse to use more RAM. You could then add:
```nix
-packageOverrides = pkgs: {
- myEclipse = with pkgs.eclipses; eclipseWithPlugins {
- eclipse = eclipse-platform;
- jvmArgs = [ "-Xmx2048m" ];
- plugins = [ plugins.color-theme ];
+{
+ packageOverrides = pkgs: {
+ myEclipse = with pkgs.eclipses; eclipseWithPlugins {
+ eclipse = eclipse-platform;
+ jvmArgs = [ "-Xmx2048m" ];
+ plugins = [ plugins.color-theme ];
+ };
};
}
```
@@ -33,32 +35,34 @@ If there is a need to install plugins that are not available in Nixpkgs then it
Expanding the previous example with two plugins using the above functions, we have:
```nix
-packageOverrides = pkgs: {
- myEclipse = with pkgs.eclipses; eclipseWithPlugins {
- eclipse = eclipse-platform;
- jvmArgs = [ "-Xmx2048m" ];
- plugins = [
- plugins.color-theme
- (plugins.buildEclipsePlugin {
- name = "myplugin1-1.0";
- srcFeature = fetchurl {
- url = "http://…/features/myplugin1.jar";
- hash = "sha256-123…";
- };
- srcPlugin = fetchurl {
- url = "http://…/plugins/myplugin1.jar";
- hash = "sha256-123…";
- };
- });
- (plugins.buildEclipseUpdateSite {
- name = "myplugin2-1.0";
- src = fetchurl {
- stripRoot = false;
- url = "http://…/myplugin2.zip";
- hash = "sha256-123…";
- };
- });
- ];
+{
+ packageOverrides = pkgs: {
+ myEclipse = with pkgs.eclipses; eclipseWithPlugins {
+ eclipse = eclipse-platform;
+ jvmArgs = [ "-Xmx2048m" ];
+ plugins = [
+ plugins.color-theme
+ (plugins.buildEclipsePlugin {
+ name = "myplugin1-1.0";
+ srcFeature = fetchurl {
+ url = "http://…/features/myplugin1.jar";
+ hash = "sha256-123…";
+ };
+ srcPlugin = fetchurl {
+ url = "http://…/plugins/myplugin1.jar";
+ hash = "sha256-123…";
+ };
+ })
+ (plugins.buildEclipseUpdateSite {
+ name = "myplugin2-1.0";
+ src = fetchurl {
+ stripRoot = false;
+ url = "http://…/myplugin2.zip";
+ hash = "sha256-123…";
+ };
+ })
+ ];
+ };
};
}
```
diff --git a/third_party/nixpkgs/doc/packages/emacs.section.md b/third_party/nixpkgs/doc/packages/emacs.section.md
index c50c781553..2ced251f3e 100644
--- a/third_party/nixpkgs/doc/packages/emacs.section.md
+++ b/third_party/nixpkgs/doc/packages/emacs.section.md
@@ -16,7 +16,7 @@ The Emacs package comes with some extra helpers to make it easier to configure.
projectile
use-package
]));
- }
+ };
}
```
@@ -102,10 +102,12 @@ This provides a fairly full Emacs start file. It will load in addition to the us
Sometimes `emacs.pkgs.withPackages` is not enough, as this package set has some priorities imposed on packages (with the lowest priority assigned to GNU-devel ELPA, and the highest for packages manually defined in `pkgs/applications/editors/emacs/elisp-packages/manual-packages`). But you can't control these priorities when some package is installed as a dependency. You can override it on a per-package-basis, providing all the required dependencies manually, but it's tedious and there is always a possibility that an unwanted dependency will sneak in through some other package. To completely override such a package, you can use `overrideScope`.
```nix
-overrides = self: super: rec {
- haskell-mode = self.melpaPackages.haskell-mode;
- ...
-};
+let
+ overrides = self: super: rec {
+ haskell-mode = self.melpaPackages.haskell-mode;
+ # ...
+ };
+in
((emacsPackagesFor emacs).overrideScope overrides).withPackages
(p: with p; [
# here both these package will use haskell-mode of our own choice
@@ -113,3 +115,4 @@ overrides = self: super: rec {
dante
])
```
+}
diff --git a/third_party/nixpkgs/doc/packages/index.md b/third_party/nixpkgs/doc/packages/index.md
index 1f45018ffc..38dba5b349 100644
--- a/third_party/nixpkgs/doc/packages/index.md
+++ b/third_party/nixpkgs/doc/packages/index.md
@@ -14,6 +14,7 @@ fish.section.md
fuse.section.md
ibus.section.md
kakoune.section.md
+krita.section.md
linux.section.md
locales.section.md
etc-files.section.md
diff --git a/third_party/nixpkgs/doc/packages/krita.section.md b/third_party/nixpkgs/doc/packages/krita.section.md
new file mode 100644
index 0000000000..ba427bd62b
--- /dev/null
+++ b/third_party/nixpkgs/doc/packages/krita.section.md
@@ -0,0 +1,37 @@
+# Krita {#sec-krita}
+
+## Python plugins {#krita-python-plugins}
+
+"pykrita" plugins should be installed following
+[Krita's manual](https://docs.krita.org/en/user_manual/python_scripting/install_custom_python_plugin.html).
+This generally involves extracting the extension to `~/.local/share/krita/pykrita/`.
+
+## Binary plugins {#krita-binary-plugins}
+
+Binary plugins are Dynamically Linked Libraries to be loaded by Krita.
+
+_Note: You most likely won't need to deal with binary plugins,
+all known plugins are bundled and enabled by default._
+
+### Installing binary plugins {#krita-install-binary-plugins}
+
+You can choose what plugins are added to Krita by overriding the
+`binaryPlugins` attribute.
+
+If you want to add plugins instead of replacing, you can read the
+list of previous plugins via `pkgs.krita.binaryPlugins`:
+
+```nix
+(pkgs.krita.override (old: {
+ binaryPlugins = old.binaryPlugins ++ [ your-plugin ];
+}))
+```
+
+### Example structure of a binary plugin {#krita-binary-plugin-structure}
+
+```
+/nix/store/00000000000000000000000000000000-krita-plugin-example-1.2.3
+└── lib
+ └── kritaplugins
+ └── krita_example.so
+```
diff --git a/third_party/nixpkgs/doc/packages/steam.section.md b/third_party/nixpkgs/doc/packages/steam.section.md
index a1e88b0d97..c9a09962f6 100644
--- a/third_party/nixpkgs/doc/packages/steam.section.md
+++ b/third_party/nixpkgs/doc/packages/steam.section.md
@@ -51,7 +51,7 @@ Use `programs.steam.enable = true;` if you want to add steam to `systemPackages`
you need to add:
```nix
- steam.override { withJava = true; };
+ steam.override { withJava = true; }
```
## steam-run {#sec-steam-run}
diff --git a/third_party/nixpkgs/doc/packages/urxvt.section.md b/third_party/nixpkgs/doc/packages/urxvt.section.md
index 7aff0997dd..1d40c92ed7 100644
--- a/third_party/nixpkgs/doc/packages/urxvt.section.md
+++ b/third_party/nixpkgs/doc/packages/urxvt.section.md
@@ -65,7 +65,9 @@ A plugin can be any kind of derivation, the only requirement is that it should a
If the plugin is itself a Perl package that needs to be imported from other plugins or scripts, add the following passthrough:
```nix
-passthru.perlPackages = [ "self" ];
+{
+ passthru.perlPackages = [ "self" ];
+}
```
This will make the urxvt wrapper pick up the dependency and set up the Perl path accordingly.
diff --git a/third_party/nixpkgs/doc/packages/weechat.section.md b/third_party/nixpkgs/doc/packages/weechat.section.md
index 755b6e6ad1..295397f476 100644
--- a/third_party/nixpkgs/doc/packages/weechat.section.md
+++ b/third_party/nixpkgs/doc/packages/weechat.section.md
@@ -3,9 +3,9 @@
WeeChat can be configured to include your choice of plugins, reducing its closure size from the default configuration which includes all available plugins. To make use of this functionality, install an expression that overrides its configuration, such as:
```nix
-weechat.override {configure = {availablePlugins, ...}: {
+weechat.override {configure = ({availablePlugins, ...}: {
plugins = with availablePlugins; [ python perl ];
- }
+ });
}
```
@@ -59,7 +59,7 @@ weechat.override {
];
init = ''
/set plugins.var.python.jabber.key "val"
- '':
+ '';
};
}
```
diff --git a/third_party/nixpkgs/doc/stdenv/cross-compilation.chapter.md b/third_party/nixpkgs/doc/stdenv/cross-compilation.chapter.md
index e659e18038..76c931ba04 100644
--- a/third_party/nixpkgs/doc/stdenv/cross-compilation.chapter.md
+++ b/third_party/nixpkgs/doc/stdenv/cross-compilation.chapter.md
@@ -15,7 +15,9 @@ Nixpkgs follows the [conventions of GNU autoconf](https://gcc.gnu.org/onlinedocs
In Nixpkgs, these three platforms are defined as attribute sets under the names `buildPlatform`, `hostPlatform`, and `targetPlatform`. They are always defined as attributes in the standard environment. That means one can access them like:
```nix
-{ stdenv, fooDep, barDep, ... }: ...stdenv.buildPlatform...
+{ stdenv, fooDep, barDep, ... }: {
+ # ...stdenv.buildPlatform...
+}
```
`buildPlatform`
@@ -127,7 +129,9 @@ Some frequently encountered problems when packaging for cross-compilation should
Many packages assume that an unprefixed binutils (`cc`/`ar`/`ld` etc.) is available, but Nix doesn't provide one. It only provides a prefixed one, just as it only does for all the other binutils programs. It may be necessary to patch the package to fix the build system to use a prefix. For instance, instead of `cc`, use `${stdenv.cc.targetPrefix}cc`.
```nix
-makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
+{
+ makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
+}
```
#### How do I avoid compiling a GCC cross-compiler from source? {#cross-qa-avoid-compiling-gcc-cross-compiler}
@@ -142,7 +146,9 @@ $ nix-build '' -A pkgsCross.raspberryPi.hello
Add the following to your `mkDerivation` invocation.
```nix
-depsBuildBuild = [ buildPackages.stdenv.cc ];
+{
+ depsBuildBuild = [ buildPackages.stdenv.cc ];
+}
```
#### My package’s testsuite needs to run host platform code. {#cross-testsuite-runs-host-code}
@@ -150,7 +156,9 @@ depsBuildBuild = [ buildPackages.stdenv.cc ];
Add the following to your `mkDerivation` invocation.
```nix
-doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+{
+ doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+}
```
#### Package using Meson needs to run binaries for the host platform during build. {#cross-meson-runs-host-code}
@@ -159,12 +167,14 @@ Add `mesonEmulatorHook` to `nativeBuildInputs` conditionally on if the target bi
e.g.
-```
-nativeBuildInputs = [
- meson
-] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
- mesonEmulatorHook
-];
+```nix
+{
+ nativeBuildInputs = [
+ meson
+ ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+ mesonEmulatorHook
+ ];
+}
```
Example of an error which this fixes.
diff --git a/third_party/nixpkgs/doc/stdenv/meta.chapter.md b/third_party/nixpkgs/doc/stdenv/meta.chapter.md
index c187f0602a..7f57eda791 100644
--- a/third_party/nixpkgs/doc/stdenv/meta.chapter.md
+++ b/third_party/nixpkgs/doc/stdenv/meta.chapter.md
@@ -3,17 +3,19 @@
Nix packages can declare *meta-attributes* that contain information about a package such as a description, its homepage, its license, and so on. For instance, the GNU Hello package has a `meta` declaration like this:
```nix
-meta = with lib; {
- description = "A program that produces a familiar, friendly greeting";
- longDescription = ''
- GNU Hello is a program that prints "Hello, world!" when you run it.
- It is fully customizable.
- '';
- homepage = "https://www.gnu.org/software/hello/manual/";
- license = licenses.gpl3Plus;
- maintainers = with maintainers; [ eelco ];
- platforms = platforms.all;
-};
+{
+ meta = {
+ description = "A program that produces a familiar, friendly greeting";
+ longDescription = ''
+ GNU Hello is a program that prints "Hello, world!" when you run it.
+ It is fully customizable.
+ '';
+ homepage = "https://www.gnu.org/software/hello/manual/";
+ license = lib.licenses.gpl3Plus;
+ maintainers = with lib.maintainers; [ eelco ];
+ platforms = lib.platforms.all;
+ };
+}
```
Meta-attributes are not passed to the builder of the package. Thus, a change to a meta-attribute doesn’t trigger a recompilation of the package.
@@ -82,7 +84,9 @@ The *priority* of the package, used by `nix-env` to resolve file name conflicts
The list of Nix platform types on which the package is supported. Hydra builds packages according to the platform specified. If no platform is specified, the package does not have prebuilt binaries. An example is:
```nix
-meta.platforms = lib.platforms.linux;
+{
+ meta.platforms = lib.platforms.linux;
+}
```
Attribute Set `lib.platforms` defines [various common lists](https://github.com/NixOS/nixpkgs/blob/master/lib/systems/doubles.nix) of platforms types.
@@ -95,8 +99,10 @@ In general it is preferable to set `meta.platforms = lib.platforms.all` and then
For example, a package which requires dynamic linking and cannot be linked statically could use this:
```nix
-meta.platforms = lib.platforms.all;
-meta.badPlatforms = [ lib.systems.inspect.patterns.isStatic ];
+{
+ meta.platforms = lib.platforms.all;
+ meta.badPlatforms = [ lib.systems.inspect.patterns.isStatic ];
+}
```
The [`lib.meta.availableOn`](https://github.com/NixOS/nixpkgs/blob/b03ac42b0734da3e7be9bf8d94433a5195734b19/lib/meta.nix#L95-L106) function can be used to test whether or not a package is available (i.e. buildable) on a given platform.
@@ -136,7 +142,7 @@ For more on how to write and run package tests, see [](#sec-package-tests).
The NixOS tests are available as `nixosTests` in parameters of derivations. For instance, the OpenSMTPD derivation includes lines similar to:
```nix
-{ /* ... */, nixosTests }:
+{ /* ... , */ nixosTests }:
{
# ...
passthru.tests = {
@@ -194,8 +200,10 @@ To be effective, it must be presented directly to an evaluation process that han
The list of Nix platform types for which the [Hydra](https://github.com/nixos/hydra) [instance at `hydra.nixos.org`](https://nixos.org/hydra) will build the package. (Hydra is the Nix-based continuous build system.) It defaults to the value of `meta.platforms`. Thus, the only reason to set `meta.hydraPlatforms` is if you want `hydra.nixos.org` to build the package on a subset of `meta.platforms`, or not at all, e.g.
```nix
-meta.platforms = lib.platforms.linux;
-meta.hydraPlatforms = [];
+{
+ meta.platforms = lib.platforms.linux;
+ meta.hydraPlatforms = [];
+}
```
### `broken` {#var-meta-broken}
@@ -209,13 +217,17 @@ This means that `broken` can be used to express constraints, for example:
- Does not cross compile
```nix
- meta.broken = !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)
+ {
+ meta.broken = !(stdenv.buildPlatform.canExecute stdenv.hostPlatform);
+ }
```
- Broken if all of a certain set of its dependencies are broken
```nix
- meta.broken = lib.all (map (p: p.meta.broken) [ glibc musl ])
+ {
+ meta.broken = lib.all (map (p: p.meta.broken) [ glibc musl ]);
+ }
```
This makes `broken` strictly more powerful than `meta.badPlatforms`.
diff --git a/third_party/nixpkgs/doc/stdenv/multiple-output.chapter.md b/third_party/nixpkgs/doc/stdenv/multiple-output.chapter.md
index 1ee063c0c2..5e86d2aa3d 100644
--- a/third_party/nixpkgs/doc/stdenv/multiple-output.chapter.md
+++ b/third_party/nixpkgs/doc/stdenv/multiple-output.chapter.md
@@ -30,7 +30,9 @@ Here you find how to write a derivation that produces multiple outputs.
In nixpkgs there is a framework supporting multiple-output derivations. It tries to cover most cases by default behavior. You can find the source separated in ``; it’s relatively well-readable. The whole machinery is triggered by defining the `outputs` attribute to contain the list of desired output names (strings).
```nix
-outputs = [ "bin" "dev" "out" "doc" ];
+{
+ outputs = [ "bin" "dev" "out" "doc" ];
+}
```
Often such a single line is enough. For each output an equally named environment variable is passed to the builder and contains the path in nix store for that output. Typically you also want to have the main `out` output, as it catches any files that didn’t get elsewhere.
diff --git a/third_party/nixpkgs/doc/stdenv/stdenv.chapter.md b/third_party/nixpkgs/doc/stdenv/stdenv.chapter.md
index a948c6757c..f3cdb1f2dc 100644
--- a/third_party/nixpkgs/doc/stdenv/stdenv.chapter.md
+++ b/third_party/nixpkgs/doc/stdenv/stdenv.chapter.md
@@ -36,7 +36,7 @@ Many packages have dependencies that are not provided in the standard environmen
stdenv.mkDerivation {
pname = "libfoo";
version = "1.2.3";
- ...
+ # ...
buildInputs = [libbar perl ncurses];
}
```
@@ -49,7 +49,7 @@ Often it is necessary to override or modify some aspect of the build. To make th
stdenv.mkDerivation {
pname = "fnord";
version = "4.5";
- ...
+ # ...
buildPhase = ''
gcc foo.c -o foo
'';
@@ -70,7 +70,7 @@ While the standard environment provides a generic builder, you can still supply
stdenv.mkDerivation {
pname = "libfoo";
version = "1.2.3";
- ...
+ # ...
builder = ./builder.sh;
}
```
@@ -449,11 +449,13 @@ Unless set to `false`, some build systems with good support for parallel buildin
This is an attribute set which can be filled with arbitrary values. For example:
```nix
-passthru = {
- foo = "bar";
- baz = {
- value1 = 4;
- value2 = 5;
+{
+ passthru = {
+ foo = "bar";
+ baz = {
+ value1 = 4;
+ value2 = 5;
+ };
};
}
```
@@ -467,27 +469,33 @@ A script to be run by `maintainers/scripts/update.nix` when the package is match
- []{#var-passthru-updateScript-command} an executable file, either on the file system:
```nix
- passthru.updateScript = ./update.sh;
+ {
+ passthru.updateScript = ./update.sh;
+ }
```
or inside the expression itself:
```nix
- passthru.updateScript = writeScript "update-zoom-us" ''
- #!/usr/bin/env nix-shell
- #!nix-shell -i bash -p curl pcre2 common-updater-scripts
+ {
+ passthru.updateScript = writeScript "update-zoom-us" ''
+ #!/usr/bin/env nix-shell
+ #!nix-shell -i bash -p curl pcre2 common-updater-scripts
- set -eu -o pipefail
+ set -eu -o pipefail
- version="$(curl -sI https://zoom.us/client/latest/zoom_x86_64.tar.xz | grep -Fi 'Location:' | pcre2grep -o1 '/(([0-9]\.?)+)/')"
- update-source-version zoom-us "$version"
- '';
+ version="$(curl -sI https://zoom.us/client/latest/zoom_x86_64.tar.xz | grep -Fi 'Location:' | pcre2grep -o1 '/(([0-9]\.?)+)/')"
+ update-source-version zoom-us "$version"
+ '';
+ }
```
- a list, a script followed by arguments to be passed to it:
```nix
- passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ];
+ {
+ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ];
+ }
```
- an attribute set containing:
@@ -496,18 +504,22 @@ A script to be run by `maintainers/scripts/update.nix` when the package is match
- [`supportedFeatures`]{#var-passthru-updateScript-set-supportedFeatures} (optional) – a list of the [extra features](#var-passthru-updateScript-supported-features) the script supports.
```nix
- passthru.updateScript = {
- command = [ ../../update.sh pname ];
- attrPath = pname;
- supportedFeatures = [ … ];
- };
+ {
+ passthru.updateScript = {
+ command = [ ../../update.sh pname ];
+ attrPath = pname;
+ supportedFeatures = [ /* ... */ ];
+ };
+ }
```
::: {.tip}
A common pattern is to use the [`nix-update-script`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/common-updater/nix-update.nix) attribute provided in Nixpkgs, which runs [`nix-update`](https://github.com/Mic92/nix-update):
```nix
-passthru.updateScript = nix-update-script { };
+{
+ passthru.updateScript = nix-update-script { };
+}
```
For simple packages, this is often enough, and will ensure that the package is updated automatically by [`nixpkgs-update`](https://ryantm.github.io/nixpkgs-update) when a new version is released. The [update bot](https://nix-community.org/update-bot) runs periodically to attempt to automatically update packages, and will run `passthru.updateScript` if set. While not strictly necessary if the project is listed on [Repology](https://repology.org), using `nix-update-script` allows the package to update via many more sources (e.g. GitHub releases).
@@ -785,7 +797,7 @@ A shell array containing additional arguments passed to the configure script. Yo
##### `dontAddPrefix` {#var-stdenv-dontAddPrefix}
-By default, the flag `--prefix=$prefix` is added to the configure flags. If this is undesirable, set this variable to true.
+By default, `./configure` is passed the concatenation of [`prefixKey`](#var-stdenv-prefixKey) and [`prefix`](#var-stdenv-prefix) on the command line. Disable this by setting `dontAddPrefix` to `true`.
##### `prefix` {#var-stdenv-prefix}
@@ -793,7 +805,7 @@ The prefix under which the package must be installed, passed via the `--prefix`
##### `prefixKey` {#var-stdenv-prefixKey}
-The key to use when specifying the prefix. By default, this is set to `--prefix=` as that is used by the majority of packages.
+The key to use when specifying the installation [`prefix`](#var-stdenv-prefix). By default, this is set to `--prefix=` as that is used by the majority of packages. Other packages may need `--prefix ` (with a trailing space) or `PREFIX=`.
##### `dontAddStaticConfigureFlags` {#var-stdenv-dontAddStaticConfigureFlags}
@@ -846,7 +858,9 @@ The file name of the Makefile.
A list of strings passed as additional flags to `make`. These flags are also used by the default install and check phase. For setting make flags specific to the build phase, use `buildFlags` (see below).
```nix
-makeFlags = [ "PREFIX=$(out)" ];
+{
+ makeFlags = [ "PREFIX=$(out)" ];
+}
```
::: {.note}
@@ -858,9 +872,11 @@ The flags are quoted in bash, but environment variables can be specified by usin
A shell array containing additional arguments passed to `make`. You must use this instead of `makeFlags` if the arguments contain spaces, e.g.
```nix
-preBuild = ''
- makeFlagsArray+=(CFLAGS="-O0 -g" LDFLAGS="-lfoo -lbar")
-'';
+{
+ preBuild = ''
+ makeFlagsArray+=(CFLAGS="-O0 -g" LDFLAGS="-lfoo -lbar")
+ '';
+}
```
Note that shell arrays cannot be passed through environment variables, so you cannot set `makeFlagsArray` in a derivation attribute (because those are passed through environment variables): you have to define them in shell code.
@@ -892,7 +908,9 @@ The check phase checks whether the package was built correctly by running its te
Controls whether the check phase is executed. By default it is skipped, but if `doCheck` is set to true, the check phase is usually executed. Thus you should set
```nix
-doCheck = true;
+{
+ doCheck = true;
+}
```
in the derivation to enable checks. The exception is cross compilation. Cross compiled builds never run tests, no matter how `doCheck` is set, as the newly-built program won’t run on the platform used to build it.
@@ -945,7 +963,9 @@ See the [build phase](#var-stdenv-makeFlags) for details.
The make targets that perform the installation. Defaults to `install`. Example:
```nix
-installTargets = "install-bin install-doc";
+{
+ installTargets = "install-bin install-doc";
+}
```
##### `installFlags` / `installFlagsArray` {#var-stdenv-installFlags}
@@ -1024,7 +1044,7 @@ This example prevents all `*.rlib` files from being stripped:
```nix
stdenv.mkDerivation {
# ...
- stripExclude = [ "*.rlib" ]
+ stripExclude = [ "*.rlib" ];
}
```
@@ -1033,7 +1053,7 @@ This example prevents files within certain paths from being stripped:
```nix
stdenv.mkDerivation {
# ...
- stripExclude = [ "lib/modules/*/build/* ]
+ stripExclude = [ "lib/modules/*/build/*" ];
}
```
@@ -1134,7 +1154,9 @@ It is often better to add tests that are not part of the source distribution to
Controls whether the installCheck phase is executed. By default it is skipped, but if `doInstallCheck` is set to true, the installCheck phase is usually executed. Thus you should set
```nix
-doInstallCheck = true;
+{
+ doInstallCheck = true;
+}
```
in the derivation to enable install checks. The exception is cross compilation. Cross compiled builds never run tests, no matter how `doInstallCheck` is set, as the newly-built program won’t run on the platform used to build it.
@@ -1244,9 +1266,11 @@ To use this, add `removeReferencesTo` to `nativeBuildInputs`.
As `remove-references-to` is an actual executable and not a shell function, it can be used with `find`.
Example removing all references to the compiler in the output:
```nix
-postInstall = ''
- find "$out" -type f -exec remove-references-to -t ${stdenv.cc} '{}' +
-'';
+{
+ postInstall = ''
+ find "$out" -type f -exec remove-references-to -t ${stdenv.cc} '{}' +
+ '';
+}
```
### `substitute` \ \ \ {#fun-substitute}
diff --git a/third_party/nixpkgs/doc/style.css b/third_party/nixpkgs/doc/style.css
index 474dd32e3f..5bc587a6ee 100644
--- a/third_party/nixpkgs/doc/style.css
+++ b/third_party/nixpkgs/doc/style.css
@@ -1,291 +1,441 @@
-/* Copied from http://bakefile.sourceforge.net/, which appears
- licensed under the GNU GPL. */
-
-
-/***************************************************************************
- Basic headers and text:
- ***************************************************************************/
-
-body
-{
- font-family: "Nimbus Sans L", sans-serif;
- font-size: 1em;
- background: white;
- margin: 2em 1em 2em 1em;
+html {
+ line-height: 1.15;
+ -webkit-text-size-adjust: 100%;
}
-h1, h2, h3, h4
-{
- color: #005aa0;
+body {
+ margin: 0;
}
-h1 /* title */
-{
- font-size: 200%;
-}
-
-h2 /* chapters, appendices, subtitle */
-{
- font-size: 180%;
-}
-
-div.book
-{
- text-align: center;
-}
-
-div.book > div
-{
- /*
- * based on https://medium.com/@zkareemz/golden-ratio-62b3b6d4282a
- * we do 70 characters per line to fit code listings better
- * 70 * (font-size / 1.618)
- * expression for emacs:
- * (* 70 (/ 1 1.618))
- */
- max-width: 43.2em;
- text-align: left;
+.book {
margin: auto;
+ width: 100%;
}
-/* Extra space between chapters, appendices. */
-div.chapter > div.titlepage h2, div.appendix > div.titlepage h2
-{
- margin-top: 1.5em;
+@media screen and (min-width: 768px) {
+ .book {
+ max-width: 46rem;
+ }
}
-div.section > div.titlepage h2 /* sections */
-{
- font-size: 150%;
- margin-top: 1.5em;
+@media screen and (min-width: 992px) {
+ .book {
+ max-width: 60rem;
+ }
}
-h3 /* subsections */
-{
- font-size: 125%;
+@media screen and (min-width: 1200px) {
+ .book {
+ max-width: 73rem;
+ }
}
-div.simplesect h2
-{
- font-size: 110%;
+.book .list-of-examples {
+ display: none;
}
-div.appendix h3
-{
- font-size: 150%;
- margin-top: 1.5em;
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
}
-div.refnamediv h2, div.refsynopsisdiv h2, div.refsection h2 /* refentry parts */
-{
- margin-top: 1.4em;
- font-size: 125%;
+hr {
+ box-sizing: content-box;
+ height: 0;
+ overflow: visible;
}
-div.refsection h3
-{
- font-size: 110%;
+pre {
+ font-family: monospace, monospace;
+ font-size: 1em;
}
-
-/***************************************************************************
- Examples:
- ***************************************************************************/
-
-div.example
-{
- border: 1px solid #b0b0b0;
- padding: 6px 6px;
- margin-left: 1.5em;
- margin-right: 1.5em;
- background: #f4f4f8;
- border-radius: 0.4em;
- box-shadow: 0.4em 0.4em 0.5em #e0e0e0;
+a {
+ background-color: transparent;
}
-div.example p.title
-{
- margin-top: 0em;
+strong {
+ font-weight: bolder;
}
-div.example pre
-{
- box-shadow: none;
+code {
+ font-family: monospace, monospace;
+ font-size: 1em;
}
-
-/***************************************************************************
- Screen dumps:
- ***************************************************************************/
-
-pre.screen, pre.programlisting
-{
- border: 1px solid #b0b0b0;
- padding: 3px 3px;
- margin-left: 0.5em;
- margin-right: 0.5em;
-
- background: #f4f4f8;
- font-family: monospace;
- border-radius: 0.4em;
- box-shadow: 0.4em 0.4em 0.5em #e0e0e0;
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
}
-div.example pre.programlisting
-{
- border: 0px;
- padding: 0 0;
- margin: 0 0 0 0;
+sup {
+ top: -0.5em;
}
-/***************************************************************************
- Notes, warnings etc:
- ***************************************************************************/
-
-.note, .warning
-{
- border: 1px solid #b0b0b0;
- padding: 3px 3px;
- margin-left: 1.5em;
- margin-right: 1.5em;
- margin-bottom: 1em;
- padding: 0.3em 0.3em 0.3em 0.3em;
- background: #fffff5;
- border-radius: 0.4em;
- box-shadow: 0.4em 0.4em 0.5em #e0e0e0;
+::-webkit-file-upload-button {
+ -webkit-appearance: button;
+ font: inherit;
}
-div.note, div.warning
-{
- font-style: italic;
+pre {
+ overflow: auto;
}
-div.note h3, div.warning h3
-{
- color: red;
+*,
+*::before,
+*::after {
+ box-sizing: border-box;
+}
+
+html {
font-size: 100%;
- padding-right: 0.5em;
- display: inline;
+ line-height: 1.77777778;
}
-div.note p, div.warning p
-{
- margin-bottom: 0em;
+@media screen and (min-width: 4000px) {
+ html {
+ background: #000;
+ }
+
+ html body {
+ margin: auto;
+ max-width: 250rem;
+ }
}
-div.note h3 + p, div.warning h3 + p
-{
- display: inline;
+@media screen and (max-width: 320px) {
+ html {
+ font-size: calc(16 / 320 * 100vw);
+ }
}
-div.note h3
-{
- color: blue;
- font-size: 100%;
+body {
+ font-size: 1rem;
+ font-family: 'Roboto', sans-serif;
+ font-weight: 300;
+ color: #000000;
+ background-color: #ffffff;
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
}
-div.navfooter *
-{
- font-size: 90%;
+@media screen and (max-width: 767.9px) {
+ body {
+ padding-left: 1rem;
+ padding-right: 1rem;
+ }
}
-
-/***************************************************************************
- Links colors and highlighting:
- ***************************************************************************/
-
-a { text-decoration: none; }
-a:hover { text-decoration: underline; }
-a:link { color: #0048b3; }
-a:visited { color: #002a6a; }
-
-
-/***************************************************************************
- Table of contents:
- ***************************************************************************/
-
-div.toc
-{
- font-size: 90%;
+a {
+ text-decoration: none;
+ border-bottom: 1px solid;
+ color: #405d99;
}
-div.toc dl
-{
- margin-top: 0em;
- margin-bottom: 0em;
+ul {
+ padding: 0;
+ margin-top: 0;
+ margin-right: 0;
+ margin-bottom: 1rem;
+ margin-left: 1rem;
}
-
-/***************************************************************************
- Special elements:
- ***************************************************************************/
-
-tt, code
-{
- color: #400000;
-}
-
-.term
-{
- font-weight: bold;
-
-}
-
-div.variablelist dd p, div.glosslist dd p
-{
- margin-top: 0em;
-}
-
-div.variablelist dd, div.glosslist dd
-{
- margin-left: 1.5em;
-}
-
-div.glosslist dt
-{
- font-style: italic;
-}
-
-.varname
-{
- color: #400000;
-}
-
-span.command strong
-{
- font-weight: normal;
- color: #400000;
-}
-
-div.calloutlist table
-{
- box-shadow: none;
-}
-
-table
-{
+table {
border-collapse: collapse;
- box-shadow: 0.4em 0.4em 0.5em #e0e0e0;
+ width: 100%;
+ margin-bottom: 1rem;
}
-table.simplelist
-{
+thead th {
text-align: left;
- color: #005aa0;
- border: 0;
+}
+
+hr {
+ margin-top: 1rem;
+ margin-bottom: 1rem;
+}
+
+h1 {
+ font-weight: 800;
+ line-height: 110%;
+ font-size: 200%;
+ margin-bottom: 1rem;
+ color: #6586c8;
+}
+
+h2 {
+ font-weight: 800;
+ line-height: 110%;
+ font-size: 170%;
+ margin-bottom: 0.625rem;
+ color: #6586c8;
+}
+
+h2:not(:first-child) {
+ margin-top: 1rem;
+}
+
+h3 {
+ font-weight: 800;
+ line-height: 110%;
+ margin-bottom: 1rem;
+ font-size: 150%;
+ color: #6586c8;
+}
+
+.note h3,
+.tip h3,
+.warning h3,
+.caution h3,
+.important h3 {
+ font-size: 120%;
+}
+
+h4 {
+ font-weight: 800;
+ line-height: 110%;
+ margin-bottom: 1rem;
+ font-size: 140%;
+ color: #6586c8;
+}
+
+h5 {
+ font-weight: 800;
+ line-height: 110%;
+ margin-bottom: 1rem;
+ font-size: 130%;
+ color: #6a6a6a;
+}
+
+h6 {
+ font-weight: 800;
+ line-height: 110%;
+ margin-bottom: 1rem;
+ font-size: 120%
+}
+
+strong {
+ font-weight: bold;
+}
+
+p {
+ margin-top: 0;
+ margin-bottom: 1rem;
+}
+
+dt>*:first-child,
+dd>*:first-child {
+ margin-top: 0;
+}
+
+dt>*:last-child,
+dd>*:last-child {
+ margin-bottom: 0;
+}
+
+pre,
+code {
+ font-family: monospace;
+}
+
+code {
+ color: #ff8657;
+ background: #f4f4f4;
+ display: inline-block;
+ padding: 0 0.5rem;
+ border: 1px solid #d8d8d8;
+ border-radius: 0.5rem;
+ line-height: 1.57777778;
+}
+
+div.book .programlisting,
+div.appendix .programlisting {
+ border-radius: 0.5rem;
+ padding: 1rem;
+ overflow: auto;
+ background: #f2f8fd;
+ color: #000000;
+}
+
+div.book .note,
+div.book .tip,
+div.book .warning,
+div.book .caution,
+div.book .important,
+div.appendix .note,
+div.appendix .tip,
+div.appendix .warning,
+div.appendix .caution,
+div.appendix .important {
+ margin-bottom: 1rem;
+ border-radius: 0.5rem;
+ padding: 1.5rem;
+ overflow: auto;
+ background: #f4f4f4;
+}
+
+div.book .note>.title,
+div.book .tip>.title,
+div.book .warning>.title,
+div.book .caution>.title,
+div.book .important>.title,
+div.appendix .note>.title,
+div.appendix .tip>.title,
+div.appendix .warning>.title,
+div.appendix .caution>.title,
+div.appendix .important>.title {
+ font-weight: 800;
+ /* font-family: 'Overpass', serif; */
+ line-height: 110%;
+ margin-bottom: 1rem;
+ color: inherit;
+ margin-bottom: 0;
+}
+
+div.book .note> :first-child,
+div.book .tip> :first-child,
+div.book .warning> :first-child,
+div.book .caution> :first-child,
+div.book .important> :first-child,
+div.appendix .note> :first-child,
+div.appendix .tip> :first-child,
+div.appendix .warning> :first-child,
+div.appendix .caution> :first-child,
+div.appendix .important> :first-child {
+ margin-top: 0;
+}
+
+div.book .note> :last-child,
+div.book .tip> :last-child,
+div.book .warning> :last-child,
+div.book .caution> :last-child,
+div.book .important> :last-child,
+div.appendix .note> :last-child,
+div.appendix .tip> :last-child,
+div.appendix .warning> :last-child,
+div.appendix .caution> :last-child,
+div.appendix .important> :last-child {
+ margin-bottom: 0;
+}
+
+div.book .note,
+div.book .tip,
+div.appendix .note,
+div.appendix .tip {
+ color: #5277c3;
+ background: #f2f8fd;
+}
+
+div.book .warning,
+div.book .caution,
+div.appendix .warning,
+div.appendix .caution {
+ color: #cc3900;
+ background-color: #fff5e1;
+}
+
+div.book .section,
+div.appendix .section {
+ margin-top: 2em;
+}
+
+div.book div.example,
+div.appendix div.example {
+ margin-top: 1.5em;
+}
+
+div.book div.example details,
+div.appendix div.example details {
padding: 5px;
- background: #fffff5;
- font-weight: normal;
- font-style: italic;
- box-shadow: none;
- margin-bottom: 1em;
}
-div.navheader table, div.navfooter table {
- box-shadow: none;
+div.book div.example details[open],
+div.appendix div.example details[open] {
+ border: 1px solid #aaa;
+ border-radius: 4px;
}
-div.affiliation
-{
- font-style: italic;
+div.book div.example details>summary,
+div.appendix div.example details>summary {
+ cursor: pointer;
+}
+
+div.book br.example-break,
+div.appendix br.example-break {
+ display: none;
+}
+
+div.book div.footnotes>hr,
+div.appendix div.footnotes>hr {
+ border-color: #d8d8d8;
+}
+
+div.book div.footnotes>br,
+div.appendix div.footnotes>br {
+ display: none;
+}
+
+div.book dt,
+div.appendix dt {
+ margin-top: 1em;
+}
+
+div.book .toc dt,
+div.appendix .toc dt {
+ margin-top: 0;
+}
+
+div.book .list-of-examples dt,
+div.appendix .list-of-examples dt {
+ margin-top: 0;
+}
+
+div.book code,
+div.appendix code {
+ padding: 0;
+ border: 0;
+ background-color: inherit;
+ color: inherit;
+ font-size: 100%;
+ -webkit-hyphens: none;
+ -moz-hyphens: none;
+ hyphens: none;
+}
+
+div.book div.toc,
+div.appendix div.toc {
+ margin-bottom: 3em;
+ border-bottom: 0.0625rem solid #d8d8d8;
+}
+
+div.book div.toc dd,
+div.appendix div.toc dd {
+ margin-left: 2em;
+}
+
+div.book span.command,
+div.appendix span.command {
+ font-family: monospace;
+ -webkit-hyphens: none;
+ -moz-hyphens: none;
+ hyphens: none;
+}
+
+div.book .informaltable th,
+div.book .informaltable td,
+div.appendix .informaltable th,
+div.appendix .informaltable td {
+ padding: 0.5rem;
+}
+
+/*
+ This relies on highlight.js applying certain classes on the prompts.
+ For more details, see https://highlightjs.readthedocs.io/en/latest/css-classes-reference.html#stylable-scopes
+*/
+.hljs-meta.prompt_ {
+ user-select: none;
+ -webkit-user-select: none;
}
diff --git a/third_party/nixpkgs/doc/using/configuration.chapter.md b/third_party/nixpkgs/doc/using/configuration.chapter.md
index 8d246b117b..05a8fa5517 100644
--- a/third_party/nixpkgs/doc/using/configuration.chapter.md
+++ b/third_party/nixpkgs/doc/using/configuration.chapter.md
@@ -1,6 +1,7 @@
# Global configuration {#chap-packageconfig}
-Nix comes with certain defaults about what packages can and cannot be installed, based on a package's metadata. By default, Nix will prevent installation if any of the following criteria are true:
+Nix comes with certain defaults about which packages can and cannot be installed, based on a package's metadata.
+By default, Nix will prevent installation if any of the following criteria are true:
- The package is thought to be broken, and has had its `meta.broken` set to `true`.
@@ -10,23 +11,14 @@ Nix comes with certain defaults about what packages can and cannot be installed,
- The package has known security vulnerabilities but has not or can not be updated for some reason, and a list of issues has been entered in to the package's `meta.knownVulnerabilities`.
-Note that all this is checked during evaluation already, and the check includes any package that is evaluated. In particular, all build-time dependencies are checked. `nix-env -qa` will (attempt to) hide any packages that would be refused.
+Each of these criteria can be altered in the Nixpkgs configuration.
-Each of these criteria can be altered in the nixpkgs configuration.
+:::{.note}
+All this is checked during evaluation already, and the check includes any package that is evaluated.
+In particular, all build-time dependencies are checked.
+:::
-The nixpkgs configuration for a NixOS system is set in the `configuration.nix`, as in the following example:
-
-```nix
-{
- nixpkgs.config = {
- allowUnfree = true;
- };
-}
-```
-
-However, this does not allow unfree software for individual users. Their configurations are managed separately.
-
-A user's nixpkgs configuration is stored in a user-specific configuration file located at `~/.config/nixpkgs/config.nix`. For example:
+A user's Nixpkgs configuration is stored in a user-specific configuration file located at `~/.config/nixpkgs/config.nix`. For example:
```nix
{
@@ -34,7 +26,10 @@ A user's nixpkgs configuration is stored in a user-specific configuration file l
}
```
-Note that we are not able to test or build unfree software on Hydra due to policy. Most unfree licenses prohibit us from either executing or distributing the software.
+:::{.caution}
+Unfree software is not tested or built in Nixpkgs continuous integration, and therefore not cached.
+Most unfree licenses prohibit either executing or distributing the software.
+:::
## Installing broken packages {#sec-allow-broken}
@@ -176,7 +171,7 @@ You can define a function called `packageOverrides` in your local `~/.config/nix
```nix
{
packageOverrides = pkgs: rec {
- foo = pkgs.foo.override { ... };
+ foo = pkgs.foo.override { /* ... */ };
};
}
```
diff --git a/third_party/nixpkgs/doc/using/overlays.chapter.md b/third_party/nixpkgs/doc/using/overlays.chapter.md
index 1bec6586f2..46200730f0 100644
--- a/third_party/nixpkgs/doc/using/overlays.chapter.md
+++ b/third_party/nixpkgs/doc/using/overlays.chapter.md
@@ -141,7 +141,7 @@ For BLAS/LAPACK switching to work correctly, all packages must depend on `blas`
assert (!blas.isILP64) && (!lapack.isILP64);
stdenv.mkDerivation {
- ...
+ # ...
}
```
diff --git a/third_party/nixpkgs/doc/using/overrides.chapter.md b/third_party/nixpkgs/doc/using/overrides.chapter.md
index a1ef9afb0b..8c6ed79076 100644
--- a/third_party/nixpkgs/doc/using/overrides.chapter.md
+++ b/third_party/nixpkgs/doc/using/overrides.chapter.md
@@ -13,13 +13,13 @@ It is used to override the arguments passed to a function.
Example usages:
```nix
-pkgs.foo.override { arg1 = val1; arg2 = val2; ... }
+pkgs.foo.override { arg1 = val1; arg2 = val2; /* ... */ }
```
It's also possible to access the previous arguments.
```nix
-pkgs.foo.override (previous: { arg1 = previous.arg1; ... })
+pkgs.foo.override (previous: { arg1 = previous.arg1; /* ... */ })
```
@@ -27,13 +27,15 @@ pkgs.foo.override (previous: { arg1 = previous.arg1; ... })
```nix
import pkgs.path { overlays = [ (self: super: {
foo = super.foo.override { barSupport = true ; };
- })]};
+ })];}
```
```nix
-mypkg = pkgs.callPackage ./mypkg.nix {
- mydep = pkgs.mydep.override { ... };
- }
+{
+ mypkg = pkgs.callPackage ./mypkg.nix {
+ mydep = pkgs.mydep.override { /* ... */ };
+ };
+}
```
In the first example, `pkgs.foo` is the result of a function call with some default arguments, usually a derivation. Using `pkgs.foo.override` will call the same function with the given new arguments.
@@ -45,9 +47,11 @@ The function `overrideAttrs` allows overriding the attribute set passed to a `st
Example usages:
```nix
-helloBar = pkgs.hello.overrideAttrs (finalAttrs: previousAttrs: {
- pname = previousAttrs.pname + "-bar";
-});
+{
+ helloBar = pkgs.hello.overrideAttrs (finalAttrs: previousAttrs: {
+ pname = previousAttrs.pname + "-bar";
+ });
+}
```
In the above example, "-bar" is appended to the pname attribute, while all other attributes will be retained from the original `hello` package.
@@ -61,9 +65,11 @@ If only a one-argument function is written, the argument has the meaning of `pre
Function arguments can be omitted entirely if there is no need to access `previousAttrs` or `finalAttrs`.
```nix
-helloWithDebug = pkgs.hello.overrideAttrs {
- separateDebugInfo = true;
-};
+{
+ helloWithDebug = pkgs.hello.overrideAttrs {
+ separateDebugInfo = true;
+ };
+}
```
In the above example, the `separateDebugInfo` attribute is overridden to be true, thus building debug info for `helloWithDebug`.
@@ -87,14 +93,16 @@ The function `overrideDerivation` creates a new derivation based on an existing
Example usage:
```nix
-mySed = pkgs.gnused.overrideDerivation (oldAttrs: {
- name = "sed-4.2.2-pre";
- src = fetchurl {
- url = "ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2";
- hash = "sha256-MxBJRcM2rYzQYwJ5XKxhXTQByvSg5jZc5cSHEZoB2IY=";
- };
- patches = [];
-});
+{
+ mySed = pkgs.gnused.overrideDerivation (oldAttrs: {
+ name = "sed-4.2.2-pre";
+ src = fetchurl {
+ url = "ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2";
+ hash = "sha256-MxBJRcM2rYzQYwJ5XKxhXTQByvSg5jZc5cSHEZoB2IY=";
+ };
+ patches = [];
+ });
+}
```
In the above example, the `name`, `src`, and `patches` of the derivation will be overridden, while all other attributes will be retained from the original derivation.
@@ -112,8 +120,10 @@ The function `lib.makeOverridable` is used to make the result of a function easi
Example usage:
```nix
-f = { a, b }: { result = a+b; };
-c = lib.makeOverridable f { a = 1; b = 2; };
+{
+ f = { a, b }: { result = a+b; };
+ c = lib.makeOverridable f { a = 1; b = 2; };
+}
```
The variable `c` is the value of the `f` function applied with some default arguments. Hence the value of `c.result` is `3`, in this example.
diff --git a/third_party/nixpkgs/lib/.version b/third_party/nixpkgs/lib/.version
new file mode 100644
index 0000000000..420f61e8c7
--- /dev/null
+++ b/third_party/nixpkgs/lib/.version
@@ -0,0 +1 @@
+24.05
\ No newline at end of file
diff --git a/third_party/nixpkgs/lib/asserts.nix b/third_party/nixpkgs/lib/asserts.nix
index 8d0a621f4c..c7900c5d6c 100644
--- a/third_party/nixpkgs/lib/asserts.nix
+++ b/third_party/nixpkgs/lib/asserts.nix
@@ -2,47 +2,87 @@
rec {
- /* Throw if pred is false, else return pred.
- Intended to be used to augment asserts with helpful error messages.
+ /**
+ Throw if pred is false, else return pred.
+ Intended to be used to augment asserts with helpful error messages.
- Example:
- assertMsg false "nope"
- stderr> error: nope
+ # Inputs
- assert assertMsg ("foo" == "bar") "foo is not bar, silly"; ""
- stderr> error: foo is not bar, silly
+ `pred`
- Type:
- assertMsg :: Bool -> String -> Bool
+ : Predicate that needs to succeed, otherwise `msg` is thrown
+
+ `msg`
+
+ : Message to throw in case `pred` fails
+
+ # Type
+
+ ```
+ assertMsg :: Bool -> String -> Bool
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.asserts.assertMsg` usage example
+
+ ```nix
+ assertMsg false "nope"
+ stderr> error: nope
+ assert assertMsg ("foo" == "bar") "foo is not bar, silly"; ""
+ stderr> error: foo is not bar, silly
+ ```
+
+ :::
*/
# TODO(Profpatsch): add tests that check stderr
assertMsg =
- # Predicate that needs to succeed, otherwise `msg` is thrown
pred:
- # Message to throw in case `pred` fails
msg:
pred || builtins.throw msg;
- /* Specialized `assertMsg` for checking if `val` is one of the elements
- of the list `xs`. Useful for checking enums.
+ /**
+ Specialized `assertMsg` for checking if `val` is one of the elements
+ of the list `xs`. Useful for checking enums.
- Example:
- let sslLibrary = "libressl";
- in assertOneOf "sslLibrary" sslLibrary [ "openssl" "bearssl" ]
- stderr> error: sslLibrary must be one of [
- stderr> "openssl"
- stderr> "bearssl"
- stderr> ], but is: "libressl"
+ # Inputs
- Type:
- assertOneOf :: String -> ComparableVal -> List ComparableVal -> Bool
+ `name`
+
+ : The name of the variable the user entered `val` into, for inclusion in the error message
+
+ `val`
+
+ : The value of what the user provided, to be compared against the values in `xs`
+
+ `xs`
+
+ : The list of valid values
+
+ # Type
+
+ ```
+ assertOneOf :: String -> ComparableVal -> List ComparableVal -> Bool
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.asserts.assertOneOf` usage example
+
+ ```nix
+ let sslLibrary = "libressl";
+ in assertOneOf "sslLibrary" sslLibrary [ "openssl" "bearssl" ]
+ stderr> error: sslLibrary must be one of [
+ stderr> "openssl"
+ stderr> "bearssl"
+ stderr> ], but is: "libressl"
+ ```
+
+ :::
*/
assertOneOf =
- # The name of the variable the user entered `val` into, for inclusion in the error message
name:
- # The value of what the user provided, to be compared against the values in `xs`
val:
- # The list of valid values
xs:
assertMsg
(lib.elem val xs)
@@ -50,29 +90,51 @@ rec {
lib.generators.toPretty {} xs}, but is: ${
lib.generators.toPretty {} val}";
- /* Specialized `assertMsg` for checking if every one of `vals` is one of the elements
- of the list `xs`. Useful for checking lists of supported attributes.
+ /**
+ Specialized `assertMsg` for checking if every one of `vals` is one of the elements
+ of the list `xs`. Useful for checking lists of supported attributes.
- Example:
- let sslLibraries = [ "libressl" "bearssl" ];
- in assertEachOneOf "sslLibraries" sslLibraries [ "openssl" "bearssl" ]
- stderr> error: each element in sslLibraries must be one of [
- stderr> "openssl"
- stderr> "bearssl"
- stderr> ], but is: [
- stderr> "libressl"
- stderr> "bearssl"
- stderr> ]
+ # Inputs
- Type:
- assertEachOneOf :: String -> List ComparableVal -> List ComparableVal -> Bool
+ `name`
+
+ : The name of the variable the user entered `val` into, for inclusion in the error message
+
+ `vals`
+
+ : The list of values of what the user provided, to be compared against the values in `xs`
+
+ `xs`
+
+ : The list of valid values
+
+ # Type
+
+ ```
+ assertEachOneOf :: String -> List ComparableVal -> List ComparableVal -> Bool
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.asserts.assertEachOneOf` usage example
+
+ ```nix
+ let sslLibraries = [ "libressl" "bearssl" ];
+ in assertEachOneOf "sslLibraries" sslLibraries [ "openssl" "bearssl" ]
+ stderr> error: each element in sslLibraries must be one of [
+ stderr> "openssl"
+ stderr> "bearssl"
+ stderr> ], but is: [
+ stderr> "libressl"
+ stderr> "bearssl"
+ stderr> ]
+ ```
+
+ :::
*/
assertEachOneOf =
- # The name of the variable the user entered `val` into, for inclusion in the error message
name:
- # The list of values of what the user provided, to be compared against the values in `xs`
vals:
- # The list of valid values
xs:
assertMsg
(lib.all (val: lib.elem val xs) vals)
diff --git a/third_party/nixpkgs/lib/attrsets.nix b/third_party/nixpkgs/lib/attrsets.nix
index 4f7d795c39..83f8d0f341 100644
--- a/third_party/nixpkgs/lib/attrsets.nix
+++ b/third_party/nixpkgs/lib/attrsets.nix
@@ -1,9 +1,11 @@
-/* Operations on attribute sets. */
+/**
+ Operations on attribute sets.
+*/
{ lib }:
let
inherit (builtins) head length;
- inherit (lib.trivial) mergeAttrs warn;
+ inherit (lib.trivial) isInOldestRelease mergeAttrs warn warnIf;
inherit (lib.strings) concatStringsSep concatMapStringsSep escapeNixIdentifier sanitizeDerivationName;
inherit (lib.lists) foldr foldl' concatMap elemAt all partition groupBy take foldl;
in
@@ -12,35 +14,57 @@ rec {
inherit (builtins) attrNames listToAttrs hasAttr isAttrs getAttr removeAttrs;
- /* Return an attribute from nested attribute sets.
+ /**
+ Return an attribute from nested attribute sets.
- Nix has an [attribute selection operator `. or`](https://nixos.org/manual/nix/stable/language/operators#attribute-selection) which is sufficient for such queries, as long as the number of attributes is static. For example:
+ Nix has an [attribute selection operator `. or`](https://nixos.org/manual/nix/stable/language/operators#attribute-selection) which is sufficient for such queries, as long as the number of attributes is static. For example:
- ```nix
- (x.a.b or 6) == attrByPath ["a" "b"] 6 x
- # and
- (x.${f p}."example.com" or 6) == attrByPath [ (f p) "example.com" ] 6 x
- ```
+ ```nix
+ (x.a.b or 6) == attrByPath ["a" "b"] 6 x
+ # and
+ (x.${f p}."example.com" or 6) == attrByPath [ (f p) "example.com" ] 6 x
+ ```
- Example:
- x = { a = { b = 3; }; }
- # ["a" "b"] is equivalent to x.a.b
- # 6 is a default value to return if the path does not exist in attrset
- attrByPath ["a" "b"] 6 x
- => 3
- attrByPath ["z" "z"] 6 x
- => 6
- Type:
- attrByPath :: [String] -> Any -> AttrSet -> Any
+ # Inputs
+ `attrPath`
+
+ : A list of strings representing the attribute path to return from `set`
+
+ `default`
+
+ : Default value if `attrPath` does not resolve to an existing value
+
+ `set`
+
+ : The nested attribute set to select values from
+
+ # Type
+
+ ```
+ attrByPath :: [String] -> Any -> AttrSet -> Any
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.attrByPath` usage example
+
+ ```nix
+ x = { a = { b = 3; }; }
+ # ["a" "b"] is equivalent to x.a.b
+ # 6 is a default value to return if the path does not exist in attrset
+ attrByPath ["a" "b"] 6 x
+ => 3
+ attrByPath ["z" "z"] 6 x
+ => 6
+ ```
+
+ :::
*/
attrByPath =
- # A list of strings representing the attribute path to return from `set`
attrPath:
- # Default value if `attrPath` does not resolve to an existing value
default:
- # The nested attribute set to select values from
set:
let
lenAttrPath = length attrPath;
@@ -57,37 +81,57 @@ rec {
in
attrByPath' 0 set;
- /* Return if an attribute from nested attribute set exists.
+ /**
+ Return if an attribute from nested attribute set exists.
- Nix has a [has attribute operator `?`](https://nixos.org/manual/nix/stable/language/operators#has-attribute), which is sufficient for such queries, as long as the number of attributes is static. For example:
+ Nix has a [has attribute operator `?`](https://nixos.org/manual/nix/stable/language/operators#has-attribute), which is sufficient for such queries, as long as the number of attributes is static. For example:
- ```nix
- (x?a.b) == hasAttryByPath ["a" "b"] x
- # and
- (x?${f p}."example.com") == hasAttryByPath [ (f p) "example.com" ] x
- ```
+ ```nix
+ (x?a.b) == hasAttrByPath ["a" "b"] x
+ # and
+ (x?${f p}."example.com") == hasAttrByPath [ (f p) "example.com" ] x
+ ```
- **Laws**:
- 1. ```nix
- hasAttrByPath [] x == true
- ```
+ **Laws**:
+ 1. ```nix
+ hasAttrByPath [] x == true
+ ```
- Example:
- x = { a = { b = 3; }; }
- hasAttrByPath ["a" "b"] x
- => true
- hasAttrByPath ["z" "z"] x
- => false
- hasAttrByPath [] (throw "no need")
- => true
- Type:
- hasAttrByPath :: [String] -> AttrSet -> Bool
+ # Inputs
+
+ `attrPath`
+
+ : A list of strings representing the attribute path to check from `set`
+
+ `e`
+
+ : The nested attribute set to check
+
+ # Type
+
+ ```
+ hasAttrByPath :: [String] -> AttrSet -> Bool
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.hasAttrByPath` usage example
+
+ ```nix
+ x = { a = { b = 3; }; }
+ hasAttrByPath ["a" "b"] x
+ => true
+ hasAttrByPath ["z" "z"] x
+ => false
+ hasAttrByPath [] (throw "no need")
+ => true
+ ```
+
+ :::
*/
hasAttrByPath =
- # A list of strings representing the attribute path to check from `set`
attrPath:
- # The nested attribute set to check
e:
let
lenAttrPath = length attrPath;
@@ -103,7 +147,7 @@ rec {
in
hasAttrByPath' 0 e;
- /*
+ /**
Return the longest prefix of an attribute path that refers to an existing attribute in a nesting of attribute sets.
Can be used after [`mapAttrsRecursiveCond`](#function-library-lib.attrsets.mapAttrsRecursiveCond) to apply a condition,
@@ -120,24 +164,43 @@ rec {
hasAttrByPath (attrsets.longestValidPathPrefix p x) x == true
```
- Example:
- x = { a = { b = 3; }; }
- attrsets.longestValidPathPrefix ["a" "b" "c"] x
- => ["a" "b"]
- attrsets.longestValidPathPrefix ["a"] x
- => ["a"]
- attrsets.longestValidPathPrefix ["z" "z"] x
- => []
- attrsets.longestValidPathPrefix ["z" "z"] (throw "no need")
- => []
- Type:
- attrsets.longestValidPathPrefix :: [String] -> Value -> [String]
+ # Inputs
+
+ `attrPath`
+
+ : A list of strings representing the longest possible path that may be returned.
+
+ `v`
+
+ : The nested attribute set to check.
+
+ # Type
+
+ ```
+ attrsets.longestValidPathPrefix :: [String] -> Value -> [String]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.longestValidPathPrefix` usage example
+
+ ```nix
+ x = { a = { b = 3; }; }
+ attrsets.longestValidPathPrefix ["a" "b" "c"] x
+ => ["a" "b"]
+ attrsets.longestValidPathPrefix ["a"] x
+ => ["a"]
+ attrsets.longestValidPathPrefix ["z" "z"] x
+ => []
+ attrsets.longestValidPathPrefix ["z" "z"] (throw "no need")
+ => []
+ ```
+
+ :::
*/
longestValidPathPrefix =
- # A list of strings representing the longest possible path that may be returned.
attrPath:
- # The nested attribute set to check.
v:
let
lenAttrPath = length attrPath;
@@ -168,19 +231,39 @@ rec {
in
getPrefixForSetAtIndex v 0;
- /* Create a new attribute set with `value` set at the nested attribute location specified in `attrPath`.
+ /**
+ Create a new attribute set with `value` set at the nested attribute location specified in `attrPath`.
- Example:
- setAttrByPath ["a" "b"] 3
- => { a = { b = 3; }; }
- Type:
- setAttrByPath :: [String] -> Any -> AttrSet
+ # Inputs
+
+ `attrPath`
+
+ : A list of strings representing the attribute path to set
+
+ `value`
+
+ : The value to set at the location described by `attrPath`
+
+ # Type
+
+ ```
+ setAttrByPath :: [String] -> Any -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.setAttrByPath` usage example
+
+ ```nix
+ setAttrByPath ["a" "b"] 3
+ => { a = { b = 3; }; }
+ ```
+
+ :::
*/
setAttrByPath =
- # A list of strings representing the attribute path to set
attrPath:
- # The value to set at the location described by `attrPath`
value:
let
len = length attrPath;
@@ -190,48 +273,89 @@ rec {
else { ${elemAt attrPath n} = atDepth (n + 1); };
in atDepth 0;
- /* Like `attrByPath`, but without a default value. If it doesn't find the
- path it will throw an error.
+ /**
+ Like `attrByPath`, but without a default value. If it doesn't find the
+ path it will throw an error.
- Nix has an [attribute selection operator](https://nixos.org/manual/nix/stable/language/operators#attribute-selection) which is sufficient for such queries, as long as the number of attributes is static. For example:
+ Nix has an [attribute selection operator](https://nixos.org/manual/nix/stable/language/operators#attribute-selection) which is sufficient for such queries, as long as the number of attributes is static. For example:
```nix
- x.a.b == getAttrByPath ["a" "b"] x
- # and
- x.${f p}."example.com" == getAttrByPath [ (f p) "example.com" ] x
- ```
+ x.a.b == getAttrByPath ["a" "b"] x
+ # and
+ x.${f p}."example.com" == getAttrByPath [ (f p) "example.com" ] x
+ ```
- Example:
- x = { a = { b = 3; }; }
- getAttrFromPath ["a" "b"] x
- => 3
- getAttrFromPath ["z" "z"] x
- => error: cannot find attribute `z.z'
- Type:
- getAttrFromPath :: [String] -> AttrSet -> Any
+ # Inputs
+
+ `attrPath`
+
+ : A list of strings representing the attribute path to get from `set`
+
+ `set`
+
+ : The nested attribute set to find the value in.
+
+ # Type
+
+ ```
+ getAttrFromPath :: [String] -> AttrSet -> Any
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.getAttrFromPath` usage example
+
+ ```nix
+ x = { a = { b = 3; }; }
+ getAttrFromPath ["a" "b"] x
+ => 3
+ getAttrFromPath ["z" "z"] x
+ => error: cannot find attribute `z.z'
+ ```
+
+ :::
*/
getAttrFromPath =
- # A list of strings representing the attribute path to get from `set`
attrPath:
- # The nested attribute set to find the value in.
set:
- let errorMsg = "cannot find attribute `" + concatStringsSep "." attrPath + "'";
- in attrByPath attrPath (abort errorMsg) set;
+ attrByPath attrPath (abort ("cannot find attribute `" + concatStringsSep "." attrPath + "'")) set;
- /* Map each attribute in the given set and merge them into a new attribute set.
+ /**
+ Map each attribute in the given set and merge them into a new attribute set.
- Type:
- concatMapAttrs :: (String -> a -> AttrSet) -> AttrSet -> AttrSet
- Example:
- concatMapAttrs
- (name: value: {
- ${name} = value;
- ${name + value} = value;
- })
- { x = "a"; y = "b"; }
- => { x = "a"; xa = "a"; y = "b"; yb = "b"; }
+ # Inputs
+
+ `f`
+
+ : 1\. Function argument
+
+ `v`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ concatMapAttrs :: (String -> a -> AttrSet) -> AttrSet -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.concatMapAttrs` usage example
+
+ ```nix
+ concatMapAttrs
+ (name: value: {
+ ${name} = value;
+ ${name + value} = value;
+ })
+ { x = "a"; y = "b"; }
+ => { x = "a"; xa = "a"; y = "b"; yb = "b"; }
+ ```
+
+ :::
*/
concatMapAttrs = f: v:
foldl' mergeAttrs { }
@@ -240,49 +364,61 @@ rec {
);
- /* Update or set specific paths of an attribute set.
+ /**
+ Update or set specific paths of an attribute set.
- Takes a list of updates to apply and an attribute set to apply them to,
- and returns the attribute set with the updates applied. Updates are
- represented as `{ path = ...; update = ...; }` values, where `path` is a
- list of strings representing the attribute path that should be updated,
- and `update` is a function that takes the old value at that attribute path
- as an argument and returns the new
- value it should be.
+ Takes a list of updates to apply and an attribute set to apply them to,
+ and returns the attribute set with the updates applied. Updates are
+ represented as `{ path = ...; update = ...; }` values, where `path` is a
+ list of strings representing the attribute path that should be updated,
+ and `update` is a function that takes the old value at that attribute path
+ as an argument and returns the new
+ value it should be.
- Properties:
+ Properties:
- - Updates to deeper attribute paths are applied before updates to more
- shallow attribute paths
+ - Updates to deeper attribute paths are applied before updates to more
+ shallow attribute paths
- - Multiple updates to the same attribute path are applied in the order
- they appear in the update list
+ - Multiple updates to the same attribute path are applied in the order
+ they appear in the update list
- - If any but the last `path` element leads into a value that is not an
- attribute set, an error is thrown
+ - If any but the last `path` element leads into a value that is not an
+ attribute set, an error is thrown
- - If there is an update for an attribute path that doesn't exist,
- accessing the argument in the update function causes an error, but
- intermediate attribute sets are implicitly created as needed
+ - If there is an update for an attribute path that doesn't exist,
+ accessing the argument in the update function causes an error, but
+ intermediate attribute sets are implicitly created as needed
- Example:
- updateManyAttrsByPath [
- {
- path = [ "a" "b" ];
- update = old: { d = old.c; };
- }
- {
- path = [ "a" "b" "c" ];
- update = old: old + 1;
- }
- {
- path = [ "x" "y" ];
- update = old: "xy";
- }
- ] { a.b.c = 0; }
- => { a = { b = { d = 1; }; }; x = { y = "xy"; }; }
+ # Type
- Type: updateManyAttrsByPath :: [{ path :: [String]; update :: (Any -> Any); }] -> AttrSet -> AttrSet
+ ```
+ updateManyAttrsByPath :: [{ path :: [String]; update :: (Any -> Any); }] -> AttrSet -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.updateManyAttrsByPath` usage example
+
+ ```nix
+ updateManyAttrsByPath [
+ {
+ path = [ "a" "b" ];
+ update = old: { d = old.c; };
+ }
+ {
+ path = [ "a" "b" "c" ];
+ update = old: old + 1;
+ }
+ {
+ path = [ "x" "y" ];
+ update = old: "xy";
+ }
+ ] { a.b.c = 0; }
+ => { a = { b = { d = 1; }; }; x = { y = "xy"; }; }
+ ```
+
+ :::
*/
updateManyAttrsByPath = let
# When recursing into attributes, instead of updating the `path` of each
@@ -343,96 +479,208 @@ rec {
in updates: value: go 0 true value updates;
- /* Return the specified attributes from a set.
+ /**
+ Return the specified attributes from a set.
- Example:
- attrVals ["a" "b" "c"] as
- => [as.a as.b as.c]
- Type:
- attrVals :: [String] -> AttrSet -> [Any]
+ # Inputs
+
+ `nameList`
+
+ : The list of attributes to fetch from `set`. Each attribute name must exist on the attrbitue set
+
+ `set`
+
+ : The set to get attribute values from
+
+ # Type
+
+ ```
+ attrVals :: [String] -> AttrSet -> [Any]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.attrVals` usage example
+
+ ```nix
+ attrVals ["a" "b" "c"] as
+ => [as.a as.b as.c]
+ ```
+
+ :::
*/
attrVals =
- # The list of attributes to fetch from `set`. Each attribute name must exist on the attrbitue set
nameList:
- # The set to get attribute values from
set: map (x: set.${x}) nameList;
- /* Return the values of all attributes in the given set, sorted by
- attribute name.
+ /**
+ Return the values of all attributes in the given set, sorted by
+ attribute name.
- Example:
- attrValues {c = 3; a = 1; b = 2;}
- => [1 2 3]
+ # Type
- Type:
- attrValues :: AttrSet -> [Any]
+ ```
+ attrValues :: AttrSet -> [Any]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.attrValues` usage example
+
+ ```nix
+ attrValues {c = 3; a = 1; b = 2;}
+ => [1 2 3]
+ ```
+
+ :::
*/
attrValues = builtins.attrValues;
- /* Given a set of attribute names, return the set of the corresponding
- attributes from the given set.
+ /**
+ Given a set of attribute names, return the set of the corresponding
+ attributes from the given set.
- Example:
- getAttrs [ "a" "b" ] { a = 1; b = 2; c = 3; }
- => { a = 1; b = 2; }
- Type:
- getAttrs :: [String] -> AttrSet -> AttrSet
+ # Inputs
+
+ `names`
+
+ : A list of attribute names to get out of `set`
+
+ `attrs`
+
+ : The set to get the named attributes from
+
+ # Type
+
+ ```
+ getAttrs :: [String] -> AttrSet -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.getAttrs` usage example
+
+ ```nix
+ getAttrs [ "a" "b" ] { a = 1; b = 2; c = 3; }
+ => { a = 1; b = 2; }
+ ```
+
+ :::
*/
getAttrs =
- # A list of attribute names to get out of `set`
names:
- # The set to get the named attributes from
attrs: genAttrs names (name: attrs.${name});
- /* Collect each attribute named `attr` from a list of attribute
- sets. Sets that don't contain the named attribute are ignored.
+ /**
+ Collect each attribute named `attr` from a list of attribute
+ sets. Sets that don't contain the named attribute are ignored.
- Example:
- catAttrs "a" [{a = 1;} {b = 0;} {a = 2;}]
- => [1 2]
+ # Inputs
- Type:
- catAttrs :: String -> [AttrSet] -> [Any]
+ `attr`
+
+ : The attribute name to get out of the sets.
+
+ `list`
+
+ : The list of attribute sets to go through
+
+ # Type
+
+ ```
+ catAttrs :: String -> [AttrSet] -> [Any]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.catAttrs` usage example
+
+ ```nix
+ catAttrs "a" [{a = 1;} {b = 0;} {a = 2;}]
+ => [1 2]
+ ```
+
+ :::
*/
catAttrs = builtins.catAttrs;
- /* Filter an attribute set by removing all attributes for which the
- given predicate return false.
+ /**
+ Filter an attribute set by removing all attributes for which the
+ given predicate return false.
- Example:
- filterAttrs (n: v: n == "foo") { foo = 1; bar = 2; }
- => { foo = 1; }
- Type:
- filterAttrs :: (String -> Any -> Bool) -> AttrSet -> AttrSet
+ # Inputs
+
+ `pred`
+
+ : Predicate taking an attribute name and an attribute value, which returns `true` to include the attribute, or `false` to exclude the attribute.
+
+ `set`
+
+ : The attribute set to filter
+
+ # Type
+
+ ```
+ filterAttrs :: (String -> Any -> Bool) -> AttrSet -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.filterAttrs` usage example
+
+ ```nix
+ filterAttrs (n: v: n == "foo") { foo = 1; bar = 2; }
+ => { foo = 1; }
+ ```
+
+ :::
*/
filterAttrs =
- # Predicate taking an attribute name and an attribute value, which returns `true` to include the attribute, or `false` to exclude the attribute.
pred:
- # The attribute set to filter
set:
listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
- /* Filter an attribute set recursively by removing all attributes for
- which the given predicate return false.
+ /**
+ Filter an attribute set recursively by removing all attributes for
+ which the given predicate return false.
- Example:
- filterAttrsRecursive (n: v: v != null) { foo = { bar = null; }; }
- => { foo = {}; }
- Type:
- filterAttrsRecursive :: (String -> Any -> Bool) -> AttrSet -> AttrSet
+ # Inputs
+
+ `pred`
+
+ : Predicate taking an attribute name and an attribute value, which returns `true` to include the attribute, or `false` to exclude the attribute.
+
+ `set`
+
+ : The attribute set to filter
+
+ # Type
+
+ ```
+ filterAttrsRecursive :: (String -> Any -> Bool) -> AttrSet -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.filterAttrsRecursive` usage example
+
+ ```nix
+ filterAttrsRecursive (n: v: v != null) { foo = { bar = null; }; }
+ => { foo = {}; }
+ ```
+
+ :::
*/
filterAttrsRecursive =
- # Predicate taking an attribute name and an attribute value, which returns `true` to include the attribute, or `false` to exclude the attribute.
pred:
- # The attribute set to filter
set:
listToAttrs (
concatMap (name:
@@ -446,59 +694,84 @@ rec {
) (attrNames set)
);
- /*
+ /**
Like [`lib.lists.foldl'`](#function-library-lib.lists.foldl-prime) but for attribute sets.
Iterates over every name-value pair in the given attribute set.
The result of the callback function is often called `acc` for accumulator. It is passed between callbacks from left to right and the final `acc` is the return value of `foldlAttrs`.
Attention:
- There is a completely different function
- `lib.foldAttrs`
- which has nothing to do with this function, despite the similar name.
- Example:
- foldlAttrs
- (acc: name: value: {
- sum = acc.sum + value;
- names = acc.names ++ [name];
- })
- { sum = 0; names = []; }
- {
- foo = 1;
- bar = 10;
- }
- ->
- {
- sum = 11;
- names = ["bar" "foo"];
- }
+ There is a completely different function `lib.foldAttrs`
+ which has nothing to do with this function, despite the similar name.
- foldlAttrs
- (throw "function not needed")
- 123
- {};
- ->
- 123
- foldlAttrs
- (acc: _: _: acc)
- 3
- { z = throw "value not needed"; a = throw "value not needed"; };
- ->
- 3
+ # Inputs
- The accumulator doesn't have to be an attrset.
- It can be as simple as a number or string.
+ `f`
- foldlAttrs
- (acc: _: v: acc * 10 + v)
- 1
- { z = 1; a = 2; };
- ->
- 121
+ : 1\. Function argument
- Type:
- foldlAttrs :: ( a -> String -> b -> a ) -> a -> { ... :: b } -> a
+ `init`
+
+ : 2\. Function argument
+
+ `set`
+
+ : 3\. Function argument
+
+ # Type
+
+ ```
+ foldlAttrs :: ( a -> String -> b -> a ) -> a -> { ... :: b } -> a
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.foldlAttrs` usage example
+
+ ```nix
+ foldlAttrs
+ (acc: name: value: {
+ sum = acc.sum + value;
+ names = acc.names ++ [name];
+ })
+ { sum = 0; names = []; }
+ {
+ foo = 1;
+ bar = 10;
+ }
+ ->
+ {
+ sum = 11;
+ names = ["bar" "foo"];
+ }
+
+ foldlAttrs
+ (throw "function not needed")
+ 123
+ {};
+ ->
+ 123
+
+ foldlAttrs
+ (acc: _: _: acc)
+ 3
+ { z = throw "value not needed"; a = throw "value not needed"; };
+ ->
+ 3
+
+ The accumulator doesn't have to be an attrset.
+ It can be as simple as a number or string.
+
+ foldlAttrs
+ (acc: _: v: acc * 10 + v)
+ 1
+ { z = 1; a = 2; };
+ ->
+ 121
+ ```
+
+ :::
*/
foldlAttrs = f: init: set:
foldl'
@@ -506,22 +779,44 @@ rec {
init
(attrNames set);
- /* Apply fold functions to values grouped by key.
+ /**
+ Apply fold functions to values grouped by key.
- Example:
- foldAttrs (item: acc: [item] ++ acc) [] [{ a = 2; } { a = 3; }]
- => { a = [ 2 3 ]; }
- Type:
- foldAttrs :: (Any -> Any -> Any) -> Any -> [AttrSets] -> Any
+ # Inputs
+ `op`
+
+ : A function, given a value and a collector combines the two.
+
+ `nul`
+
+ : The starting value.
+
+ `list_of_attrs`
+
+ : A list of attribute sets to fold together by key.
+
+ # Type
+
+ ```
+ foldAttrs :: (Any -> Any -> Any) -> Any -> [AttrSets] -> Any
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.foldAttrs` usage example
+
+ ```nix
+ foldAttrs (item: acc: [item] ++ acc) [] [{ a = 2; } { a = 3; }]
+ => { a = [ 2 3 ]; }
+ ```
+
+ :::
*/
foldAttrs =
- # A function, given a value and a collector combines the two.
op:
- # The starting value.
nul:
- # A list of attribute sets to fold together by key.
list_of_attrs:
foldr (n: a:
foldr (name: o:
@@ -530,26 +825,46 @@ rec {
) {} list_of_attrs;
- /* Recursively collect sets that verify a given predicate named `pred`
- from the set `attrs`. The recursion is stopped when the predicate is
- verified.
+ /**
+ Recursively collect sets that verify a given predicate named `pred`
+ from the set `attrs`. The recursion is stopped when the predicate is
+ verified.
- Example:
- collect isList { a = { b = ["b"]; }; c = [1]; }
- => [["b"] [1]]
- collect (x: x ? outPath)
- { a = { outPath = "a/"; }; b = { outPath = "b/"; }; }
- => [{ outPath = "a/"; } { outPath = "b/"; }]
+ # Inputs
- Type:
- collect :: (AttrSet -> Bool) -> AttrSet -> [x]
+ `pred`
+
+ : Given an attribute's value, determine if recursion should stop.
+
+ `attrs`
+
+ : The attribute set to recursively collect.
+
+ # Type
+
+ ```
+ collect :: (AttrSet -> Bool) -> AttrSet -> [x]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.collect` usage example
+
+ ```nix
+ collect isList { a = { b = ["b"]; }; c = [1]; }
+ => [["b"] [1]]
+
+ collect (x: x ? outPath)
+ { a = { outPath = "a/"; }; b = { outPath = "b/"; }; }
+ => [{ outPath = "a/"; } { outPath = "b/"; }]
+ ```
+
+ :::
*/
collect =
- # Given an attribute's value, determine if recursion should stop.
- pred:
- # The attribute set to recursively collect.
- attrs:
+ pred:
+ attrs:
if pred attrs then
[ attrs ]
else if isAttrs attrs then
@@ -557,21 +872,39 @@ rec {
else
[];
- /* Return the cartesian product of attribute set value combinations.
+ /**
+ Return the cartesian product of attribute set value combinations.
- Example:
- cartesianProductOfSets { a = [ 1 2 ]; b = [ 10 20 ]; }
- => [
- { a = 1; b = 10; }
- { a = 1; b = 20; }
- { a = 2; b = 10; }
- { a = 2; b = 20; }
- ]
- Type:
- cartesianProductOfSets :: AttrSet -> [AttrSet]
+
+ # Inputs
+
+ `attrsOfLists`
+
+ : Attribute set with attributes that are lists of values
+
+ # Type
+
+ ```
+ cartesianProduct :: AttrSet -> [AttrSet]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.cartesianProduct` usage example
+
+ ```nix
+ cartesianProduct { a = [ 1 2 ]; b = [ 10 20 ]; }
+ => [
+ { a = 1; b = 10; }
+ { a = 1; b = 20; }
+ { a = 2; b = 10; }
+ { a = 2; b = 20; }
+ ]
+ ```
+
+ :::
*/
- cartesianProductOfSets =
- # Attribute set with attributes that are lists of values
+ cartesianProduct =
attrsOfLists:
foldl' (listOfAttrs: attrName:
concatMap (attrs:
@@ -580,76 +913,189 @@ rec {
) [{}] (attrNames attrsOfLists);
- /* Utility function that creates a `{name, value}` pair as expected by `builtins.listToAttrs`.
+ /**
+ Return the result of function f applied to the cartesian product of attribute set value combinations.
+ Equivalent to using cartesianProduct followed by map.
- Example:
- nameValuePair "some" 6
- => { name = "some"; value = 6; }
+ # Inputs
- Type:
- nameValuePair :: String -> Any -> { name :: String; value :: Any; }
+ `f`
+
+ : A function, given an attribute set, it returns a new value.
+
+ `attrsOfLists`
+
+ : Attribute set with attributes that are lists of values
+
+ # Type
+
+ ```
+ mapCartesianProduct :: (AttrSet -> a) -> AttrSet -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.mapCartesianProduct` usage example
+
+ ```nix
+ mapCartesianProduct ({a, b}: "${a}-${b}") { a = [ "1" "2" ]; b = [ "3" "4" ]; }
+ => [ "1-3" "1-4" "2-3" "2-4" ]
+ ```
+
+ :::
+
+ */
+ mapCartesianProduct = f: attrsOfLists: map f (cartesianProduct attrsOfLists);
+
+ /**
+ Utility function that creates a `{name, value}` pair as expected by `builtins.listToAttrs`.
+
+
+ # Inputs
+
+ `name`
+
+ : Attribute name
+
+ `value`
+
+ : Attribute value
+
+ # Type
+
+ ```
+ nameValuePair :: String -> Any -> { name :: String; value :: Any; }
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.nameValuePair` usage example
+
+ ```nix
+ nameValuePair "some" 6
+ => { name = "some"; value = 6; }
+ ```
+
+ :::
*/
nameValuePair =
- # Attribute name
name:
- # Attribute value
value:
{ inherit name value; };
- /* Apply a function to each element in an attribute set, creating a new attribute set.
+ /**
+ Apply a function to each element in an attribute set, creating a new attribute set.
- Example:
- mapAttrs (name: value: name + "-" + value)
- { x = "foo"; y = "bar"; }
- => { x = "x-foo"; y = "y-bar"; }
+ # Inputs
- Type:
- mapAttrs :: (String -> Any -> Any) -> AttrSet -> AttrSet
+ `f`
+
+ : A function that takes an attribute name and its value, and returns the new value for the attribute.
+
+ `attrset`
+
+ : The attribute set to iterate through.
+
+ # Type
+
+ ```
+ mapAttrs :: (String -> Any -> Any) -> AttrSet -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.mapAttrs` usage example
+
+ ```nix
+ mapAttrs (name: value: name + "-" + value)
+ { x = "foo"; y = "bar"; }
+ => { x = "x-foo"; y = "y-bar"; }
+ ```
+
+ :::
*/
mapAttrs = builtins.mapAttrs;
- /* Like `mapAttrs`, but allows the name of each attribute to be
- changed in addition to the value. The applied function should
- return both the new name and value as a `nameValuePair`.
+ /**
+ Like `mapAttrs`, but allows the name of each attribute to be
+ changed in addition to the value. The applied function should
+ return both the new name and value as a `nameValuePair`.
- Example:
- mapAttrs' (name: value: nameValuePair ("foo_" + name) ("bar-" + value))
- { x = "a"; y = "b"; }
- => { foo_x = "bar-a"; foo_y = "bar-b"; }
- Type:
- mapAttrs' :: (String -> Any -> { name :: String; value :: Any; }) -> AttrSet -> AttrSet
+ # Inputs
+
+ `f`
+
+ : A function, given an attribute's name and value, returns a new `nameValuePair`.
+
+ `set`
+
+ : Attribute set to map over.
+
+ # Type
+
+ ```
+ mapAttrs' :: (String -> Any -> { name :: String; value :: Any; }) -> AttrSet -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.mapAttrs'` usage example
+
+ ```nix
+ mapAttrs' (name: value: nameValuePair ("foo_" + name) ("bar-" + value))
+ { x = "a"; y = "b"; }
+ => { foo_x = "bar-a"; foo_y = "bar-b"; }
+ ```
+
+ :::
*/
mapAttrs' =
- # A function, given an attribute's name and value, returns a new `nameValuePair`.
f:
- # Attribute set to map over.
set:
listToAttrs (map (attr: f attr set.${attr}) (attrNames set));
- /* Call a function for each attribute in the given set and return
- the result in a list.
+ /**
+ Call a function for each attribute in the given set and return
+ the result in a list.
- Example:
- mapAttrsToList (name: value: name + value)
- { x = "a"; y = "b"; }
- => [ "xa" "yb" ]
+ # Inputs
- Type:
- mapAttrsToList :: (String -> a -> b) -> AttrSet -> [b]
+ `f`
+ : A function, given an attribute's name and value, returns a new value.
+
+ `attrs`
+
+ : Attribute set to map over.
+
+ # Type
+
+ ```
+ mapAttrsToList :: (String -> a -> b) -> AttrSet -> [b]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.mapAttrsToList` usage example
+
+ ```nix
+ mapAttrsToList (name: value: name + value)
+ { x = "a"; y = "b"; }
+ => [ "xa" "yb" ]
+ ```
+
+ :::
*/
mapAttrsToList =
- # A function, given an attribute's name and value, returns a new value.
f:
- # Attribute set to map over.
attrs:
map (name: f name attrs.${name}) (attrNames attrs);
- /*
+ /**
Deconstruct an attrset to a list of name-value pairs as expected by [`builtins.listToAttrs`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-listToAttrs).
Each element of the resulting list is an attribute set with these attributes:
- `name` (string): The name of the attribute
@@ -669,120 +1115,190 @@ rec {
This is because the `listToAttrs` removes duplicate names and doesn't preserve the order of the list.
:::
- Example:
- attrsToList { foo = 1; bar = "asdf"; }
- => [ { name = "bar"; value = "asdf"; } { name = "foo"; value = 1; } ]
+ # Inputs
- Type:
- attrsToList :: AttrSet -> [ { name :: String; value :: Any; } ]
+ `set`
+ : The attribute set to deconstruct.
+
+ # Type
+
+ ```
+ attrsToList :: AttrSet -> [ { name :: String; value :: Any; } ]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.attrsToList` usage example
+
+ ```nix
+ attrsToList { foo = 1; bar = "asdf"; }
+ => [ { name = "bar"; value = "asdf"; } { name = "foo"; value = 1; } ]
+ ```
+
+ :::
*/
attrsToList = mapAttrsToList nameValuePair;
- /* Like `mapAttrs`, except that it recursively applies itself to
- the *leaf* attributes of a potentially-nested attribute set:
- the second argument of the function will never be an attrset.
- Also, the first argument of the argument function is a *list*
- of the attribute names that form the path to the leaf attribute.
+ /**
+ Like `mapAttrs`, except that it recursively applies itself to the *leaf* attributes of a potentially-nested attribute set:
+ the second argument of the function will never be an attrset.
+ Also, the first argument of the mapping function is a *list* of the attribute names that form the path to the leaf attribute.
- For a function that gives you control over what counts as a leaf,
- see `mapAttrsRecursiveCond`.
+ For a function that gives you control over what counts as a leaf, see `mapAttrsRecursiveCond`.
- Example:
- mapAttrsRecursive (path: value: concatStringsSep "-" (path ++ [value]))
- { n = { a = "A"; m = { b = "B"; c = "C"; }; }; d = "D"; }
- => { n = { a = "n-a-A"; m = { b = "n-m-b-B"; c = "n-m-c-C"; }; }; d = "d-D"; }
+ :::{#map-attrs-recursive-example .example}
+ # Map over leaf attributes
- Type:
- mapAttrsRecursive :: ([String] -> a -> b) -> AttrSet -> AttrSet
+ ```nix
+ mapAttrsRecursive (path: value: concatStringsSep "-" (path ++ [value]))
+ { n = { a = "A"; m = { b = "B"; c = "C"; }; }; d = "D"; }
+ ```
+ evaluates to
+ ```nix
+ { n = { a = "n-a-A"; m = { b = "n-m-b-B"; c = "n-m-c-C"; }; }; d = "d-D"; }
+ ```
+ :::
+
+ # Type
+ ```
+ mapAttrsRecursive :: ([String] -> a -> b) -> AttrSet -> AttrSet
+ ```
*/
mapAttrsRecursive =
- # A function, given a list of attribute names and a value, returns a new value.
f:
- # Set to recursively map over.
set:
mapAttrsRecursiveCond (as: true) f set;
- /* Like `mapAttrsRecursive`, but it takes an additional predicate
- function that tells it whether to recurse into an attribute
- set. If it returns false, `mapAttrsRecursiveCond` does not
- recurse, but does apply the map function. If it returns true, it
- does recurse, and does not apply the map function.
+ /**
+ Like `mapAttrsRecursive`, but it takes an additional predicate that tells it whether to recurse into an attribute set.
+ If the predicate returns false, `mapAttrsRecursiveCond` does not recurse, but instead applies the mapping function.
+ If the predicate returns true, it does recurse, and does not apply the mapping function.
- Example:
- # To prevent recursing into derivations (which are attribute
- # sets with the attribute "type" equal to "derivation"):
- mapAttrsRecursiveCond
- (as: !(as ? "type" && as.type == "derivation"))
- (x: ... do something ...)
- attrs
+ :::{#map-attrs-recursive-cond-example .example}
+ # Map over an leaf attributes defined by a condition
- Type:
- mapAttrsRecursiveCond :: (AttrSet -> Bool) -> ([String] -> a -> b) -> AttrSet -> AttrSet
+ Map derivations to their `name` attribute.
+ Derivatons are identified as attribute sets that contain `{ type = "derivation"; }`.
+ ```nix
+ mapAttrsRecursiveCond
+ (as: !(as ? "type" && as.type == "derivation"))
+ (x: x.name)
+ attrs
+ ```
+ :::
+
+ # Type
+ ```
+ mapAttrsRecursiveCond :: (AttrSet -> Bool) -> ([String] -> a -> b) -> AttrSet -> AttrSet
+ ```
*/
mapAttrsRecursiveCond =
- # A function, given the attribute set the recursion is currently at, determine if to recurse deeper into that attribute set.
cond:
- # A function, given a list of attribute names and a value, returns a new value.
f:
- # Attribute set to recursively map over.
set:
let
recurse = path:
- let
- g =
- name: value:
+ mapAttrs
+ (name: value:
if isAttrs value && cond value
- then recurse (path ++ [name]) value
- else f (path ++ [name]) value;
- in mapAttrs g;
- in recurse [] set;
+ then recurse (path ++ [ name ]) value
+ else f (path ++ [ name ]) value);
+ in
+ recurse [ ] set;
- /* Generate an attribute set by mapping a function over a list of
- attribute names.
+ /**
+ Generate an attribute set by mapping a function over a list of
+ attribute names.
- Example:
- genAttrs [ "foo" "bar" ] (name: "x_" + name)
- => { foo = "x_foo"; bar = "x_bar"; }
- Type:
- genAttrs :: [ String ] -> (String -> Any) -> AttrSet
+ # Inputs
+
+ `names`
+
+ : Names of values in the resulting attribute set.
+
+ `f`
+
+ : A function, given the name of the attribute, returns the attribute's value.
+
+ # Type
+
+ ```
+ genAttrs :: [ String ] -> (String -> Any) -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.genAttrs` usage example
+
+ ```nix
+ genAttrs [ "foo" "bar" ] (name: "x_" + name)
+ => { foo = "x_foo"; bar = "x_bar"; }
+ ```
+
+ :::
*/
genAttrs =
- # Names of values in the resulting attribute set.
names:
- # A function, given the name of the attribute, returns the attribute's value.
f:
listToAttrs (map (n: nameValuePair n (f n)) names);
- /* Check whether the argument is a derivation. Any set with
- `{ type = "derivation"; }` counts as a derivation.
+ /**
+ Check whether the argument is a derivation. Any set with
+ `{ type = "derivation"; }` counts as a derivation.
- Example:
- nixpkgs = import {}
- isDerivation nixpkgs.ruby
- => true
- isDerivation "foobar"
- => false
- Type:
- isDerivation :: Any -> Bool
+ # Inputs
+
+ `value`
+
+ : Value to check.
+
+ # Type
+
+ ```
+ isDerivation :: Any -> Bool
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.isDerivation` usage example
+
+ ```nix
+ nixpkgs = import {}
+ isDerivation nixpkgs.ruby
+ => true
+ isDerivation "foobar"
+ => false
+ ```
+
+ :::
*/
isDerivation =
- # Value to check.
value: value.type or null == "derivation";
- /* Converts a store path to a fake derivation.
+ /**
+ Converts a store path to a fake derivation.
- Type:
- toDerivation :: Path -> Derivation
- */
+
+ # Inputs
+
+ `path`
+
+ : A store path to convert to a derivation.
+
+ # Type
+
+ ```
+ toDerivation :: Path -> Derivation
+ ```
+ */
toDerivation =
- # A store path to convert to a derivation.
path:
let
path' = builtins.storePath path;
@@ -797,42 +1313,85 @@ rec {
in res;
- /* If `cond` is true, return the attribute set `as`,
- otherwise an empty attribute set.
+ /**
+ If `cond` is true, return the attribute set `as`,
+ otherwise an empty attribute set.
- Example:
- optionalAttrs (true) { my = "set"; }
- => { my = "set"; }
- optionalAttrs (false) { my = "set"; }
- => { }
- Type:
- optionalAttrs :: Bool -> AttrSet -> AttrSet
+ # Inputs
+
+ `cond`
+
+ : Condition under which the `as` attribute set is returned.
+
+ `as`
+
+ : The attribute set to return if `cond` is `true`.
+
+ # Type
+
+ ```
+ optionalAttrs :: Bool -> AttrSet -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.optionalAttrs` usage example
+
+ ```nix
+ optionalAttrs (true) { my = "set"; }
+ => { my = "set"; }
+ optionalAttrs (false) { my = "set"; }
+ => { }
+ ```
+
+ :::
*/
optionalAttrs =
- # Condition under which the `as` attribute set is returned.
cond:
- # The attribute set to return if `cond` is `true`.
as:
if cond then as else {};
- /* Merge sets of attributes and use the function `f` to merge attributes
- values.
+ /**
+ Merge sets of attributes and use the function `f` to merge attributes
+ values.
- Example:
- zipAttrsWithNames ["a"] (name: vs: vs) [{a = "x";} {a = "y"; b = "z";}]
- => { a = ["x" "y"]; }
- Type:
- zipAttrsWithNames :: [ String ] -> (String -> [ Any ] -> Any) -> [ AttrSet ] -> AttrSet
+ # Inputs
+
+ `names`
+
+ : List of attribute names to zip.
+
+ `f`
+
+ : A function, accepts an attribute name, all the values, and returns a combined value.
+
+ `sets`
+
+ : List of values from the list of attribute sets.
+
+ # Type
+
+ ```
+ zipAttrsWithNames :: [ String ] -> (String -> [ Any ] -> Any) -> [ AttrSet ] -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.zipAttrsWithNames` usage example
+
+ ```nix
+ zipAttrsWithNames ["a"] (name: vs: vs) [{a = "x";} {a = "y"; b = "z";}]
+ => { a = ["x" "y"]; }
+ ```
+
+ :::
*/
zipAttrsWithNames =
- # List of attribute names to zip.
names:
- # A function, accepts an attribute name, all the values, and returns a combined value.
f:
- # List of values from the list of attribute sets.
sets:
listToAttrs (map (name: {
inherit name;
@@ -840,55 +1399,91 @@ rec {
}) names);
- /* Merge sets of attributes and use the function f to merge attribute values.
- Like `lib.attrsets.zipAttrsWithNames` with all key names are passed for `names`.
+ /**
+ Merge sets of attributes and use the function f to merge attribute values.
+ Like `lib.attrsets.zipAttrsWithNames` with all key names are passed for `names`.
- Implementation note: Common names appear multiple times in the list of
- names, hopefully this does not affect the system because the maximal
- laziness avoid computing twice the same expression and `listToAttrs` does
- not care about duplicated attribute names.
+ Implementation note: Common names appear multiple times in the list of
+ names, hopefully this does not affect the system because the maximal
+ laziness avoid computing twice the same expression and `listToAttrs` does
+ not care about duplicated attribute names.
- Example:
- zipAttrsWith (name: values: values) [{a = "x";} {a = "y"; b = "z";}]
- => { a = ["x" "y"]; b = ["z"]; }
+ # Type
- Type:
- zipAttrsWith :: (String -> [ Any ] -> Any) -> [ AttrSet ] -> AttrSet
+ ```
+ zipAttrsWith :: (String -> [ Any ] -> Any) -> [ AttrSet ] -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.zipAttrsWith` usage example
+
+ ```nix
+ zipAttrsWith (name: values: values) [{a = "x";} {a = "y"; b = "z";}]
+ => { a = ["x" "y"]; b = ["z"]; }
+ ```
+
+ :::
*/
zipAttrsWith =
builtins.zipAttrsWith or (f: sets: zipAttrsWithNames (concatMap attrNames sets) f sets);
- /* Merge sets of attributes and combine each attribute value in to a list.
+ /**
+ Merge sets of attributes and combine each attribute value in to a list.
- Like `lib.attrsets.zipAttrsWith` with `(name: values: values)` as the function.
+ Like `lib.attrsets.zipAttrsWith` with `(name: values: values)` as the function.
- Example:
- zipAttrs [{a = "x";} {a = "y"; b = "z";}]
- => { a = ["x" "y"]; b = ["z"]; }
+ # Type
- Type:
- zipAttrs :: [ AttrSet ] -> AttrSet
+ ```
+ zipAttrs :: [ AttrSet ] -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.zipAttrs` usage example
+
+ ```nix
+ zipAttrs [{a = "x";} {a = "y"; b = "z";}]
+ => { a = ["x" "y"]; b = ["z"]; }
+ ```
+
+ :::
*/
- zipAttrs =
- # List of attribute sets to zip together.
- sets:
- zipAttrsWith (name: values: values) sets;
+ zipAttrs = zipAttrsWith (name: values: values);
- /*
+ /**
Merge a list of attribute sets together using the `//` operator.
In case of duplicate attributes, values from later list elements take precedence over earlier ones.
The result is the same as `foldl mergeAttrs { }`, but the performance is better for large inputs.
For n list elements, each with an attribute set containing m unique attributes, the complexity of this operation is O(nm log n).
- Type:
- mergeAttrsList :: [ Attrs ] -> Attrs
- Example:
- mergeAttrsList [ { a = 0; b = 1; } { c = 2; d = 3; } ]
- => { a = 0; b = 1; c = 2; d = 3; }
- mergeAttrsList [ { a = 0; } { a = 1; } ]
- => { a = 1; }
+ # Inputs
+
+ `list`
+
+ : 1\. Function argument
+
+ # Type
+
+ ```
+ mergeAttrsList :: [ Attrs ] -> Attrs
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.mergeAttrsList` usage example
+
+ ```nix
+ mergeAttrsList [ { a = 0; b = 1; } { c = 2; d = 3; } ]
+ => { a = 0; b = 1; c = 2; d = 3; }
+ mergeAttrsList [ { a = 0; } { a = 1; } ]
+ => { a = 1; }
+ ```
+
+ :::
*/
mergeAttrsList = list:
let
@@ -912,42 +1507,65 @@ rec {
binaryMerge 0 (length list);
- /* Does the same as the update operator '//' except that attributes are
- merged until the given predicate is verified. The predicate should
- accept 3 arguments which are the path to reach the attribute, a part of
- the first attribute set and a part of the second attribute set. When
- the predicate is satisfied, the value of the first attribute set is
- replaced by the value of the second attribute set.
+ /**
+ Does the same as the update operator '//' except that attributes are
+ merged until the given predicate is verified. The predicate should
+ accept 3 arguments which are the path to reach the attribute, a part of
+ the first attribute set and a part of the second attribute set. When
+ the predicate is satisfied, the value of the first attribute set is
+ replaced by the value of the second attribute set.
- Example:
- recursiveUpdateUntil (path: l: r: path == ["foo"]) {
- # first attribute set
- foo.bar = 1;
- foo.baz = 2;
- bar = 3;
- } {
- #second attribute set
- foo.bar = 1;
- foo.quz = 2;
- baz = 4;
- }
- => {
- foo.bar = 1; # 'foo.*' from the second set
- foo.quz = 2; #
- bar = 3; # 'bar' from the first set
- baz = 4; # 'baz' from the second set
- }
+ # Inputs
- Type:
- recursiveUpdateUntil :: ( [ String ] -> AttrSet -> AttrSet -> Bool ) -> AttrSet -> AttrSet -> AttrSet
+ `pred`
+
+ : Predicate, taking the path to the current attribute as a list of strings for attribute names, and the two values at that path from the original arguments.
+
+ `lhs`
+
+ : Left attribute set of the merge.
+
+ `rhs`
+
+ : Right attribute set of the merge.
+
+ # Type
+
+ ```
+ recursiveUpdateUntil :: ( [ String ] -> AttrSet -> AttrSet -> Bool ) -> AttrSet -> AttrSet -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.recursiveUpdateUntil` usage example
+
+ ```nix
+ recursiveUpdateUntil (path: l: r: path == ["foo"]) {
+ # first attribute set
+ foo.bar = 1;
+ foo.baz = 2;
+ bar = 3;
+ } {
+ #second attribute set
+ foo.bar = 1;
+ foo.quz = 2;
+ baz = 4;
+ }
+
+ => {
+ foo.bar = 1; # 'foo.*' from the second set
+ foo.quz = 2; #
+ bar = 3; # 'bar' from the first set
+ baz = 4; # 'baz' from the second set
+ }
+ ```
+
+ :::
*/
recursiveUpdateUntil =
- # Predicate, taking the path to the current attribute as a list of strings for attribute names, and the two values at that path from the original arguments.
pred:
- # Left attribute set of the merge.
lhs:
- # Right attribute set of the merge.
rhs:
let f = attrPath:
zipAttrsWith (n: values:
@@ -961,51 +1579,90 @@ rec {
in f [] [rhs lhs];
- /* A recursive variant of the update operator ‘//’. The recursion
- stops when one of the attribute values is not an attribute set,
- in which case the right hand side value takes precedence over the
- left hand side value.
+ /**
+ A recursive variant of the update operator ‘//’. The recursion
+ stops when one of the attribute values is not an attribute set,
+ in which case the right hand side value takes precedence over the
+ left hand side value.
- Example:
- recursiveUpdate {
- boot.loader.grub.enable = true;
- boot.loader.grub.device = "/dev/hda";
- } {
- boot.loader.grub.device = "";
- }
- returns: {
- boot.loader.grub.enable = true;
- boot.loader.grub.device = "";
- }
+ # Inputs
- Type:
- recursiveUpdate :: AttrSet -> AttrSet -> AttrSet
+ `lhs`
+
+ : Left attribute set of the merge.
+
+ `rhs`
+
+ : Right attribute set of the merge.
+
+ # Type
+
+ ```
+ recursiveUpdate :: AttrSet -> AttrSet -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.recursiveUpdate` usage example
+
+ ```nix
+ recursiveUpdate {
+ boot.loader.grub.enable = true;
+ boot.loader.grub.device = "/dev/hda";
+ } {
+ boot.loader.grub.device = "";
+ }
+
+ returns: {
+ boot.loader.grub.enable = true;
+ boot.loader.grub.device = "";
+ }
+ ```
+
+ :::
*/
recursiveUpdate =
- # Left attribute set of the merge.
lhs:
- # Right attribute set of the merge.
rhs:
recursiveUpdateUntil (path: lhs: rhs: !(isAttrs lhs && isAttrs rhs)) lhs rhs;
- /*
+ /**
Recurse into every attribute set of the first argument and check that:
- Each attribute path also exists in the second argument.
- If the attribute's value is not a nested attribute set, it must have the same value in the right argument.
- Example:
- matchAttrs { cpu = {}; } { cpu = { bits = 64; }; }
- => true
- Type:
- matchAttrs :: AttrSet -> AttrSet -> Bool
+ # Inputs
+
+ `pattern`
+
+ : Attribute set structure to match
+
+ `attrs`
+
+ : Attribute set to check
+
+ # Type
+
+ ```
+ matchAttrs :: AttrSet -> AttrSet -> Bool
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.matchAttrs` usage example
+
+ ```nix
+ matchAttrs { cpu = {}; } { cpu = { bits = 64; }; }
+ => true
+ ```
+
+ :::
*/
matchAttrs =
- # Attribute set structure to match
pattern:
- # Attribute set to check
attrs:
assert isAttrs pattern;
all
@@ -1024,164 +1681,340 @@ rec {
)
(attrNames pattern);
- /* Override only the attributes that are already present in the old set
+ /**
+ Override only the attributes that are already present in the old set
useful for deep-overriding.
- Example:
- overrideExisting {} { a = 1; }
- => {}
- overrideExisting { b = 2; } { a = 1; }
- => { b = 2; }
- overrideExisting { a = 3; b = 2; } { a = 1; }
- => { a = 1; b = 2; }
- Type:
- overrideExisting :: AttrSet -> AttrSet -> AttrSet
+ # Inputs
+
+ `old`
+
+ : Original attribute set
+
+ `new`
+
+ : Attribute set with attributes to override in `old`.
+
+ # Type
+
+ ```
+ overrideExisting :: AttrSet -> AttrSet -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.overrideExisting` usage example
+
+ ```nix
+ overrideExisting {} { a = 1; }
+ => {}
+ overrideExisting { b = 2; } { a = 1; }
+ => { b = 2; }
+ overrideExisting { a = 3; b = 2; } { a = 1; }
+ => { a = 1; b = 2; }
+ ```
+
+ :::
*/
overrideExisting =
- # Original attribute set
old:
- # Attribute set with attributes to override in `old`.
new:
mapAttrs (name: value: new.${name} or value) old;
- /* Turns a list of strings into a human-readable description of those
+ /**
+ Turns a list of strings into a human-readable description of those
strings represented as an attribute path. The result of this function is
not intended to be machine-readable.
Create a new attribute set with `value` set at the nested attribute location specified in `attrPath`.
- Example:
- showAttrPath [ "foo" "10" "bar" ]
- => "foo.\"10\".bar"
- showAttrPath []
- => ""
- Type:
- showAttrPath :: [String] -> String
+ # Inputs
+
+ `path`
+
+ : Attribute path to render to a string
+
+ # Type
+
+ ```
+ showAttrPath :: [String] -> String
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.showAttrPath` usage example
+
+ ```nix
+ showAttrPath [ "foo" "10" "bar" ]
+ => "foo.\"10\".bar"
+ showAttrPath []
+ => ""
+ ```
+
+ :::
*/
showAttrPath =
- # Attribute path to render to a string
path:
if path == [] then ""
else concatMapStringsSep "." escapeNixIdentifier path;
- /* Get a package output.
- If no output is found, fallback to `.out` and then to the default.
+ /**
+ Get a package output.
+ If no output is found, fallback to `.out` and then to the default.
- Example:
- getOutput "dev" pkgs.openssl
- => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev"
- Type:
- getOutput :: String -> Derivation -> String
+ # Inputs
+
+ `output`
+
+ : 1\. Function argument
+
+ `pkg`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ getOutput :: String -> Derivation -> String
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.getOutput` usage example
+
+ ```nix
+ getOutput "dev" pkgs.openssl
+ => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev"
+ ```
+
+ :::
*/
getOutput = output: pkg:
if ! pkg ? outputSpecified || ! pkg.outputSpecified
then pkg.${output} or pkg.out or pkg
else pkg;
- /* Get a package's `bin` output.
- If the output does not exist, fallback to `.out` and then to the default.
+ /**
+ Get a package's `bin` output.
+ If the output does not exist, fallback to `.out` and then to the default.
- Example:
- getBin pkgs.openssl
- => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r"
+ # Inputs
- Type:
- getBin :: Derivation -> String
+ `pkg`
+
+ : The package whose `bin` output will be retrieved.
+
+ # Type
+
+ ```
+ getBin :: Derivation -> String
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.getBin` usage example
+
+ ```nix
+ getBin pkgs.openssl
+ => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r"
+ ```
+
+ :::
*/
getBin = getOutput "bin";
- /* Get a package's `lib` output.
- If the output does not exist, fallback to `.out` and then to the default.
+ /**
+ Get a package's `lib` output.
+ If the output does not exist, fallback to `.out` and then to the default.
- Example:
- getLib pkgs.openssl
- => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-lib"
+ # Inputs
- Type:
- getLib :: Derivation -> String
+ `pkg`
+
+ : The package whose `lib` output will be retrieved.
+
+ # Type
+
+ ```
+ getLib :: Derivation -> String
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.getLib` usage example
+
+ ```nix
+ getLib pkgs.openssl
+ => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-lib"
+ ```
+
+ :::
*/
getLib = getOutput "lib";
- /* Get a package's `dev` output.
- If the output does not exist, fallback to `.out` and then to the default.
+ /**
+ Get a package's `dev` output.
+ If the output does not exist, fallback to `.out` and then to the default.
- Example:
- getDev pkgs.openssl
- => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev"
+ # Inputs
- Type:
- getDev :: Derivation -> String
+ `pkg`
+
+ : The package whose `dev` output will be retrieved.
+
+ # Type
+
+ ```
+ getDev :: Derivation -> String
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.getDev` usage example
+
+ ```nix
+ getDev pkgs.openssl
+ => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev"
+ ```
+
+ :::
*/
getDev = getOutput "dev";
- /* Get a package's `man` output.
- If the output does not exist, fallback to `.out` and then to the default.
+ /**
+ Get a package's `man` output.
+ If the output does not exist, fallback to `.out` and then to the default.
- Example:
- getMan pkgs.openssl
- => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-man"
+ # Inputs
- Type:
- getMan :: Derivation -> String
+ `pkg`
+
+ : The package whose `man` output will be retrieved.
+
+ # Type
+
+ ```
+ getMan :: Derivation -> String
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.getMan` usage example
+
+ ```nix
+ getMan pkgs.openssl
+ => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-man"
+ ```
+
+ :::
*/
getMan = getOutput "man";
- /* Pick the outputs of packages to place in `buildInputs`
+ /**
+ Pick the outputs of packages to place in `buildInputs`
- Type: chooseDevOutputs :: [Derivation] -> [String]
+ # Inputs
+ `pkgs`
+
+ : List of packages.
+
+ # Type
+
+ ```
+ chooseDevOutputs :: [Derivation] -> [String]
+ ```
*/
- chooseDevOutputs =
- # List of packages to pick `dev` outputs from
- drvs:
- builtins.map getDev drvs;
+ chooseDevOutputs = builtins.map getDev;
- /* Make various Nix tools consider the contents of the resulting
- attribute set when looking for what to build, find, etc.
+ /**
+ Make various Nix tools consider the contents of the resulting
+ attribute set when looking for what to build, find, etc.
- This function only affects a single attribute set; it does not
- apply itself recursively for nested attribute sets.
+ This function only affects a single attribute set; it does not
+ apply itself recursively for nested attribute sets.
- Example:
- { pkgs ? import {} }:
- {
- myTools = pkgs.lib.recurseIntoAttrs {
- inherit (pkgs) hello figlet;
- };
- }
- Type:
- recurseIntoAttrs :: AttrSet -> AttrSet
+ # Inputs
- */
+ `attrs`
+
+ : An attribute set to scan for derivations.
+
+ # Type
+
+ ```
+ recurseIntoAttrs :: AttrSet -> AttrSet
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.attrsets.recurseIntoAttrs` usage example
+
+ ```nix
+ { pkgs ? import {} }:
+ {
+ myTools = pkgs.lib.recurseIntoAttrs {
+ inherit (pkgs) hello figlet;
+ };
+ }
+ ```
+
+ :::
+ */
recurseIntoAttrs =
- # An attribute set to scan for derivations.
attrs:
attrs // { recurseForDerivations = true; };
- /* Undo the effect of recurseIntoAttrs.
+ /**
+ Undo the effect of recurseIntoAttrs.
- Type:
- dontRecurseIntoAttrs :: AttrSet -> AttrSet
- */
+
+ # Inputs
+
+ `attrs`
+
+ : An attribute set to not scan for derivations.
+
+ # Type
+
+ ```
+ dontRecurseIntoAttrs :: AttrSet -> AttrSet
+ ```
+ */
dontRecurseIntoAttrs =
- # An attribute set to not scan for derivations.
attrs:
attrs // { recurseForDerivations = false; };
- /* `unionOfDisjoint x y` is equal to `x // y // z` where the
- attrnames in `z` are the intersection of the attrnames in `x` and
- `y`, and all values `assert` with an error message. This
- operator is commutative, unlike (//).
+ /**
+ `unionOfDisjoint x y` is equal to `x // y // z` where the
+ attrnames in `z` are the intersection of the attrnames in `x` and
+ `y`, and all values `assert` with an error message. This
+ operator is commutative, unlike (//).
- Type: unionOfDisjoint :: AttrSet -> AttrSet -> AttrSet
+
+ # Inputs
+
+ `x`
+
+ : 1\. Function argument
+
+ `y`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ unionOfDisjoint :: AttrSet -> AttrSet -> AttrSet
+ ```
*/
unionOfDisjoint = x: y:
let
@@ -1200,4 +2033,8 @@ rec {
# DEPRECATED
zip = warn
"lib.zip is a deprecated alias of lib.zipAttrsWith." zipAttrsWith;
+
+ # DEPRECATED
+ cartesianProductOfSets = warnIf (isInOldestRelease 2405)
+ "lib.cartesianProductOfSets is a deprecated alias of lib.cartesianProduct." cartesianProduct;
}
diff --git a/third_party/nixpkgs/lib/cli.nix b/third_party/nixpkgs/lib/cli.nix
index c96d4dbb04..fcffacb5ea 100644
--- a/third_party/nixpkgs/lib/cli.nix
+++ b/third_party/nixpkgs/lib/cli.nix
@@ -1,43 +1,64 @@
{ lib }:
rec {
- /* Automatically convert an attribute set to command-line options.
+ /**
+ Automatically convert an attribute set to command-line options.
- This helps protect against malformed command lines and also to reduce
- boilerplate related to command-line construction for simple use cases.
+ This helps protect against malformed command lines and also to reduce
+ boilerplate related to command-line construction for simple use cases.
- `toGNUCommandLine` returns a list of nix strings.
- `toGNUCommandLineShell` returns an escaped shell string.
+ `toGNUCommandLine` returns a list of nix strings.
- Example:
- cli.toGNUCommandLine {} {
- data = builtins.toJSON { id = 0; };
- X = "PUT";
- retry = 3;
- retry-delay = null;
- url = [ "https://example.com/foo" "https://example.com/bar" ];
- silent = false;
- verbose = true;
- }
- => [
- "-X" "PUT"
- "--data" "{\"id\":0}"
- "--retry" "3"
- "--url" "https://example.com/foo"
- "--url" "https://example.com/bar"
- "--verbose"
- ]
+ `toGNUCommandLineShell` returns an escaped shell string.
- cli.toGNUCommandLineShell {} {
- data = builtins.toJSON { id = 0; };
- X = "PUT";
- retry = 3;
- retry-delay = null;
- url = [ "https://example.com/foo" "https://example.com/bar" ];
- silent = false;
- verbose = true;
- }
- => "'-X' 'PUT' '--data' '{\"id\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'";
+
+ # Inputs
+
+ `options`
+
+ : 1\. Function argument
+
+ `attrs`
+
+ : 2\. Function argument
+
+
+ # Examples
+ :::{.example}
+ ## `lib.cli.toGNUCommandLineShell` usage example
+
+ ```nix
+ cli.toGNUCommandLine {} {
+ data = builtins.toJSON { id = 0; };
+ X = "PUT";
+ retry = 3;
+ retry-delay = null;
+ url = [ "https://example.com/foo" "https://example.com/bar" ];
+ silent = false;
+ verbose = true;
+ }
+ => [
+ "-X" "PUT"
+ "--data" "{\"id\":0}"
+ "--retry" "3"
+ "--url" "https://example.com/foo"
+ "--url" "https://example.com/bar"
+ "--verbose"
+ ]
+
+ cli.toGNUCommandLineShell {} {
+ data = builtins.toJSON { id = 0; };
+ X = "PUT";
+ retry = 3;
+ retry-delay = null;
+ url = [ "https://example.com/foo" "https://example.com/bar" ];
+ silent = false;
+ verbose = true;
+ }
+ => "'-X' 'PUT' '--data' '{\"id\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'";
+ ```
+
+ :::
*/
toGNUCommandLineShell =
options: attrs: lib.escapeShellArgs (toGNUCommandLine options attrs);
diff --git a/third_party/nixpkgs/lib/customisation.nix b/third_party/nixpkgs/lib/customisation.nix
index 0b5cad71fd..0e0d791202 100644
--- a/third_party/nixpkgs/lib/customisation.nix
+++ b/third_party/nixpkgs/lib/customisation.nix
@@ -15,42 +15,64 @@ in
rec {
- /* `overrideDerivation drv f` takes a derivation (i.e., the result
- of a call to the builtin function `derivation`) and returns a new
- derivation in which the attributes of the original are overridden
- according to the function `f`. The function `f` is called with
- the original derivation attributes.
+ /**
+ `overrideDerivation drv f` takes a derivation (i.e., the result
+ of a call to the builtin function `derivation`) and returns a new
+ derivation in which the attributes of the original are overridden
+ according to the function `f`. The function `f` is called with
+ the original derivation attributes.
- `overrideDerivation` allows certain "ad-hoc" customisation
- scenarios (e.g. in ~/.config/nixpkgs/config.nix). For instance,
- if you want to "patch" the derivation returned by a package
- function in Nixpkgs to build another version than what the
- function itself provides.
+ `overrideDerivation` allows certain "ad-hoc" customisation
+ scenarios (e.g. in ~/.config/nixpkgs/config.nix). For instance,
+ if you want to "patch" the derivation returned by a package
+ function in Nixpkgs to build another version than what the
+ function itself provides.
- For another application, see build-support/vm, where this
- function is used to build arbitrary derivations inside a QEMU
- virtual machine.
+ For another application, see build-support/vm, where this
+ function is used to build arbitrary derivations inside a QEMU
+ virtual machine.
- Note that in order to preserve evaluation errors, the new derivation's
- outPath depends on the old one's, which means that this function cannot
- be used in circular situations when the old derivation also depends on the
- new one.
+ Note that in order to preserve evaluation errors, the new derivation's
+ outPath depends on the old one's, which means that this function cannot
+ be used in circular situations when the old derivation also depends on the
+ new one.
- You should in general prefer `drv.overrideAttrs` over this function;
- see the nixpkgs manual for more information on overriding.
+ You should in general prefer `drv.overrideAttrs` over this function;
+ see the nixpkgs manual for more information on overriding.
- Example:
- mySed = overrideDerivation pkgs.gnused (oldAttrs: {
- name = "sed-4.2.2-pre";
- src = fetchurl {
- url = ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2;
- hash = "sha256-MxBJRcM2rYzQYwJ5XKxhXTQByvSg5jZc5cSHEZoB2IY=";
- };
- patches = [];
- });
- Type:
- overrideDerivation :: Derivation -> ( Derivation -> AttrSet ) -> Derivation
+ # Inputs
+
+ `drv`
+
+ : 1\. Function argument
+
+ `f`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ overrideDerivation :: Derivation -> ( Derivation -> AttrSet ) -> Derivation
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.customisation.overrideDerivation` usage example
+
+ ```nix
+ mySed = overrideDerivation pkgs.gnused (oldAttrs: {
+ name = "sed-4.2.2-pre";
+ src = fetchurl {
+ url = ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2;
+ hash = "sha256-MxBJRcM2rYzQYwJ5XKxhXTQByvSg5jZc5cSHEZoB2IY=";
+ };
+ patches = [];
+ });
+ ```
+
+ :::
*/
overrideDerivation = drv: f:
let
@@ -67,26 +89,44 @@ rec {
});
- /* `makeOverridable` takes a function from attribute set to attribute set and
- injects `override` attribute which can be used to override arguments of
- the function.
+ /**
+ `makeOverridable` takes a function from attribute set to attribute set and
+ injects `override` attribute which can be used to override arguments of
+ the function.
- Please refer to documentation on [`.overrideDerivation`](#sec-pkg-overrideDerivation) to learn about `overrideDerivation` and caveats
- related to its use.
+ Please refer to documentation on [`.overrideDerivation`](#sec-pkg-overrideDerivation) to learn about `overrideDerivation` and caveats
+ related to its use.
- Example:
- nix-repl> x = {a, b}: { result = a + b; }
- nix-repl> y = lib.makeOverridable x { a = 1; b = 2; }
+ # Inputs
- nix-repl> y
- { override = «lambda»; overrideDerivation = «lambda»; result = 3; }
+ `f`
- nix-repl> y.override { a = 10; }
- { override = «lambda»; overrideDerivation = «lambda»; result = 12; }
+ : 1\. Function argument
- Type:
- makeOverridable :: (AttrSet -> a) -> AttrSet -> a
+ # Type
+
+ ```
+ makeOverridable :: (AttrSet -> a) -> AttrSet -> a
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.customisation.makeOverridable` usage example
+
+ ```nix
+ nix-repl> x = {a, b}: { result = a + b; }
+
+ nix-repl> y = lib.makeOverridable x { a = 1; b = 2; }
+
+ nix-repl> y
+ { override = «lambda»; overrideDerivation = «lambda»; result = 3; }
+
+ nix-repl> y.override { a = 10; }
+ { override = «lambda»; overrideDerivation = «lambda»; result = 12; }
+ ```
+
+ :::
*/
makeOverridable = f:
let
@@ -120,7 +160,8 @@ rec {
else result);
- /* Call the package function in the file `fn` with the required
+ /**
+ Call the package function in the file `fn` with the required
arguments automatically. The function is called with the
arguments `args`, but any missing arguments are obtained from
`autoArgs`. This function is intended to be partially
@@ -147,8 +188,26 @@ rec {
- Type:
- callPackageWith :: AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a
+
+ # Inputs
+
+ `autoArgs`
+
+ : 1\. Function argument
+
+ `fn`
+
+ : 2\. Function argument
+
+ `args`
+
+ : 3\. Function argument
+
+ # Type
+
+ ```
+ callPackageWith :: AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a
+ ```
*/
callPackageWith = autoArgs: fn: args:
let
@@ -210,20 +269,40 @@ rec {
else abort "lib.customisation.callPackageWith: ${error}";
- /* Like callPackage, but for a function that returns an attribute
- set of derivations. The override function is added to the
- individual attributes.
+ /**
+ Like callPackage, but for a function that returns an attribute
+ set of derivations. The override function is added to the
+ individual attributes.
- Type:
- callPackagesWith :: AttrSet -> ((AttrSet -> AttrSet) | Path) -> AttrSet -> AttrSet
+
+ # Inputs
+
+ `autoArgs`
+
+ : 1\. Function argument
+
+ `fn`
+
+ : 2\. Function argument
+
+ `args`
+
+ : 3\. Function argument
+
+ # Type
+
+ ```
+ callPackagesWith :: AttrSet -> ((AttrSet -> AttrSet) | Path) -> AttrSet -> AttrSet
+ ```
*/
callPackagesWith = autoArgs: fn: args:
let
f = if isFunction fn then fn else import fn;
auto = intersectAttrs (functionArgs f) autoArgs;
+ mirrorArgs = mirrorFunctionArgs f;
origArgs = auto // args;
pkgs = f origArgs;
- mkAttrOverridable = name: _: makeOverridable (newArgs: (f newArgs).${name}) origArgs;
+ mkAttrOverridable = name: _: makeOverridable (mirrorArgs (newArgs: (f newArgs).${name})) origArgs;
in
if isDerivation pkgs then throw
("function `callPackages` was called on a *single* derivation "
@@ -232,11 +311,30 @@ rec {
else mapAttrs mkAttrOverridable pkgs;
- /* Add attributes to each output of a derivation without changing
- the derivation itself and check a given condition when evaluating.
+ /**
+ Add attributes to each output of a derivation without changing
+ the derivation itself and check a given condition when evaluating.
- Type:
- extendDerivation :: Bool -> Any -> Derivation -> Derivation
+
+ # Inputs
+
+ `condition`
+
+ : 1\. Function argument
+
+ `passthru`
+
+ : 2\. Function argument
+
+ `drv`
+
+ : 3\. Function argument
+
+ # Type
+
+ ```
+ extendDerivation :: Bool -> Any -> Derivation -> Derivation
+ ```
*/
extendDerivation = condition: passthru: drv:
let
@@ -268,13 +366,24 @@ rec {
outPath = assert condition; drv.outPath;
};
- /* Strip a derivation of all non-essential attributes, returning
- only those needed by hydra-eval-jobs. Also strictly evaluate the
- result to ensure that there are no thunks kept alive to prevent
- garbage collection.
+ /**
+ Strip a derivation of all non-essential attributes, returning
+ only those needed by hydra-eval-jobs. Also strictly evaluate the
+ result to ensure that there are no thunks kept alive to prevent
+ garbage collection.
- Type:
- hydraJob :: (Derivation | Null) -> (Derivation | Null)
+
+ # Inputs
+
+ `drv`
+
+ : 1\. Function argument
+
+ # Type
+
+ ```
+ hydraJob :: (Derivation | Null) -> (Derivation | Null)
+ ```
*/
hydraJob = drv:
let
@@ -305,18 +414,129 @@ rec {
in if drv == null then null else
deepSeq drv' drv';
- /* Make a set of packages with a common scope. All packages called
- with the provided `callPackage` will be evaluated with the same
- arguments. Any package in the set may depend on any other. The
- `overrideScope'` function allows subsequent modification of the package
- set in a consistent way, i.e. all packages in the set will be
- called with the overridden packages. The package sets may be
- hierarchical: the packages in the set are called with the scope
- provided by `newScope` and the set provides a `newScope` attribute
- which can form the parent scope for later package sets.
+ /**
+ Make an attribute set (a "scope") from functions that take arguments from that same attribute set.
+ See [](#ex-makeScope) for how to use it.
- Type:
- makeScope :: (AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a) -> (AttrSet -> AttrSet) -> AttrSet
+ # Inputs
+
+ 1. `newScope` (`AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a`)
+
+ A function that takes an attribute set `attrs` and returns what ends up as `callPackage` in the output.
+
+ Typical values are `callPackageWith` or the output attribute `newScope`.
+
+ 2. `f` (`AttrSet -> AttrSet`)
+
+ A function that takes an attribute set as returned by `makeScope newScope f` (a "scope") and returns any attribute set.
+
+ This function is used to compute the fixpoint of the resulting scope using `callPackage`.
+ Its argument is the lazily evaluated reference to the value of that fixpoint, and is typically called `self` or `final`.
+
+ See [](#ex-makeScope) for how to use it.
+ See [](#sec-functions-library-fixedPoints) for details on fixpoint computation.
+
+ # Output
+
+ `makeScope` returns an attribute set of a form called `scope`, which also contains the final attributes produced by `f`:
+
+ ```
+ scope :: {
+ callPackage :: ((AttrSet -> a) | Path) -> AttrSet -> a
+ newScope = AttrSet -> scope
+ overrideScope = (scope -> scope -> AttrSet) -> scope
+ packages :: AttrSet -> AttrSet
+ }
+ ```
+
+ - `callPackage` (`((AttrSet -> a) | Path) -> AttrSet -> a`)
+
+ A function that
+
+ 1. Takes a function `p`, or a path to a Nix file that contains a function `p`, which takes an attribute set and returns value of arbitrary type `a`,
+ 2. Takes an attribute set `args` with explicit attributes to pass to `p`,
+ 3. Calls `f` with attributes from the original attribute set `attrs` passed to `newScope` updated with `args, i.e. `attrs // args`, if they match the attributes in the argument of `p`.
+
+ All such functions `p` will be called with the same value for `attrs`.
+
+ See [](#ex-makeScope-callPackage) for how to use it.
+
+ - `newScope` (`AttrSet -> scope`)
+
+ Takes an attribute set `attrs` and returns a scope that extends the original scope.
+
+ - `overrideScope` (`(scope -> scope -> AttrSet) -> scope`)
+
+ Takes a function `g` of the form `final: prev: { # attributes }` to act as an overlay on `f`, and returns a new scope with values determined by `extends g f`.
+ See [](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.fixedPoints.extends) for details.
+
+ This allows subsequent modification of the final attribute set in a consistent way, i.e. all functions `p` invoked with `callPackage` will be called with the modified values.
+
+ - `packages` (`AttrSet -> AttrSet`)
+
+ The value of the argument `f` to `makeScope`.
+
+ - final attributes
+
+ The final values returned by `f`.
+
+ # Examples
+
+ :::{#ex-makeScope .example}
+ # Create an interdependent package set on top of `pkgs`
+
+ The functions in `foo.nix` and `bar.nix` can depend on each other, in the sense that `foo.nix` can contain a function that expects `bar` as an attribute in its argument.
+
+ ```nix
+ let
+ pkgs = import { };
+ in
+ pkgs.lib.makeScope pkgs.newScope (self: {
+ foo = self.callPackage ./foo.nix { };
+ bar = self.callPackage ./bar.nix { };
+ })
+ ```
+
+ evaluates to
+
+ ```nix
+ {
+ callPackage = «lambda»;
+ newScope = «lambda»;
+ overrideScope = «lambda»;
+ packages = «lambda»;
+ foo = «derivation»;
+ bar = «derivation»;
+ }
+ ```
+ :::
+
+ :::{#ex-makeScope-callPackage .example}
+ # Using `callPackage` from a scope
+
+ ```nix
+ let
+ pkgs = import { };
+ inherit (pkgs) lib;
+ scope = lib.makeScope lib.callPackageWith (self: { a = 1; b = 2; });
+ three = scope.callPackage ({ a, b }: a + b) { };
+ four = scope.callPackage ({ a, b }: a + b) { a = 2; };
+ in
+ [ three four ]
+ ```
+
+ evaluates to
+
+ ```nix
+ [ 3 4 ]
+ ```
+ :::
+
+ # Type
+
+ ```
+ makeScope :: (AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a) -> (AttrSet -> AttrSet) -> scope
+ ```
*/
makeScope = newScope: f:
let self = f self // {
@@ -331,32 +551,65 @@ rec {
};
in self;
- /* backward compatibility with old uncurried form; deprecated */
+ /**
+ backward compatibility with old uncurried form; deprecated
+
+
+ # Inputs
+
+ `splicePackages`
+
+ : 1\. Function argument
+
+ `newScope`
+
+ : 2\. Function argument
+
+ `otherSplices`
+
+ : 3\. Function argument
+
+ `keep`
+
+ : 4\. Function argument
+
+ `extra`
+
+ : 5\. Function argument
+
+ `f`
+
+ : 6\. Function argument
+ */
makeScopeWithSplicing =
splicePackages: newScope: otherSplices: keep: extra: f:
makeScopeWithSplicing'
{ inherit splicePackages newScope; }
{ inherit otherSplices keep extra f; };
- /* Like makeScope, but aims to support cross compilation. It's still ugly, but
- hopefully it helps a little bit.
+ /**
+ Like makeScope, but aims to support cross compilation. It's still ugly, but
+ hopefully it helps a little bit.
- Type:
- makeScopeWithSplicing' ::
- { splicePackages :: Splice -> AttrSet
- , newScope :: AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a
- }
- -> { otherSplices :: Splice, keep :: AttrSet -> AttrSet, extra :: AttrSet -> AttrSet }
- -> AttrSet
+ # Type
- Splice ::
- { pkgsBuildBuild :: AttrSet
- , pkgsBuildHost :: AttrSet
- , pkgsBuildTarget :: AttrSet
- , pkgsHostHost :: AttrSet
- , pkgsHostTarget :: AttrSet
- , pkgsTargetTarget :: AttrSet
- }
+ ```
+ makeScopeWithSplicing' ::
+ { splicePackages :: Splice -> AttrSet
+ , newScope :: AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a
+ }
+ -> { otherSplices :: Splice, keep :: AttrSet -> AttrSet, extra :: AttrSet -> AttrSet }
+ -> AttrSet
+
+ Splice ::
+ { pkgsBuildBuild :: AttrSet
+ , pkgsBuildHost :: AttrSet
+ , pkgsBuildTarget :: AttrSet
+ , pkgsHostHost :: AttrSet
+ , pkgsHostTarget :: AttrSet
+ , pkgsTargetTarget :: AttrSet
+ }
+ ```
*/
makeScopeWithSplicing' =
{ splicePackages
diff --git a/third_party/nixpkgs/lib/default.nix b/third_party/nixpkgs/lib/default.nix
index 668c29640f..486d412fbb 100644
--- a/third_party/nixpkgs/lib/default.nix
+++ b/third_party/nixpkgs/lib/default.nix
@@ -69,7 +69,7 @@ let
hasAttr head isAttrs isBool isInt isList isPath isString length
lessThan listToAttrs pathExists readFile replaceStrings seq
stringLength sub substring tail trace;
- inherit (self.trivial) id const pipe concat or and bitAnd bitOr bitXor
+ inherit (self.trivial) id const pipe concat or and xor bitAnd bitOr bitXor
bitNot boolToString mergeAttrs flip mapNullable inNixShell isFloat min max
importJSON importTOML warn warnIf warnIfNot throwIf throwIfNot checkListOfEnum
info showWarnings nixpkgsVersion version isInOldestRelease
@@ -86,8 +86,8 @@ let
zipAttrsWithNames zipAttrsWith zipAttrs recursiveUpdateUntil
recursiveUpdate matchAttrs mergeAttrsList overrideExisting showAttrPath getOutput
getBin getLib getDev getMan chooseDevOutputs zipWithNames zip
- recurseIntoAttrs dontRecurseIntoAttrs cartesianProductOfSets
- updateManyAttrsByPath;
+ recurseIntoAttrs dontRecurseIntoAttrs cartesianProduct cartesianProductOfSets
+ mapCartesianProduct updateManyAttrsByPath;
inherit (self.lists) singleton forEach foldr fold foldl foldl' imap0 imap1
concatMap flatten remove findSingle findFirst any all count
optional optionals toList range replicate partition zipListsWith zipLists
@@ -97,7 +97,7 @@ let
inherit (self.strings) concatStrings concatMapStrings concatImapStrings
intersperse concatStringsSep concatMapStringsSep
concatImapStringsSep concatLines makeSearchPath makeSearchPathOutput
- makeLibraryPath makeBinPath optionalString
+ makeLibraryPath makeIncludePath makeBinPath optionalString
hasInfix hasPrefix hasSuffix stringToCharacters stringAsChars escape
escapeShellArg escapeShellArgs
isStorePath isStringLike
@@ -128,7 +128,7 @@ let
canCleanSource pathIsGitRepo;
inherit (self.modules) evalModules setDefaultModuleLocation
unifyModuleSyntax applyModuleArgsIfFunction mergeModules
- mergeModules' mergeOptionDecls evalOptionValue mergeDefinitions
+ mergeModules' mergeOptionDecls mergeDefinitions
pushDownProperties dischargeProperties filterOverrides
sortProperties fixupOptionType mkIf mkAssert mkMerge mkOverride
mkOptionDefault mkDefault mkImageMediaOverride mkForce mkVMOverride
@@ -138,6 +138,7 @@ let
mkMergedOptionModule mkChangedOptionModule
mkAliasOptionModule mkDerivedConfig doRename
mkAliasOptionModuleMD;
+ evalOptionValue = lib.warn "External use of `lib.evalOptionValue` is deprecated. If your use case isn't covered by non-deprecated functions, we'd like to know more and perhaps support your use case well, instead of providing access to these low level functions. In this case please open an issue in https://github.com/nixos/nixpkgs/issues/." self.modules.evalOptionValue;
inherit (self.options) isOption mkEnableOption mkSinkUndeclaredOptions
mergeDefaultOption mergeOneOption mergeEqualOption mergeUniqueOption
getValues getFiles
diff --git a/third_party/nixpkgs/lib/deprecated.nix b/third_party/nixpkgs/lib/deprecated.nix
index ed14e04bbd..d556bccbec 100644
--- a/third_party/nixpkgs/lib/deprecated.nix
+++ b/third_party/nixpkgs/lib/deprecated.nix
@@ -1,14 +1,37 @@
{ lib }:
+
let
- inherit (builtins) head tail isList isAttrs isInt attrNames;
+ inherit (lib)
+ and
+ any
+ attrByPath
+ attrNames
+ compare
+ concat
+ concatMap
+ elem
+ filter
+ foldl
+ foldr
+ genericClosure
+ head
+ imap1
+ init
+ isAttrs
+ isFunction
+ isInt
+ isList
+ lists
+ listToAttrs
+ mapAttrs
+ mergeAttrs
+ meta
+ nameValuePair
+ tail
+ toList
+ ;
-in
-
-with lib.lists;
-with lib.attrsets;
-with lib.strings;
-
-rec {
+ inherit (lib.attrsets) removeAttrs;
# returns default if env var is not set
maybeEnv = name: default:
@@ -26,7 +49,7 @@ rec {
base = (setAttrMerge "passthru" {} (f arg)
( z: z // {
function = foldArgs merger f arg;
- args = (lib.attrByPath ["passthru" "args"] {} z) // x;
+ args = (attrByPath ["passthru" "args"] {} z) // x;
} ));
withStdOverrides = base // {
override = base.passthru.function;
@@ -77,11 +100,11 @@ rec {
# Output : are reqs satisfied? It's asserted.
checkReqs = attrSet: argList: condList:
(
- foldr lib.and true
+ foldr and true
(map (x: let name = (head x); in
((checkFlag attrSet name) ->
- (foldr lib.and true
+ (foldr and true
(map (y: let val=(getValue attrSet argList y); in
(val!=null) && (val!=false))
(tail x))))) condList));
@@ -159,11 +182,11 @@ rec {
closePropagationSlow = list: (uniqList {inputList = (innerClosePropagation [] list);});
- # This is an optimisation of lib.closePropagation which avoids the O(n^2) behavior
+ # This is an optimisation of closePropagation which avoids the O(n^2) behavior
# Using a list of derivations, it generates the full closure of the propagatedXXXBuildInputs
# The ordering / sorting / comparison is done based on the `outPath`
# attribute of each derivation.
- # On some benchmarks, it performs up to 15 times faster than lib.closePropagation.
+ # On some benchmarks, it performs up to 15 times faster than closePropagation.
# See https://github.com/NixOS/nixpkgs/pull/194391 for details.
closePropagationFast = list:
builtins.map (x: x.val) (builtins.genericClosure {
@@ -250,10 +273,10 @@ rec {
# foldArgs, composedArgsAndFun or applyAndFun. Example: composableDerivation in all-packages.nix
mergeAttrByFunc = x: y:
let
- mergeAttrBy2 = { mergeAttrBy = lib.mergeAttrs; }
+ mergeAttrBy2 = { mergeAttrBy = mergeAttrs; }
// (maybeAttr "mergeAttrBy" {} x)
// (maybeAttr "mergeAttrBy" {} y); in
- foldr lib.mergeAttrs {} [
+ foldr mergeAttrs {} [
x y
(mapAttrs ( a: v: # merge special names using given functions
if x ? ${a}
@@ -273,9 +296,9 @@ rec {
# sane defaults (same name as attr name so that inherit can be used)
mergeAttrBy = # { buildInputs = concatList; [...]; passthru = mergeAttr; [..]; }
- listToAttrs (map (n: nameValuePair n lib.concat)
+ listToAttrs (map (n: nameValuePair n concat)
[ "nativeBuildInputs" "buildInputs" "propagatedBuildInputs" "configureFlags" "prePhases" "postAll" "patches" ])
- // listToAttrs (map (n: nameValuePair n lib.mergeAttrs) [ "passthru" "meta" "cfg" "flags" ])
+ // listToAttrs (map (n: nameValuePair n mergeAttrs) [ "passthru" "meta" "cfg" "flags" ])
// listToAttrs (map (n: nameValuePair n (a: b: "${a}\n${b}") ) [ "preConfigure" "postInstall" ])
;
@@ -283,7 +306,7 @@ rec {
if isAttrs x then
if x ? outPath then "derivation"
else "attrs"
- else if lib.isFunction x then "function"
+ else if isFunction x then "function"
else if isList x then "list"
else if x == true then "bool"
else if x == false then "bool"
@@ -291,12 +314,13 @@ rec {
else if isInt x then "int"
else "string";
- /* deprecated:
+ /**
+ # Deprecated
- For historical reasons, imap has an index starting at 1.
+ For historical reasons, imap has an index starting at 1.
- But for consistency with the rest of the library we want an index
- starting at zero.
+ But for consistency with the rest of the library we want an index
+ starting at zero.
*/
imap = imap1;
@@ -304,4 +328,47 @@ rec {
fakeHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
fakeSha256 = "0000000000000000000000000000000000000000000000000000000000000000";
fakeSha512 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
+
+in
+
+# Everything in this attrset is the public interface of the file.
+{
+ inherit
+ checkFlag
+ checkReqs
+ closePropagation
+ closePropagationFast
+ closePropagationSlow
+ condConcat
+ defaultMerge
+ defaultMergeArg
+ fakeHash
+ fakeSha256
+ fakeSha512
+ foldArgs
+ getValue
+ ifEnable
+ imap
+ innerClosePropagation
+ innerModifySumArgs
+ lazyGenericClosure
+ mapAttrsFlatten
+ maybeAttr
+ maybeAttrNullable
+ maybeEnv
+ mergeAttrBy
+ mergeAttrByFunc
+ mergeAttrsByFuncDefaults
+ mergeAttrsByFuncDefaultsClean
+ mergeAttrsConcatenateValues
+ mergeAttrsNoOverride
+ mergeAttrsWithFunc
+ modifySumArgs
+ nixType
+ nvs
+ setAttr
+ setAttrMerge
+ uniqList
+ uniqListExt
+ ;
}
diff --git a/third_party/nixpkgs/lib/derivations.nix b/third_party/nixpkgs/lib/derivations.nix
index 44b727ee31..6867458f9e 100644
--- a/third_party/nixpkgs/lib/derivations.nix
+++ b/third_party/nixpkgs/lib/derivations.nix
@@ -1,7 +1,20 @@
{ lib }:
let
- inherit (lib) throwIfNot;
+ inherit (lib)
+ genAttrs
+ isString
+ throwIfNot
+ ;
+
+ showMaybeAttrPosPre = prefix: attrName: v:
+ let pos = builtins.unsafeGetAttrPos attrName v;
+ in if pos == null then "" else "${prefix}${pos.file}:${toString pos.line}:${toString pos.column}";
+
+ showMaybePackagePosPre = prefix: pkg:
+ if pkg?meta.position && isString pkg.meta.position
+ then "${prefix}${pkg.meta.position}"
+ else "";
in
{
/*
@@ -64,6 +77,11 @@ in
#
# This can be used for adding package attributes, such as `tests`.
passthru ? { }
+ , # Optional list of assumed outputs. Default: ["out"]
+ #
+ # This must match the set of outputs that the returned derivation has.
+ # You must use this when the derivation has multiple outputs.
+ outputs ? [ "out" ]
}:
let
# These checks are strict in `drv` and some `drv` attributes, but the
@@ -71,11 +89,40 @@ in
# Instead, the individual derivation attributes do depend on it.
checked =
throwIfNot (derivation.type or null == "derivation")
- "lazySimpleDerivation: input must be a derivation."
+ "lazyDerivation: input must be a derivation."
throwIfNot
- (derivation.outputs == [ "out" ])
- # Supporting multiple outputs should be a matter of inheriting more attrs.
- "The derivation ${derivation.name or ""} has multiple outputs. This is not supported by lazySimpleDerivation yet. Support could be added, and be useful as long as the set of outputs is known in advance, without evaluating the actual derivation."
+ # NOTE: Technically we could require our outputs to be a subset of the
+ # actual ones, or even leave them unchecked and fail on a lazy basis.
+ # However, consider the case where an output is added in the underlying
+ # derivation, such as dev. lazyDerivation would remove it and cause it
+ # to fail as a buildInputs item, without any indication as to what
+ # happened. Hence the more stringent condition. We could consider
+ # adding a flag to control this behavior if there's a valid case for it,
+ # but the documentation must have a note like this.
+ (derivation.outputs == outputs)
+ ''
+ lib.lazyDerivation: The derivation ${derivation.name or ""} has outputs that don't match the assumed outputs.
+
+ Assumed outputs passed to lazyDerivation${showMaybeAttrPosPre ",\n at " "outputs" args}:
+ ${lib.generators.toPretty { multiline = false; } outputs};
+
+ Actual outputs of the derivation${showMaybePackagePosPre ",\n defined at " derivation}:
+ ${lib.generators.toPretty { multiline = false; } derivation.outputs}
+
+ If the outputs are known ahead of evaluating the derivation,
+ then update the lazyDerivation call to match the actual outputs, in the same order.
+ If lazyDerivation is passed a literal value, just change it to the actual outputs.
+ As a result it will work as before / as intended.
+
+ Otherwise, when the outputs are dynamic and can't be known ahead of time, it won't
+ be possible to add laziness, but lib.lazyDerivation may still be useful for trimming
+ the attributes.
+ If you want to keep trimming the attributes, make sure that the package is in a
+ variable (don't evaluate it twice!) and pass the variable and its outputs attribute
+ to lib.lazyDerivation. This largely defeats laziness, but keeps the trimming.
+ If none of the above works for you, replace the lib.lazyDerivation call by the
+ expression in the derivation argument.
+ ''
derivation;
in
{
@@ -92,12 +139,15 @@ in
# A fixed set of derivation values, so that `lazyDerivation` can return
# its attrset before evaluating `derivation`.
# This must only list attributes that are available on _all_ derivations.
- inherit (checked) outputs out outPath outputName drvPath name system;
+ inherit (checked) outPath outputName drvPath name system;
+ inherit outputs;
# The meta attribute can either be taken from the derivation, or if the
# `lazyDerivation` caller knew a shortcut, be taken from there.
meta = args.meta or checked.meta;
- } // passthru;
+ }
+ // genAttrs outputs (outputName: checked.${outputName})
+ // passthru;
/* Conditionally set a derivation attribute.
diff --git a/third_party/nixpkgs/lib/fileset/default.nix b/third_party/nixpkgs/lib/fileset/default.nix
index ce9afc796a..e29f30251c 100644
--- a/third_party/nixpkgs/lib/fileset/default.nix
+++ b/third_party/nixpkgs/lib/fileset/default.nix
@@ -1,5 +1,5 @@
/*
-
+
[]{#sec-fileset}
The [`lib.fileset`](#sec-functions-library-fileset) library allows you to work with _file sets_.
diff --git a/third_party/nixpkgs/lib/generators.nix b/third_party/nixpkgs/lib/generators.nix
index ed59654cc0..5f42a98de7 100644
--- a/third_party/nixpkgs/lib/generators.nix
+++ b/third_party/nixpkgs/lib/generators.nix
@@ -14,15 +14,58 @@
* Documentation in the manual, #sec-generators
*/
{ lib }:
-with (lib).trivial;
+
let
- libStr = lib.strings;
- libAttr = lib.attrsets;
+ inherit (lib)
+ addErrorContext
+ assertMsg
+ attrNames
+ concatLists
+ concatMapStringsSep
+ concatStrings
+ concatStringsSep
+ const
+ elem
+ escape
+ filter
+ flatten
+ foldl
+ functionArgs # Note: not the builtin; considers `__functor` in attrsets.
+ gvariant
+ hasInfix
+ head
+ id
+ init
+ isAttrs
+ isBool
+ isDerivation
+ isFloat
+ isFunction # Note: not the builtin; considers `__functor` in attrsets.
+ isInt
+ isList
+ isPath
+ isString
+ last
+ length
+ mapAttrs
+ mapAttrsToList
+ optionals
+ recursiveUpdate
+ replaceStrings
+ reverseList
+ splitString
+ tail
+ toList
+ ;
- inherit (lib) isFunction;
-in
-
-rec {
+ inherit (lib.strings)
+ escapeNixIdentifier
+ floatToString
+ match
+ split
+ toJSON
+ typeOf
+ ;
## -- HELPER FUNCTIONS & DEFAULTS --
@@ -30,13 +73,13 @@ rec {
* The builtin `toString` function has some strange defaults,
* suitable for bash scripts but not much else.
*/
- mkValueStringDefault = {}: v: with builtins;
+ mkValueStringDefault = {}: v:
let err = t: v: abort
("generators.mkValueStringDefault: " +
"${t} not supported: ${toPretty {} v}");
in if isInt v then toString v
# convert derivations to store paths
- else if lib.isDerivation v then toString v
+ else if isDerivation v then toString v
# we default to not quoting strings
else if isString v then v
# isString returns "1", which is not a good default
@@ -53,7 +96,7 @@ rec {
# Floats currently can't be converted to precise strings,
# condition warning on nix version once this isn't a problem anymore
# See https://github.com/NixOS/nix/pull/3480
- else if isFloat v then libStr.floatToString v
+ else if isFloat v then floatToString v
else err "this value is" (toString v);
@@ -69,7 +112,7 @@ rec {
mkKeyValueDefault = {
mkValueString ? mkValueStringDefault {}
}: sep: k: v:
- "${libStr.escape [sep] k}${sep}${mkValueString v}";
+ "${escape [sep] k}${sep}${mkValueString v}";
## -- FILE FORMAT GENERATORS --
@@ -86,9 +129,9 @@ rec {
}:
let mkLine = k: v: indent + mkKeyValue k v + "\n";
mkLines = if listsAsDuplicateKeys
- then k: v: map (mkLine k) (if lib.isList v then v else [v])
+ then k: v: map (mkLine k) (if isList v then v else [v])
else k: v: [ (mkLine k v) ];
- in attrs: libStr.concatStrings (lib.concatLists (libAttr.mapAttrsToList mkLines attrs));
+ in attrs: concatStrings (concatLists (mapAttrsToList mkLines attrs));
/* Generate an INI-style config file from an
@@ -113,7 +156,7 @@ rec {
*/
toINI = {
# apply transformations (e.g. escapes) to section names
- mkSectionName ? (name: libStr.escape [ "[" "]" ] name),
+ mkSectionName ? (name: escape [ "[" "]" ] name),
# format a setting line from key and value
mkKeyValue ? mkKeyValueDefault {} "=",
# allow lists as values for duplicate keys
@@ -122,8 +165,8 @@ rec {
let
# map function to string for each key val
mapAttrsToStringsSep = sep: mapFn: attrs:
- libStr.concatStringsSep sep
- (libAttr.mapAttrsToList mapFn attrs);
+ concatStringsSep sep
+ (mapAttrsToList mapFn attrs);
mkSection = sectName: sectValues: ''
[${mkSectionName sectName}]
'' + toKeyValue { inherit mkKeyValue listsAsDuplicateKeys; } sectValues;
@@ -164,7 +207,7 @@ rec {
*/
toINIWithGlobalSection = {
# apply transformations (e.g. escapes) to section names
- mkSectionName ? (name: libStr.escape [ "[" "]" ] name),
+ mkSectionName ? (name: escape [ "[" "]" ] name),
# format a setting line from key and value
mkKeyValue ? mkKeyValueDefault {} "=",
# allow lists as values for duplicate keys
@@ -195,12 +238,11 @@ rec {
*> name = "edolstra"
*/
toGitINI = attrs:
- with builtins;
let
mkSectionName = name:
let
- containsQuote = libStr.hasInfix ''"'' name;
- sections = libStr.splitString "." name;
+ containsQuote = hasInfix ''"'' name;
+ sections = splitString "." name;
section = head sections;
subsections = tail sections;
subsection = concatStringsSep "." subsections;
@@ -220,19 +262,19 @@ rec {
# generation for multiple ini values
mkKeyValue = k: v:
let mkKeyValue = mkKeyValueDefault { inherit mkValueString; } " = " k;
- in concatStringsSep "\n" (map (kv: "\t" + mkKeyValue kv) (lib.toList v));
+ in concatStringsSep "\n" (map (kv: "\t" + mkKeyValue kv) (toList v));
# converts { a.b.c = 5; } to { "a.b".c = 5; } for toINI
gitFlattenAttrs = let
recurse = path: value:
- if isAttrs value && !lib.isDerivation value then
- lib.mapAttrsToList (name: value: recurse ([ name ] ++ path) value) value
+ if isAttrs value && !isDerivation value then
+ mapAttrsToList (name: value: recurse ([ name ] ++ path) value) value
else if length path > 1 then {
- ${concatStringsSep "." (lib.reverseList (tail path))}.${head path} = value;
+ ${concatStringsSep "." (reverseList (tail path))}.${head path} = value;
} else {
${head path} = value;
};
- in attrs: lib.foldl lib.recursiveUpdate { } (lib.flatten (recurse [ ] attrs));
+ in attrs: foldl recursiveUpdate { } (flatten (recurse [ ] attrs));
toINI_ = toINI { inherit mkKeyValue mkSectionName; };
in
@@ -240,25 +282,12 @@ rec {
# mkKeyValueDefault wrapper that handles dconf INI quirks.
# The main differences of the format is that it requires strings to be quoted.
- mkDconfKeyValue = mkKeyValueDefault { mkValueString = v: toString (lib.gvariant.mkValue v); } "=";
+ mkDconfKeyValue = mkKeyValueDefault { mkValueString = v: toString (gvariant.mkValue v); } "=";
# Generates INI in dconf keyfile style. See https://help.gnome.org/admin/system-admin-guide/stable/dconf-keyfiles.html.en
# for details.
toDconfINI = toINI { mkKeyValue = mkDconfKeyValue; };
- /* Generates JSON from an arbitrary (non-function) value.
- * For more information see the documentation of the builtin.
- */
- toJSON = {}: builtins.toJSON;
-
-
- /* YAML has been a strict superset of JSON since 1.2, so we
- * use toJSON. Before it only had a few differences referring
- * to implicit typing rules, so it should work with older
- * parsers as well.
- */
- toYAML = toJSON;
-
withRecursion =
{
/* If this option is not null, the given value will stop evaluating at a certain depth */
@@ -266,7 +295,7 @@ rec {
/* If this option is true, an error will be thrown, if a certain given depth is exceeded */
, throwOnDepthLimit ? true
}:
- assert builtins.isInt depthLimit;
+ assert isInt depthLimit;
let
specialAttrs = [
"__functor"
@@ -275,7 +304,7 @@ rec {
"__pretty"
];
stepIntoAttr = evalNext: name:
- if builtins.elem name specialAttrs
+ if elem name specialAttrs
then id
else evalNext;
transform = depth:
@@ -284,7 +313,7 @@ rec {
then throw "Exceeded maximum eval-depth limit of ${toString depthLimit} while trying to evaluate with `generators.withRecursion'!"
else const ""
else id;
- mapAny = with builtins; depth: v:
+ mapAny = depth: v:
let
evalNext = x: mapAny (depth + 1) (transform (depth + 1) x);
in
@@ -311,9 +340,8 @@ rec {
indent ? ""
}:
let
- go = indent: v: with builtins;
- let isPath = v: typeOf v == "path";
- introSpace = if multiline then "\n${indent} " else " ";
+ go = indent: v:
+ let introSpace = if multiline then "\n${indent} " else " ";
outroSpace = if multiline then "\n${indent}" else " ";
in if isInt v then toString v
# toString loses precision on floats, so we use toJSON instead. This isn't perfect
@@ -322,16 +350,16 @@ rec {
else if isFloat v then builtins.toJSON v
else if isString v then
let
- lines = filter (v: ! isList v) (builtins.split "\n" v);
- escapeSingleline = libStr.escape [ "\\" "\"" "\${" ];
- escapeMultiline = libStr.replaceStrings [ "\${" "''" ] [ "''\${" "'''" ];
+ lines = filter (v: ! isList v) (split "\n" v);
+ escapeSingleline = escape [ "\\" "\"" "\${" ];
+ escapeMultiline = replaceStrings [ "\${" "''" ] [ "''\${" "'''" ];
singlelineResult = "\"" + concatStringsSep "\\n" (map escapeSingleline lines) + "\"";
multilineResult = let
escapedLines = map escapeMultiline lines;
# The last line gets a special treatment: if it's empty, '' is on its own line at the "outer"
# indentation level. Otherwise, '' is appended to the last line.
- lastLine = lib.last escapedLines;
- in "''" + introSpace + concatStringsSep introSpace (lib.init escapedLines)
+ lastLine = last escapedLines;
+ in "''" + introSpace + concatStringsSep introSpace (init escapedLines)
+ (if lastLine == "" then outroSpace else introSpace + lastLine) + "''";
in
if multiline && length lines > 1 then multilineResult else singlelineResult
@@ -342,11 +370,11 @@ rec {
else if isList v then
if v == [] then "[ ]"
else "[" + introSpace
- + libStr.concatMapStringsSep introSpace (go (indent + " ")) v
+ + concatMapStringsSep introSpace (go (indent + " ")) v
+ outroSpace + "]"
else if isFunction v then
- let fna = lib.functionArgs v;
- showFnas = concatStringsSep ", " (libAttr.mapAttrsToList
+ let fna = functionArgs v;
+ showFnas = concatStringsSep ", " (mapAttrsToList
(name: hasDefVal: if hasDefVal then name + "?" else name)
fna);
in if fna == {} then ""
@@ -359,10 +387,10 @@ rec {
else if v ? type && v.type == "derivation" then
""
else "{" + introSpace
- + libStr.concatStringsSep introSpace (libAttr.mapAttrsToList
+ + concatStringsSep introSpace (mapAttrsToList
(name: value:
- "${libStr.escapeNixIdentifier name} = ${
- builtins.addErrorContext "while evaluating an attribute `${name}`"
+ "${escapeNixIdentifier name} = ${
+ addErrorContext "while evaluating an attribute `${name}`"
(go (indent + " ") value)
};") v)
+ outroSpace + "}"
@@ -371,9 +399,7 @@ rec {
# PLIST handling
toPlist = {}: v: let
- isFloat = builtins.isFloat or (x: false);
- isPath = x: builtins.typeOf x == "path";
- expr = ind: x: with builtins;
+ expr = ind: x:
if x == null then "" else
if isBool x then bool ind x else
if isInt x then int ind x else
@@ -394,23 +420,23 @@ rec {
indent = ind: expr "\t${ind}";
- item = ind: libStr.concatMapStringsSep "\n" (indent ind);
+ item = ind: concatMapStringsSep "\n" (indent ind);
- list = ind: x: libStr.concatStringsSep "\n" [
+ list = ind: x: concatStringsSep "\n" [
(literal ind "")
(item ind x)
(literal ind " ")
];
- attrs = ind: x: libStr.concatStringsSep "\n" [
+ attrs = ind: x: concatStringsSep "\n" [
(literal ind "")
(attr ind x)
(literal ind " ")
];
attr = let attrFilter = name: value: name != "_module" && value != null;
- in ind: x: libStr.concatStringsSep "\n" (lib.flatten (lib.mapAttrsToList
- (name: value: lib.optionals (attrFilter name value) [
+ in ind: x: concatStringsSep "\n" (flatten (mapAttrsToList
+ (name: value: optionals (attrFilter name value) [
(key "\t${ind}" name)
(expr "\t${ind}" value)
]) x));
@@ -426,11 +452,10 @@ ${expr "" v}
* the Natural type.
*/
toDhall = { }@args: v:
- with builtins;
- let concatItems = lib.strings.concatStringsSep ", ";
+ let concatItems = concatStringsSep ", ";
in if isAttrs v then
"{ ${
- concatItems (lib.attrsets.mapAttrsToList
+ concatItems (mapAttrsToList
(key: value: "${key} = ${toDhall args value}") v)
} }"
else if isList v then
@@ -444,7 +469,7 @@ ${expr "" v}
else if v == null then
abort "generators.toDhall: cannot convert a null to Dhall"
else
- builtins.toJSON v;
+ toJSON v;
/*
Translate a simple Nix expression to Lua representation with occasional
@@ -488,7 +513,6 @@ ${expr "" v}
/* Interpret as variable bindings */
asBindings ? false,
}@args: v:
- with builtins;
let
innerIndent = "${indent} ";
introSpace = if multiline then "\n${innerIndent}" else " ";
@@ -501,9 +525,9 @@ ${expr "" v}
isLuaInline = { _type ? null, ... }: _type == "lua-inline";
generatedBindings =
- assert lib.assertMsg (badVarNames == []) "Bad Lua var names: ${toPretty {} badVarNames}";
- libStr.concatStrings (
- lib.attrsets.mapAttrsToList (key: value: "${indent}${key} = ${toLua innerArgs value}\n") v
+ assert assertMsg (badVarNames == []) "Bad Lua var names: ${toPretty {} badVarNames}";
+ concatStrings (
+ mapAttrsToList (key: value: "${indent}${key} = ${toLua innerArgs value}\n") v
);
# https://en.wikibooks.org/wiki/Lua_Programming/variable#Variable_names
@@ -515,7 +539,7 @@ ${expr "" v}
else if v == null then
"nil"
else if isInt v || isFloat v || isString v || isBool v then
- builtins.toJSON v
+ toJSON v
else if isList v then
(if v == [ ] then "{}" else
"{${introSpace}${concatItems (map (value: "${toLua innerArgs value}") v)}${outroSpace}}")
@@ -525,11 +549,11 @@ ${expr "" v}
"(${v.expr})"
else if v == { } then
"{}"
- else if libAttr.isDerivation v then
+ else if isDerivation v then
''"${toString v}"''
else
"{${introSpace}${concatItems (
- lib.attrsets.mapAttrsToList (key: value: "[${builtins.toJSON key}] = ${toLua innerArgs value}") v
+ mapAttrsToList (key: value: "[${toJSON key}] = ${toLua innerArgs value}") v
)}${outroSpace}}"
)
else
@@ -542,4 +566,37 @@ ${expr "" v}
mkLuaInline :: String -> AttrSet
*/
mkLuaInline = expr: { _type = "lua-inline"; inherit expr; };
+
+in
+
+# Everything in this attrset is the public interface of the file.
+{
+ inherit
+ mkDconfKeyValue
+ mkKeyValueDefault
+ mkLuaInline
+ mkValueStringDefault
+ toDconfINI
+ toDhall
+ toGitINI
+ toINI
+ toINIWithGlobalSection
+ toKeyValue
+ toLua
+ toPlist
+ toPretty
+ withRecursion
+ ;
+
+ /* Generates JSON from an arbitrary (non-function) value.
+ * For more information see the documentation of the builtin.
+ */
+ toJSON = {}: toJSON;
+
+ /* YAML has been a strict superset of JSON since 1.2, so we
+ * use toJSON. Before it only had a few differences referring
+ * to implicit typing rules, so it should work with older
+ * parsers as well.
+ */
+ toYAML = {}: toJSON;
}
diff --git a/third_party/nixpkgs/lib/kernel.nix b/third_party/nixpkgs/lib/kernel.nix
index 33da9663a8..d03d0103a6 100644
--- a/third_party/nixpkgs/lib/kernel.nix
+++ b/third_party/nixpkgs/lib/kernel.nix
@@ -1,6 +1,8 @@
{ lib }:
-with lib;
+let
+ inherit (lib) mkIf versionAtLeast versionOlder;
+in
{
@@ -14,9 +16,8 @@ with lib;
unset = { tristate = null; optional = false; };
freeform = x: { freeform = x; optional = false; };
- /*
- Common patterns/legacy used in common-config/hardened/config.nix
- */
+
+ # Common patterns/legacy used in common-config/hardened/config.nix
whenHelpers = version: {
whenAtLeast = ver: mkIf (versionAtLeast version ver);
whenOlder = ver: mkIf (versionOlder version ver);
diff --git a/third_party/nixpkgs/lib/licenses.nix b/third_party/nixpkgs/lib/licenses.nix
index 39d8272f75..035907ed92 100644
--- a/third_party/nixpkgs/lib/licenses.nix
+++ b/third_party/nixpkgs/lib/licenses.nix
@@ -93,12 +93,12 @@ in mkLicense lset) ({
url = "https://aomedia.org/license/patent-license/";
};
- apsl10 = {
+ apple-psl10 = {
spdxId = "APSL-1.0";
fullName = "Apple Public Source License 1.0";
};
- apsl20 = {
+ apple-psl20 = {
spdxId = "APSL-2.0";
fullName = "Apple Public Source License 2.0";
};
@@ -392,6 +392,12 @@ in mkLicense lset) ({
fullName = "Common Public Attribution License 1.0";
};
+ commons-clause = {
+ fullName = "Commons Clause License";
+ url = "https://commonsclause.com/";
+ free = false;
+ };
+
cpl10 = {
spdxId = "CPL-1.0";
fullName = "Common Public License 1.0";
@@ -412,6 +418,11 @@ in mkLicense lset) ({
fullName = "Detection Rule License 1.0";
};
+ dtoa = {
+ spdxId = "dtoa";
+ fullName = "dtoa License";
+ };
+
eapl = {
fullName = "EPSON AVASYS PUBLIC LICENSE";
url = "https://avasys.jp/hp/menu000000700/hpg000000603.htm";
@@ -594,6 +605,11 @@ in mkLicense lset) ({
url = "https://fedoraproject.org/wiki/Licensing/GPL_Classpath_Exception";
};
+ giftware = {
+ spdxId = "Giftware";
+ fullName = "Giftware License";
+ };
+
hpnd = {
spdxId = "HPND";
fullName = "Historic Permission Notice and Disclaimer";
@@ -604,6 +620,11 @@ in mkLicense lset) ({
spdxId = "HPND-sell-variant";
};
+ hpndUc = {
+ spdxId = "HPND-UC";
+ fullName = "Historical Permission Notice and Disclaimer - University of California variant";
+ };
+
# Intel's license, seems free
iasl = {
spdxId = "Intel-ACPI";
@@ -889,6 +910,11 @@ in mkLicense lset) ({
url = "https://raw.githubusercontent.com/netdata/netdata/master/web/gui/v2/LICENSE.md";
};
+ nistSoftware = {
+ spdxId = "NIST-Software";
+ fullName = "NIST Software License";
+ };
+
nlpl = {
spdxId = "NLPL";
fullName = "No Limit Public License";
@@ -1066,6 +1092,11 @@ in mkLicense lset) ({
url = "https://sources.debian.org/copyright/license/debianutils/4.9.1/";
};
+ smlnj = {
+ spdxId = "SMLNJ";
+ fullName = "Standard ML of New Jersey License";
+ };
+
sspl = {
shortName = "SSPL";
fullName = "Server Side Public License";
@@ -1215,6 +1246,11 @@ in mkLicense lset) ({
url = "https://mcj.sourceforge.net/authors.html#xfig";
};
+ xinetd = {
+ spdxId = "xinetd";
+ fullName = "xinetd License";
+ };
+
zlib = {
spdxId = "Zlib";
fullName = "zlib License";
@@ -1229,11 +1265,23 @@ in mkLicense lset) ({
spdxId = "ZPL-2.1";
fullName = "Zope Public License 2.1";
};
+
+ xskat = {
+ spdxId = "XSkat";
+ fullName = "XSkat License";
+ };
} // {
# TODO: remove legacy aliases
- agpl3 = {
- spdxId = "AGPL-3.0";
- fullName = "GNU Affero General Public License v3.0";
+ apsl10 = {
+ # deprecated for consistency with `apple-psl20`; use `apple-psl10`
+ spdxId = "APSL-1.0";
+ fullName = "Apple Public Source License 1.0";
+ deprecated = true;
+ };
+ apsl20 = {
+ # deprecated due to confusion with Apache-2.0; use `apple-psl20`
+ spdxId = "APSL-2.0";
+ fullName = "Apple Public Source License 2.0";
deprecated = true;
};
gpl2 = {
diff --git a/third_party/nixpkgs/lib/lists.nix b/third_party/nixpkgs/lib/lists.nix
index 05216c1a66..28fa277b22 100644
--- a/third_party/nixpkgs/lib/lists.nix
+++ b/third_party/nixpkgs/lib/lists.nix
@@ -1,4 +1,6 @@
-/* General list operations. */
+/**
+ General list operations.
+*/
{ lib }:
let
inherit (lib.strings) toInt;
@@ -9,45 +11,112 @@ rec {
inherit (builtins) head tail length isList elemAt concatLists filter elem genList map;
- /* Create a list consisting of a single element. `singleton x` is
- sometimes more convenient with respect to indentation than `[x]`
- when x spans multiple lines.
+ /**
+ Create a list consisting of a single element. `singleton x` is
+ sometimes more convenient with respect to indentation than `[x]`
+ when x spans multiple lines.
- Type: singleton :: a -> [a]
+ # Inputs
- Example:
- singleton "foo"
- => [ "foo" ]
+ `x`
+
+ : 1\. Function argument
+
+ # Type
+
+ ```
+ singleton :: a -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.singleton` usage example
+
+ ```nix
+ singleton "foo"
+ => [ "foo" ]
+ ```
+
+ :::
*/
singleton = x: [x];
- /* Apply the function to each element in the list. Same as `map`, but arguments
- flipped.
+ /**
+ Apply the function to each element in the list.
+ Same as `map`, but arguments flipped.
- Type: forEach :: [a] -> (a -> b) -> [b]
+ # Inputs
- Example:
- forEach [ 1 2 ] (x:
- toString x
- )
- => [ "1" "2" ]
+ `xs`
+
+ : 1\. Function argument
+
+ `f`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ forEach :: [a] -> (a -> b) -> [b]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.forEach` usage example
+
+ ```nix
+ forEach [ 1 2 ] (x:
+ toString x
+ )
+ => [ "1" "2" ]
+ ```
+
+ :::
*/
forEach = xs: f: map f xs;
- /* “right fold” a binary function `op` between successive elements of
- `list` with `nul` as the starting value, i.e.,
- `foldr op nul [x_1 x_2 ... x_n] == op x_1 (op x_2 ... (op x_n nul))`.
+ /**
+ “right fold” a binary function `op` between successive elements of
+ `list` with `nul` as the starting value, i.e.,
+ `foldr op nul [x_1 x_2 ... x_n] == op x_1 (op x_2 ... (op x_n nul))`.
- Type: foldr :: (a -> b -> b) -> b -> [a] -> b
- Example:
- concat = foldr (a: b: a + b) "z"
- concat [ "a" "b" "c" ]
- => "abcz"
- # different types
- strange = foldr (int: str: toString (int + 1) + str) "a"
- strange [ 1 2 3 4 ]
- => "2345a"
+ # Inputs
+
+ `op`
+
+ : 1\. Function argument
+
+ `nul`
+
+ : 2\. Function argument
+
+ `list`
+
+ : 3\. Function argument
+
+ # Type
+
+ ```
+ foldr :: (a -> b -> b) -> b -> [a] -> b
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.foldr` usage example
+
+ ```nix
+ concat = foldr (a: b: a + b) "z"
+ concat [ "a" "b" "c" ]
+ => "abcz"
+ # different types
+ strange = foldr (int: str: toString (int + 1) + str) "a"
+ strange [ 1 2 3 4 ]
+ => "2345a"
+ ```
+
+ :::
*/
foldr = op: nul: list:
let
@@ -58,24 +127,53 @@ rec {
else op (elemAt list n) (fold' (n + 1));
in fold' 0;
- /* `fold` is an alias of `foldr` for historic reasons */
+ /**
+ `fold` is an alias of `foldr` for historic reasons
+ */
# FIXME(Profpatsch): deprecate?
fold = foldr;
- /* “left fold”, like `foldr`, but from the left:
- `foldl op nul [x_1 x_2 ... x_n] == op (... (op (op nul x_1) x_2) ... x_n)`.
+ /**
+ “left fold”, like `foldr`, but from the left:
- Type: foldl :: (b -> a -> b) -> b -> [a] -> b
+ `foldl op nul [x_1 x_2 ... x_n] == op (... (op (op nul x_1) x_2) ... x_n)`.
- Example:
- lconcat = foldl (a: b: a + b) "z"
- lconcat [ "a" "b" "c" ]
- => "zabc"
- # different types
- lstrange = foldl (str: int: str + toString (int + 1)) "a"
- lstrange [ 1 2 3 4 ]
- => "a2345"
+ # Inputs
+
+ `op`
+
+ : 1\. Function argument
+
+ `nul`
+
+ : 2\. Function argument
+
+ `list`
+
+ : 3\. Function argument
+
+ # Type
+
+ ```
+ foldl :: (b -> a -> b) -> b -> [a] -> b
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.foldl` usage example
+
+ ```nix
+ lconcat = foldl (a: b: a + b) "z"
+ lconcat [ "a" "b" "c" ]
+ => "zabc"
+ # different types
+ lstrange = foldl (str: int: str + toString (int + 1)) "a"
+ lstrange [ 1 2 3 4 ]
+ => "a2345"
+ ```
+
+ :::
*/
foldl = op: nul: list:
let
@@ -85,7 +183,7 @@ rec {
else op (foldl' (n - 1)) (elemAt list n);
in foldl' (length list - 1);
- /*
+ /**
Reduce a list by applying a binary operator from left to right,
starting with an initial accumulator.
@@ -119,131 +217,305 @@ rec {
op (op (... (op (op (op acc₀ x₀) x₁) x₂) ...) xₙ₋₁) xₙ
```
- Type: foldl' :: (acc -> x -> acc) -> acc -> [x] -> acc
+ # Inputs
- Example:
- foldl' (acc: x: acc + x) 0 [1 2 3]
- => 6
- */
- foldl' =
- /* The binary operation to run, where the two arguments are:
+ `op`
+
+ : The binary operation to run, where the two arguments are:
1. `acc`: The current accumulator value: Either the initial one for the first iteration, or the result of the previous iteration
2. `x`: The corresponding list element for this iteration
- */
- op:
- # The initial accumulator value
- acc:
- # The list to fold
- list:
+ `acc`
+
+ : The initial accumulator value.
+
+ The accumulator value is evaluated in any case before the first iteration starts.
+
+ To avoid evaluation even before the `list` argument is given an eta expansion can be used:
+
+ ```nix
+ list: lib.foldl' op acc list
+ ```
+
+ `list`
+
+ : The list to fold
+
+ # Type
+
+ ```
+ foldl' :: (acc -> x -> acc) -> acc -> [x] -> acc
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.foldl'` usage example
+
+ ```nix
+ foldl' (acc: x: acc + x) 0 [1 2 3]
+ => 6
+ ```
+
+ :::
+ */
+ foldl' =
+ op:
+ acc:
# The builtin `foldl'` is a bit lazier than one might expect.
# See https://github.com/NixOS/nix/pull/7158.
# In particular, the initial accumulator value is not forced before the first iteration starts.
builtins.seq acc
- (builtins.foldl' op acc list);
+ (builtins.foldl' op acc);
- /* Map with index starting from 0
+ /**
+ Map with index starting from 0
- Type: imap0 :: (int -> a -> b) -> [a] -> [b]
+ # Inputs
- Example:
- imap0 (i: v: "${v}-${toString i}") ["a" "b"]
- => [ "a-0" "b-1" ]
+ `f`
+
+ : 1\. Function argument
+
+ `list`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ imap0 :: (int -> a -> b) -> [a] -> [b]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.imap0` usage example
+
+ ```nix
+ imap0 (i: v: "${v}-${toString i}") ["a" "b"]
+ => [ "a-0" "b-1" ]
+ ```
+
+ :::
*/
imap0 = f: list: genList (n: f n (elemAt list n)) (length list);
- /* Map with index starting from 1
+ /**
+ Map with index starting from 1
- Type: imap1 :: (int -> a -> b) -> [a] -> [b]
- Example:
- imap1 (i: v: "${v}-${toString i}") ["a" "b"]
- => [ "a-1" "b-2" ]
+ # Inputs
+
+ `f`
+
+ : 1\. Function argument
+
+ `list`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ imap1 :: (int -> a -> b) -> [a] -> [b]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.imap1` usage example
+
+ ```nix
+ imap1 (i: v: "${v}-${toString i}") ["a" "b"]
+ => [ "a-1" "b-2" ]
+ ```
+
+ :::
*/
imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
- /* Map and concatenate the result.
+ /**
+ Map and concatenate the result.
- Type: concatMap :: (a -> [b]) -> [a] -> [b]
+ # Type
- Example:
- concatMap (x: [x] ++ ["z"]) ["a" "b"]
- => [ "a" "z" "b" "z" ]
+ ```
+ concatMap :: (a -> [b]) -> [a] -> [b]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.concatMap` usage example
+
+ ```nix
+ concatMap (x: [x] ++ ["z"]) ["a" "b"]
+ => [ "a" "z" "b" "z" ]
+ ```
+
+ :::
*/
concatMap = builtins.concatMap;
- /* Flatten the argument into a single list; that is, nested lists are
- spliced into the top-level lists.
+ /**
+ Flatten the argument into a single list; that is, nested lists are
+ spliced into the top-level lists.
- Example:
- flatten [1 [2 [3] 4] 5]
- => [1 2 3 4 5]
- flatten 1
- => [1]
+
+ # Inputs
+
+ `x`
+
+ : 1\. Function argument
+
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.flatten` usage example
+
+ ```nix
+ flatten [1 [2 [3] 4] 5]
+ => [1 2 3 4 5]
+ flatten 1
+ => [1]
+ ```
+
+ :::
*/
flatten = x:
if isList x
then concatMap (y: flatten y) x
else [x];
- /* Remove elements equal to 'e' from a list. Useful for buildInputs.
+ /**
+ Remove elements equal to 'e' from a list. Useful for buildInputs.
- Type: remove :: a -> [a] -> [a]
- Example:
- remove 3 [ 1 3 4 3 ]
- => [ 1 4 ]
+ # Inputs
+
+ `e`
+
+ : Element to remove from `list`
+
+ `list`
+
+ : The list
+
+ # Type
+
+ ```
+ remove :: a -> [a] -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.remove` usage example
+
+ ```nix
+ remove 3 [ 1 3 4 3 ]
+ => [ 1 4 ]
+ ```
+
+ :::
*/
remove =
- # Element to remove from the list
e: filter (x: x != e);
- /* Find the sole element in the list matching the specified
- predicate, returns `default` if no such element exists, or
- `multiple` if there are multiple matching elements.
+ /**
+ Find the sole element in the list matching the specified
+ predicate.
- Type: findSingle :: (a -> bool) -> a -> a -> [a] -> a
+ Returns `default` if no such element exists, or
+ `multiple` if there are multiple matching elements.
- Example:
- findSingle (x: x == 3) "none" "multiple" [ 1 3 3 ]
- => "multiple"
- findSingle (x: x == 3) "none" "multiple" [ 1 3 ]
- => 3
- findSingle (x: x == 3) "none" "multiple" [ 1 9 ]
- => "none"
+
+ # Inputs
+
+ `pred`
+
+ : Predicate
+
+ `default`
+
+ : Default value to return if element was not found.
+
+ `multiple`
+
+ : Default value to return if more than one element was found
+
+ `list`
+
+ : Input list
+
+ # Type
+
+ ```
+ findSingle :: (a -> bool) -> a -> a -> [a] -> a
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.findSingle` usage example
+
+ ```nix
+ findSingle (x: x == 3) "none" "multiple" [ 1 3 3 ]
+ => "multiple"
+ findSingle (x: x == 3) "none" "multiple" [ 1 3 ]
+ => 3
+ findSingle (x: x == 3) "none" "multiple" [ 1 9 ]
+ => "none"
+ ```
+
+ :::
*/
findSingle =
- # Predicate
pred:
- # Default value to return if element was not found.
default:
- # Default value to return if more than one element was found
multiple:
- # Input list
list:
let found = filter pred list; len = length found;
in if len == 0 then default
else if len != 1 then multiple
else head found;
- /* Find the first index in the list matching the specified
- predicate or return `default` if no such element exists.
+ /**
+ Find the first index in the list matching the specified
+ predicate or return `default` if no such element exists.
- Type: findFirstIndex :: (a -> Bool) -> b -> [a] -> (Int | b)
+ # Inputs
- Example:
- findFirstIndex (x: x > 3) null [ 0 6 4 ]
- => 1
- findFirstIndex (x: x > 9) null [ 0 6 4 ]
- => null
+ `pred`
+
+ : Predicate
+
+ `default`
+
+ : Default value to return
+
+ `list`
+
+ : Input list
+
+ # Type
+
+ ```
+ findFirstIndex :: (a -> Bool) -> b -> [a] -> (Int | b)
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.findFirstIndex` usage example
+
+ ```nix
+ findFirstIndex (x: x > 3) null [ 0 6 4 ]
+ => 1
+ findFirstIndex (x: x > 9) null [ 0 6 4 ]
+ => null
+ ```
+
+ :::
*/
findFirstIndex =
- # Predicate
pred:
- # Default value to return
default:
- # Input list
list:
let
# A naive recursive implementation would be much simpler, but
@@ -278,23 +550,46 @@ rec {
else
resultIndex;
- /* Find the first element in the list matching the specified
- predicate or return `default` if no such element exists.
+ /**
+ Find the first element in the list matching the specified
+ predicate or return `default` if no such element exists.
- Type: findFirst :: (a -> bool) -> a -> [a] -> a
+ # Inputs
- Example:
- findFirst (x: x > 3) 7 [ 1 6 4 ]
- => 6
- findFirst (x: x > 9) 7 [ 1 6 4 ]
- => 7
+ `pred`
+
+ : Predicate
+
+ `default`
+
+ : Default value to return
+
+ `list`
+
+ : Input list
+
+ # Type
+
+ ```
+ findFirst :: (a -> bool) -> a -> [a] -> a
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.findFirst` usage example
+
+ ```nix
+ findFirst (x: x > 3) 7 [ 1 6 4 ]
+ => 6
+ findFirst (x: x > 9) 7 [ 1 6 4 ]
+ => 7
+ ```
+
+ :::
*/
findFirst =
- # Predicate
pred:
- # Default value to return
default:
- # Input list
list:
let
index = findFirstIndex pred null list;
@@ -304,152 +599,359 @@ rec {
else
elemAt list index;
- /* Return true if function `pred` returns true for at least one
- element of `list`.
+ /**
+ Return true if function `pred` returns true for at least one
+ element of `list`.
- Type: any :: (a -> bool) -> [a] -> bool
+ # Inputs
- Example:
- any isString [ 1 "a" { } ]
- => true
- any isString [ 1 { } ]
- => false
+ `pred`
+
+ : Predicate
+
+ `list`
+
+ : Input list
+
+ # Type
+
+ ```
+ any :: (a -> bool) -> [a] -> bool
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.any` usage example
+
+ ```nix
+ any isString [ 1 "a" { } ]
+ => true
+ any isString [ 1 { } ]
+ => false
+ ```
+
+ :::
*/
any = builtins.any;
- /* Return true if function `pred` returns true for all elements of
- `list`.
+ /**
+ Return true if function `pred` returns true for all elements of
+ `list`.
- Type: all :: (a -> bool) -> [a] -> bool
+ # Inputs
- Example:
- all (x: x < 3) [ 1 2 ]
- => true
- all (x: x < 3) [ 1 2 3 ]
- => false
+ `pred`
+
+ : Predicate
+
+ `list`
+
+ : Input list
+
+ # Type
+
+ ```
+ all :: (a -> bool) -> [a] -> bool
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.all` usage example
+
+ ```nix
+ all (x: x < 3) [ 1 2 ]
+ => true
+ all (x: x < 3) [ 1 2 3 ]
+ => false
+ ```
+
+ :::
*/
all = builtins.all;
- /* Count how many elements of `list` match the supplied predicate
- function.
+ /**
+ Count how many elements of `list` match the supplied predicate
+ function.
- Type: count :: (a -> bool) -> [a] -> int
+ # Inputs
- Example:
- count (x: x == 3) [ 3 2 3 4 6 ]
- => 2
+ `pred`
+
+ : Predicate
+
+ # Type
+
+ ```
+ count :: (a -> bool) -> [a] -> int
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.count` usage example
+
+ ```nix
+ count (x: x == 3) [ 3 2 3 4 6 ]
+ => 2
+ ```
+
+ :::
*/
count =
- # Predicate
pred: foldl' (c: x: if pred x then c + 1 else c) 0;
- /* Return a singleton list or an empty list, depending on a boolean
- value. Useful when building lists with optional elements
- (e.g. `++ optional (system == "i686-linux") firefox`).
+ /**
+ Return a singleton list or an empty list, depending on a boolean
+ value. Useful when building lists with optional elements
+ (e.g. `++ optional (system == "i686-linux") firefox`).
- Type: optional :: bool -> a -> [a]
+ # Inputs
- Example:
- optional true "foo"
- => [ "foo" ]
- optional false "foo"
- => [ ]
+ `cond`
+
+ : 1\. Function argument
+
+ `elem`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ optional :: bool -> a -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.optional` usage example
+
+ ```nix
+ optional true "foo"
+ => [ "foo" ]
+ optional false "foo"
+ => [ ]
+ ```
+
+ :::
*/
optional = cond: elem: if cond then [elem] else [];
- /* Return a list or an empty list, depending on a boolean value.
+ /**
+ Return a list or an empty list, depending on a boolean value.
- Type: optionals :: bool -> [a] -> [a]
+ # Inputs
- Example:
- optionals true [ 2 3 ]
- => [ 2 3 ]
- optionals false [ 2 3 ]
- => [ ]
+ `cond`
+
+ : Condition
+
+ `elems`
+
+ : List to return if condition is true
+
+ # Type
+
+ ```
+ optionals :: bool -> [a] -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.optionals` usage example
+
+ ```nix
+ optionals true [ 2 3 ]
+ => [ 2 3 ]
+ optionals false [ 2 3 ]
+ => [ ]
+ ```
+
+ :::
*/
optionals =
- # Condition
cond:
- # List to return if condition is true
elems: if cond then elems else [];
- /* If argument is a list, return it; else, wrap it in a singleton
- list. If you're using this, you should almost certainly
- reconsider if there isn't a more "well-typed" approach.
+ /**
+ If argument is a list, return it; else, wrap it in a singleton
+ list. If you're using this, you should almost certainly
+ reconsider if there isn't a more "well-typed" approach.
- Example:
- toList [ 1 2 ]
- => [ 1 2 ]
- toList "hi"
- => [ "hi "]
+ # Inputs
+
+ `x`
+
+ : 1\. Function argument
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.toList` usage example
+
+ ```nix
+ toList [ 1 2 ]
+ => [ 1 2 ]
+ toList "hi"
+ => [ "hi "]
+ ```
+
+ :::
*/
toList = x: if isList x then x else [x];
- /* Return a list of integers from `first` up to and including `last`.
+ /**
+ Return a list of integers from `first` up to and including `last`.
- Type: range :: int -> int -> [int]
+ # Inputs
- Example:
- range 2 4
- => [ 2 3 4 ]
- range 3 2
- => [ ]
+ `first`
+
+ : First integer in the range
+
+ `last`
+
+ : Last integer in the range
+
+ # Type
+
+ ```
+ range :: int -> int -> [int]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.range` usage example
+
+ ```nix
+ range 2 4
+ => [ 2 3 4 ]
+ range 3 2
+ => [ ]
+ ```
+
+ :::
*/
range =
- # First integer in the range
first:
- # Last integer in the range
last:
if first > last then
[]
else
genList (n: first + n) (last - first + 1);
- /* Return a list with `n` copies of an element.
+ /**
+ Return a list with `n` copies of an element.
- Type: replicate :: int -> a -> [a]
+ # Inputs
- Example:
- replicate 3 "a"
- => [ "a" "a" "a" ]
- replicate 2 true
- => [ true true ]
+ `n`
+
+ : 1\. Function argument
+
+ `elem`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ replicate :: int -> a -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.replicate` usage example
+
+ ```nix
+ replicate 3 "a"
+ => [ "a" "a" "a" ]
+ replicate 2 true
+ => [ true true ]
+ ```
+
+ :::
*/
replicate = n: elem: genList (_: elem) n;
- /* Splits the elements of a list in two lists, `right` and
- `wrong`, depending on the evaluation of a predicate.
+ /**
+ Splits the elements of a list in two lists, `right` and
+ `wrong`, depending on the evaluation of a predicate.
- Type: (a -> bool) -> [a] -> { right :: [a]; wrong :: [a]; }
+ # Inputs
- Example:
- partition (x: x > 2) [ 5 1 2 3 4 ]
- => { right = [ 5 3 4 ]; wrong = [ 1 2 ]; }
+ `pred`
+
+ : Predicate
+
+ `list`
+
+ : Input list
+
+ # Type
+
+ ```
+ (a -> bool) -> [a] -> { right :: [a]; wrong :: [a]; }
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.partition` usage example
+
+ ```nix
+ partition (x: x > 2) [ 5 1 2 3 4 ]
+ => { right = [ 5 3 4 ]; wrong = [ 1 2 ]; }
+ ```
+
+ :::
*/
partition = builtins.partition;
- /* Splits the elements of a list into many lists, using the return value of a predicate.
- Predicate should return a string which becomes keys of attrset `groupBy` returns.
+ /**
+ Splits the elements of a list into many lists, using the return value of a predicate.
+ Predicate should return a string which becomes keys of attrset `groupBy` returns.
+ `groupBy'` allows to customise the combining function and initial value
- `groupBy'` allows to customise the combining function and initial value
+ # Inputs
- Example:
- groupBy (x: boolToString (x > 2)) [ 5 1 2 3 4 ]
- => { true = [ 5 3 4 ]; false = [ 1 2 ]; }
- groupBy (x: x.name) [ {name = "icewm"; script = "icewm &";}
- {name = "xfce"; script = "xfce4-session &";}
- {name = "icewm"; script = "icewmbg &";}
- {name = "mate"; script = "gnome-session &";}
- ]
- => { icewm = [ { name = "icewm"; script = "icewm &"; }
- { name = "icewm"; script = "icewmbg &"; } ];
- mate = [ { name = "mate"; script = "gnome-session &"; } ];
- xfce = [ { name = "xfce"; script = "xfce4-session &"; } ];
- }
+ `op`
- groupBy' builtins.add 0 (x: boolToString (x > 2)) [ 5 1 2 3 4 ]
- => { true = 12; false = 3; }
+ : 1\. Function argument
+
+ `nul`
+
+ : 2\. Function argument
+
+ `pred`
+
+ : 3\. Function argument
+
+ `lst`
+
+ : 4\. Function argument
+
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.groupBy'` usage example
+
+ ```nix
+ groupBy (x: boolToString (x > 2)) [ 5 1 2 3 4 ]
+ => { true = [ 5 3 4 ]; false = [ 1 2 ]; }
+ groupBy (x: x.name) [ {name = "icewm"; script = "icewm &";}
+ {name = "xfce"; script = "xfce4-session &";}
+ {name = "icewm"; script = "icewmbg &";}
+ {name = "mate"; script = "gnome-session &";}
+ ]
+ => { icewm = [ { name = "icewm"; script = "icewm &"; }
+ { name = "icewm"; script = "icewmbg &"; } ];
+ mate = [ { name = "mate"; script = "gnome-session &"; } ];
+ xfce = [ { name = "xfce"; script = "xfce4-session &"; } ];
+ }
+
+ groupBy' builtins.add 0 (x: boolToString (x > 2)) [ 5 1 2 3 4 ]
+ => { true = 12; false = 3; }
+ ```
+
+ :::
*/
groupBy' = op: nul: pred: lst: mapAttrs (name: foldl op nul) (groupBy pred lst);
@@ -461,68 +963,153 @@ rec {
r // { ${key} = (r.${key} or []) ++ [e]; }
) {});
- /* Merges two lists of the same size together. If the sizes aren't the same
- the merging stops at the shortest. How both lists are merged is defined
- by the first argument.
+ /**
+ Merges two lists of the same size together. If the sizes aren't the same
+ the merging stops at the shortest. How both lists are merged is defined
+ by the first argument.
- Type: zipListsWith :: (a -> b -> c) -> [a] -> [b] -> [c]
+ # Inputs
- Example:
- zipListsWith (a: b: a + b) ["h" "l"] ["e" "o"]
- => ["he" "lo"]
+ `f`
+
+ : Function to zip elements of both lists
+
+ `fst`
+
+ : First list
+
+ `snd`
+
+ : Second list
+
+ # Type
+
+ ```
+ zipListsWith :: (a -> b -> c) -> [a] -> [b] -> [c]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.zipListsWith` usage example
+
+ ```nix
+ zipListsWith (a: b: a + b) ["h" "l"] ["e" "o"]
+ => ["he" "lo"]
+ ```
+
+ :::
*/
zipListsWith =
- # Function to zip elements of both lists
f:
- # First list
fst:
- # Second list
snd:
genList
(n: f (elemAt fst n) (elemAt snd n)) (min (length fst) (length snd));
- /* Merges two lists of the same size together. If the sizes aren't the same
- the merging stops at the shortest.
+ /**
+ Merges two lists of the same size together. If the sizes aren't the same
+ the merging stops at the shortest.
- Type: zipLists :: [a] -> [b] -> [{ fst :: a; snd :: b; }]
+ # Inputs
- Example:
- zipLists [ 1 2 ] [ "a" "b" ]
- => [ { fst = 1; snd = "a"; } { fst = 2; snd = "b"; } ]
+ `fst`
+
+ : First list
+
+ `snd`
+
+ : Second list
+
+ # Type
+
+ ```
+ zipLists :: [a] -> [b] -> [{ fst :: a; snd :: b; }]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.zipLists` usage example
+
+ ```nix
+ zipLists [ 1 2 ] [ "a" "b" ]
+ => [ { fst = 1; snd = "a"; } { fst = 2; snd = "b"; } ]
+ ```
+
+ :::
*/
zipLists = zipListsWith (fst: snd: { inherit fst snd; });
- /* Reverse the order of the elements of a list.
+ /**
+ Reverse the order of the elements of a list.
- Type: reverseList :: [a] -> [a]
+ # Inputs
- Example:
+ `xs`
- reverseList [ "b" "o" "j" ]
- => [ "j" "o" "b" ]
+ : 1\. Function argument
+
+ # Type
+
+ ```
+ reverseList :: [a] -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.reverseList` usage example
+
+ ```nix
+ reverseList [ "b" "o" "j" ]
+ => [ "j" "o" "b" ]
+ ```
+
+ :::
*/
reverseList = xs:
let l = length xs; in genList (n: elemAt xs (l - n - 1)) l;
- /* Depth-First Search (DFS) for lists `list != []`.
+ /**
+ Depth-First Search (DFS) for lists `list != []`.
- `before a b == true` means that `b` depends on `a` (there's an
- edge from `b` to `a`).
+ `before a b == true` means that `b` depends on `a` (there's an
+ edge from `b` to `a`).
- Example:
- listDfs true hasPrefix [ "/home/user" "other" "/" "/home" ]
- == { minimal = "/"; # minimal element
- visited = [ "/home/user" ]; # seen elements (in reverse order)
- rest = [ "/home" "other" ]; # everything else
- }
- listDfs true hasPrefix [ "/home/user" "other" "/" "/home" "/" ]
- == { cycle = "/"; # cycle encountered at this element
- loops = [ "/" ]; # and continues to these elements
- visited = [ "/" "/home/user" ]; # elements leading to the cycle (in reverse order)
- rest = [ "/home" "other" ]; # everything else
+ # Inputs
- */
+ `stopOnCycles`
+
+ : 1\. Function argument
+
+ `before`
+
+ : 2\. Function argument
+
+ `list`
+
+ : 3\. Function argument
+
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.listDfs` usage example
+
+ ```nix
+ listDfs true hasPrefix [ "/home/user" "other" "/" "/home" ]
+ == { minimal = "/"; # minimal element
+ visited = [ "/home/user" ]; # seen elements (in reverse order)
+ rest = [ "/home" "other" ]; # everything else
+ }
+
+ listDfs true hasPrefix [ "/home/user" "other" "/" "/home" "/" ]
+ == { cycle = "/"; # cycle encountered at this element
+ loops = [ "/" ]; # and continues to these elements
+ visited = [ "/" "/home/user" ]; # elements leading to the cycle (in reverse order)
+ rest = [ "/home" "other" ]; # everything else
+ ```
+
+ :::
+ */
listDfs = stopOnCycles: before: list:
let
dfs' = us: visited: rest:
@@ -540,28 +1127,46 @@ rec {
(tail b.right ++ b.wrong);
in dfs' (head list) [] (tail list);
- /* Sort a list based on a partial ordering using DFS. This
- implementation is O(N^2), if your ordering is linear, use `sort`
- instead.
+ /**
+ Sort a list based on a partial ordering using DFS. This
+ implementation is O(N^2), if your ordering is linear, use `sort`
+ instead.
- `before a b == true` means that `b` should be after `a`
- in the result.
+ `before a b == true` means that `b` should be after `a`
+ in the result.
- Example:
- toposort hasPrefix [ "/home/user" "other" "/" "/home" ]
- == { result = [ "/" "/home" "/home/user" "other" ]; }
+ # Inputs
- toposort hasPrefix [ "/home/user" "other" "/" "/home" "/" ]
- == { cycle = [ "/home/user" "/" "/" ]; # path leading to a cycle
- loops = [ "/" ]; } # loops back to these elements
+ `before`
- toposort hasPrefix [ "other" "/home/user" "/home" "/" ]
- == { result = [ "other" "/" "/home" "/home/user" ]; }
+ : 1\. Function argument
- toposort (a: b: a < b) [ 3 2 1 ] == { result = [ 1 2 3 ]; }
+ `list`
- */
+ : 2\. Function argument
+
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.toposort` usage example
+
+ ```nix
+ toposort hasPrefix [ "/home/user" "other" "/" "/home" ]
+ == { result = [ "/" "/home" "/home/user" "other" ]; }
+
+ toposort hasPrefix [ "/home/user" "other" "/" "/home" "/" ]
+ == { cycle = [ "/home/user" "/" "/" ]; # path leading to a cycle
+ loops = [ "/" ]; } # loops back to these elements
+
+ toposort hasPrefix [ "other" "/home/user" "/home" "/" ]
+ == { result = [ "other" "/" "/home" "/home/user" ]; }
+
+ toposort (a: b: a < b) [ 3 2 1 ] == { result = [ 1 2 3 ]; }
+ ```
+
+ :::
+ */
toposort = before: list:
let
dfsthis = listDfs true before list;
@@ -581,24 +1186,45 @@ rec {
else # there are no cycles
{ result = [ dfsthis.minimal ] ++ toporest.result; };
- /* Sort a list based on a comparator function which compares two
- elements and returns true if the first argument is strictly below
- the second argument. The returned list is sorted in an increasing
- order. The implementation does a quick-sort.
+ /**
+ Sort a list based on a comparator function which compares two
+ elements and returns true if the first argument is strictly below
+ the second argument. The returned list is sorted in an increasing
+ order. The implementation does a quick-sort.
- See also [`sortOn`](#function-library-lib.lists.sortOn), which applies the
- default comparison on a function-derived property, and may be more efficient.
+ See also [`sortOn`](#function-library-lib.lists.sortOn), which applies the
+ default comparison on a function-derived property, and may be more efficient.
- Example:
- sort (p: q: p < q) [ 5 3 7 ]
- => [ 3 5 7 ]
+ # Inputs
- Type:
- sort :: (a -> a -> Bool) -> [a] -> [a]
+ `comparator`
+
+ : 1\. Function argument
+
+ `list`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ sort :: (a -> a -> Bool) -> [a] -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.sort` usage example
+
+ ```nix
+ sort (p: q: p < q) [ 5 3 7 ]
+ => [ 3 5 7 ]
+ ```
+
+ :::
*/
sort = builtins.sort;
- /*
+ /**
Sort a list based on the default comparison of a derived property `b`.
The items are returned in `b`-increasing order.
@@ -614,12 +1240,33 @@ rec {
sortOn f == sort (p: q: f p < f q)
```
- Example:
- sortOn stringLength [ "aa" "b" "cccc" ]
- => [ "b" "aa" "cccc" ]
- Type:
- sortOn :: (a -> b) -> [a] -> [a], for comparable b
+ # Inputs
+
+ `f`
+
+ : 1\. Function argument
+
+ `list`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ sortOn :: (a -> b) -> [a] -> [a], for comparable b
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.sortOn` usage example
+
+ ```nix
+ sortOn stringLength [ "aa" "b" "cccc" ]
+ => [ "b" "aa" "cccc" ]
+ ```
+
+ :::
*/
sortOn = f: list:
let
@@ -634,17 +1281,40 @@ rec {
(a: b: head a < head b)
pairs);
- /* Compare two lists element-by-element.
+ /**
+ Compare two lists element-by-element.
- Example:
- compareLists compare [] []
- => 0
- compareLists compare [] [ "a" ]
- => -1
- compareLists compare [ "a" ] []
- => 1
- compareLists compare [ "a" "b" ] [ "a" "c" ]
- => -1
+ # Inputs
+
+ `cmp`
+
+ : 1\. Function argument
+
+ `a`
+
+ : 2\. Function argument
+
+ `b`
+
+ : 3\. Function argument
+
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.compareLists` usage example
+
+ ```nix
+ compareLists compare [] []
+ => 0
+ compareLists compare [] [ "a" ]
+ => -1
+ compareLists compare [ "a" ] []
+ => 1
+ compareLists compare [ "a" "b" ] [ "a" "c" ]
+ => -1
+ ```
+
+ :::
*/
compareLists = cmp: a: b:
if a == []
@@ -658,16 +1328,32 @@ rec {
then compareLists cmp (tail a) (tail b)
else rel;
- /* Sort list using "Natural sorting".
- Numeric portions of strings are sorted in numeric order.
+ /**
+ Sort list using "Natural sorting".
+ Numeric portions of strings are sorted in numeric order.
- Example:
- naturalSort ["disk11" "disk8" "disk100" "disk9"]
- => ["disk8" "disk9" "disk11" "disk100"]
- naturalSort ["10.46.133.149" "10.5.16.62" "10.54.16.25"]
- => ["10.5.16.62" "10.46.133.149" "10.54.16.25"]
- naturalSort ["v0.2" "v0.15" "v0.0.9"]
- => [ "v0.0.9" "v0.2" "v0.15" ]
+
+ # Inputs
+
+ `lst`
+
+ : 1\. Function argument
+
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.naturalSort` usage example
+
+ ```nix
+ naturalSort ["disk11" "disk8" "disk100" "disk9"]
+ => ["disk8" "disk9" "disk11" "disk100"]
+ naturalSort ["10.46.133.149" "10.5.16.62" "10.54.16.25"]
+ => ["10.5.16.62" "10.46.133.149" "10.54.16.25"]
+ naturalSort ["v0.2" "v0.15" "v0.0.9"]
+ => [ "v0.0.9" "v0.2" "v0.15" ]
+ ```
+
+ :::
*/
naturalSort = lst:
let
@@ -677,61 +1363,149 @@ rec {
in
map (x: elemAt x 1) (sort less prepared);
- /* Return the first (at most) N elements of a list.
+ /**
+ Return the first (at most) N elements of a list.
- Type: take :: int -> [a] -> [a]
- Example:
- take 2 [ "a" "b" "c" "d" ]
- => [ "a" "b" ]
- take 2 [ ]
- => [ ]
+ # Inputs
+
+ `count`
+
+ : Number of elements to take
+
+ `list`
+
+ : Input list
+
+ # Type
+
+ ```
+ take :: int -> [a] -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.take` usage example
+
+ ```nix
+ take 2 [ "a" "b" "c" "d" ]
+ => [ "a" "b" ]
+ take 2 [ ]
+ => [ ]
+ ```
+
+ :::
*/
take =
- # Number of elements to take
count: sublist 0 count;
- /* Remove the first (at most) N elements of a list.
+ /**
+ Remove the first (at most) N elements of a list.
- Type: drop :: int -> [a] -> [a]
- Example:
- drop 2 [ "a" "b" "c" "d" ]
- => [ "c" "d" ]
- drop 2 [ ]
- => [ ]
+ # Inputs
+
+ `count`
+
+ : Number of elements to drop
+
+ `list`
+
+ : Input list
+
+ # Type
+
+ ```
+ drop :: int -> [a] -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.drop` usage example
+
+ ```nix
+ drop 2 [ "a" "b" "c" "d" ]
+ => [ "c" "d" ]
+ drop 2 [ ]
+ => [ ]
+ ```
+
+ :::
*/
drop =
- # Number of elements to drop
count:
- # Input list
list: sublist count (length list) list;
- /* Whether the first list is a prefix of the second list.
+ /**
+ Whether the first list is a prefix of the second list.
- Type: hasPrefix :: [a] -> [a] -> bool
- Example:
+ # Inputs
+
+ `list1`
+
+ : 1\. Function argument
+
+ `list2`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ hasPrefix :: [a] -> [a] -> bool
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.hasPrefix` usage example
+
+ ```nix
hasPrefix [ 1 2 ] [ 1 2 3 4 ]
=> true
hasPrefix [ 0 1 ] [ 1 2 3 4 ]
=> false
+ ```
+
+ :::
*/
hasPrefix =
list1:
list2:
take (length list1) list2 == list1;
- /* Remove the first list as a prefix from the second list.
- Error if the first list isn't a prefix of the second list.
+ /**
+ Remove the first list as a prefix from the second list.
+ Error if the first list isn't a prefix of the second list.
- Type: removePrefix :: [a] -> [a] -> [a]
+ # Inputs
- Example:
+ `list1`
+
+ : 1\. Function argument
+
+ `list2`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ removePrefix :: [a] -> [a] -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.removePrefix` usage example
+
+ ```nix
removePrefix [ 1 2 ] [ 1 2 3 4 ]
=> [ 3 4 ]
removePrefix [ 0 1 ] [ 1 2 3 4 ]
=>
+ ```
+
+ :::
*/
removePrefix =
list1:
@@ -741,23 +1515,46 @@ rec {
else
throw "lib.lists.removePrefix: First argument is not a list prefix of the second argument";
- /* Return a list consisting of at most `count` elements of `list`,
- starting at index `start`.
+ /**
+ Return a list consisting of at most `count` elements of `list`,
+ starting at index `start`.
- Type: sublist :: int -> int -> [a] -> [a]
+ # Inputs
- Example:
- sublist 1 3 [ "a" "b" "c" "d" "e" ]
- => [ "b" "c" "d" ]
- sublist 1 3 [ ]
- => [ ]
+ `start`
+
+ : Index at which to start the sublist
+
+ `count`
+
+ : Number of elements to take
+
+ `list`
+
+ : Input list
+
+ # Type
+
+ ```
+ sublist :: int -> int -> [a] -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.sublist` usage example
+
+ ```nix
+ sublist 1 3 [ "a" "b" "c" "d" "e" ]
+ => [ "b" "c" "d" ]
+ sublist 1 3 [ ]
+ => [ ]
+ ```
+
+ :::
*/
sublist =
- # Index at which to start the sublist
start:
- # Number of elements to take
count:
- # Input list
list:
let len = length list; in
genList
@@ -766,17 +1563,40 @@ rec {
else if start + count > len then len - start
else count);
- /* The common prefix of two lists.
+ /**
+ The common prefix of two lists.
- Type: commonPrefix :: [a] -> [a] -> [a]
- Example:
+ # Inputs
+
+ `list1`
+
+ : 1\. Function argument
+
+ `list2`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ commonPrefix :: [a] -> [a] -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.commonPrefix` usage example
+
+ ```nix
commonPrefix [ 1 2 3 4 5 6 ] [ 1 2 4 8 ]
=> [ 1 2 ]
commonPrefix [ 1 2 3 ] [ 1 2 3 4 5 ]
=> [ 1 2 3 ]
commonPrefix [ 1 2 3 ] [ 4 5 6 ]
=> [ ]
+ ```
+
+ :::
*/
commonPrefix =
list1:
@@ -792,87 +1612,241 @@ rec {
in
take commonPrefixLength list1;
- /* Return the last element of a list.
+ /**
+ Return the last element of a list.
- This function throws an error if the list is empty.
+ This function throws an error if the list is empty.
- Type: last :: [a] -> a
- Example:
- last [ 1 2 3 ]
- => 3
+ # Inputs
+
+ `list`
+
+ : 1\. Function argument
+
+ # Type
+
+ ```
+ last :: [a] -> a
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.last` usage example
+
+ ```nix
+ last [ 1 2 3 ]
+ => 3
+ ```
+
+ :::
*/
last = list:
assert lib.assertMsg (list != []) "lists.last: list must not be empty!";
elemAt list (length list - 1);
- /* Return all elements but the last.
+ /**
+ Return all elements but the last.
- This function throws an error if the list is empty.
+ This function throws an error if the list is empty.
- Type: init :: [a] -> [a]
- Example:
- init [ 1 2 3 ]
- => [ 1 2 ]
+ # Inputs
+
+ `list`
+
+ : 1\. Function argument
+
+ # Type
+
+ ```
+ init :: [a] -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.init` usage example
+
+ ```nix
+ init [ 1 2 3 ]
+ => [ 1 2 ]
+ ```
+
+ :::
*/
init = list:
assert lib.assertMsg (list != []) "lists.init: list must not be empty!";
take (length list - 1) list;
- /* Return the image of the cross product of some lists by a function.
+ /**
+ Return the image of the cross product of some lists by a function.
- Example:
- crossLists (x:y: "${toString x}${toString y}") [[1 2] [3 4]]
- => [ "13" "14" "23" "24" ]
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.crossLists` usage example
+
+ ```nix
+ crossLists (x: y: "${toString x}${toString y}") [[1 2] [3 4]]
+ => [ "13" "14" "23" "24" ]
+ ```
+
+ The following function call is equivalent to the one deprecated above:
+
+ ```nix
+ mapCartesianProduct (x: "${toString x.a}${toString x.b}") { a = [1 2]; b = [3 4]; }
+ => [ "13" "14" "23" "24" ]
+ ```
+ :::
*/
crossLists = warn
- "lib.crossLists is deprecated, use lib.cartesianProductOfSets instead."
+ ''lib.crossLists is deprecated, use lib.mapCartesianProduct instead.
+
+ For example, the following function call:
+
+ nix-repl> lib.crossLists (x: y: x+y) [[1 2] [3 4]]
+ [ 4 5 5 6 ]
+
+ Can now be replaced by the following one:
+
+ nix-repl> lib.mapCartesianProduct ({x,y}: x+y) { x = [1 2]; y = [3 4]; }
+ [ 4 5 5 6 ]
+ ''
(f: foldl (fs: args: concatMap (f: map f args) fs) [f]);
+ /**
+ Remove duplicate elements from the `list`. O(n^2) complexity.
- /* Remove duplicate elements from the list. O(n^2) complexity.
- Type: unique :: [a] -> [a]
+ # Inputs
- Example:
- unique [ 3 2 3 4 ]
- => [ 3 2 4 ]
- */
+ `list`
+
+ : Input list
+
+ # Type
+
+ ```
+ unique :: [a] -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.unique` usage example
+
+ ```nix
+ unique [ 3 2 3 4 ]
+ => [ 3 2 4 ]
+ ```
+
+ :::
+ */
unique = foldl' (acc: e: if elem e acc then acc else acc ++ [ e ]) [];
- /* Check if list contains only unique elements. O(n^2) complexity.
+ /**
+ Check if list contains only unique elements. O(n^2) complexity.
- Type: allUnique :: [a] -> bool
- Example:
- allUnique [ 3 2 3 4 ]
- => false
- allUnique [ 3 2 4 1 ]
- => true
- */
+ # Inputs
+
+ `list`
+
+ : 1\. Function argument
+
+ # Type
+
+ ```
+ allUnique :: [a] -> bool
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.allUnique` usage example
+
+ ```nix
+ allUnique [ 3 2 3 4 ]
+ => false
+ allUnique [ 3 2 4 1 ]
+ => true
+ ```
+
+ :::
+ */
allUnique = list: (length (unique list) == length list);
- /* Intersects list 'e' and another list. O(nm) complexity.
+ /**
+ Intersects list 'list1' and another list (`list2`).
- Example:
- intersectLists [ 1 2 3 ] [ 6 3 2 ]
- => [ 3 2 ]
+ O(nm) complexity.
+
+ # Inputs
+
+ `list1`
+
+ : First list
+
+ `list2`
+
+ : Second list
+
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.intersectLists` usage example
+
+ ```nix
+ intersectLists [ 1 2 3 ] [ 6 3 2 ]
+ => [ 3 2 ]
+ ```
+
+ :::
*/
intersectLists = e: filter (x: elem x e);
- /* Subtracts list 'e' from another list. O(nm) complexity.
+ /**
+ Subtracts list 'e' from another list (`list2`).
- Example:
- subtractLists [ 3 2 ] [ 1 2 3 4 5 3 ]
- => [ 1 4 5 ]
+ O(nm) complexity.
+
+ # Inputs
+
+ `e`
+
+ : First list
+
+ `list2`
+
+ : Second list
+
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.subtractLists` usage example
+
+ ```nix
+ subtractLists [ 3 2 ] [ 1 2 3 4 5 3 ]
+ => [ 1 4 5 ]
+ ```
+
+ :::
*/
subtractLists = e: filter (x: !(elem x e));
- /* Test if two lists have no common element.
- It should be slightly more efficient than (intersectLists a b == [])
+ /**
+ Test if two lists have no common element.
+ It should be slightly more efficient than (intersectLists a b == [])
+
+ # Inputs
+
+ `a`
+
+ : 1\. Function argument
+
+ `b`
+
+ : 2\. Function argument
*/
mutuallyExclusive = a: b: length a == 0 || !(any (x: elem x a) b);
diff --git a/third_party/nixpkgs/lib/modules.nix b/third_party/nixpkgs/lib/modules.nix
index 61964d4667..79892f50c4 100644
--- a/third_party/nixpkgs/lib/modules.nix
+++ b/third_party/nixpkgs/lib/modules.nix
@@ -136,7 +136,7 @@ let
# TODO: Change the type of this option to a submodule with a
# freeformType, so that individual arguments can be documented
# separately
- description = lib.mdDoc ''
+ description = ''
Additional arguments passed to each module in addition to ones
like `lib`, `config`,
and `pkgs`, `modulesPath`.
@@ -187,14 +187,14 @@ let
type = types.bool;
internal = true;
default = true;
- description = lib.mdDoc "Whether to check whether all option definitions have matching declarations.";
+ description = "Whether to check whether all option definitions have matching declarations.";
};
_module.freeformType = mkOption {
type = types.nullOr types.optionType;
internal = true;
default = null;
- description = lib.mdDoc ''
+ description = ''
If set, merge all definitions that don't have an associated option
together using this type. The result then gets combined with the
values of all declared options to produce the final `
@@ -209,7 +209,7 @@ let
_module.specialArgs = mkOption {
readOnly = true;
internal = true;
- description = lib.mdDoc ''
+ description = ''
Externally provided module arguments that can't be modified from
within a configuration, but can be used in module imports.
'';
@@ -1378,7 +1378,6 @@ let
inherit
applyModuleArgsIfFunction
dischargeProperties
- evalOptionValue
mergeModules
mergeModules'
pushDownProperties
@@ -1399,6 +1398,7 @@ private //
defaultPriority
doRename
evalModules
+ evalOptionValue # for use by lib.types
filterOverrides
filterOverrides'
fixMergeModules
diff --git a/third_party/nixpkgs/lib/options.nix b/third_party/nixpkgs/lib/options.nix
index 0d1d90efe2..7e64e6e510 100644
--- a/third_party/nixpkgs/lib/options.nix
+++ b/third_party/nixpkgs/lib/options.nix
@@ -400,9 +400,11 @@ rec {
literalExample = lib.warn "lib.literalExample is deprecated, use lib.literalExpression instead, or use lib.literalMD for a non-Nix description." literalExpression;
/* Transition marker for documentation that's already migrated to markdown
- syntax. This is a no-op and no longer needed.
+ syntax. Has been a no-op for some while and been removed from nixpkgs.
+ Kept here to alert downstream users who may not be aware of the migration's
+ completion that it should be removed from modules.
*/
- mdDoc = lib.id;
+ mdDoc = lib.warn "lib.mdDoc will be removed from nixpkgs in 24.11. Option descriptions are now in Markdown by default; you can remove any remaining uses of lib.mdDoc.";
/* For use in the `defaultText` and `example` option attributes. Causes the
given MD text to be inserted verbatim in the documentation, for when
diff --git a/third_party/nixpkgs/lib/strings.nix b/third_party/nixpkgs/lib/strings.nix
index 47ee095f1b..67bb669d04 100644
--- a/third_party/nixpkgs/lib/strings.nix
+++ b/third_party/nixpkgs/lib/strings.nix
@@ -206,6 +206,18 @@ rec {
*/
makeLibraryPath = makeSearchPathOutput "lib" "lib";
+ /* Construct an include search path (such as C_INCLUDE_PATH) containing the
+ header files for a set of packages or paths.
+
+ Example:
+ makeIncludePath [ "/usr" "/usr/local" ]
+ => "/usr/include:/usr/local/include"
+ pkgs = import { }
+ makeIncludePath [ pkgs.openssl pkgs.zlib ]
+ => "/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev/include:/nix/store/wwh7mhwh269sfjkm6k5665b5kgp7jrk2-zlib-1.2.8-dev/include"
+ */
+ makeIncludePath = makeSearchPathOutput "dev" "include";
+
/* Construct a binary search path (such as $PATH) containing the
binaries for a set of packages.
@@ -1038,30 +1050,32 @@ rec {
toInt "3.14"
=> error: floating point JSON numbers are not supported
*/
- toInt = str:
+ toInt =
+ let
+ matchStripInput = match "[[:space:]]*(-?[[:digit:]]+)[[:space:]]*";
+ matchLeadingZero = match "0[[:digit:]]+";
+ in
+ str:
let
# RegEx: Match any leading whitespace, possibly a '-', one or more digits,
# and finally match any trailing whitespace.
- strippedInput = match "[[:space:]]*(-?[[:digit:]]+)[[:space:]]*" str;
+ strippedInput = matchStripInput str;
# RegEx: Match a leading '0' then one or more digits.
- isLeadingZero = match "0[[:digit:]]+" (head strippedInput) == [];
+ isLeadingZero = matchLeadingZero (head strippedInput) == [];
# Attempt to parse input
parsedInput = fromJSON (head strippedInput);
generalError = "toInt: Could not convert ${escapeNixString str} to int.";
- octalAmbigError = "toInt: Ambiguity in interpretation of ${escapeNixString str}"
- + " between octal and zero padded integer.";
-
in
# Error on presence of non digit characters.
if strippedInput == null
then throw generalError
# Error on presence of leading zero/octal ambiguity.
else if isLeadingZero
- then throw octalAmbigError
+ then throw "toInt: Ambiguity in interpretation of ${escapeNixString str} between octal and zero padded integer."
# Error if parse function fails.
else if !isInt parsedInput
then throw generalError
@@ -1089,15 +1103,20 @@ rec {
toIntBase10 "3.14"
=> error: floating point JSON numbers are not supported
*/
- toIntBase10 = str:
+ toIntBase10 =
+ let
+ matchStripInput = match "[[:space:]]*0*(-?[[:digit:]]+)[[:space:]]*";
+ matchZero = match "0+";
+ in
+ str:
let
# RegEx: Match any leading whitespace, then match any zero padding,
# capture possibly a '-' followed by one or more digits,
# and finally match any trailing whitespace.
- strippedInput = match "[[:space:]]*0*(-?[[:digit:]]+)[[:space:]]*" str;
+ strippedInput = matchStripInput str;
# RegEx: Match at least one '0'.
- isZero = match "0+" (head strippedInput) == [];
+ isZero = matchZero (head strippedInput) == [];
# Attempt to parse input
parsedInput = fromJSON (head strippedInput);
diff --git a/third_party/nixpkgs/lib/systems/default.nix b/third_party/nixpkgs/lib/systems/default.nix
index 6137d47e91..7e9aadeef7 100644
--- a/third_party/nixpkgs/lib/systems/default.nix
+++ b/third_party/nixpkgs/lib/systems/default.nix
@@ -1,7 +1,25 @@
{ lib }:
- let inherit (lib.attrsets) mapAttrs; in
-rec {
+let
+ inherit (lib)
+ any
+ filterAttrs
+ foldl
+ hasInfix
+ isFunction
+ isList
+ isString
+ mapAttrs
+ optional
+ optionalAttrs
+ optionalString
+ removeSuffix
+ replaceStrings
+ toUpper
+ ;
+
+ inherit (lib.strings) toJSON;
+
doubles = import ./doubles.nix { inherit lib; };
parse = import ./parse.nix { inherit lib; };
inspect = import ./inspect.nix { inherit lib; };
@@ -9,7 +27,7 @@ rec {
examples = import ./examples.nix { inherit lib; };
architectures = import ./architectures.nix { inherit lib; };
- /*
+ /**
Elaborated systems contain functions, which means that they don't satisfy
`==` for a lack of reflexivity.
@@ -24,13 +42,16 @@ rec {
both arguments have been `elaborate`-d.
*/
equals =
- let removeFunctions = a: lib.filterAttrs (_: v: !builtins.isFunction v) a;
+ let removeFunctions = a: filterAttrs (_: v: !isFunction v) a;
in a: b: removeFunctions a == removeFunctions b;
- /* List of all Nix system doubles the nixpkgs flake will expose the package set
- for. All systems listed here must be supported by nixpkgs as `localSystem`.
+ /**
+ List of all Nix system doubles the nixpkgs flake will expose the package set
+ for. All systems listed here must be supported by nixpkgs as `localSystem`.
- **Warning**: This attribute is considered experimental and is subject to change.
+ :::{.warning}
+ This attribute is considered experimental and is subject to change.
+ :::
*/
flakeExposed = import ./flake-systems.nix { };
@@ -41,7 +62,7 @@ rec {
# clearly preferred, and to prevent cycles. A simpler fixed point where the RHS
# always just used `final.*` would fail on both counts.
elaborate = args': let
- args = if lib.isString args' then { system = args'; }
+ args = if isString args' then { system = args'; }
else args';
# TODO: deprecate args.rustc in favour of args.rust after 23.05 is EOL.
@@ -96,7 +117,7 @@ rec {
then "lib64"
else "lib"
else null;
- extensions = lib.optionalAttrs final.hasSharedLibraries {
+ extensions = optionalAttrs final.hasSharedLibraries {
sharedLibrary =
if final.isDarwin then ".dylib"
else if final.isWindows then ".dll"
@@ -134,9 +155,9 @@ rec {
# uname -m
processor =
if final.isPower64
- then "ppc64${lib.optionalString final.isLittleEndian "le"}"
+ then "ppc64${optionalString final.isLittleEndian "le"}"
else if final.isPower
- then "ppc${lib.optionalString final.isLittleEndian "le"}"
+ then "ppc${optionalString final.isLittleEndian "le"}"
else if final.isMips64
then "mips64" # endianness is *not* included on mips64
else final.parsed.cpu.name;
@@ -202,8 +223,8 @@ rec {
else if final.isS390 && !final.isS390x then null
else if final.isx86_64 then "x86_64"
else if final.isx86 then "i386"
- else if final.isMips64n32 then "mipsn32${lib.optionalString final.isLittleEndian "el"}"
- else if final.isMips64 then "mips64${lib.optionalString final.isLittleEndian "el"}"
+ else if final.isMips64n32 then "mipsn32${optionalString final.isLittleEndian "el"}"
+ else if final.isMips64 then "mips64${optionalString final.isLittleEndian "el"}"
else final.uname.processor;
# Name used by UEFI for architectures.
@@ -243,10 +264,14 @@ rec {
vncSupport = false;
gtkSupport = false;
sdlSupport = false;
+ alsaSupport = false;
pulseSupport = false;
pipewireSupport = false;
+ jackSupport = false;
smbdSupport = false;
seccompSupport = false;
+ tpmSupport = false;
+ capstoneSupport = false;
enableDocs = false;
hostCpuTargets = [ "${final.qemuArch}-linux-user" ];
};
@@ -255,7 +280,7 @@ rec {
if pkgs.stdenv.hostPlatform.canExecute final
then "${pkgs.runtimeShell} -c '\"$@\"' --"
else if final.isWindows
- then "${wine}/bin/wine${lib.optionalString (final.parsed.cpu.bits == 64) "64"}"
+ then "${wine}/bin/wine${optionalString (final.parsed.cpu.bits == 64) "64"}"
else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux && final.qemuArch != null
then "${qemu-user}/bin/qemu-${final.qemuArch}"
else if final.isWasi
@@ -306,10 +331,10 @@ rec {
let
f = args.rustc.platform.target-family;
in
- if builtins.isList f then f else [ f ]
+ if isList f then f else [ f ]
)
- else lib.optional final.isUnix "unix"
- ++ lib.optional final.isWindows "windows";
+ else optional final.isUnix "unix"
+ ++ optional final.isWindows "windows";
# https://doc.rust-lang.org/reference/conditional-compilation.html#target_vendor
vendor = let
@@ -333,13 +358,13 @@ rec {
vendor_ = final.rust.platform.vendor;
# TODO: deprecate args.rustc in favour of args.rust after 23.05 is EOL.
in args.rust.rustcTarget or args.rustc.config
- or "${cpu_}-${vendor_}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
+ or "${cpu_}-${vendor_}-${kernel.name}${optionalString (abi.name != "unknown") "-${abi.name}"}";
# The name of the rust target if it is standard, or the json file
# containing the custom target spec.
rustcTargetSpec = rust.rustcTargetSpec or (
/**/ if rust ? platform
- then builtins.toFile (final.rust.rustcTarget + ".json") (builtins.toJSON rust.platform)
+ then builtins.toFile (final.rust.rustcTarget + ".json") (toJSON rust.platform)
else final.rust.rustcTarget);
# The name of the rust target if it is standard, or the
@@ -348,7 +373,7 @@ rec {
#
# This is the name used by Cargo for target subdirectories.
cargoShortTarget =
- lib.removeSuffix ".json" (baseNameOf "${final.rust.rustcTargetSpec}");
+ removeSuffix ".json" (baseNameOf "${final.rust.rustcTargetSpec}");
# When used as part of an environment variable name, triples are
# uppercased and have all hyphens replaced by underscores:
@@ -356,17 +381,17 @@ rec {
# https://github.com/rust-lang/cargo/pull/9169
# https://github.com/rust-lang/cargo/issues/8285#issuecomment-634202431
cargoEnvVarTarget =
- lib.strings.replaceStrings ["-"] ["_"]
- (lib.strings.toUpper final.rust.cargoShortTarget);
+ replaceStrings ["-"] ["_"]
+ (toUpper final.rust.cargoShortTarget);
# True if the target is no_std
# https://github.com/rust-lang/rust/blob/2e44c17c12cec45b6a682b1e53a04ac5b5fcc9d2/src/bootstrap/config.rs#L415-L421
isNoStdTarget =
- builtins.any (t: lib.hasInfix t final.rust.rustcTarget) ["-none" "nvptx" "switch" "-uefi"];
+ any (t: hasInfix t final.rust.rustcTarget) ["-none" "nvptx" "switch" "-uefi"];
};
};
in assert final.useAndroidPrebuilt -> final.isAndroid;
- assert lib.foldl
+ assert foldl
(pass: { assertion, message }:
if assertion final
then pass
@@ -374,4 +399,20 @@ rec {
true
(final.parsed.abi.assertions or []);
final;
+
+in
+
+# Everything in this attrset is the public interface of the file.
+{
+ inherit
+ architectures
+ doubles
+ elaborate
+ equals
+ examples
+ flakeExposed
+ inspect
+ parse
+ platforms
+ ;
}
diff --git a/third_party/nixpkgs/lib/systems/inspect.nix b/third_party/nixpkgs/lib/systems/inspect.nix
index c6a33781ae..ebc7ab3668 100644
--- a/third_party/nixpkgs/lib/systems/inspect.nix
+++ b/third_party/nixpkgs/lib/systems/inspect.nix
@@ -1,10 +1,31 @@
{ lib }:
-with import ./parse.nix { inherit lib; };
-with lib.attrsets;
-with lib.lists;
-let abis_ = abis; in
-let abis = lib.mapAttrs (_: abi: builtins.removeAttrs abi [ "assertions" ]) abis_; in
+let
+ inherit (lib)
+ any
+ attrValues
+ concatMap
+ filter
+ hasPrefix
+ isList
+ mapAttrs
+ matchAttrs
+ recursiveUpdateUntil
+ toList
+ ;
+
+ inherit (lib.strings) toJSON;
+
+ inherit (lib.systems.parse)
+ kernels
+ kernelFamilies
+ significantBytes
+ cpuTypes
+ execFormats
+ ;
+
+ abis = mapAttrs (_: abi: removeAttrs abi [ "assertions" ]) lib.systems.parse.abis;
+in
rec {
# these patterns are to be matched against {host,build,target}Platform.parsed
@@ -32,8 +53,8 @@ rec {
isx86 = { cpu = { family = "x86"; }; };
isAarch32 = { cpu = { family = "arm"; bits = 32; }; };
isArmv7 = map ({ arch, ... }: { cpu = { inherit arch; }; })
- (lib.filter (cpu: lib.hasPrefix "armv7" cpu.arch or "")
- (lib.attrValues cpuTypes));
+ (filter (cpu: hasPrefix "armv7" cpu.arch or "")
+ (attrValues cpuTypes));
isAarch64 = { cpu = { family = "arm"; bits = 64; }; };
isAarch = { cpu = { family = "arm"; }; };
isMicroBlaze = { cpu = { family = "microblaze"; }; };
@@ -111,19 +132,19 @@ rec {
let
# patterns can be either a list or a (bare) singleton; turn
# them into singletons for uniform handling
- pat1 = lib.toList pat1_;
- pat2 = lib.toList pat2_;
+ pat1 = toList pat1_;
+ pat2 = toList pat2_;
in
- lib.concatMap (attr1:
+ concatMap (attr1:
map (attr2:
- lib.recursiveUpdateUntil
+ recursiveUpdateUntil
(path: subattr1: subattr2:
if (builtins.intersectAttrs subattr1 subattr2) == {} || subattr1 == subattr2
then true
else throw ''
pattern conflict at path ${toString path}:
- ${builtins.toJSON subattr1}
- ${builtins.toJSON subattr2}
+ ${toJSON subattr1}
+ ${toJSON subattr2}
'')
attr1
attr2
@@ -132,7 +153,7 @@ rec {
pat1;
matchAnyAttrs = patterns:
- if builtins.isList patterns then attrs: any (pattern: matchAttrs pattern attrs) patterns
+ if isList patterns then attrs: any (pattern: matchAttrs pattern attrs) patterns
else matchAttrs patterns;
predicates = mapAttrs (_: matchAnyAttrs) patterns;
diff --git a/third_party/nixpkgs/lib/systems/parse.nix b/third_party/nixpkgs/lib/systems/parse.nix
index b69ad669e1..191e9734b8 100644
--- a/third_party/nixpkgs/lib/systems/parse.nix
+++ b/third_party/nixpkgs/lib/systems/parse.nix
@@ -15,14 +15,45 @@
# systems that overlap with existing ones and won't notice something amiss.
#
{ lib }:
-with lib.lists;
-with lib.types;
-with lib.attrsets;
-with lib.strings;
-with (import ./inspect.nix { inherit lib; }).predicates;
let
- inherit (lib.options) mergeOneOption;
+ inherit (lib)
+ all
+ any
+ attrValues
+ elem
+ elemAt
+ hasPrefix
+ id
+ length
+ mapAttrs
+ mergeOneOption
+ optionalString
+ splitString
+ versionAtLeast
+ ;
+
+ inherit (lib.strings) match;
+
+ inherit (lib.systems.inspect.predicates)
+ isAarch32
+ isBigEndian
+ isDarwin
+ isLinux
+ isPower64
+ isWindows
+ ;
+
+ inherit (lib.types)
+ enum
+ float
+ isType
+ mkOptionType
+ number
+ setType
+ string
+ types
+ ;
setTypes = type:
mapAttrs (name: value:
@@ -33,10 +64,10 @@ let
# regex `e?abi.*$` when determining the validity of a triple. In
# other words, `i386-linuxabichickenlips` is a valid triple.
removeAbiSuffix = x:
- let match = builtins.match "(.*)e?abi.*" x;
- in if match==null
+ let found = match "(.*)e?abi.*" x;
+ in if found == null
then x
- else lib.elemAt match 0;
+ else elemAt found 0;
in
@@ -76,7 +107,7 @@ rec {
types.cpuType = enum (attrValues cpuTypes);
- cpuTypes = with significantBytes; setTypes types.openCpuType {
+ cpuTypes = let inherit (significantBytes) bigEndian littleEndian; in setTypes types.openCpuType {
arm = { bits = 32; significantByte = littleEndian; family = "arm"; };
armv5tel = { bits = 32; significantByte = littleEndian; family = "arm"; version = "5"; arch = "armv5t"; };
armv6m = { bits = 32; significantByte = littleEndian; family = "arm"; version = "6"; arch = "armv6-m"; };
@@ -166,7 +197,7 @@ rec {
# Note: Since 22.11 the archs of a mode switching CPU are no longer considered
# pairwise compatible. Mode switching implies that binaries built for A
# and B respectively can't be executed at the same time.
- isCompatible = a: b: with cpuTypes; lib.any lib.id [
+ isCompatible = with cpuTypes; a: b: any id [
# x86
(b == i386 && isCompatible a i486)
(b == i486 && isCompatible a i586)
@@ -287,7 +318,10 @@ rec {
types.kernel = enum (attrValues kernels);
- kernels = with execFormats; with kernelFamilies; setTypes types.openKernel {
+ kernels = let
+ inherit (execFormats) elf pe wasm unknown macho;
+ inherit (kernelFamilies) bsd darwin;
+ in setTypes types.openKernel {
# TODO(@Ericson2314): Don't want to mass-rebuild yet to keeping 'darwin' as
# the normalized name for macOS.
macos = { execFormat = macho; families = { inherit darwin; }; name = "darwin"; };
@@ -359,7 +393,7 @@ rec {
The "gnu" ABI is ambiguous on 32-bit ARM. Use "gnueabi" or "gnueabihf" instead.
'';
}
- { assertion = platform: with platform; !(isPower64 && isBigEndian);
+ { assertion = platform: !(platform.isPower64 && platform.isBigEndian);
message = ''
The "gnu" ABI is ambiguous on big-endian 64-bit PowerPC. Use "gnuabielfv2" or "gnuabielfv1" instead.
'';
@@ -480,7 +514,7 @@ rec {
/**/ if args ? abi then getAbi args.abi
else if isLinux parsed || isWindows parsed then
if isAarch32 parsed then
- if lib.versionAtLeast (parsed.cpu.version or "0") "6"
+ if versionAtLeast (parsed.cpu.version or "0") "6"
then abis.gnueabihf
else abis.gnueabi
# Default ppc64 BE to ELFv2
@@ -491,7 +525,7 @@ rec {
in mkSystem parsed;
- mkSystemFromString = s: mkSystemFromSkeleton (mkSkeletonFromList (lib.splitString "-" s));
+ mkSystemFromString = s: mkSystemFromSkeleton (mkSkeletonFromList (splitString "-" s));
kernelName = kernel:
kernel.name + toString (kernel.version or "");
@@ -503,10 +537,10 @@ rec {
tripleFromSystem = { cpu, vendor, kernel, abi, ... } @ sys: assert isSystem sys; let
optExecFormat =
- lib.optionalString (kernel.name == "netbsd" &&
+ optionalString (kernel.name == "netbsd" &&
gnuNetBSDDefaultExecFormat cpu != kernel.execFormat)
kernel.execFormat.name;
- optAbi = lib.optionalString (abi != abis.unknown) "-${abi.name}";
+ optAbi = optionalString (abi != abis.unknown) "-${abi.name}";
in "${cpu.name}-${vendor.name}-${kernelName kernel}${optExecFormat}${optAbi}";
################################################################################
diff --git a/third_party/nixpkgs/lib/tests/misc.nix b/third_party/nixpkgs/lib/tests/misc.nix
index 193e68a969..cf4a185c14 100644
--- a/third_party/nixpkgs/lib/tests/misc.nix
+++ b/third_party/nixpkgs/lib/tests/misc.nix
@@ -1,21 +1,114 @@
-/*
-Nix evaluation tests for various lib functions.
+/**
+ Nix evaluation tests for various lib functions.
-Since these tests are implemented with Nix evaluation, error checking is limited to what `builtins.tryEval` can detect, which is `throw`'s and `abort`'s, without error messages.
-If you need to test error messages or more complex evaluations, see ./modules.sh, ./sources.sh or ./filesystem.sh as examples.
+ Since these tests are implemented with Nix evaluation,
+ error checking is limited to what `builtins.tryEval` can detect,
+ which is `throw`'s and `abort`'s, without error messages.
-To run these tests:
+ If you need to test error messages or more complex evaluations, see
+ `lib/tests/modules.sh`, `lib/tests/sources.sh` or `lib/tests/filesystem.sh` as examples.
- [nixpkgs]$ nix-instantiate --eval --strict lib/tests/misc.nix
+ To run these tests:
-If the resulting list is empty, all tests passed.
-Alternatively, to run all `lib` tests:
+ [nixpkgs]$ nix-instantiate --eval --strict lib/tests/misc.nix
- [nixpkgs]$ nix-build lib/tests/release.nix
+ If the resulting list is empty, all tests passed.
+ Alternatively, to run all `lib` tests:
+
+ [nixpkgs]$ nix-build lib/tests/release.nix
*/
-with import ../default.nix;
let
+ lib = import ../default.nix;
+
+ inherit (lib)
+ allUnique
+ and
+ attrNames
+ attrsets
+ attrsToList
+ bitAnd
+ bitOr
+ bitXor
+ boolToString
+ callPackagesWith
+ callPackageWith
+ cartesianProduct
+ cli
+ composeExtensions
+ composeManyExtensions
+ concatLines
+ concatMapAttrs
+ concatMapStrings
+ concatStrings
+ concatStringsSep
+ const
+ escapeXML
+ evalModules
+ filter
+ fix
+ fold
+ foldAttrs
+ foldl
+ foldl'
+ foldlAttrs
+ foldr
+ functionArgs
+ generators
+ genList
+ getExe
+ getExe'
+ groupBy
+ groupBy'
+ hasAttrByPath
+ hasInfix
+ id
+ isStorePath
+ lazyDerivation
+ lists
+ listToAttrs
+ makeExtensible
+ makeIncludePath
+ makeOverridable
+ mapAttrs
+ mapCartesianProduct
+ matchAttrs
+ mergeAttrs
+ meta
+ mod
+ nameValuePair
+ optionalDrvAttr
+ optionAttrSetToDocList
+ overrideExisting
+ packagesFromDirectoryRecursive
+ pipe
+ range
+ recursiveUpdateUntil
+ removePrefix
+ replicate
+ runTests
+ setFunctionArgs
+ showAttrPath
+ sort
+ sortOn
+ stringLength
+ strings
+ stringToCharacters
+ systems
+ tail
+ take
+ testAllTrue
+ toBaseDigits
+ toHexString
+ toInt
+ toIntBase10
+ toShellVars
+ types
+ updateManyAttrsByPath
+ versions
+ xor
+ ;
+
testingThrow = expr: {
expr = (builtins.tryEval (builtins.seq expr "didn't throw"));
expected = { success = false; value = false; };
@@ -24,7 +117,6 @@ let
expr = (builtins.tryEval expr).success;
expected = true;
};
- testingDeepThrow = expr: testingThrow (builtins.deepSeq expr expr);
testSanitizeDerivationName = { name, expected }:
let
@@ -55,6 +147,24 @@ runTests {
expected = { a = false; b = false; c = true; };
};
+ testCallPackageWithOverridePreservesArguments =
+ let
+ f = { a ? 0, b }: {};
+ f' = callPackageWith { a = 1; b = 2; } f {};
+ in {
+ expr = functionArgs f'.override;
+ expected = functionArgs f;
+ };
+
+ testCallPackagesWithOverridePreservesArguments =
+ let
+ f = { a ? 0, b }: { nested = {}; };
+ f' = callPackagesWith { a = 1; b = 2; } f {};
+ in {
+ expr = functionArgs f'.nested.override;
+ expected = functionArgs f;
+ };
+
# TRIVIAL
testId = {
@@ -93,10 +203,10 @@ runTests {
};
/*
- testOr = {
- expr = or true false;
- expected = true;
- };
+ testOr = {
+ expr = or true false;
+ expected = true;
+ };
*/
testAnd = {
@@ -104,6 +214,21 @@ runTests {
expected = false;
};
+ testXor = {
+ expr = [
+ (xor true false)
+ (xor true true)
+ (xor false false)
+ (xor false true)
+ ];
+ expected = [
+ true
+ false
+ false
+ true
+ ];
+ };
+
testFix = {
expr = fix (x: {a = if x ? a then "a" else "b";});
expected = {a = "a";};
@@ -191,6 +316,35 @@ runTests {
expected = "a\nb\nc\n";
};
+ testMakeIncludePathWithPkgs = {
+ expr = (makeIncludePath [
+ # makeIncludePath preferably selects the "dev" output
+ { dev.outPath = "/dev"; out.outPath = "/out"; outPath = "/default"; }
+ # "out" is used if "dev" is not found
+ { out.outPath = "/out"; outPath = "/default"; }
+ # And it returns the derivation directly if there's no "out" either
+ { outPath = "/default"; }
+ # Same if the output is specified explicitly, even if there's a "dev"
+ { dev.outPath = "/dev"; outPath = "/default"; outputSpecified = true; }
+ ]);
+ expected = "/dev/include:/out/include:/default/include:/default/include";
+ };
+
+ testMakeIncludePathWithEmptyList = {
+ expr = (makeIncludePath [ ]);
+ expected = "";
+ };
+
+ testMakeIncludePathWithOneString = {
+ expr = (makeIncludePath [ "/usr" ]);
+ expected = "/usr/include";
+ };
+
+ testMakeIncludePathWithManyString = {
+ expr = (makeIncludePath [ "/usr" "/usr/local" ]);
+ expected = "/usr/include:/usr/local/include";
+ };
+
testReplicateString = {
expr = strings.replicate 5 "hello";
expected = "hellohellohellohellohello";
@@ -1162,7 +1316,7 @@ runTests {
'';
};
- /* right now only invocation check */
+ # right now only invocation check
testToJSONSimple =
let val = {
foobar = [ "baz" 1 2 3 ];
@@ -1173,7 +1327,7 @@ runTests {
expected = builtins.toJSON val;
};
- /* right now only invocation check */
+ # right now only invocation check
testToYAMLSimple =
let val = {
list = [ { one = 1; } { two = 2; } ];
@@ -1260,7 +1414,7 @@ runTests {
};
testToPrettyMultiline = {
- expr = mapAttrs (const (generators.toPretty { })) rec {
+ expr = mapAttrs (const (generators.toPretty { })) {
list = [ 3 4 [ false ] ];
attrs = { foo = null; bar.foo = "baz"; };
newlinestring = "\n";
@@ -1274,7 +1428,7 @@ runTests {
there
test'';
};
- expected = rec {
+ expected = {
list = ''
[
3
@@ -1312,13 +1466,10 @@ runTests {
expected = "«foo»";
};
- testToPlist =
- let
- deriv = derivation { name = "test"; builder = "/bin/sh"; system = "aarch64-linux"; };
- in {
+ testToPlist = {
expr = mapAttrs (const (generators.toPlist { })) {
value = {
- nested.values = rec {
+ nested.values = {
int = 42;
float = 0.1337;
bool = true;
@@ -1531,17 +1682,17 @@ runTests {
};
testCartesianProductOfEmptySet = {
- expr = cartesianProductOfSets {};
+ expr = cartesianProduct {};
expected = [ {} ];
};
testCartesianProductOfOneSet = {
- expr = cartesianProductOfSets { a = [ 1 2 3 ]; };
+ expr = cartesianProduct { a = [ 1 2 3 ]; };
expected = [ { a = 1; } { a = 2; } { a = 3; } ];
};
testCartesianProductOfTwoSets = {
- expr = cartesianProductOfSets { a = [ 1 ]; b = [ 10 20 ]; };
+ expr = cartesianProduct { a = [ 1 ]; b = [ 10 20 ]; };
expected = [
{ a = 1; b = 10; }
{ a = 1; b = 20; }
@@ -1549,12 +1700,12 @@ runTests {
};
testCartesianProductOfTwoSetsWithOneEmpty = {
- expr = cartesianProductOfSets { a = [ ]; b = [ 10 20 ]; };
+ expr = cartesianProduct { a = [ ]; b = [ 10 20 ]; };
expected = [ ];
};
testCartesianProductOfThreeSets = {
- expr = cartesianProductOfSets {
+ expr = cartesianProduct {
a = [ 1 2 3 ];
b = [ 10 20 30 ];
c = [ 100 200 300 ];
@@ -1598,6 +1749,30 @@ runTests {
];
};
+ testMapCartesianProductOfOneSet = {
+ expr = mapCartesianProduct ({a}: a * 2) { a = [ 1 2 3 ]; };
+ expected = [ 2 4 6 ];
+ };
+
+ testMapCartesianProductOfTwoSets = {
+ expr = mapCartesianProduct ({a,b}: a + b) { a = [ 1 ]; b = [ 10 20 ]; };
+ expected = [ 11 21 ];
+ };
+
+ testMapCartesianProcutOfTwoSetsWithOneEmpty = {
+ expr = mapCartesianProduct (x: x.a + x.b) { a = [ ]; b = [ 10 20 ]; };
+ expected = [ ];
+ };
+
+ testMapCartesianProductOfThreeSets = {
+ expr = mapCartesianProduct ({a,b,c}: a + b + c) {
+ a = [ 1 2 3 ];
+ b = [ 10 20 30 ];
+ c = [ 100 200 300 ];
+ };
+ expected = [ 111 211 311 121 221 321 131 231 331 112 212 312 122 222 322 132 232 332 113 213 313 123 223 323 133 233 333 ];
+ };
+
# The example from the showAttrPath documentation
testShowAttrPathExample = {
expr = showAttrPath [ "foo" "10" "bar" ];
@@ -1973,6 +2148,24 @@ runTests {
}).drvPath;
};
+ testLazyDerivationMultiOutputReturnsDerivationAttrs = let
+ derivation = {
+ type = "derivation";
+ outputs = ["out" "dev"];
+ dev = "test dev";
+ out = "test out";
+ outPath = "test outPath";
+ outputName = "out";
+ drvPath = "test drvPath";
+ name = "test name";
+ system = "test system";
+ meta.position = "/hi:23";
+ };
+ in {
+ expr = lazyDerivation { inherit derivation; outputs = ["out" "dev"]; passthru.meta.position = "/hi:23"; };
+ expected = derivation;
+ };
+
testTypeDescriptionInt = {
expr = (with types; int).description;
expected = "signed integer";
diff --git a/third_party/nixpkgs/lib/tests/modules.sh b/third_party/nixpkgs/lib/tests/modules.sh
index b3bbdf9485..750b1d025e 100755
--- a/third_party/nixpkgs/lib/tests/modules.sh
+++ b/third_party/nixpkgs/lib/tests/modules.sh
@@ -103,6 +103,18 @@ checkConfigError 'The option .sub.wrong2. does not exist. Definition values:' co
checkConfigError '.*This can happen if you e.g. declared your options in .types.submodule.' config.sub ./error-mkOption-in-submodule-config.nix
checkConfigError '.*A definition for option .bad. is not of type .non-empty .list of .submodule...\.' config.bad ./error-nonEmptyListOf-submodule.nix
+# types.attrTag
+checkConfigOutput '^true$' config.okChecks ./types-attrTag.nix
+checkConfigError 'A definition for option .intStrings\.syntaxError. is not of type .attribute-tagged union' config.intStrings.syntaxError ./types-attrTag.nix
+checkConfigError 'A definition for option .intStrings\.syntaxError2. is not of type .attribute-tagged union' config.intStrings.syntaxError2 ./types-attrTag.nix
+checkConfigError 'A definition for option .intStrings\.syntaxError3. is not of type .attribute-tagged union' config.intStrings.syntaxError3 ./types-attrTag.nix
+checkConfigError 'A definition for option .intStrings\.syntaxError4. is not of type .attribute-tagged union' config.intStrings.syntaxError4 ./types-attrTag.nix
+checkConfigError 'A definition for option .intStrings\.mergeError. is not of type .attribute-tagged union' config.intStrings.mergeError ./types-attrTag.nix
+checkConfigError 'A definition for option .intStrings\.badTagError. is not of type .attribute-tagged union' config.intStrings.badTagError ./types-attrTag.nix
+checkConfigError 'A definition for option .intStrings\.badTagTypeError\.left. is not of type .signed integer.' config.intStrings.badTagTypeError.left ./types-attrTag.nix
+checkConfigError 'A definition for option .nested\.right\.left. is not of type .signed integer.' config.nested.right.left ./types-attrTag.nix
+checkConfigError 'In attrTag, each tag value must be an option, but tag int was a bare type, not wrapped in mkOption.' config.opt.int ./types-attrTag-wrong-decl.nix
+
# types.pathInStore
checkConfigOutput '".*/store/0lz9p8xhf89kb1c1kk6jxrzskaiygnlh-bash-5.2-p15.drv"' config.pathInStore.ok1 ./types.nix
checkConfigOutput '".*/store/0fb3ykw9r5hpayd05sr0cizwadzq1d8q-bash-5.2-p15"' config.pathInStore.ok2 ./types.nix
diff --git a/third_party/nixpkgs/lib/tests/modules/alias-with-priority-can-override.nix b/third_party/nixpkgs/lib/tests/modules/alias-with-priority-can-override.nix
index 9a18c9d9f6..82a4c0df8c 100644
--- a/third_party/nixpkgs/lib/tests/modules/alias-with-priority-can-override.nix
+++ b/third_party/nixpkgs/lib/tests/modules/alias-with-priority-can-override.nix
@@ -6,12 +6,19 @@
{ config, lib, ... }:
-with lib;
+let
+ inherit (lib)
+ mkAliasOptionModule
+ mkForce
+ mkOption
+ types
+ ;
+in
{
options = {
# A simple boolean option that can be enabled or disabled.
- enable = lib.mkOption {
+ enable = mkOption {
type = types.nullOr types.bool;
default = null;
example = true;
@@ -41,7 +48,7 @@ with lib;
# should override the next import.
( { config, lib, ... }:
{
- enableAlias = lib.mkForce false;
+ enableAlias = mkForce false;
}
)
diff --git a/third_party/nixpkgs/lib/tests/modules/alias-with-priority.nix b/third_party/nixpkgs/lib/tests/modules/alias-with-priority.nix
index a35a06fc69..c64a586ab2 100644
--- a/third_party/nixpkgs/lib/tests/modules/alias-with-priority.nix
+++ b/third_party/nixpkgs/lib/tests/modules/alias-with-priority.nix
@@ -6,12 +6,19 @@
{ config, lib, ... }:
-with lib;
+let
+ inherit (lib)
+ mkAliasOptionModule
+ mkDefault
+ mkOption
+ types
+ ;
+in
{
options = {
# A simple boolean option that can be enabled or disabled.
- enable = lib.mkOption {
+ enable = mkOption {
type = types.nullOr types.bool;
default = null;
example = true;
@@ -41,7 +48,7 @@ with lib;
# should be able to be overridden by the next import.
( { config, lib, ... }:
{
- enableAlias = lib.mkDefault false;
+ enableAlias = mkDefault false;
}
)
diff --git a/third_party/nixpkgs/lib/tests/modules/doRename-condition.nix b/third_party/nixpkgs/lib/tests/modules/doRename-condition.nix
index c08b3035be..176c21a01a 100644
--- a/third_party/nixpkgs/lib/tests/modules/doRename-condition.nix
+++ b/third_party/nixpkgs/lib/tests/modules/doRename-condition.nix
@@ -1,4 +1,4 @@
-/*
+/**
Simulate a migration from a single-instance `services.foo` to a multi instance
`services.foos.` module, where `name = ""` serves as the legacy /
compatibility instance.
@@ -10,7 +10,7 @@
The relevant scenarios are tested in separate files:
- ./doRename-condition-enable.nix
- ./doRename-condition-no-enable.nix
- */
+*/
{ config, lib, ... }:
let
inherit (lib) mkOption mkEnableOption types doRename;
diff --git a/third_party/nixpkgs/lib/tests/modules/docs.nix b/third_party/nixpkgs/lib/tests/modules/docs.nix
new file mode 100644
index 0000000000..225aa7eac1
--- /dev/null
+++ b/third_party/nixpkgs/lib/tests/modules/docs.nix
@@ -0,0 +1,41 @@
+/*
+ A basic documentation generating module.
+ Declares and defines a `docs` option, suitable for making assertions about
+ the extraction "phase" of documentation generation.
+ */
+{ lib, options, ... }:
+
+let
+ inherit (lib)
+ head
+ length
+ mkOption
+ types
+ ;
+
+ traceListSeq = l: v: lib.foldl' (a: b: lib.traceSeq b a) v l;
+
+in
+
+{
+ options.docs = mkOption {
+ type = types.lazyAttrsOf types.raw;
+ description = ''
+ All options to be rendered, without any visibility filtering applied.
+ '';
+ };
+ config.docs =
+ lib.zipAttrsWith
+ (name: values:
+ if length values > 1 then
+ traceListSeq values
+ abort "Multiple options with the same name: ${name}"
+ else
+ assert length values == 1;
+ head values
+ )
+ (map
+ (opt: { ${opt.name} = opt; })
+ (lib.optionAttrSetToDocList options)
+ );
+}
diff --git a/third_party/nixpkgs/lib/tests/modules/extendModules-168767-imports.nix b/third_party/nixpkgs/lib/tests/modules/extendModules-168767-imports.nix
index 489e6b5a5d..6b50b81236 100644
--- a/third_party/nixpkgs/lib/tests/modules/extendModules-168767-imports.nix
+++ b/third_party/nixpkgs/lib/tests/modules/extendModules-168767-imports.nix
@@ -2,7 +2,14 @@
, extendModules
, ...
}:
-with lib;
+
+let
+ inherit (lib)
+ mkOption
+ mkOverride
+ types
+ ;
+in
{
imports = [
diff --git a/third_party/nixpkgs/lib/tests/modules/types-attrTag-wrong-decl.nix b/third_party/nixpkgs/lib/tests/modules/types-attrTag-wrong-decl.nix
new file mode 100644
index 0000000000..d03370bc10
--- /dev/null
+++ b/third_party/nixpkgs/lib/tests/modules/types-attrTag-wrong-decl.nix
@@ -0,0 +1,14 @@
+{ lib, ... }:
+let
+ inherit (lib) types mkOption;
+in
+{
+ options = {
+ opt = mkOption {
+ type = types.attrTag {
+ int = types.int;
+ };
+ default = { int = 1; };
+ };
+ };
+}
diff --git a/third_party/nixpkgs/lib/tests/modules/types-attrTag.nix b/third_party/nixpkgs/lib/tests/modules/types-attrTag.nix
new file mode 100644
index 0000000000..b2e5158bb4
--- /dev/null
+++ b/third_party/nixpkgs/lib/tests/modules/types-attrTag.nix
@@ -0,0 +1,135 @@
+{ lib, config, options, ... }:
+let
+ inherit (lib) mkOption types;
+ forceDeep = x: builtins.deepSeq x x;
+ mergedSubOption = (options.merged.type.getSubOptions options.merged.loc).extensible."merged.";
+in
+{
+ options = {
+ intStrings = mkOption {
+ type = types.attrsOf
+ (types.attrTag {
+ left = mkOption {
+ type = types.int;
+ };
+ right = mkOption {
+ type = types.str;
+ };
+ });
+ };
+ nested = mkOption {
+ type = types.attrTag {
+ left = mkOption {
+ type = types.int;
+ };
+ right = mkOption {
+ type = types.attrTag {
+ left = mkOption {
+ type = types.int;
+ };
+ right = mkOption {
+ type = types.str;
+ };
+ };
+ };
+ };
+ };
+ merged = mkOption {
+ type = types.attrsOf (
+ types.attrTag {
+ yay = mkOption {
+ type = types.int;
+ };
+ extensible = mkOption {
+ type = types.enum [ "foo" ];
+ };
+ }
+ );
+ };
+ submodules = mkOption {
+ type = types.attrsOf (
+ types.attrTag {
+ foo = mkOption {
+ type = types.submodule {
+ options = {
+ bar = mkOption {
+ type = types.int;
+ };
+ };
+ };
+ };
+ qux = mkOption {
+ type = types.str;
+ description = "A qux for when you don't want a foo";
+ };
+ }
+ );
+ };
+ okChecks = mkOption {};
+ };
+ imports = [
+ ./docs.nix
+ {
+ options.merged = mkOption {
+ type = types.attrsOf (
+ types.attrTag {
+ nay = mkOption {
+ type = types.bool;
+ };
+ extensible = mkOption {
+ type = types.enum [ "bar" ];
+ };
+ }
+ );
+ };
+ }
+ ];
+ config = {
+ intStrings.syntaxError = 1;
+ intStrings.syntaxError2 = {};
+ intStrings.syntaxError3 = { a = true; b = true; };
+ intStrings.syntaxError4 = lib.mkMerge [ { a = true; } { b = true; } ];
+ intStrings.mergeError = lib.mkMerge [ { int = throw "do not eval"; } { string = throw "do not eval"; } ];
+ intStrings.badTagError.rite = throw "do not eval";
+ intStrings.badTagTypeError.left = "bad";
+ intStrings.numberOne.left = 1;
+ intStrings.hello.right = "hello world";
+ nested.right.left = "not a number";
+ merged.negative.nay = false;
+ merged.positive.yay = 100;
+ merged.extensi-foo.extensible = "foo";
+ merged.extensi-bar.extensible = "bar";
+ okChecks = builtins.addErrorContext "while evaluating the assertions" (
+ assert config.intStrings.hello == { right = "hello world"; };
+ assert config.intStrings.numberOne == { left = 1; };
+ assert config.merged.negative == { nay = false; };
+ assert config.merged.positive == { yay = 100; };
+ assert config.merged.extensi-foo == { extensible = "foo"; };
+ assert config.merged.extensi-bar == { extensible = "bar"; };
+ assert config.docs."submodules..foo.bar".type == "signed integer";
+ assert config.docs."submodules..qux".type == "string";
+ assert config.docs."submodules..qux".declarations == [ __curPos.file ];
+ assert config.docs."submodules..qux".loc == [ "submodules" "" "qux" ];
+ assert config.docs."submodules..qux".name == "submodules..qux";
+ assert config.docs."submodules..qux".description == "A qux for when you don't want a foo";
+ assert config.docs."submodules..qux".readOnly == false;
+ assert config.docs."submodules..qux".visible == true;
+ # Not available (yet?)
+ # assert config.docs."submodules..qux".declarationsWithPositions == [ ... ];
+ assert options.submodules.declarations == [ __curPos.file ];
+ assert lib.length options.submodules.declarationPositions == 1;
+ assert (lib.head options.submodules.declarationPositions).file == __curPos.file;
+ assert options.merged.declarations == [ __curPos.file __curPos.file ];
+ assert lib.length options.merged.declarationPositions == 2;
+ assert (lib.elemAt options.merged.declarationPositions 0).file == __curPos.file;
+ assert (lib.elemAt options.merged.declarationPositions 1).file == __curPos.file;
+ assert (lib.elemAt options.merged.declarationPositions 0).line != (lib.elemAt options.merged.declarationPositions 1).line;
+ assert mergedSubOption.declarations == [ __curPos.file __curPos.file ];
+ assert lib.length mergedSubOption.declarationPositions == 2;
+ assert (lib.elemAt mergedSubOption.declarationPositions 0).file == __curPos.file;
+ assert (lib.elemAt mergedSubOption.declarationPositions 1).file == __curPos.file;
+ assert (lib.elemAt mergedSubOption.declarationPositions 0).line != (lib.elemAt mergedSubOption.declarationPositions 1).line;
+ assert lib.length config.docs."merged..extensible".declarations == 2;
+ true);
+ };
+}
diff --git a/third_party/nixpkgs/lib/tests/test-with-nix.nix b/third_party/nixpkgs/lib/tests/test-with-nix.nix
index fd2e7532e6..9d66b91cab 100644
--- a/third_party/nixpkgs/lib/tests/test-with-nix.nix
+++ b/third_party/nixpkgs/lib/tests/test-with-nix.nix
@@ -53,6 +53,12 @@ pkgs.runCommand "nixpkgs-lib-tests-nix-${nix.version}" {
echo "Running lib/tests/modules.sh"
bash lib/tests/modules.sh
+ echo "Checking lib.version"
+ nix-instantiate lib -A version --eval || {
+ echo "lib.version does not evaluate when lib is isolated from the rest of the nixpkgs tree"
+ exit 1
+ }
+
echo "Running lib/tests/filesystem.sh"
TEST_LIB=$PWD/lib bash lib/tests/filesystem.sh
diff --git a/third_party/nixpkgs/lib/trivial.nix b/third_party/nixpkgs/lib/trivial.nix
index fa499cbbf0..5b7a1ee30f 100644
--- a/third_party/nixpkgs/lib/trivial.nix
+++ b/third_party/nixpkgs/lib/trivial.nix
@@ -16,59 +16,114 @@ in {
## Simple (higher order) functions
- /* The identity function
- For when you need a function that does “nothing”.
+ /**
+ The identity function
+ For when you need a function that does “nothing”.
- Type: id :: a -> a
+
+ # Inputs
+
+ `x`
+
+ : The value to return
+
+ # Type
+
+ ```
+ id :: a -> a
+ ```
*/
- id =
- # The value to return
- x: x;
+ id = x: x;
- /* The constant function
+ /**
+ The constant function
- Ignores the second argument. If called with only one argument,
- constructs a function that always returns a static value.
+ Ignores the second argument. If called with only one argument,
+ constructs a function that always returns a static value.
- Type: const :: a -> b -> a
- Example:
- let f = const 5; in f 10
- => 5
+
+ # Inputs
+
+ `x`
+
+ : Value to return
+
+ `y`
+
+ : Value to ignore
+
+ # Type
+
+ ```
+ const :: a -> b -> a
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.trivial.const` usage example
+
+ ```nix
+ let f = const 5; in f 10
+ => 5
+ ```
+
+ :::
*/
const =
- # Value to return
x:
- # Value to ignore
y: x;
- /* Pipes a value through a list of functions, left to right.
+ /**
+ Pipes a value through a list of functions, left to right.
- Type: pipe :: a -> [] ->
- Example:
- pipe 2 [
- (x: x + 2) # 2 + 2 = 4
- (x: x * 2) # 4 * 2 = 8
- ]
- => 8
+ # Inputs
- # ideal to do text transformations
- pipe [ "a/b" "a/c" ] [
+ `value`
- # create the cp command
- (map (file: ''cp "${src}/${file}" $out\n''))
+ : Value to start piping.
- # concatenate all commands into one string
- lib.concatStrings
+ `fns`
- # make that string into a nix derivation
- (pkgs.runCommand "copy-to-out" {})
+ : List of functions to apply sequentially.
- ]
- =>
+ # Type
- The output type of each function has to be the input type
- of the next function, and the last function returns the
- final value.
+ ```
+ pipe :: a -> [] ->
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.trivial.pipe` usage example
+
+ ```nix
+ pipe 2 [
+ (x: x + 2) # 2 + 2 = 4
+ (x: x * 2) # 4 * 2 = 8
+ ]
+ => 8
+
+ # ideal to do text transformations
+ pipe [ "a/b" "a/c" ] [
+
+ # create the cp command
+ (map (file: ''cp "${src}/${file}" $out\n''))
+
+ # concatenate all commands into one string
+ lib.concatStrings
+
+ # make that string into a nix derivation
+ (pkgs.runCommand "copy-to-out" {})
+
+ ]
+ =>
+
+ The output type of each function has to be the input type
+ of the next function, and the last function returns the
+ final value.
+ ```
+
+ :::
*/
pipe = builtins.foldl' (x: f: f x);
@@ -79,71 +134,215 @@ in {
## Named versions corresponding to some builtin operators.
- /* Concatenate two lists
+ /**
+ Concatenate two lists
- Type: concat :: [a] -> [a] -> [a]
- Example:
- concat [ 1 2 ] [ 3 4 ]
- => [ 1 2 3 4 ]
+ # Inputs
+
+ `x`
+
+ : 1\. Function argument
+
+ `y`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ concat :: [a] -> [a] -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.trivial.concat` usage example
+
+ ```nix
+ concat [ 1 2 ] [ 3 4 ]
+ => [ 1 2 3 4 ]
+ ```
+
+ :::
*/
concat = x: y: x ++ y;
- /* boolean “or” */
+ /**
+ boolean “or”
+
+
+ # Inputs
+
+ `x`
+
+ : 1\. Function argument
+
+ `y`
+
+ : 2\. Function argument
+ */
or = x: y: x || y;
- /* boolean “and” */
+ /**
+ boolean “and”
+
+
+ # Inputs
+
+ `x`
+
+ : 1\. Function argument
+
+ `y`
+
+ : 2\. Function argument
+ */
and = x: y: x && y;
- /* bitwise “not” */
+ /**
+ boolean “exclusive or”
+
+
+ # Inputs
+
+ `x`
+
+ : 1\. Function argument
+
+ `y`
+
+ : 2\. Function argument
+ */
+ # We explicitly invert the arguments purely as a type assertion.
+ # This is invariant under XOR, so it does not affect the result.
+ xor = x: y: (!x) != (!y);
+
+ /**
+ bitwise “not”
+ */
bitNot = builtins.sub (-1);
- /* Convert a boolean to a string.
+ /**
+ Convert a boolean to a string.
- This function uses the strings "true" and "false" to represent
- boolean values. Calling `toString` on a bool instead returns "1"
- and "" (sic!).
+ This function uses the strings "true" and "false" to represent
+ boolean values. Calling `toString` on a bool instead returns "1"
+ and "" (sic!).
- Type: boolToString :: bool -> string
+
+ # Inputs
+
+ `b`
+
+ : 1\. Function argument
+
+ # Type
+
+ ```
+ boolToString :: bool -> string
+ ```
*/
boolToString = b: if b then "true" else "false";
- /* Merge two attribute sets shallowly, right side trumps left
+ /**
+ Merge two attribute sets shallowly, right side trumps left
- mergeAttrs :: attrs -> attrs -> attrs
+ mergeAttrs :: attrs -> attrs -> attrs
- Example:
- mergeAttrs { a = 1; b = 2; } { b = 3; c = 4; }
- => { a = 1; b = 3; c = 4; }
+
+ # Inputs
+
+ `x`
+
+ : Left attribute set
+
+ `y`
+
+ : Right attribute set (higher precedence for equal keys)
+
+
+ # Examples
+ :::{.example}
+ ## `lib.trivial.mergeAttrs` usage example
+
+ ```nix
+ mergeAttrs { a = 1; b = 2; } { b = 3; c = 4; }
+ => { a = 1; b = 3; c = 4; }
+ ```
+
+ :::
*/
mergeAttrs =
- # Left attribute set
x:
- # Right attribute set (higher precedence for equal keys)
y: x // y;
- /* Flip the order of the arguments of a binary function.
+ /**
+ Flip the order of the arguments of a binary function.
- Type: flip :: (a -> b -> c) -> (b -> a -> c)
- Example:
- flip concat [1] [2]
- => [ 2 1 ]
+ # Inputs
+
+ `f`
+
+ : 1\. Function argument
+
+ `a`
+
+ : 2\. Function argument
+
+ `b`
+
+ : 3\. Function argument
+
+ # Type
+
+ ```
+ flip :: (a -> b -> c) -> (b -> a -> c)
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.trivial.flip` usage example
+
+ ```nix
+ flip concat [1] [2]
+ => [ 2 1 ]
+ ```
+
+ :::
*/
flip = f: a: b: f b a;
- /* Apply function if the supplied argument is non-null.
+ /**
+ Apply function if the supplied argument is non-null.
- Example:
- mapNullable (x: x+1) null
- => null
- mapNullable (x: x+1) 22
- => 23
+
+ # Inputs
+
+ `f`
+
+ : Function to call
+
+ `a`
+
+ : Argument to check for null before passing it to `f`
+
+
+ # Examples
+ :::{.example}
+ ## `lib.trivial.mapNullable` usage example
+
+ ```nix
+ mapNullable (x: x+1) null
+ => null
+ mapNullable (x: x+1) 22
+ => 23
+ ```
+
+ :::
*/
mapNullable =
- # Function to call
f:
- # Argument to check for null before passing it to `f`
a: if a == null then a else f a;
# Pull in some builtins not included elsewhere.
@@ -155,57 +354,84 @@ in {
## nixpkgs version strings
- /* Returns the current full nixpkgs version number. */
+ /**
+ Returns the current full nixpkgs version number.
+ */
version = release + versionSuffix;
- /* Returns the current nixpkgs release number as string. */
- release = lib.strings.fileContents ../.version;
+ /**
+ Returns the current nixpkgs release number as string.
+ */
+ release = lib.strings.fileContents ./.version;
- /* The latest release that is supported, at the time of release branch-off,
- if applicable.
+ /**
+ The latest release that is supported, at the time of release branch-off,
+ if applicable.
- Ideally, out-of-tree modules should be able to evaluate cleanly with all
- supported Nixpkgs versions (master, release and old release until EOL).
- So if possible, deprecation warnings should take effect only when all
- out-of-tree expressions/libs/modules can upgrade to the new way without
- losing support for supported Nixpkgs versions.
+ Ideally, out-of-tree modules should be able to evaluate cleanly with all
+ supported Nixpkgs versions (master, release and old release until EOL).
+ So if possible, deprecation warnings should take effect only when all
+ out-of-tree expressions/libs/modules can upgrade to the new way without
+ losing support for supported Nixpkgs versions.
- This release number allows deprecation warnings to be implemented such that
- they take effect as soon as the oldest release reaches end of life. */
+ This release number allows deprecation warnings to be implemented such that
+ they take effect as soon as the oldest release reaches end of life.
+ */
oldestSupportedRelease =
# Update on master only. Do not backport.
2311;
- /* Whether a feature is supported in all supported releases (at the time of
- release branch-off, if applicable). See `oldestSupportedRelease`. */
+ /**
+ Whether a feature is supported in all supported releases (at the time of
+ release branch-off, if applicable). See `oldestSupportedRelease`.
+
+
+ # Inputs
+
+ `release`
+
+ : Release number of feature introduction as an integer, e.g. 2111 for 21.11.
+ Set it to the upcoming release, matching the nixpkgs/.version file.
+ */
isInOldestRelease =
- /* Release number of feature introduction as an integer, e.g. 2111 for 21.11.
- Set it to the upcoming release, matching the nixpkgs/.version file.
- */
release:
release <= lib.trivial.oldestSupportedRelease;
- /* Returns the current nixpkgs release code name.
+ /**
+ Returns the current nixpkgs release code name.
- On each release the first letter is bumped and a new animal is chosen
- starting with that new letter.
+ On each release the first letter is bumped and a new animal is chosen
+ starting with that new letter.
*/
codeName = "Uakari";
- /* Returns the current nixpkgs version suffix as string. */
+ /**
+ Returns the current nixpkgs version suffix as string.
+ */
versionSuffix =
let suffixFile = ../.version-suffix;
in if pathExists suffixFile
then lib.strings.fileContents suffixFile
else "pre-git";
- /* Attempts to return the the current revision of nixpkgs and
- returns the supplied default value otherwise.
+ /**
+ Attempts to return the the current revision of nixpkgs and
+ returns the supplied default value otherwise.
- Type: revisionWithDefault :: string -> string
+
+ # Inputs
+
+ `default`
+
+ : Default value to return if revision can not be determined
+
+ # Type
+
+ ```
+ revisionWithDefault :: string -> string
+ ```
*/
revisionWithDefault =
- # Default value to return if revision can not be determined
default:
let
revisionFile = "${toString ./..}/.git-revision";
@@ -217,47 +443,115 @@ in {
nixpkgsVersion = warn "lib.nixpkgsVersion is a deprecated alias of lib.version." version;
- /* Determine whether the function is being called from inside a Nix
- shell.
+ /**
+ Determine whether the function is being called from inside a Nix
+ shell.
- Type: inNixShell :: bool
+ # Type
+
+ ```
+ inNixShell :: bool
+ ```
*/
inNixShell = builtins.getEnv "IN_NIX_SHELL" != "";
- /* Determine whether the function is being called from inside pure-eval mode
- by seeing whether `builtins` contains `currentSystem`. If not, we must be in
- pure-eval mode.
+ /**
+ Determine whether the function is being called from inside pure-eval mode
+ by seeing whether `builtins` contains `currentSystem`. If not, we must be in
+ pure-eval mode.
- Type: inPureEvalMode :: bool
+ # Type
+
+ ```
+ inPureEvalMode :: bool
+ ```
*/
inPureEvalMode = ! builtins ? currentSystem;
## Integer operations
- /* Return minimum of two numbers. */
+ /**
+ Return minimum of two numbers.
+
+
+ # Inputs
+
+ `x`
+
+ : 1\. Function argument
+
+ `y`
+
+ : 2\. Function argument
+ */
min = x: y: if x < y then x else y;
- /* Return maximum of two numbers. */
+ /**
+ Return maximum of two numbers.
+
+
+ # Inputs
+
+ `x`
+
+ : 1\. Function argument
+
+ `y`
+
+ : 2\. Function argument
+ */
max = x: y: if x > y then x else y;
- /* Integer modulus
+ /**
+ Integer modulus
- Example:
- mod 11 10
- => 1
- mod 1 10
- => 1
+
+ # Inputs
+
+ `base`
+
+ : 1\. Function argument
+
+ `int`
+
+ : 2\. Function argument
+
+
+ # Examples
+ :::{.example}
+ ## `lib.trivial.mod` usage example
+
+ ```nix
+ mod 11 10
+ => 1
+ mod 1 10
+ => 1
+ ```
+
+ :::
*/
mod = base: int: base - (int * (builtins.div base int));
## Comparisons
- /* C-style comparisons
+ /**
+ C-style comparisons
- a < b, compare a b => -1
- a == b, compare a b => 0
- a > b, compare a b => 1
+ a < b, compare a b => -1
+ a == b, compare a b => 0
+ a > b, compare a b => 1
+
+
+ # Inputs
+
+ `a`
+
+ : 1\. Function argument
+
+ `b`
+
+ : 2\. Function argument
*/
compare = a: b:
if a < b
@@ -266,50 +560,100 @@ in {
then 1
else 0;
- /* Split type into two subtypes by predicate `p`, take all elements
- of the first subtype to be less than all the elements of the
- second subtype, compare elements of a single subtype with `yes`
- and `no` respectively.
+ /**
+ Split type into two subtypes by predicate `p`, take all elements
+ of the first subtype to be less than all the elements of the
+ second subtype, compare elements of a single subtype with `yes`
+ and `no` respectively.
- Type: (a -> bool) -> (a -> a -> int) -> (a -> a -> int) -> (a -> a -> int)
- Example:
- let cmp = splitByAndCompare (hasPrefix "foo") compare compare; in
+ # Inputs
- cmp "a" "z" => -1
- cmp "fooa" "fooz" => -1
+ `p`
- cmp "f" "a" => 1
- cmp "fooa" "a" => -1
- # while
- compare "fooa" "a" => 1
+ : Predicate
+
+ `yes`
+
+ : Comparison function if predicate holds for both values
+
+ `no`
+
+ : Comparison function if predicate holds for neither value
+
+ `a`
+
+ : First value to compare
+
+ `b`
+
+ : Second value to compare
+
+ # Type
+
+ ```
+ (a -> bool) -> (a -> a -> int) -> (a -> a -> int) -> (a -> a -> int)
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.trivial.splitByAndCompare` usage example
+
+ ```nix
+ let cmp = splitByAndCompare (hasPrefix "foo") compare compare; in
+
+ cmp "a" "z" => -1
+ cmp "fooa" "fooz" => -1
+
+ cmp "f" "a" => 1
+ cmp "fooa" "a" => -1
+ # while
+ compare "fooa" "a" => 1
+ ```
+
+ :::
*/
splitByAndCompare =
- # Predicate
- p:
- # Comparison function if predicate holds for both values
- yes:
- # Comparison function if predicate holds for neither value
- no:
- # First value to compare
- a:
- # Second value to compare
- b:
+ p: yes: no: a: b:
if p a
then if p b then yes a b else -1
else if p b then 1 else no a b;
- /* Reads a JSON file.
+ /**
+ Reads a JSON file.
- Type: importJSON :: path -> any
+
+ # Inputs
+
+ `path`
+
+ : 1\. Function argument
+
+ # Type
+
+ ```
+ importJSON :: path -> any
+ ```
*/
importJSON = path:
builtins.fromJSON (builtins.readFile path);
- /* Reads a TOML file.
+ /**
+ Reads a TOML file.
- Type: importTOML :: path -> any
+
+ # Inputs
+
+ `path`
+
+ : 1\. Function argument
+
+ # Type
+
+ ```
+ importTOML :: path -> any
+ ```
*/
importTOML = path:
builtins.fromTOML (builtins.readFile path);
@@ -329,7 +673,7 @@ in {
# TODO: figure out a clever way to integrate location information from
# something like __unsafeGetAttrPos.
- /*
+ /**
Print a warning before returning the second argument. This function behaves
like `builtins.trace`, but requires a string message and formats it as a
warning, including the `warning: ` prefix.
@@ -337,28 +681,80 @@ in {
To get a call stack trace and abort evaluation, set the environment variable
`NIX_ABORT_ON_WARN=true` and set the Nix options `--option pure-eval false --show-trace`
- Type: string -> a -> a
+ # Inputs
+
+ `msg`
+
+ : Warning message to print.
+
+ `val`
+
+ : Value to return as-is.
+
+ # Type
+
+ ```
+ string -> a -> a
+ ```
*/
warn =
if lib.elem (builtins.getEnv "NIX_ABORT_ON_WARN") ["1" "true" "yes"]
then msg: builtins.trace "[1;31mwarning: ${msg}[0m" (abort "NIX_ABORT_ON_WARN=true; warnings are treated as unrecoverable errors.")
else msg: builtins.trace "[1;31mwarning: ${msg}[0m";
- /*
+ /**
Like warn, but only warn when the first argument is `true`.
- Type: bool -> string -> a -> a
+
+ # Inputs
+
+ `cond`
+
+ : 1\. Function argument
+
+ `msg`
+
+ : 2\. Function argument
+
+ `val`
+
+ : Value to return as-is.
+
+ # Type
+
+ ```
+ bool -> string -> a -> a
+ ```
*/
warnIf = cond: msg: if cond then warn msg else x: x;
- /*
+ /**
Like warnIf, but negated (warn if the first argument is `false`).
- Type: bool -> string -> a -> a
+
+ # Inputs
+
+ `cond`
+
+ : 1\. Function argument
+
+ `msg`
+
+ : 2\. Function argument
+
+ `val`
+
+ : Value to return as-is.
+
+ # Type
+
+ ```
+ bool -> string -> a -> a
+ ```
*/
warnIfNot = cond: msg: if cond then x: x else warn msg;
- /*
+ /**
Like the `assert b; e` expression, but with a custom error message and
without the semicolon.
@@ -369,33 +765,95 @@ in {
Calls can be juxtaposed using function application, as `(r: r) a = a`, so
`(r: r) (r: r) a = a`, and so forth.
- Type: bool -> string -> a -> a
- Example:
+ # Inputs
- throwIfNot (lib.isList overlays) "The overlays argument to nixpkgs must be a list."
- lib.foldr (x: throwIfNot (lib.isFunction x) "All overlays passed to nixpkgs must be functions.") (r: r) overlays
- pkgs
+ `cond`
+ : 1\. Function argument
+
+ `msg`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ bool -> string -> a -> a
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.trivial.throwIfNot` usage example
+
+ ```nix
+ throwIfNot (lib.isList overlays) "The overlays argument to nixpkgs must be a list."
+ lib.foldr (x: throwIfNot (lib.isFunction x) "All overlays passed to nixpkgs must be functions.") (r: r) overlays
+ pkgs
+ ```
+
+ :::
*/
throwIfNot = cond: msg: if cond then x: x else throw msg;
- /*
+ /**
Like throwIfNot, but negated (throw if the first argument is `true`).
- Type: bool -> string -> a -> a
+
+ # Inputs
+
+ `cond`
+
+ : 1\. Function argument
+
+ `msg`
+
+ : 2\. Function argument
+
+ # Type
+
+ ```
+ bool -> string -> a -> a
+ ```
*/
throwIf = cond: msg: if cond then throw msg else x: x;
- /* Check if the elements in a list are valid values from a enum, returning the identity function, or throwing an error message otherwise.
+ /**
+ Check if the elements in a list are valid values from a enum, returning the identity function, or throwing an error message otherwise.
- Example:
- let colorVariants = ["bright" "dark" "black"]
- in checkListOfEnum "color variants" [ "standard" "light" "dark" ] colorVariants;
- =>
- error: color variants: bright, black unexpected; valid ones: standard, light, dark
- Type: String -> List ComparableVal -> List ComparableVal -> a -> a
+ # Inputs
+
+ `msg`
+
+ : 1\. Function argument
+
+ `valid`
+
+ : 2\. Function argument
+
+ `given`
+
+ : 3\. Function argument
+
+ # Type
+
+ ```
+ String -> List ComparableVal -> List ComparableVal -> a -> a
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.trivial.checkListOfEnum` usage example
+
+ ```nix
+ let colorVariants = ["bright" "dark" "black"]
+ in checkListOfEnum "color variants" [ "standard" "light" "dark" ] colorVariants;
+ =>
+ error: color variants: bright, black unexpected; valid ones: standard, light, dark
+ ```
+
+ :::
*/
checkListOfEnum = msg: valid: given:
let
@@ -410,15 +868,27 @@ in {
## Function annotations
- /* Add metadata about expected function arguments to a function.
- The metadata should match the format given by
- builtins.functionArgs, i.e. a set from expected argument to a bool
- representing whether that argument has a default or not.
- setFunctionArgs : (a → b) → Map String Bool → (a → b)
+ /**
+ Add metadata about expected function arguments to a function.
+ The metadata should match the format given by
+ builtins.functionArgs, i.e. a set from expected argument to a bool
+ representing whether that argument has a default or not.
+ setFunctionArgs : (a → b) → Map String Bool → (a → b)
- This function is necessary because you can't dynamically create a
- function of the { a, b ? foo, ... }: format, but some facilities
- like callPackage expect to be able to query expected arguments.
+ This function is necessary because you can't dynamically create a
+ function of the { a, b ? foo, ... }: format, but some facilities
+ like callPackage expect to be able to query expected arguments.
+
+
+ # Inputs
+
+ `f`
+
+ : 1\. Function argument
+
+ `args`
+
+ : 2\. Function argument
*/
setFunctionArgs = f: args:
{ # TODO: Should we add call-time "type" checking like built in?
@@ -426,84 +896,133 @@ in {
__functionArgs = args;
};
- /* Extract the expected function arguments from a function.
- This works both with nix-native { a, b ? foo, ... }: style
- functions and functions with args set with 'setFunctionArgs'. It
- has the same return type and semantics as builtins.functionArgs.
- setFunctionArgs : (a → b) → Map String Bool.
+ /**
+ Extract the expected function arguments from a function.
+ This works both with nix-native { a, b ? foo, ... }: style
+ functions and functions with args set with 'setFunctionArgs'. It
+ has the same return type and semantics as builtins.functionArgs.
+ setFunctionArgs : (a → b) → Map String Bool.
+
+
+ # Inputs
+
+ `f`
+
+ : 1\. Function argument
*/
functionArgs = f:
if f ? __functor
then f.__functionArgs or (functionArgs (f.__functor f))
else builtins.functionArgs f;
- /* Check whether something is a function or something
- annotated with function args.
+ /**
+ Check whether something is a function or something
+ annotated with function args.
+
+
+ # Inputs
+
+ `f`
+
+ : 1\. Function argument
*/
isFunction = f: builtins.isFunction f ||
(f ? __functor && isFunction (f.__functor f));
- /*
+ /**
`mirrorFunctionArgs f g` creates a new function `g'` with the same behavior as `g` (`g' x == g x`)
but its function arguments mirroring `f` (`lib.functionArgs g' == lib.functionArgs f`).
- Type:
- mirrorFunctionArgs :: (a -> b) -> (a -> c) -> (a -> c)
- Example:
- addab = {a, b}: a + b
- addab { a = 2; b = 4; }
- => 6
- lib.functionArgs addab
- => { a = false; b = false; }
- addab1 = attrs: addab attrs + 1
- addab1 { a = 2; b = 4; }
- => 7
- lib.functionArgs addab1
- => { }
- addab1' = lib.mirrorFunctionArgs addab addab1
- addab1' { a = 2; b = 4; }
- => 7
- lib.functionArgs addab1'
- => { a = false; b = false; }
+ # Inputs
+
+ `f`
+
+ : Function to provide the argument metadata
+
+ `g`
+
+ : Function to set the argument metadata to
+
+ # Type
+
+ ```
+ mirrorFunctionArgs :: (a -> b) -> (a -> c) -> (a -> c)
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.trivial.mirrorFunctionArgs` usage example
+
+ ```nix
+ addab = {a, b}: a + b
+ addab { a = 2; b = 4; }
+ => 6
+ lib.functionArgs addab
+ => { a = false; b = false; }
+ addab1 = attrs: addab attrs + 1
+ addab1 { a = 2; b = 4; }
+ => 7
+ lib.functionArgs addab1
+ => { }
+ addab1' = lib.mirrorFunctionArgs addab addab1
+ addab1' { a = 2; b = 4; }
+ => 7
+ lib.functionArgs addab1'
+ => { a = false; b = false; }
+ ```
+
+ :::
*/
mirrorFunctionArgs =
- # Function to provide the argument metadata
f:
let
fArgs = functionArgs f;
in
- # Function to set the argument metadata to
g:
setFunctionArgs g fArgs;
- /*
+ /**
Turns any non-callable values into constant functions.
Returns callable values as is.
- Example:
- nix-repl> lib.toFunction 1 2
- 1
+ # Inputs
- nix-repl> lib.toFunction (x: x + 1) 2
- 3
+ `v`
+
+ : Any value
+
+
+ # Examples
+ :::{.example}
+ ## `lib.trivial.toFunction` usage example
+
+ ```nix
+ nix-repl> lib.toFunction 1 2
+ 1
+
+ nix-repl> lib.toFunction (x: x + 1) 2
+ 3
+ ```
+
+ :::
*/
toFunction =
- # Any value
v:
if isFunction v
then v
else k: v;
- /* Convert the given positive integer to a string of its hexadecimal
- representation. For example:
+ /**
+ Convert the given positive integer to a string of its hexadecimal
+ representation. For example:
- toHexString 0 => "0"
+ toHexString 0 => "0"
- toHexString 16 => "10"
+ toHexString 16 => "10"
- toHexString 250 => "FA"
+ toHexString 250 => "FA"
*/
toHexString = let
hexDigits = {
@@ -520,14 +1039,26 @@ in {
else hexDigits.${toString d};
in i: lib.concatMapStrings toHexDigit (toBaseDigits 16 i);
- /* `toBaseDigits base i` converts the positive integer i to a list of its
- digits in the given base. For example:
+ /**
+ `toBaseDigits base i` converts the positive integer i to a list of its
+ digits in the given base. For example:
- toBaseDigits 10 123 => [ 1 2 3 ]
+ toBaseDigits 10 123 => [ 1 2 3 ]
- toBaseDigits 2 6 => [ 1 1 0 ]
+ toBaseDigits 2 6 => [ 1 1 0 ]
- toBaseDigits 16 250 => [ 15 10 ]
+ toBaseDigits 16 250 => [ 15 10 ]
+
+
+ # Inputs
+
+ `base`
+
+ : 1\. Function argument
+
+ `i`
+
+ : 2\. Function argument
*/
toBaseDigits = base: i:
let
diff --git a/third_party/nixpkgs/lib/types.nix b/third_party/nixpkgs/lib/types.nix
index 12bf18633e..518b987dcd 100644
--- a/third_party/nixpkgs/lib/types.nix
+++ b/third_party/nixpkgs/lib/types.nix
@@ -15,6 +15,7 @@ let
isList
isString
isStorePath
+ throwIf
toDerivation
toList
;
@@ -65,6 +66,11 @@ let
fixupOptionType
mergeOptionDecls
;
+
+ inAttrPosSuffix = v: name:
+ let pos = builtins.unsafeGetAttrPos name v; in
+ if pos == null then "" else " at ${pos.file}:${toString pos.line}:${toString pos.column}";
+
outer_types =
rec {
__attrsFailEvaluation = true;
@@ -152,7 +158,7 @@ rec {
# If it doesn't, this should be {}
# This may be used when a value is required for `mkIf false`. This allows the extra laziness in e.g. `lazyAttrsOf`.
emptyValue ? {}
- , # Return a flat list of sub-options. Used to generate
+ , # Return a flat attrset of sub-options. Used to generate
# documentation.
getSubOptions ? prefix: {}
, # List of modules if any, or null if none.
@@ -328,15 +334,24 @@ rec {
"signedInt${toString bit}" "${toString bit} bit signed integer";
in {
- /* An int with a fixed range.
- *
- * Example:
- * (ints.between 0 100).check (-1)
- * => false
- * (ints.between 0 100).check (101)
- * => false
- * (ints.between 0 0).check 0
- * => true
+ # TODO: Deduplicate with docs in nixos/doc/manual/development/option-types.section.md
+ /**
+ An int with a fixed range.
+
+ # Example
+ :::{.example}
+ ## `lib.types.ints.between` usage example
+
+ ```nix
+ (ints.between 0 100).check (-1)
+ => false
+ (ints.between 0 100).check (101)
+ => false
+ (ints.between 0 0).check 0
+ => true
+ ```
+
+ :::
*/
inherit between;
@@ -614,6 +629,100 @@ rec {
nestedTypes.elemType = elemType;
};
+ attrTag = tags:
+ let tags_ = tags; in
+ let
+ tags =
+ mapAttrs
+ (n: opt:
+ builtins.addErrorContext "while checking that attrTag tag ${lib.strings.escapeNixIdentifier n} is an option with a type${inAttrPosSuffix tags_ n}" (
+ throwIf (opt._type or null != "option")
+ "In attrTag, each tag value must be an option, but tag ${lib.strings.escapeNixIdentifier n} ${
+ if opt?_type then
+ if opt._type == "option-type"
+ then "was a bare type, not wrapped in mkOption."
+ else "was of type ${lib.strings.escapeNixString opt._type}."
+ else "was not."}"
+ opt // {
+ declarations = opt.declarations or (
+ let pos = builtins.unsafeGetAttrPos n tags_;
+ in if pos == null then [] else [ pos.file ]
+ );
+ declarationPositions = opt.declarationPositions or (
+ let pos = builtins.unsafeGetAttrPos n tags_;
+ in if pos == null then [] else [ pos ]
+ );
+ }
+ ))
+ tags_;
+ choicesStr = concatMapStringsSep ", " lib.strings.escapeNixIdentifier (attrNames tags);
+ in
+ mkOptionType {
+ name = "attrTag";
+ description = "attribute-tagged union";
+ descriptionClass = "noun";
+ getSubOptions = prefix:
+ mapAttrs
+ (tagName: tagOption: {
+ "${lib.showOption prefix}" =
+ tagOption // {
+ loc = prefix ++ [ tagName ];
+ };
+ })
+ tags;
+ check = v: isAttrs v && length (attrNames v) == 1 && tags?${head (attrNames v)};
+ merge = loc: defs:
+ let
+ choice = head (attrNames (head defs).value);
+ checkedValueDefs = map
+ (def:
+ assert (length (attrNames def.value)) == 1;
+ if (head (attrNames def.value)) != choice
+ then throw "The option `${showOption loc}` is defined both as `${choice}` and `${head (attrNames def.value)}`, in ${showFiles (getFiles defs)}."
+ else { inherit (def) file; value = def.value.${choice}; })
+ defs;
+ in
+ if tags?${choice}
+ then
+ { ${choice} =
+ (lib.modules.evalOptionValue
+ (loc ++ [choice])
+ tags.${choice}
+ checkedValueDefs
+ ).value;
+ }
+ else throw "The option `${showOption loc}` is defined as ${lib.strings.escapeNixIdentifier choice}, but ${lib.strings.escapeNixIdentifier choice} is not among the valid choices (${choicesStr}). Value ${choice} was defined in ${showFiles (getFiles defs)}.";
+ nestedTypes = tags;
+ functor = defaultFunctor "attrTag" // {
+ type = { tags, ... }: types.attrTag tags;
+ payload = { inherit tags; };
+ binOp =
+ let
+ # Add metadata in the format that submodules work with
+ wrapOptionDecl =
+ option: { options = option; _file = ""; pos = null; };
+ in
+ a: b: {
+ tags = a.tags // b.tags //
+ mapAttrs
+ (tagName: bOpt:
+ lib.mergeOptionDecls
+ # FIXME: loc is not accurate; should include prefix
+ # Fortunately, it's only used for error messages, where a "relative" location is kinda ok.
+ # It is also returned though, but use of the attribute seems rare?
+ [tagName]
+ [ (wrapOptionDecl a.tags.${tagName}) (wrapOptionDecl bOpt) ]
+ // {
+ # mergeOptionDecls is not idempotent in these attrs:
+ declarations = a.tags.${tagName}.declarations ++ bOpt.declarations;
+ declarationPositions = a.tags.${tagName}.declarationPositions ++ bOpt.declarationPositions;
+ }
+ )
+ (builtins.intersectAttrs a.tags b.tags);
+ };
+ };
+ };
+
uniq = unique { message = ""; };
unique = { message }: type: mkOptionType rec {
diff --git a/third_party/nixpkgs/maintainers/README.md b/third_party/nixpkgs/maintainers/README.md
index f121ec7564..848cb9fed9 100644
--- a/third_party/nixpkgs/maintainers/README.md
+++ b/third_party/nixpkgs/maintainers/README.md
@@ -87,8 +87,8 @@ checks should be performed:
keys = [{
fingerprint = "0000 0000 2A70 6423 0AED 3C11 F04F 7A19 AAA6 3AFE";
}];
- }
- };
+ };
+ }
```
First receive their key from a keyserver:
@@ -133,8 +133,8 @@ checks should be performed:
name = "Example User";
github = "ghost";
githubId = 10137;
- }
- };
+ };
+ }
```
First, make sure that the listed GitHub handle matches the author of
diff --git a/third_party/nixpkgs/maintainers/maintainer-list.nix b/third_party/nixpkgs/maintainers/maintainer-list.nix
index c01c67033a..018666e7f0 100644
--- a/third_party/nixpkgs/maintainers/maintainer-list.nix
+++ b/third_party/nixpkgs/maintainers/maintainer-list.nix
@@ -58,6 +58,10 @@
nix-build lib/tests/maintainers.nix
See `./scripts/check-maintainer-github-handles.sh` for an example on how to work with this data.
+
+ When adding a new maintainer, be aware of the current commit conventions
+ documented at [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#commit-conventions)
+ file located in the root of the Nixpkgs repo.
*/
{
_0b11stan = {
@@ -203,6 +207,12 @@
fingerprint = "D292 365E 3C46 A5AA 75EE B30B 78DB 7EDE 3540 794B";
}];
};
+ _48cf = {
+ name = "czapek";
+ email = "czapek1337@gmail.com";
+ github = "48cf";
+ githubId = 32851089;
+ };
_6543 = {
email = "6543@obermui.de";
github = "6543";
@@ -218,6 +228,12 @@
githubId = 12578560;
name = "Quinn Bohner";
};
+ _8aed = {
+ email = "8aed@riseup.net";
+ github = "8aed";
+ githubId = 140662578;
+ name = "Huit Aed";
+ };
_8-bit-fox = {
email = "sebastian@markwaerter.de";
github = "8-bit-fox";
@@ -256,6 +272,12 @@
githubId = 381298;
name = "9R";
};
+ A1ca7raz = {
+ email = "aya@wtm.moe";
+ github = "A1ca7raz";
+ githubId = 7345998;
+ name = "A1ca7raz";
+ };
a1russell = {
email = "adamlr6+pub@gmail.com";
github = "a1russell";
@@ -649,6 +671,12 @@
fingerprint = "B0D7 2955 235F 6AB5 ACFA 1619 8C7F F5BB 1ADE F191";
}];
};
+ aimpizza = {
+ email = "rickomo.us@gmail.com";
+ name = "Rick Omonsky";
+ github = "AimPizza";
+ githubId = 64905268;
+ };
aiotter = {
email = "git@aiotter.com";
github = "aiotter";
@@ -681,7 +709,7 @@
};
ajs124 = {
email = "nix@ajs124.de";
- matrix = "@andreas.schraegle:helsinki-systems.de";
+ matrix = "@ajs124:ajs124.de";
github = "ajs124";
githubId = 1229027;
name = "Andreas Schrägle";
@@ -761,12 +789,23 @@
githubId = 786394;
name = "Alexander Krupenkin ";
};
+ akshayka = {
+ github = "akshayka";
+ githubId = 1994308;
+ name = "Akshay Agrawal";
+ };
akshgpt7 = {
email = "akshgpt7@gmail.com";
github = "akshgpt7";
githubId = 20405311;
name = "Aksh Gupta";
};
+ aktaboot = {
+ email = "akhtaboo@protonmail.com";
+ github = "aktaboot";
+ githubId = 120214979;
+ name = "aktaboot";
+ };
al3xtjames = {
email = "nix@alextjam.es";
github = "al3xtjames";
@@ -1226,12 +1265,6 @@
githubId = 29887;
name = "Andrew Smith";
};
- andsild = {
- email = "andsild@gmail.com";
- github = "andsild";
- githubId = 3808928;
- name = "Anders Sildnes";
- };
andys8 = {
github = "andys8";
githubId = 13085980;
@@ -1325,12 +1358,6 @@
githubId = 81317317;
name = "Anna Aurora";
};
- a-n-n-a-l-e-e = {
- github = "a-n-n-a-l-e-e";
- githubId = 150648636;
- matrix = "@a-n-n-a-l-e-e:matrix.org";
- name = "annalee";
- };
anoa = {
matrix = "@andrewm:amorgan.xyz";
email = "andrew@amorgan.xyz";
@@ -1377,6 +1404,7 @@
github = "anthonyroussel";
githubId = 220084;
name = "Anthony Roussel";
+ matrix = "@anthonyrsl:matrix.org";
keys = [{
fingerprint = "472D 368A F107 F443 F3A5 C712 9DC4 987B 1A55 E75E";
}];
@@ -1420,6 +1448,12 @@
githubId = 4194320;
name = "Anton Schirg";
};
+ aorith = {
+ email = "aomanu+nixpkgs@gmail.com";
+ github = "aorith";
+ githubId = 5411704;
+ name = "Manuel Sanchez Pinar";
+ };
apeschar = {
email = "albert@peschar.net";
github = "apeschar";
@@ -1541,6 +1575,12 @@
githubId = 160646;
name = "Patrick Jackson";
};
+ arduano = {
+ email = "leonid.shchurov@gmail.com";
+ github = "arduano";
+ githubId = 13347712;
+ name = "Leo Shchurov";
+ };
ardumont = {
email = "eniotna.t@gmail.com";
github = "ardumont";
@@ -1747,6 +1787,16 @@
githubId = 11037075;
name = "Ashley Hooper";
};
+ ashuramaruzxc = {
+ email = "ashuramaru@tenjin-dk.com";
+ matrix = "@tenjin:mozilla.org";
+ github = "ashuramaruzxc";
+ githubId = 72100551;
+ name = "Mariia Holovata";
+ keys = [{
+ fingerprint = "409D 201E 9450 8732 A49E D0FC 6BDA F874 0068 08DF";
+ }];
+ };
ashvith-shetty = {
github = "Ashvith10";
githubId = 113123021;
@@ -1779,6 +1829,13 @@
fingerprint = "C919 E69E A7C0 E147 9E0F C26E 1EDA D0C6 70BD 062D";
}];
};
+ assistant = {
+ email = "assistant.moetron@gmail.com";
+ github = "Assistant";
+ githubId = 2748721;
+ matrix = "@assistant:pygmalion.chat";
+ name = "Assistant Moetron";
+ };
astavie = {
email = "astavie@pm.me";
github = "astavie";
@@ -1965,12 +2022,6 @@
githubId = 687218;
name = "averelld";
};
- avery = {
- email = "averyl+nixos@protonmail.com";
- github = "AveryLychee";
- githubId = 9147625;
- name = "Avery Lychee";
- };
avh4 = {
email = "gruen0aermel@gmail.com";
github = "avh4";
@@ -2539,6 +2590,12 @@
githubId = 34919100;
name = "Brendan Hall";
};
+ bhankas = {
+ email = "payas@relekar.org";
+ github = "bhankas";
+ githubId = 24254289;
+ name = "Payas Relekar";
+ };
bhipple = {
email = "bhipple@protonmail.com";
github = "bhipple";
@@ -2581,6 +2638,12 @@
githubId = 30630233;
name = "Timo Triebensky";
};
+ birkb = {
+ email = "birk@batchworks.de";
+ github = "birkb";
+ githubId = 10164833;
+ name = "Birk Bohne";
+ };
bjornfor = {
email = "bjorn.forsman@gmail.com";
github = "bjornfor";
@@ -2599,6 +2662,12 @@
github = "blaggacao";
githubId = 7548295;
};
+ blakesmith = {
+ name = "Blake Smith";
+ email = "blakesmith0@gmail.com";
+ github = "blakesmith";
+ githubId = 44368;
+ };
blankparticle = {
name = "BlankParticle";
email = "blankparticle@gmail.com";
@@ -2663,6 +2732,12 @@
github = "bmwalters";
githubId = 4380777;
};
+ bnlrnz = {
+ github = "bnlrnz";
+ githubId = 11310385;
+ name = "Ben Lorenz";
+ email = "bnlrnz@gmail.com";
+ };
bobakker = {
email = "bobakk3r@gmail.com";
github = "bobakker";
@@ -2700,6 +2775,12 @@
githubId = 150560585;
name = "Dmitry Ivankov";
};
+ bonsairobo = {
+ email = "duncanfairbanks6@gmail.com";
+ github = "bonsairobo";
+ githubId = 3229981;
+ name = "Duncan Fairbanks";
+ };
booklearner = {
name = "booklearner";
email = "booklearner@proton.me";
@@ -2930,6 +3011,12 @@
githubId = 37375448;
name = "Buildit";
};
+ bwc9876 = {
+ email = "bwc9876@gmail.com";
+ github = "Bwc9876";
+ githubId = 25644444;
+ name = "Ben C";
+ };
bwlang = {
email = "brad@langhorst.com";
github = "bwlang";
@@ -2941,6 +3028,12 @@
github = "bycEEE";
githubId = 8891115;
name = "Brian Choy";
+ };
+ ByteSudoer = {
+ email = "bytesudoer@gmail.com";
+ github = "bytesudoer";
+ githubId = 88513682;
+ name = "ByteSudoer";
};
bzizou = {
email = "Bruno@bzizou.net";
@@ -3200,6 +3293,12 @@
matrix = "@cawilliamson:nixos.dev";
name = "Christopher A. Williamson";
};
+ cbarrete = {
+ github = "cbarrete";
+ githubId = 62146989;
+ matrix = "@cedric:cbarrete.com";
+ name = "Cédric Barreteau";
+ };
cbleslie = {
email = "cameronleslie@gmail.com";
github = "cbleslie";
@@ -3422,7 +3521,7 @@
name = "Philipp Dargel";
};
chito = {
- email = "iamchito@protonmail.com";
+ email = "chitochi@proton.me";
github = "chitochi";
githubId = 153365419;
matrix = "@chito:nichijou.dev";
@@ -3446,6 +3545,12 @@
githubId = 1118859;
name = "Scott Worley";
};
+ ChlorideCull = {
+ email = "nixrelated@chcl.se";
+ github = "ChlorideCull";
+ githubId = 4977063;
+ name = "Sebastian Johansson";
+ };
choochootrain = {
email = "hurshal@imap.cc";
github = "choochootrain";
@@ -3651,6 +3756,13 @@
githubId = 46303707;
name = "Christian Lütke-Stetzkamp";
};
+ clot27 = {
+ name = "Clot";
+ email = "adityayadav11082@protonmail.com";
+ github = "clot27";
+ githubId = 69784758;
+ matrix = "@clot27:matrix.org";
+ };
clr-cera = {
email = "clrcera05@gmail.com";
github = "clr-cera";
@@ -4095,6 +4207,17 @@
githubId = 16950437;
name = "cwyc";
};
+ cybershadow = {
+ name = "Vladimir Panteleev";
+ email = "nixpkgs@cy.md";
+ matrix = "@cybershadow:cy.md";
+ github = "CyberShadow";
+ githubId = 160894;
+
+ keys = [{
+ fingerprint = "BBED 1B08 8CED 7F95 8917 FBE8 5004 F0FA D051 576D";
+ }];
+ };
cynerd = {
name = "Karel Kočí";
email = "cynerd@email.cz";
@@ -4247,6 +4370,12 @@
githubId = 49398;
name = "Daniël de Kok";
};
+ daniel-fahey = {
+ name = "Daniel Fahey";
+ email = "daniel.fahey+nixpkgs@pm.me";
+ github = "daniel-fahey";
+ githubId = 7294692;
+ };
danielfullmer = {
email = "danielrf12@gmail.com";
github = "danielfullmer";
@@ -4293,6 +4422,13 @@
fingerprint = "4779 D1D5 3C97 2EAE 34A5 ED3D D8AF C4BF 0567 0F9D";
}];
};
+ dan-theriault = {
+ email = "nix@theriault.codes";
+ github = "Dan-Theriault";
+ githubId = 13945563;
+ matrix = "@dan:matrix.org";
+ name = "Daniel Theriault";
+ };
dariof4 = {
name = "dariof4";
email = "dazedtank@gmail.com";
@@ -4439,6 +4575,12 @@
githubId = 11422515;
name = "David Sánchez";
};
+ dav-wolff = {
+ email = "dav-wolff@outlook.com";
+ github = "dav-wolff";
+ githubId = 130931508;
+ name = "David Wolff";
+ };
dawidd6 = {
email = "dawidd0811@gmail.com";
github = "dawidd6";
@@ -4710,6 +4852,12 @@
githubId = 4956158;
name = "Robin Stumm";
};
+ DerRockWolf = {
+ email = "git@rockwolf.eu";
+ github = "DerRockWolf";
+ githubId = 50499906;
+ name = "DerRockWolf";
+ };
DerTim1 = {
email = "tim.digel@active-group.de";
github = "DerTim1";
@@ -4791,6 +4939,12 @@
github = "dfithian";
githubId = 8409320;
};
+ dflores = {
+ email = "dflores.country455@passinbox.com";
+ name = "David Flores";
+ github = "dflores1";
+ githubId = 8538265;
+ };
dfordivam = {
email = "dfordivam+nixpkgs@gmail.com";
github = "dfordivam";
@@ -4803,6 +4957,12 @@
githubId = 4708206;
name = "Daniel Fox Franke";
};
+ dghubble = {
+ email = "dghubble@gmail.com";
+ github = "dghubble";
+ githubId = 2253428;
+ name = "Dalton Hubble";
+ };
dgliwka = {
email = "dawid.gliwka@gmail.com";
github = "dgliwka";
@@ -4882,6 +5042,12 @@
github = "DimitarNestorov";
githubId = 8790386;
};
+ diniamo = {
+ name = "diniamo";
+ email = "diniamo53@gmail.com";
+ github = "diniamo";
+ githubId = 55629891;
+ };
diogotcorreia = {
name = "Diogo Correia";
email = "me@diogotc.com";
@@ -4987,6 +5153,12 @@
githubId = 283316;
name = "Dane Lipscombe";
};
+ dmadisetti = {
+ email = "nix@madisetti.me";
+ github = "dmadisetti";
+ githubId = 2689338;
+ name = "Dylan Madisetti";
+ };
dmalikov = {
email = "malikov.d.y@gmail.com";
github = "dmalikov";
@@ -5164,6 +5336,12 @@
fingerprint = "D245 D484 F357 8CB1 7FD6 DA6B 67DB 29BF F3C9 6757";
}];
};
+ dragonginger = {
+ email = "dragonginger10@gmail.com";
+ github = "dragonginger10";
+ githubId = 20759788;
+ name = "JP Lippold";
+ };
dramaturg = {
email = "seb@ds.ag";
github = "dramaturg";
@@ -5258,6 +5436,12 @@
fingerprint = "389A 78CB CD88 5E0C 4701 DEB9 FD42 C7D0 D414 94C8";
}];
};
+ dudymas = {
+ email = "jeremy.white@cloudposse.com";
+ github = "dudymas";
+ githubId = 928448;
+ name = "Jeremy White";
+ };
dukc = {
email = "ajieskola@gmail.com";
github = "dukc";
@@ -5301,6 +5485,12 @@
githubId = 6689924;
name = "David Terry";
};
+ dylan-gonzalez = {
+ email = "dylcg10@gmail.com";
+ github = "dylan-gonzalez";
+ githubId = 45161987;
+ name = "Dylan Gonzalez";
+ };
dylanmtaylor = {
email = "dylan@dylanmtaylor.com";
github = "dylanmtaylor";
@@ -5388,6 +5578,7 @@
name = "Florentin Eckl";
};
eclairevoyant = {
+ email = "contactmeongithubinstead@proton.me";
github = "eclairevoyant";
githubId = 848000;
name = "éclairevoyant";
@@ -5594,6 +5785,12 @@
githubId = 5737945;
name = "Elia Argentieri";
};
+ elisesouche = {
+ email = "elise@souche.one";
+ github = "elisesouche";
+ githubId = 161958668;
+ name = "Élise Souche";
+ };
elitak = {
email = "elitak@gmail.com";
github = "elitak";
@@ -5648,6 +5845,18 @@
githubId = 2536303;
name = "Enno Lohmeier";
};
+ elpdt852 = {
+ email = "nix@pdtpartners.com";
+ github = "elpdt852";
+ githubId = 122112154;
+ name = "Edgar Lee";
+ };
+ elrohirgt = {
+ email = "elrohirgt@gmail.com";
+ github = "ElrohirGT";
+ githubId = 45268815;
+ name = "Flavio Galán";
+ };
elvishjerricco = {
email = "elvishjerricco@gmail.com";
matrix = "@elvishjerricco:matrix.org";
@@ -5765,6 +5974,22 @@
githubId = 418227;
name = "Jean-Philippe Braun";
};
+ eopb = {
+ email = "ethanboxx@gmail.com";
+ github = "eopb";
+ githubId = 8074468;
+ matrix = "@efun:matrix.org";
+ name = "Ethan Brierley";
+ };
+ eownerdead = {
+ name = "EOWNERDEAD";
+ email = "eownerdead@disroot.org";
+ github = "eownerdead";
+ githubId = 141208772;
+ keys = [{
+ fingerprint = "4715 17D6 2495 A273 4DDB 5661 009E 5630 5CA5 4D63";
+ }];
+ };
eperuffo = {
email = "info@emanueleperuffo.com";
github = "emanueleperuffo";
@@ -6041,6 +6266,15 @@
githubId = 159288204;
name = "evey";
};
+ evilbulgarian = {
+ email = "vladi@aresgate.net";
+ github = "evilbulgarian";
+ githubId = 1960413;
+ name = "Vladi Gergov";
+ keys = [{
+ fingerprint = "50D5 67C5 D693 15A2 76F5 5634 3758 5F3C A9EC BFA4";
+ }];
+ };
evilmav = {
email = "elenskiy.ilya@gmail.com";
github = "evilmav";
@@ -6121,7 +6355,7 @@
};
eymeric = {
name = "Eymeric Dechelette";
- email = "hatchchcien@protonmail.com";
+ email = "hatchchien@protonmail.com";
github = "hatch01";
githubId = 42416805;
};
@@ -6168,6 +6402,12 @@
githubId = 303897;
name = "Fabián Heredia Montiel";
};
+ fabianrig = {
+ email = "fabianrig@posteo.de";
+ github = "fabianrig";
+ githubId = 88741530;
+ name = "Fabian Rigoll";
+ };
fadenb = {
email = "tristan.helmich+nixos@gmail.com";
github = "fadenb";
@@ -6222,6 +6462,12 @@
githubId = 4246921;
name = "Florian Beeres";
};
+ fccapria = {
+ email = "francesco@capria.eu";
+ github = "fccapria";
+ githubId = 62179193;
+ name = "Francesco Carmelo Capria";
+ };
fd = {
email = "simon.menke@gmail.com";
github = "fd";
@@ -6236,12 +6482,12 @@
};
federicoschonborn = {
name = "Federico Damián Schonborn";
- email = "fdschonborn@gmail.com";
+ email = "federicoschonborn@disroot.org";
github = "FedericoSchonborn";
githubId = 62166915;
matrix = "@FedericoDSchonborn:matrix.org";
keys = [
- { fingerprint = "517A 8A6A 09CA A11C 9667 CEE3 193F 70F1 5C9A B0A0"; }
+ { fingerprint = "C43F 4052 D289 3B73 33F8 0259 E4F6 F544 DE9E 29E8"; }
];
};
fedx-sudo = {
@@ -6313,6 +6559,12 @@
githubId = 5198058;
name = "Udo Sauer";
};
+ ferrine = {
+ email = "justferres@yandex.ru";
+ github = "ferrine";
+ githubId = 11705326;
+ name = "Max Kochurov";
+ };
ffinkdevs = {
email = "fink@h0st.space";
github = "ffinkdevs";
@@ -6404,12 +6656,6 @@
githubId = 1952914;
name = "Maxence Maireaux";
};
- flexagoon = {
- email = "flexagoon@pm.me";
- github = "flexagoon";
- githubId = 66178592;
- name = "Pavel Zolotarevskiy";
- };
flexiondotorg = {
name = "Martin Wimpress";
email = "martin@wimpress.org";
@@ -6557,6 +6803,11 @@
githubId = 726447;
name = "Francisco Demartino";
};
+ frankp = {
+ github = "MDM23";
+ githubId = 10290864;
+ name = "Peter Frank";
+ };
franzmondlichtmann = {
name = "Franz Schroepf";
email = "franz-schroepf@t-online.de";
@@ -6622,6 +6873,11 @@
githubId = 46672819;
name = "Frido Friedemann";
};
+ friedrichaltheide = {
+ github = "friedrichaltheide";
+ githubId = 11352905;
+ name = "Friedrich Altheide";
+ };
frlan = {
email = "frank@frank.uvena.de";
github = "frlan";
@@ -6707,6 +6963,15 @@
githubId = 21362942;
name = "Fugi";
};
+ funkeleinhorn = {
+ email = "git@funkeleinhorn.com";
+ github = "funkeleinhorn";
+ githubId = 103313934;
+ name = "Funkeleinhorn";
+ keys = [{
+ fingerprint = "689D 1C81 DA0D 1EB2 F029 D24E C7BE A25A 0A33 5A72";
+ }];
+ };
fusion809 = {
email = "brentonhorne77@gmail.com";
github = "fusion809";
@@ -6791,6 +7056,15 @@
githubId = 1313787;
name = "Gabriella Gonzalez";
};
+ gabyx = {
+ email = "gnuetzi@gmail.com";
+ github = "gabyx";
+ githubId = 647437;
+ name = "Gabriel Nützi";
+ keys = [{
+ fingerprint = "90AE CCB9 7AD3 4CE4 3AED 9402 E969 172A B075 7EB8";
+ }];
+ };
gador = {
email = "florian.brandes@posteo.de";
github = "gador";
@@ -7028,12 +7302,24 @@
github = "getpsyched";
githubId = 43472218;
};
+ getreu = {
+ email = "getreu@web.de";
+ github = "getreu";
+ githubId = 579082;
+ name = "Jens Getreu";
+ };
gfrascadorio = {
email = "gfrascadorio@tutanota.com";
github = "gfrascadorio";
githubId = 37602871;
name = "Galois";
};
+ ggg = {
+ email = "gggkiller2@gmail.com";
+ github = "GGG-KILLER";
+ githubId = 5892127;
+ name = "GGG";
+ };
ggpeti = {
email = "ggpeti@gmail.com";
matrix = "@ggpeti:ggpeti.com";
@@ -7047,6 +7333,15 @@
github = "ghostbuster91";
githubId = 5662622;
};
+ ghthor = {
+ email = "ghthor@gmail.com";
+ github = "ghthor";
+ githubId = 160298;
+ name = "Will Owens";
+ keys = [{
+ fingerprint = "8E98 BB01 BFF8 AEA4 E303 FC4C 8074 09C9 2CE2 3033";
+ }];
+ };
ghuntley = {
email = "ghuntley@ghuntley.com";
github = "ghuntley";
@@ -7092,6 +7387,12 @@
githubId = 5549373;
name = "Jochen Kiemes";
};
+ giodamelio = {
+ name = "Giovanni d'Amelio";
+ email = "gio@damelio.net";
+ github = "giodamelio";
+ githubId = 441646;
+ };
giogadi = {
email = "lgtorres42@gmail.com";
github = "giogadi";
@@ -7350,6 +7651,13 @@
githubId = 201997;
name = "Eric Seidel";
};
+ grimmauld = {
+ name = "Sören Bender";
+ email = "soeren@benjos.de";
+ github = "LordGrimmauld";
+ githubId = 49513131;
+ matrix = "@grimmauld:grimmauld.de";
+ };
grindhold = {
name = "grindhold";
email = "grindhold+nix@skarphed.org";
@@ -7392,6 +7700,12 @@
githubId = 21156405;
name = "GuangTao Zhang";
};
+ Guanran928 = {
+ email = "guanran928@outlook.com";
+ github = "Guanran928";
+ githubId = 68757440;
+ name = "Guanran928";
+ };
guekka = {
github = "Guekka";
githubId = 39066502;
@@ -7438,6 +7752,13 @@
githubId = 443978;
name = "Gabriel Volpe";
};
+ gwg313 = {
+ email = "gwg313@pm.me";
+ matrix = "@gwg313:matrix.org";
+ github = "gwg313";
+ githubId = 70684146;
+ name = "Glen Goodwin";
+ };
gytis-ivaskevicius = {
name = "Gytis Ivaskevicius";
email = "me@gytis.io";
@@ -7491,6 +7812,12 @@
githubId = 22756350;
name = "Emile Hansmaennel";
};
+ HannahMR = {
+ name = "Hannah Rosenberg";
+ email = "hannah@velascommerce.com";
+ github = "HannahMR";
+ githubId = 9088467;
+ };
hansjoergschurr = {
email = "commits@schurr.at";
github = "hansjoergschurr";
@@ -7666,6 +7993,12 @@
matrix = "@chris:netsoj.nl";
name = "Chris Josten";
};
+ hennk = {
+ email = "henning.kiel@gmail.com";
+ github = "hennk";
+ githubId = 328259;
+ name = "Henning Kiel";
+ };
henrikolsson = {
email = "henrik@fixme.se";
github = "henrikolsson";
@@ -7924,6 +8257,12 @@
githubId = 1614615;
name = "Hendrik Schaeidt";
};
+ hsjobeki = {
+ email = "hsjobeki@gmail.com";
+ github = "hsjobeki";
+ githubId = 50398876;
+ name = "Johannes Kirschbauer";
+ };
htr = {
email = "hugo@linux.com";
github = "htr";
@@ -8111,6 +8450,12 @@
github = "Icy-Thought";
githubId = 53710398;
};
+ id3v1669 = {
+ name = "id3v1669";
+ email = "id3v1669@gmail.com";
+ github = "id3v1669";
+ githubId = 57532211;
+ };
idlip = {
name = "Dilip";
email = "igoldlip@gmail.com";
@@ -8214,6 +8559,13 @@
github = "ilyakooo0";
githubId = 6209627;
};
+ imadnyc = {
+ email = "me@imad.nyc";
+ github = "imadnyc";
+ githubId = 113966166;
+ name = "Abdullah Imad";
+ matrix = "@dre:imad.nyc";
+ };
imalison = {
email = "IvanMalison@gmail.com";
github = "colonelpanic8";
@@ -8262,6 +8614,12 @@
fingerprint = "F5B2 BE1B 9AAD 98FE 2916 5597 3665 FFF7 9D38 7BAA";
}];
};
+ imrying = {
+ email = "philiprying@gmail.com";
+ github = "imrying";
+ githubId = 36996706;
+ name = "Philip Rying";
+ };
imuli = {
email = "i@imu.li";
github = "imuli";
@@ -8378,6 +8736,12 @@
githubId = 137306;
name = "Michele Catalano";
};
+ isabelroses = {
+ email = "isabel@isabelroses.com";
+ github = "isabelroses";
+ githubId = 71222764;
+ name = "Isabel Roses";
+ };
isaozler = {
email = "isaozler@gmail.com";
github = "isaozler";
@@ -8519,12 +8883,33 @@
github = "j0xaf";
githubId = 932697;
};
+ j1nxie = {
+ email = "rylie@rylie.moe";
+ name = "Nguyen Pham Quoc An";
+ github = "j1nxie";
+ githubId = 52886388;
+ };
j4m3s = {
name = "James Landrein";
email = "github@j4m3s.eu";
github = "j4m3s-s";
githubId = 9413812;
};
+ ja1den = {
+ name = "Jaiden Douglas";
+ email = "contact@ja1den.me";
+ github = "ja1den";
+ githubId = 49811314;
+ keys = [{
+ fingerprint = "CC36 4CF4 32DD 443F 27FC 033C 3475 AA20 D72F 6A93";
+ }];
+ };
+ jab = {
+ name = "Joshua Bronson";
+ email = "jabronson@gmail.com";
+ github = "jab";
+ githubId = 64992;
+ };
jacbart = {
name = "Jack Bartlett";
email = "jacbart@gmail.com";
@@ -8561,6 +8946,12 @@
githubId = 2179419;
name = "Arseniy Seroka";
};
+ jakedevs = {
+ email = "work@jakedevs.net";
+ github = "jakedevs";
+ githubId = 153585330;
+ name = "Jacob Levi";
+ };
jakehamilton = {
name = "Jake Hamilton";
email = "jake.hamilton@hey.com";
@@ -8905,6 +9296,12 @@
githubId = 1667473;
name = "Jethro Kuan";
};
+ jetpackjackson = {
+ email = "baileyannew@tutanota.com";
+ github = "JetpackJackson";
+ githubId = 88674707;
+ name = "Bailey Watkins";
+ };
jevy = {
email = "jevin@quickjack.ca";
github = "jevy";
@@ -9118,6 +9515,12 @@
githubId = 8900;
name = "Johan Magnus Jonsson";
};
+ jmarmstrong1207 = {
+ name = "James Armstrong";
+ email = "jm.armstrong1207@gmail.com";
+ github = "jmarmstrong1207";
+ githubId = 32995055;
+ };
jmbaur = {
email = "jaredbaur@fastmail.com";
github = "jmbaur";
@@ -9188,6 +9591,15 @@
githubId = 1102396;
name = "Jussi Maki";
};
+ joaquintrinanes = {
+ email = "hi@joaquint.io";
+ github = "JoaquinTrinanes";
+ name = "Joaquín Triñanes";
+ githubId = 1385934;
+ keys = [{
+ fingerprint = "3A13 5C15 E1D5 850D 2F90 AB25 6E14 46DD 451C 6BAF";
+ }];
+ };
jobojeha = {
email = "jobojeha@jeppener.de";
github = "jobojeha";
@@ -9308,6 +9720,12 @@
githubId = 51028009;
name = "John Rodewald";
};
+ johnrtitor = {
+ email = "masumrezarock100@gmail.com";
+ github = "johnrtitor";
+ githubId = 50095635;
+ name = "Masum Reza";
+ };
john-shaffer = {
email = "jdsha@proton.me";
github = "john-shaffer";
@@ -9362,6 +9780,13 @@
githubId = 392720;
name = "Jon Banafato";
};
+ jonas-w = {
+ email = "nixpkgs@03j.de";
+ github = "jonas-w";
+ githubId = 32615971;
+ name = "Jonas Wunderlich";
+ matrix = "@matrix:03j.de";
+ };
jonathanmarler = {
email = "johnnymarler@gmail.com";
github = "marler8997";
@@ -9374,6 +9799,12 @@
githubId = 1843676;
name = "Jonathan Reeve";
};
+ jonboh = {
+ email = "jon.bosque.hernando@gmail.com";
+ github = "jonboh";
+ githubId = 31407988;
+ name = "Jon Bosque";
+ };
jonnybolton = {
email = "jonnybolton@gmail.com";
github = "jonnynightingale";
@@ -9800,6 +10231,11 @@
githubId = 6544084;
name = "Kai Harries";
};
+ kai-tub = {
+ name = "Kai Norman Clasen";
+ github = "kai-tub";
+ githubId = 46302524;
+ };
kalbasit = {
email = "wael.nasreddine@gmail.com";
matrix = "@kalbasit:matrix.org";
@@ -9835,6 +10271,15 @@
githubId = 1621930;
name = "Kamil Chmielewski";
};
+ kamillaova = {
+ name = "Kamilla Ova";
+ email = "me@kamillaova.dev";
+ github = "Kamillaova";
+ githubId = 54859825;
+ keys = [{
+ fingerprint = "B2D0 AA53 8DBE 60B0 0811 3FC0 2D52 5F67 791E 5834";
+ }];
+ };
kampfschlaefer = {
email = "arnold@arnoldarts.de";
github = "kampfschlaefer";
@@ -9871,6 +10316,11 @@
githubId = 15855440;
name = "Keanu Ashwell";
};
+ katanallama = {
+ github = "katanallama";
+ githubId = 70604257;
+ name = "katanallama";
+ };
katexochen = {
github = "katexochen";
githubId = 49727155;
@@ -9934,14 +10384,6 @@
githubId = 15373888;
name = "Claudius Holeksa";
};
- ken-matsui = {
- github = "ken-matsui";
- githubId = 26405363;
- name = "Ken Matsui";
- keys = [{
- fingerprint = "3611 8CD3 6DE8 3334 B44A DDE4 1033 60B3 298E E433";
- }];
- };
kennyballou = {
email = "kb@devnulllabs.io";
github = "kennyballou";
@@ -10093,6 +10535,12 @@
githubId = 845652;
name = "Kier Davis";
};
+ kiike = {
+ email = "me@enric.me";
+ github = "kiike";
+ githubId = 464625;
+ name = "Enric Morales";
+ };
kilianar = {
email = "mail@kilianar.de";
github = "kilianar";
@@ -10147,6 +10595,12 @@
githubId = 691290;
name = "Keshav Kini";
};
+ kintrix = {
+ email = "kintrix007@proton.me";
+ github = "kintrix007";
+ githubId = 60898798;
+ name = "kintrix";
+ };
kinzoku = {
email = "kinzokudev4869@gmail.com";
github = "kinzoku-dev";
@@ -10503,6 +10957,15 @@
githubId = 70764075;
name = "kud";
};
+ kugland = {
+ email = "kugland@gmail.com";
+ github = "kugland";
+ githubId = 1173932;
+ name = "André Kugland";
+ keys = [{
+ fingerprint = "6A62 5E60 E3FF FCAE B3AA 50DC 1DA9 3817 80CD D833";
+ }];
+ };
kupac = {
github = "Kupac";
githubId = 8224569;
@@ -10526,6 +10989,12 @@
githubId = 449813;
name = "Roman Kuznetsov";
};
+ kuznetsss = {
+ email = "kuzzz99@gmail.com";
+ github = "kuznetsss";
+ githubId = 15742918;
+ name = "Sergey Kuznetsov";
+ };
kwohlfahrt = {
email = "kai.wohlfahrt@gmail.com";
github = "kwohlfahrt";
@@ -10586,6 +11055,12 @@
}];
name = "Yaroslav Bolyukin";
};
+ lachrymal = {
+ email = "lachrymalfutura@gmail.com";
+ name = "lachrymaL";
+ github = "lachrymaLF";
+ githubId = 13716477;
+ };
lafrenierejm = {
email = "joseph@lafreniere.xyz";
github = "lafrenierejm";
@@ -10624,6 +11099,12 @@
githubId = 695526;
name = "Benjamin Kober";
};
+ lampros = {
+ email = "hauahx@gmail.com";
+ github = "LamprosPitsillos";
+ githubId = 61395246;
+ name = "Lampros Pitsillos";
+ };
larsr = {
email = "Lars.Rasmusson@gmail.com";
github = "larsr";
@@ -10833,6 +11314,15 @@
githubId = 77865363;
name = "Leonid Belyaev";
};
+ leonm1 = {
+ github = "leonm1";
+ githubId = 32306579;
+ keys = [{
+ fingerprint = "C12D F14B DC9D 64E1 44C3 4D8A 755C DA4E 5923 416A";
+ }];
+ matrix = "@mattleon:matrix.org";
+ name = "Matt Leon";
+ };
leshainc = {
email = "leshainc@fomalhaut.me";
github = "LeshaInc";
@@ -10973,6 +11463,12 @@
fingerprint = "92D8 A09D 03DD B774 AABD 53B9 E136 2F07 D750 DB5C";
}];
};
+ lilacious = {
+ email = "yuchenhe126@gmail.com";
+ github = "Lilacious";
+ githubId = 101508537;
+ name = "Yuchen He";
+ };
lillycham = {
email = "lillycat332@gmail.com";
github = "lillycat332";
@@ -11014,6 +11510,13 @@
fingerprint = "80EE AAD8 43F9 3097 24B5 3D7E 27E9 7B91 E63A 7FF8";
}];
};
+ link2xt = {
+ email = "link2xt@testrun.org";
+ githubId = 18373967;
+ github = "link2xt";
+ matrix = "@link2xt:matrix.org";
+ name = "link2xt";
+ };
linquize = {
email = "linquize@yahoo.com.hk";
github = "linquize";
@@ -11291,6 +11794,15 @@
githubId = 3717454;
name = "Lucas Bergman";
};
+ lucas-deangelis = {
+ email = "deangelis.lucas@outlook.com";
+ github = "lucas-deangelis";
+ githubId = 55180995;
+ name = "Lucas De Angelis";
+ keys = [{
+ fingerprint = "3C8B D3AD 93BB 1F36 B8FF 30BD 8627 E5ED F74B 5BF4";
+ }];
+ };
lucasew = {
email = "lucas59356@gmail.com";
github = "lucasew";
@@ -11357,12 +11869,6 @@
githubId = 5767106;
name = "Lukas Schmidt";
};
- luis = {
- email = "luis.nixos@gmail.com";
- github = "Luis-Hebendanz";
- githubId = 22085373;
- name = "Luis Hebendanz";
- };
luisdaranda = {
email = "luisdomingoaranda@gmail.com";
github = "propet";
@@ -11407,6 +11913,12 @@
githubId = 30468956;
name = "Lukas Heiligenbrunner";
};
+ lukaslihotzki = {
+ email = "lukas@lihotzki.de";
+ github = "lukaslihotzki";
+ githubId = 10326063;
+ name = "Lukas Lihotzki";
+ };
lukaswrz = {
email = "lukas@wrz.one";
github = "lukaswrz";
@@ -11700,6 +12212,12 @@
githubId = 1780588;
name = "Malte Poll";
};
+ maltejanz = {
+ email = "service.malte.j@protonmail.com";
+ github = "MalteJanz";
+ githubId = 18661391;
+ name = "Malte Janz";
+ };
malte-v = {
email = "nixpkgs@mal.tc";
github = "malte-v";
@@ -11841,6 +12359,12 @@
githubId = 26470037;
name = "Markus Kowalewski";
};
+ marmolak = {
+ email = "hack.robin@gmail.com";
+ github = "marmolak";
+ githubId = 1709273;
+ name = "Robin Hack";
+ };
marsam = {
github = "marsam";
githubId = 65531;
@@ -12283,6 +12807,12 @@
fingerprint = "D709 03C8 0BE9 ACDC 14F0 3BFB 77BF E531 397E DE94";
}];
};
+ mdorman = {
+ email = "mdorman@jaunder.io";
+ github = "mdorman";
+ githubId = 333344;
+ name = "Michael Alan Dorman";
+ };
mdr = {
email = "MattRussellUK@gmail.com";
github = "mdr";
@@ -12314,6 +12844,12 @@
githubId = 1631737;
name = "Mikhail Medvedev";
};
+ meebey = {
+ email = "meebey@meebey.net";
+ github = "meebey";
+ githubId = 318066;
+ name = "Mirco Bauer";
+ };
megheaiulian = {
email = "iulian.meghea@gmail.com";
github = "megheaiulian";
@@ -12356,6 +12892,15 @@
githubId = 15093162;
name = "Melanie B. Sigl";
};
+ melvyn2 = {
+ email = "melvyn2@dnsense.pub";
+ github = "melvyn2";
+ githubId = 9157412;
+ name = "melvyn";
+ keys = [{
+ fingerprint = "232B 9F00 2153 CA86 849C 9224 25A2 B728 0CE3 AFF6";
+ }];
+ };
mephistophiles = {
email = "mussitantesmortem@gmail.com";
name = "Maxim Zhukov";
@@ -12486,6 +13031,12 @@
github = "MichaelBrunn3r";
githubId = 19626539;
};
+ MichaelCDormann = {
+ email = "michael.c.dormann@gmail.com";
+ name = "Michael Dormann";
+ github = "MichaelCDormann";
+ githubId = 12633081;
+ };
michaelCTS = {
email = "michael.vogel@cts.co";
name = "Michael Vogel";
@@ -12577,6 +13128,12 @@
githubId = 635591;
name = "Shahar Dawn Or";
};
+ mihaimaruseac = {
+ email = "mihaimaruseac@gmail.com";
+ github = "mihaimaruseac";
+ githubId = 323199;
+ name = "Mihai Maruseac";
+ };
mihnea-s = {
email = "mihn.stn@gmail.com";
github = "mihnea-s";
@@ -12840,6 +13397,12 @@
fingerprint = "E90C BA34 55B3 6236 740C 038F 0D94 8CE1 9CF4 9C5F";
}];
};
+ mksafavi = {
+ name = "MK Safavi";
+ email = "mksafavi@gmail.com";
+ github = "mksafavi";
+ githubId = 50653293;
+ };
mktip = {
email = "mo.issa.ok+nix@gmail.com";
github = "mktip";
@@ -12849,6 +13412,12 @@
fingerprint = "64BE BF11 96C3 DD7A 443E 8314 1DC0 82FA DE5B A863";
}];
};
+ mlaradji = {
+ name = "Mohamed Laradji";
+ email = "mlaradji@pm.me";
+ github = "mlaradji";
+ githubId = 33703663;
+ };
mlatus = {
email = "wqseleven@gmail.com";
github = "Ninlives";
@@ -12988,6 +13557,12 @@
githubId = 830082;
name = "Nathan Moos";
};
+ moraxyc = {
+ name = "Moraxyc Xu";
+ email = "nix@qaq.li";
+ github = "Moraxyc";
+ githubId = 69713071;
+ };
moredread = {
email = "code@apb.name";
github = "Moredread";
@@ -13376,6 +13951,14 @@
fingerprint = "9E6A 25F2 C1F2 9D76 ED00 1932 1261 173A 01E1 0298";
}];
};
+ n8henrie = {
+ name = "Nathan Henrie";
+ github = "n8henrie";
+ githubId = 1234956;
+ "keys" = [{
+ "fingerprint" = "F21A 6194 C9DB 9899 CD09 E24E 434B 2C14 B8C3 3422";
+ }];
+ };
nadir-ishiguro = {
github = "nadir-ishiguro";
githubId = 23151917;
@@ -13487,6 +14070,10 @@
githubId = 56316606;
name = "Amneesh Singh";
};
+ nayala = {
+ name = "Nia";
+ matrix = "@fly:asra.gr";
+ };
nazarewk = {
name = "Krzysztof Nazarewski";
matrix = "@nazarewk:matrix.org";
@@ -13542,6 +14129,12 @@
githubId = 77314501;
name = "Maurice Zhou";
};
+ nealfennimore = {
+ email = "hi@neal.codes";
+ github = "nealfennimore";
+ githubId = 5731551;
+ name = "Neal Fennimore";
+ };
Nebucatnetzer = {
email = "andreas+nixpkgs@zweili.ch";
github = "Nebucatnetzer";
@@ -13890,6 +14483,11 @@
githubId = 3159451;
name = "Nicolas Schneider";
};
+ NIS = {
+ name = "NSC IT Solutions";
+ github = "dev-nis";
+ githubId = 132921300;
+ };
nitsky = {
name = "nitsky";
github = "nitsky";
@@ -13955,6 +14553,12 @@
githubId = 6930756;
name = "Nicolas Mattia";
};
+ noaccos = {
+ name = "Francesco Noacco";
+ email = "francesco.noacco2000@gmail.com";
+ github = "noaccOS";
+ githubId = 24324352;
+ };
nobbz = {
name = "Norbert Melzer";
email = "timmelzer+nixpkgs@gmail.com";
@@ -13973,6 +14577,12 @@
githubId = 42322511;
name = "Patryk Kwiatek";
};
+ nokazn = {
+ email = "me@nokazn.me";
+ github = "nokazn";
+ githubId = 41154684;
+ name = "nokazn";
+ };
nomeata = {
email = "mail@joachim-breitner.de";
github = "nomeata";
@@ -14169,7 +14779,8 @@
githubId = 332423;
};
nu-nu-ko = {
- email = "host@nuko.city";
+ email = "nuko@shimeji.cafe";
+ matrix = "@nuko:shimeji.cafe";
github = "nu-nu-ko";
githubId = 153512689;
name = "nuko";
@@ -14180,6 +14791,12 @@
githubId = 16027994;
name = "Nathan Viets";
};
+ nyadiia = {
+ email = "nyadiia@pm.me";
+ github = "nyadiia";
+ githubId = 43252360;
+ name = "Nadia";
+ };
nyanbinary = {
email = "nyanbinary@keemail.me";
matrix = "@niko:conduit.rs";
@@ -14205,6 +14822,12 @@
githubId = 127548;
name = "Judson Lester";
};
+ nyawox = {
+ name = "nyawox";
+ email = "nyawox.git@gmail.com";
+ github = "nyawox";
+ githubId = 93813719;
+ };
nzbr = {
email = "nixos@nzbr.de";
github = "nzbr";
@@ -14309,6 +14932,12 @@
githubId = 7249506;
name = "oida";
};
+ ok-nick = {
+ email = "nick.libraries@gmail.com";
+ github = "ok-nick";
+ githubId = 25470747;
+ name = "Nick";
+ };
olcai = {
email = "dev@timan.info";
github = "olcai";
@@ -14418,6 +15047,12 @@
github = "ony";
githubId = 11265;
};
+ oo-infty = {
+ name = "Justin Chen";
+ email = "oo-infty@outlook.com";
+ github = "oo-infty";
+ githubId = 42143810;
+ };
ooliver1 = {
name = "Oliver Wilkes";
email = "oliverwilkes2006@icloud.com";
@@ -14495,6 +15130,12 @@
githubId = 111265;
name = "Ozan Sener";
};
+ osnyx = {
+ email = "os@flyingcircus.io";
+ github = "osnyx";
+ githubId = 104593071;
+ name = "Oliver Schmidt";
+ };
ostrolucky = {
email = "gabriel.ostrolucky@gmail.com";
github = "ostrolucky";
@@ -14778,12 +15419,6 @@
githubId = 116740;
name = "Paweł Pacana";
};
- payas = {
- email = "relekarpayas@gmail.com";
- github = "bhankas";
- githubId = 24254289;
- name = "Payas Relekar";
- };
pb- = {
email = "pbaecher@gmail.com";
github = "pb-";
@@ -14806,6 +15441,12 @@
fingerprint = "E005 48D5 D6AC 812C AAD2 AFFA 9C42 B05E 5913 60DC";
}];
};
+ pbeucher = {
+ email = "pierre@crafteo.io";
+ github = "PierreBeucher";
+ githubId = 5041481;
+ name = "Pierre Beucher";
+ };
pblkt = {
email = "pebblekite@gmail.com";
github = "pblkt";
@@ -14843,12 +15484,24 @@
githubId = 8641;
name = "Pierre Carrier";
};
+ pcasaretto = {
+ email = "pcasaretto@gmail.com";
+ github = "pcasaretto";
+ githubId = 817039;
+ name = "Paulo Casaretto";
+ };
pedrohlc = {
email = "root@pedrohlc.com";
github = "PedroHLC";
githubId = 1368952;
name = "Pedro Lara Campos";
};
+ peefy = {
+ email = "xpf6677@gmail.com";
+ github = "Peefy";
+ githubId = 22744597;
+ name = "Peefy";
+ };
peelz = {
email = "peelz.dev+nixpkgs@gmail.com";
github = "notpeelz";
@@ -14879,6 +15532,12 @@
github = "pennae";
githubId = 82953136;
};
+ perchun = {
+ name = "Perchun Pak";
+ email = "nixpkgs@perchun.it";
+ github = "PerchunPak";
+ githubId = 68118654;
+ };
peret = {
name = "Peter Retzlaff";
github = "peret";
@@ -14975,6 +15634,12 @@
fingerprint = "7756 E88F 3C6A 47A5 C5F0 CDFB AB54 6777 F93E 20BF";
}];
};
+ phdyellow = {
+ name = "Phil Dyer";
+ email = "phildyer@protonmail.com";
+ github = "PhDyellow";
+ githubId = 7740661;
+ };
phfroidmont = {
name = "Paul-Henri Froidmont";
email = "nix.contact-j9dw4d@froidmont.org";
@@ -15400,6 +16065,12 @@
githubId = 4201956;
name = "pongo1231";
};
+ poptart = {
+ email = "poptart@hosakacorp.net";
+ github = "terrorbyte";
+ githubId = 1601039;
+ name = "Cale Black";
+ };
portothree = {
name = "Gustavo Porto";
email = "gus@p8s.co";
@@ -15747,7 +16418,7 @@
githubId = 10837173;
};
qjoly = {
- email = "github@thoughtless.eu";
+ email = "github@une-pause-cafe.fr";
github = "qjoly";
githubId = 82603435;
name = "Quentin JOLY";
@@ -15783,6 +16454,12 @@
matrix = "@quantenzitrone:matrix.org";
name = "quantenzitrone";
};
+ qubasa = {
+ email = "consulting@qube.email";
+ github = "Qubasa";
+ githubId = 22085373;
+ name = "Luis Hebendanz";
+ };
queezle = {
email = "git@queezle.net";
github = "queezle42";
@@ -15816,6 +16493,12 @@
githubId = 39039420;
name = "Quinn Dougherty";
};
+ qusic = {
+ email = "qusicx@gmail.com";
+ github = "Qusic";
+ githubId = 2141853;
+ name = "Bang Lee";
+ };
qyliss = {
email = "hi@alyssa.is";
github = "alyssais";
@@ -15925,6 +16608,15 @@
githubId = 104558;
name = "Benjamin Saunders";
};
+ ramblurr = {
+ name = "Casey Link";
+ email = "nix@caseylink.com";
+ github = "Ramblurr";
+ githubId = 14830;
+ keys = [{
+ fingerprint = "978C 4D08 058B A26E B97C B518 2078 2DBC ACFA ACDA";
+ }];
+ };
ramkromberg = {
email = "ramkromberg@mail.com";
github = "RamKromberg";
@@ -16009,12 +16701,24 @@
githubId = 25647735;
name = "Victor Freire";
};
+ ravenz46 = {
+ email = "goldraven0406@gmail.com";
+ github = "RAVENz46";
+ githubId = 86608952;
+ name = "RAVENz46";
+ };
rawkode = {
email = "david.andrew.mckay@gmail.com";
github = "rawkode";
githubId = 145816;
name = "David McKay";
};
+ raylas = {
+ email = "r@raymond.sh";
+ github = "raylas";
+ githubId = 8099415;
+ name = "Raymond Douglas";
+ };
rayslash = {
email = "stevemathewjoy@tutanota.com";
github = "rayslash";
@@ -16257,6 +16961,13 @@
githubId = 12279531;
name = "Ricardo Guevara";
};
+ rhelmot = {
+ name = "Audrey Dutcher";
+ github = "rhelmot";
+ githubId = 2498805;
+ email = "audrey@rhelmot.io";
+ matrix = "@rhelmot:matrix.org";
+ };
rhendric = {
name = "Ryan Hendrickson";
github = "rhendric";
@@ -16293,6 +17004,11 @@
githubId = 61013287;
name = "Ricardo Steijn";
};
+ richar = {
+ github = "ri-char";
+ githubId = 17962023;
+ name = "richar";
+ };
richardipsum = {
email = "richardipsum@fastmail.co.uk";
github = "richardipsum";
@@ -16418,6 +17134,12 @@
githubId = 641278;
name = "Robert T. McGibbon";
};
+ rmgpinto = {
+ email = "hessian_loom_0u@icloud.com";
+ github = "rmgpinto";
+ githubId = 24584;
+ name = "Ricardo Gândara Pinto";
+ };
rnhmjoj = {
email = "rnhmjoj@inventati.org";
matrix = "@rnhmjoj:maxwell.ydns.eu";
@@ -16555,6 +17277,15 @@
githubId = 1312525;
name = "Rongcui Dong";
};
+ rookeur = {
+ email = "adrien.langou@hotmail.com";
+ github = "Rookeur";
+ githubId = 57438432;
+ name = "Adrien Langou";
+ keys = [{
+ fingerprint = "3B8F FC41 0094 2CB4 5A2A 7DF2 5A44 DA8F 9071 91B0";
+ }];
+ };
roosemberth = {
email = "roosembert.palacios+nixpkgs@posteo.ch";
matrix = "@roosemberth:orbstheorem.ch";
@@ -16573,6 +17304,11 @@
fingerprint = "1401 1B63 393D 16C1 AA9C C521 8526 B757 4A53 6236";
}];
};
+ rosehobgoblin = {
+ name = "J. L. Bowden";
+ github = "rosehobgoblin";
+ githubId = 84164410;
+ };
rossabaker = {
name = "Ross A. Baker";
email = "ross@rossabaker.com";
@@ -16655,6 +17391,17 @@
github = "rski";
githubId = 2960312;
};
+ rsniezek = {
+ email = "radoslaw.sniezek@protonmail.com";
+ github = "rsniezek";
+ githubId = 19433256;
+ name = "Radoslaw Sniezek";
+ };
+ rster2002 = {
+ name = "Bjørn";
+ github = "rster2002";
+ githubId = 26026518;
+ };
rsynnest = {
email = "contact@rsynnest.com";
github = "rsynnest";
@@ -16747,6 +17494,12 @@
githubId = 2660;
name = "Russell Sim";
};
+ rutherther = {
+ name = "Rutherther";
+ email = "rutherther@proton.me";
+ github = "rutherther";
+ githubId = 12197024;
+ };
ruuda = {
email = "dev+nix@veniogames.com";
github = "ruuda";
@@ -16981,6 +17734,15 @@
githubId = 132835;
name = "Samuel Dionne-Riel";
};
+ samuelefacenda = {
+ name = "Samuele Facenda";
+ email = "samuele.facenda@gmail.com";
+ github = "SamueleFacenda";
+ githubId = 92163673;
+ keys = [{
+ fingerprint = "3BA5 A3DB 3239 E2AC 1F3B 68A0 0DB8 3F58 B259 6271";
+ }];
+ };
samuel-martineau = {
name = "Samuel Martineau";
email = "samuel@smartineau.me";
@@ -17023,6 +17785,18 @@
githubId = 1153271;
name = "Sander van der Burg";
};
+ Sanskarzz = {
+ email = "sanskar.gur@gmail.com";
+ github = "Sanskarzz";
+ githubId = 92817635;
+ name = "Sanskar Gurdasani";
+ };
+ sarahec = {
+ email = "seclark@nextquestion.net";
+ github = "sarahec";
+ githubId = 11277967;
+ name = "Sarah Clark";
+ };
sarcasticadmin = {
email = "rob@sarcasticadmin.com";
github = "sarcasticadmin";
@@ -17035,6 +17809,15 @@
githubId = 178904;
name = "Daniel Ehlers";
};
+ sascha8a = {
+ email = "sascha@localhost.systems";
+ github = "sascha8a";
+ githubId = 6937965;
+ name = "Alexander Lampalzer";
+ keys = [{
+ fingerprint = "0350 3136 E22C C561 30E3 A4AE 2087 9CCA CD5C D670";
+ }];
+ };
saschagrunert = {
email = "mail@saschagrunert.de";
github = "saschagrunert";
@@ -17059,6 +17842,12 @@
githubId = 8534888;
name = "Savanni D'Gerinel";
};
+ savedra1 = {
+ email = "michaelsavedra@gmail.com";
+ github = "savedra1";
+ githubId = 99875823;
+ name = "Michael Savedra";
+ };
savyajha = {
email = "savya.jha@hawkradius.com";
github = "savyajha";
@@ -17248,6 +18037,17 @@
fingerprint = "0AF6 4C3B 1F12 14B3 8C8C 5786 1FA2 DBE6 7438 7CC3";
}];
};
+ sebrut = {
+ email = "kontakt@sebastian-rutofski.de";
+ github = "sebrut";
+ githubId = 3962409;
+ name = "Sebastian Rutofski";
+ keys = [
+ {
+ fingerprint = "F1D4 8061 2830 3AF6 42DC 3867 C37F 3374 2A95 C547";
+ }
+ ];
+ };
sebtm = {
email = "mail@sebastian-sellmeier.de";
github = "SebTM";
@@ -17363,6 +18163,11 @@
githubId = 863807;
name = "Serge Guelton";
};
+ sergioribera = {
+ github = "SergioRibera";
+ githubId = 56278796;
+ name = "Sergio Ribera";
+ };
sersorrel = {
email = "ash@sorrel.sh";
github = "sersorrel";
@@ -17455,15 +18260,6 @@
matrix = "@shamrocklee:matrix.org";
name = "Yueh-Shun Li";
};
- shanesveller = {
- email = "shane@sveller.dev";
- github = "shanesveller";
- githubId = 831;
- keys = [{
- fingerprint = "F83C 407C ADC4 5A0F 1F2F 44E8 9210 C218 023C 15CD";
- }];
- name = "Shane Sveller";
- };
shard7 = {
email = "sh7user@gmail.com";
github = "shard77";
@@ -17673,6 +18469,7 @@
};
sikmir = {
email = "sikmir@disroot.org";
+ matrix = "@sikmir:matrix.org";
github = "sikmir";
githubId = 688044;
name = "Nikolay Korotkiy";
@@ -17680,6 +18477,22 @@
fingerprint = "ADF4 C13D 0E36 1240 BD01 9B51 D1DE 6D7F 6936 63A5";
}];
};
+ silky = {
+ name = "Noon van der Silk";
+ email = "noonsilk+nixpkgs@gmail.com";
+ github = "silky";
+ githubId = 129525;
+ };
+ sils = {
+ name = "Silas Schöffel";
+ email = "sils@sils.li";
+ matrix = "@sils:vhack.eu";
+ github = "s1ls";
+ githubId = 91412114;
+ keys = [{
+ fingerprint = "C1DA A551 B422 7A6F 3FD9 6B3A 467B 7D12 9EA7 3AC9";
+ }];
+ };
Silver-Golden = {
name = "Brendan Golden";
email = "github+nixpkgs@brendan.ie";
@@ -17723,7 +18536,7 @@
};
sinanmohd = {
name = "Sinan Mohd";
- email = "sinan@firemail.cc";
+ email = "sinan@sinanmohd.com";
matrix = "@sinan:sinanmohd.com";
github = "sinanmohd";
githubId = 69694713;
@@ -17854,6 +18667,16 @@
githubId = 12828415;
name = "Michel Weitbrecht";
};
+ slotThe = {
+ name = "Tony Zorman";
+ email = "tonyzorman@mailbox.org";
+ github= "slotThe";
+ matrix = "@slot-:matrix.org";
+ githubId = 50166980;
+ keys = [{
+ fingerprint = "4896 FB6C 9528 46C3 414C 2475 C927 DE8C 7DFD 57B8";
+ }];
+ };
slwst = {
email = "email@slw.st";
github = "slwst";
@@ -17984,6 +18807,12 @@
githubId = 55726;
name = "Stanislav Ochotnický";
};
+ sodiboo = {
+ name = "sodiboo";
+ github = "sodiboo";
+ githubId = 37938646;
+ matrix = "@sodiboo:arcticfoxes.net";
+ };
softinio = {
email = "code@softinio.com";
github = "softinio";
@@ -18082,6 +18911,12 @@
githubId = 20756843;
name = "Sofi";
};
+ soyouzpanda = {
+ name = "soyouzpanda";
+ email = "soyouzpanda@soyouzpanda.fr";
+ github = "soyouzpanda";
+ githubId = 23421201;
+ };
soywod = {
name = "Clément DOUIN";
email = "clement.douin@posteo.net";
@@ -18146,6 +18981,26 @@
githubId = 950799;
name = "Tomasz Czyż";
};
+ spitulax = {
+ name = "Bintang Adiputra Pratama";
+ email = "bintangadiputrapratama@gmail.com";
+ github = "spitulax";
+ githubId = 96517350;
+ keys = [{
+ fingerprint = "652F FAAD 5CB8 AF1D 3F96 9521 929E D6C4 0414 D3F5";
+ }];
+ };
+ spk = {
+ email = "laurent@spkdev.net";
+ github = "spk";
+ githubId = 98590;
+ name = "Laurent Arnoud";
+ };
+ spoonbaker = {
+ github = "Spoonbaker";
+ githubId = 47164123;
+ name = "Spoonbaker";
+ };
sprock = {
email = "rmason@mun.ca";
github = "sprock";
@@ -18246,11 +19101,17 @@
githubId = 6362238;
name = "Christoph Honal";
};
- star-szr = {
- email = "nixpkgs@szr.fastmail.com";
- github = "star-szr";
- githubId = 327943;
- name = "Scott Zhu Reeves";
+ starkca90 = {
+ email = "starkca90@gmail.com";
+ github = "starkca90";
+ githubId = 2060836;
+ name = "Casey Stark";
+ };
+ starsep = {
+ email = "nix@starsep.com";
+ github = "starsep";
+ githubId = 2798728;
+ name = "Filip Czaplicki";
};
starzation = {
email = "nixpkgs@starzation.net";
@@ -18320,6 +19181,15 @@
githubId = 89950;
name = "Stéphan Kochen";
};
+ stephen-huan = {
+ name = "Stephen Huan";
+ email = "stephen.huan@cgdct.moe";
+ github = "stephen-huan";
+ githubId = 20411956;
+ keys = [{
+ fingerprint = "EA6E 2794 8C7D BF5D 0DF0 85A1 0FBC 2E3B A99D D60E";
+ }];
+ };
stephenmw = {
email = "stephen@q5comm.com";
github = "stephenmw";
@@ -18456,6 +19326,16 @@
githubId = 39732259;
name = "Justus K";
};
+ stv0g = {
+ name = "Steffen Vogel";
+ email = "post@steffenvogel.de";
+ matrix = "@stv0ge:matrix.org";
+ github = "stv0g";
+ githubId = 285829;
+ keys = [{
+ fingerprint = "09BE 3BAE 8D55 D4CD 8579 285A 9675 EAC3 4897 E6E2";
+ }];
+ };
SubhrajyotiSen = {
email = "subhrajyoti12@gmail.com";
github = "SubhrajyotiSen";
@@ -18492,6 +19372,12 @@
githubId = 1939855;
name = "Kimmo Suominen";
};
+ supa = {
+ email = "supa.codes@gmail.com";
+ github = "0Supa";
+ githubId = 36031171;
+ name = "Supa";
+ };
superbo = {
email = "supernbo@gmail.com";
github = "SuperBo";
@@ -18590,6 +19476,12 @@
github = "sweenu";
githubId = 7051978;
};
+ swendel = {
+ name = "Sebastian Wendel";
+ email = "nixpkgs.aiX5ph@srx.digital";
+ github = "SebastianWendel";
+ githubId = 919570;
+ };
swesterfeld = {
email = "stefan@space.twc.de";
github = "swesterfeld";
@@ -18673,6 +19565,12 @@
fingerprint = "6866 981C 4992 4D64 D154 E1AC 19E5 A2D8 B1E4 3F19";
}];
};
+ t4sm5n = {
+ email = "t4sm5n@gmail.com";
+ github = "t4sm5n";
+ githubId = 28858039;
+ name = "Tuomas Mäkinen";
+ };
tadeokondrak = {
email = "me@tadeo.ca";
github = "tadeokondrak";
@@ -18715,6 +19613,12 @@
githubId = 321799;
name = "Paul Colomiets";
};
+ takac = {
+ email = "cammann.tom@gmail.com";
+ github = "takac";
+ githubId = 1015381;
+ name = "Tom Cammann";
+ };
takagiy = {
email = "takagiy.4dev@gmail.com";
github = "takagiy";
@@ -18858,6 +19762,12 @@
githubId = 2389333;
name = "Andy Tockman";
};
+ tcmal = {
+ email = "me@aria.rip";
+ github = "tcmal";
+ githubId = 4183876;
+ name = "Aria Shrimpton";
+ };
teatwig = {
email = "nix@teatwig.net";
name = "tea";
@@ -19076,6 +19986,13 @@
githubId = 42933;
name = "Andrew Childs";
};
+ thefossguy = {
+ name = "Pratham Patel";
+ email = "prathampatel@thefossguy.com";
+ matrix = "@thefossguy:matrix.org";
+ github = "thefossguy";
+ githubId = 44400303;
+ };
thehedgeh0g = {
name = "The Hedgehog";
email = "hedgehog@mrhedgehog.xyz";
@@ -19101,6 +20018,12 @@
githubId = 3105057;
name = "Jan Beinke";
};
+ themaxmur = {
+ name = "Maxim Muravev";
+ email = "muravjev.mak@yandex.ru";
+ github = "TheMaxMur";
+ githubId = 31189199;
+ };
thenonameguy = {
email = "thenonameguy24@gmail.com";
name = "Krisztian Szabo";
@@ -19422,6 +20345,11 @@
githubId = 9853194;
name = "Philipp Bartsch";
};
+ toast = {
+ name = "Toast";
+ github = "toast003";
+ githubId = 39011842;
+ };
toastal = {
email = "toastal+nix@posteo.net";
matrix = "@toastal:mozilla.org";
@@ -19769,6 +20697,12 @@
fingerprint = "E631 8869 586F 99B4 F6E6 D785 5942 58F0 389D 2802";
}];
};
+ twitchy0 = {
+ email = "code@nitinpassa.com";
+ github = "twitchy0";
+ githubId = 131159000;
+ name = "Nitin Passa";
+ };
twitchyliquid64 = {
name = "Tom";
email = "twitchyliquid64@ciphersink.net";
@@ -19850,6 +20784,12 @@
githubId = 20206121;
name = "umlx5h";
};
+ uncenter = {
+ name = "uncenter";
+ email = "uncenter@uncenter.dev";
+ github = "uncenter";
+ githubId = 47499684;
+ };
unclamped = {
name = "Maru";
email = "clear6860@tutanota.com";
@@ -20388,6 +21328,12 @@
githubId = 357664;
name = "Viktor Petersson";
};
+ vpochapuis = {
+ email = "vincent.professional@chapuis.ovh";
+ github = "vpochapuis";
+ githubId = 75721408;
+ name = "Vincent Chapuis";
+ };
vq = {
email = "vq@erq.se";
github = "vq";
@@ -20640,6 +21586,16 @@
fingerprint = "DA03 D6C6 3F58 E796 AD26 E99B 366A 2940 479A 06FC";
}];
};
+ willbush = {
+ email = "git@willbush.dev";
+ matrix = "@willbush:matrix.org";
+ github = "willbush";
+ githubId = 2023546;
+ name = "Will Bush";
+ keys = [{
+ fingerprint = "4441 422E 61E4 C8F3 EBFE 5E33 3823 864B 54B1 3BDA";
+ }];
+ };
willcohen = {
github = "willcohen";
githubId = 5185341;
@@ -20734,6 +21690,12 @@
githubId = 15619766;
name = "wldhx";
};
+ w-lfchen = {
+ email = "w-lfchen@posteo.net";
+ github = "w-lfchen";
+ githubId = 115360611;
+ name = "Wölfchen";
+ };
wmertens = {
email = "Wout.Mertens@gmail.com";
github = "wmertens";
@@ -20770,6 +21732,15 @@
githubId = 8378365;
name = "P. R. d. O.";
};
+ wolfgangwalther = {
+ name = "Wolfgang Walther";
+ email = "walther@technowledgy.de";
+ github = "wolfgangwalther";
+ githubId = 9132420;
+ keys = [{
+ fingerprint = "F943 A0BC 720C 5BEF 73CD E02D B398 93FA 5F65 CAE1";
+ }];
+ };
womfoo = {
email = "kranium@gikos.net";
github = "womfoo";
@@ -20976,6 +21947,12 @@
githubId = 3028542;
name = "Guillermo NWDD";
};
+ xokdvium = {
+ email = "xokdvium@proton.me";
+ github = "xokdvium";
+ githubId = 145775305;
+ name = "Sergei Zimmerman";
+ };
xrelkd = {
github = "xrelkd";
githubId = 46590321;
@@ -21028,6 +22005,12 @@
githubId = 973709;
name = "Jairo Llopis";
};
+ yamashitax = {
+ email = "hello@yamashit.ax";
+ github = "yamashitax";
+ githubId = 99486674;
+ name = "山下";
+ };
yana = {
email = "yana@riseup.net";
github = "yanateras";
@@ -21040,6 +22023,12 @@
github = "yanganto";
githubId = 10803111;
};
+ yannickulrich = {
+ email = "yannick.ulrich@proton.me";
+ github = "yannickulrich";
+ githubId = 749922;
+ name = "Yannick Ulrich";
+ };
yannip = {
email = "yPapandreou7@gmail.com";
github = "YanniPapandreou";
@@ -21497,6 +22486,12 @@
githubId = 1108325;
name = "Théo Zimmermann";
};
+ zlepper = {
+ name = "Rasmus Hansen";
+ github = "zlepper";
+ githubId = 1499810;
+ email = "hansen13579@gmail.com";
+ };
zmitchell = {
name = "Zach Mitchell";
email = "zmitchell@fastmail.com";
diff --git a/third_party/nixpkgs/maintainers/scripts/README.md b/third_party/nixpkgs/maintainers/scripts/README.md
index f8fc7aff95..1af4715b05 100644
--- a/third_party/nixpkgs/maintainers/scripts/README.md
+++ b/third_party/nixpkgs/maintainers/scripts/README.md
@@ -11,7 +11,7 @@ What follows is a (very incomplete) overview of available scripts.
### `check-by-name.sh`
-An alias for `pkgs/test/nixpkgs-check-by-name/scripts/run-local.sh`, see [documentation](../../pkgs/test/nixpkgs-check-by-name/scripts/README.md).
+An alias for `pkgs/test/check-by-name/run-local.sh`, see [documentation](../../pkgs/test/check-by-name/README.md).
### `get-maintainer.sh`
diff --git a/third_party/nixpkgs/maintainers/scripts/bootstrap-files/README.md b/third_party/nixpkgs/maintainers/scripts/bootstrap-files/README.md
index b55878f341..7a1a2bef86 100644
--- a/third_party/nixpkgs/maintainers/scripts/bootstrap-files/README.md
+++ b/third_party/nixpkgs/maintainers/scripts/bootstrap-files/README.md
@@ -6,8 +6,9 @@ binaries (without the reliance on external inputs):
- `bootstrap-tools`: an archive with the compiler toolchain and other
helper tools enough to build the rest of the `nixpkgs`.
- initial binaries needed to unpack `bootstrap-tools.*`. On `linux`
- it's just `busybox`, on `darwin` it's `sh`, `bzip2`, `mkdir` and
- `cpio`. These binaries can be executed directly from the store.
+ it's just `busybox`, on `darwin` it is unpack.nar.xz which contains
+ the binaries and script needed to unpack the tools. These binaries
+ can be executed directly from the store.
These are called "bootstrap files".
@@ -74,12 +75,3 @@ There are two types of bootstrap files:
The `.build` job contains `/on-server/` subdirectory with binaries to
be uploaded to `tarballs.nixos.org`.
The files are uploaded to `tarballs.nixos.org` by writers to `S3` store.
-
-## TODOs
-
-- `pkgs/stdenv/darwin` file layout is slightly different from
- `pkgs/stdenv/linux`. Once `linux` seed update becomes a routine we can
- bring `darwin` in sync if it's feasible.
-- `darwin` definition of `.build` `on-server/` directory layout differs
- and should be updated.
-
diff --git a/third_party/nixpkgs/maintainers/scripts/bootstrap-files/refresh-tarballs.bash b/third_party/nixpkgs/maintainers/scripts/bootstrap-files/refresh-tarballs.bash
index 21c43ade27..e7bf27f240 100755
--- a/third_party/nixpkgs/maintainers/scripts/bootstrap-files/refresh-tarballs.bash
+++ b/third_party/nixpkgs/maintainers/scripts/bootstrap-files/refresh-tarballs.bash
@@ -6,6 +6,8 @@
#! nix-shell -p nix
#! nix-shell -p jq
+set -o pipefail
+
# How the refresher works:
#
# For a given list of :
@@ -15,6 +17,9 @@
# 4. calculate hashes and craft the commit message with the details on
# how to upload the result to 'tarballs.nixos.org'
+scratch_dir=$(mktemp -d)
+trap 'rm -rf -- "${scratch_dir}"' EXIT
+
usage() {
cat >&2 < {
url = "http://tarballs.nixos.org/${s3_prefix}/${nixpkgs_revision}/$fname";
- hash = "${sri}";$(printf "\n%s" "${executable_nix}")
+ hash = "${sri}";$(
+ [[ -n ${executable_nix} ]] && printf "\n %s" "${executable_nix}"
+ [[ -n ${name_nix} ]] && printf "\n %s" "${name_nix}"
+ [[ -n ${unpack_nix} ]] && printf "\n %s" "${unpack_nix}"
+)
};
EOF
done
diff --git a/third_party/nixpkgs/maintainers/scripts/check-by-name.sh b/third_party/nixpkgs/maintainers/scripts/check-by-name.sh
index 46cbd5e858..b1b662046b 100755
--- a/third_party/nixpkgs/maintainers/scripts/check-by-name.sh
+++ b/third_party/nixpkgs/maintainers/scripts/check-by-name.sh
@@ -14,7 +14,6 @@ cleanup() {
[[ -e "$tmp/base" ]] && git worktree remove --force "$tmp/base"
[[ -e "$tmp/merged" ]] && git worktree remove --force "$tmp/merged"
- [[ -e "$tmp/tool-nixpkgs" ]] && git worktree remove --force "$tmp/tool-nixpkgs"
rm -rf "$tmp"
@@ -63,20 +62,12 @@ trace -n "Merging base branch into the HEAD commit in $tmp/merged.. "
git -C "$tmp/merged" merge -q --no-edit "$baseSha"
trace -e "\e[34m$(git -C "$tmp/merged" rev-parse HEAD)\e[0m"
-trace -n "Reading pinned nixpkgs-check-by-name revision from pinned-tool.json.. "
-toolSha=$(jq -r .rev "$tmp/merged/pkgs/test/nixpkgs-check-by-name/scripts/pinned-tool.json")
-trace -e "\e[34m$toolSha\e[0m"
+trace -n "Reading pinned nixpkgs-check-by-name version from pinned-version.txt.. "
+toolVersion=$(<"$tmp/merged/pkgs/test/check-by-name/pinned-version.txt")
+trace -e "\e[34m$toolVersion\e[0m"
-trace -n "Creating Git worktree for the nixpkgs-check-by-name revision in $tmp/tool-nixpkgs.. "
-git worktree add -q "$tmp/tool-nixpkgs" "$toolSha"
-trace "Done"
-
-trace "Building/fetching nixpkgs-check-by-name.."
-nix-build -o "$tmp/tool" "$tmp/tool-nixpkgs" \
- -A tests.nixpkgs-check-by-name \
- --arg config '{}' \
- --arg overlays '[]' \
- -j 0
+trace -n "Building tool.. "
+nix-build https://github.com/NixOS/nixpkgs-check-by-name/tarball/"$toolVersion" -o "$tmp/tool" -A build
trace "Running nixpkgs-check-by-name.."
"$tmp/tool/bin/nixpkgs-check-by-name" --base "$tmp/base" "$tmp/merged"
diff --git a/third_party/nixpkgs/maintainers/scripts/check-cherry-picks.sh b/third_party/nixpkgs/maintainers/scripts/check-cherry-picks.sh
new file mode 100755
index 0000000000..e7ffe2bf4c
--- /dev/null
+++ b/third_party/nixpkgs/maintainers/scripts/check-cherry-picks.sh
@@ -0,0 +1,97 @@
+#!/usr/bin/env bash
+# Find alleged cherry-picks
+
+set -e
+
+if [ $# != "2" ] ; then
+ echo "usage: check-cherry-picks.sh base_rev head_rev"
+ exit 2
+fi
+
+PICKABLE_BRANCHES=${PICKABLE_BRANCHES:-master staging release-??.?? staging-??.??}
+problem=0
+
+while read new_commit_sha ; do
+ if [ -z "$new_commit_sha" ] ; then
+ continue # skip empty lines
+ fi
+ if [ "$GITHUB_ACTIONS" = 'true' ] ; then
+ echo "::group::Commit $new_commit_sha"
+ else
+ echo "================================================="
+ fi
+ git rev-list --max-count=1 --format=medium "$new_commit_sha"
+ echo "-------------------------------------------------"
+
+ original_commit_sha=$(
+ git rev-list --max-count=1 --format=format:%B "$new_commit_sha" \
+ | grep -Ei -m1 "cherry.*[0-9a-f]{40}" \
+ | grep -Eoi -m1 '[0-9a-f]{40}'
+ )
+ if [ "$?" != "0" ] ; then
+ echo " ? Couldn't locate original commit hash in message"
+ [ "$GITHUB_ACTIONS" = 'true' ] && echo ::endgroup::
+ continue
+ fi
+
+ set -f # prevent pathname expansion of patterns
+ for branch_pattern in $PICKABLE_BRANCHES ; do
+ set +f # re-enable pathname expansion
+
+ while read -r picked_branch ; do
+ if git merge-base --is-ancestor "$original_commit_sha" "$picked_branch" ; then
+ echo " ✔ $original_commit_sha present in branch $picked_branch"
+
+ range_diff_common='git range-diff
+ --no-notes
+ --creation-factor=100
+ '"$original_commit_sha~..$original_commit_sha"'
+ '"$new_commit_sha~..$new_commit_sha"'
+ '
+
+ if $range_diff_common --no-color | grep -E '^ {4}[+-]{2}' > /dev/null ; then
+ if [ "$GITHUB_ACTIONS" = 'true' ] ; then
+ echo ::endgroup::
+ echo -n "::warning ::"
+ else
+ echo -n " ⚠ "
+ fi
+ echo "Difference between $new_commit_sha and original $original_commit_sha may warrant inspection:"
+
+ $range_diff_common --color
+
+ echo "Note this should not necessarily be treated as a hard fail, but a reviewer's attention should" \
+ "be drawn to it and github actions have no way of doing that but to raise a 'failure'"
+ problem=1
+ else
+ echo " ✔ $original_commit_sha highly similar to $new_commit_sha"
+ $range_diff_common --color
+ [ "$GITHUB_ACTIONS" = 'true' ] && echo ::endgroup::
+ fi
+
+ # move on to next commit
+ continue 3
+ fi
+ done <<< "$(
+ git for-each-ref \
+ --format="%(refname)" \
+ "refs/remotes/origin/$branch_pattern"
+ )"
+ done
+
+ if [ "$GITHUB_ACTIONS" = 'true' ] ; then
+ echo ::endgroup::
+ echo -n "::error ::"
+ else
+ echo -n " ✘ "
+ fi
+ echo "$original_commit_sha not found in any pickable branch"
+
+ problem=1
+done <<< "$(
+ git rev-list \
+ -E -i --grep="cherry.*[0-9a-f]{40}" --reverse \
+ "$1..$2"
+)"
+
+exit $problem
diff --git a/third_party/nixpkgs/maintainers/scripts/eval-release.nix b/third_party/nixpkgs/maintainers/scripts/eval-release.nix
index 4f0ca24650..10acfe3284 100644
--- a/third_party/nixpkgs/maintainers/scripts/eval-release.nix
+++ b/third_party/nixpkgs/maintainers/scripts/eval-release.nix
@@ -1,9 +1,8 @@
-# Evaluate `release.nix' like Hydra would. Too bad nix-instantiate
-# can't to do this.
-
-with import ../../lib;
+# Evaluate `release.nix' like Hydra would. Too bad nix-instantiate can't to do this.
let
+ inherit (import ../../lib) isDerivation mapAttrs;
+
trace = if builtins.getEnv "VERBOSE" == "1" then builtins.trace else (x: y: y);
rel = removeAttrs (import ../../pkgs/top-level/release.nix { }) [ "tarball" "unstable" "xbursttools" ];
diff --git a/third_party/nixpkgs/maintainers/scripts/find-tarballs.nix b/third_party/nixpkgs/maintainers/scripts/find-tarballs.nix
index c47b5168ab..cae4bec201 100644
--- a/third_party/nixpkgs/maintainers/scripts/find-tarballs.nix
+++ b/third_party/nixpkgs/maintainers/scripts/find-tarballs.nix
@@ -1,11 +1,22 @@
# This expression returns a list of all fetchurl calls used by ‘expr’.
-with import ../.. { };
-with lib;
-
-{ expr }:
+{ expr, lib ? import ../../lib }:
let
+ inherit (lib)
+ addErrorContext
+ attrNames
+ concatLists
+ const
+ filter
+ genericClosure
+ isAttrs
+ isDerivation
+ isList
+ mapAttrsToList
+ optional
+ optionals
+ ;
root = expr;
diff --git a/third_party/nixpkgs/maintainers/scripts/haskell/dependencies.nix b/third_party/nixpkgs/maintainers/scripts/haskell/dependencies.nix
index fd8338c002..5965b1ba18 100644
--- a/third_party/nixpkgs/maintainers/scripts/haskell/dependencies.nix
+++ b/third_party/nixpkgs/maintainers/scripts/haskell/dependencies.nix
@@ -2,8 +2,10 @@
let
pkgs = import ../../.. {};
inherit (pkgs) lib;
- getDeps = _: pkg: {
- deps = builtins.filter (x: x != null) (map (x: x.pname or null) (pkg.propagatedBuildInputs or []));
+ getDeps = _: pkg: let
+ pname = pkg.pname or null;
+ in {
+ deps = builtins.filter (x: x != null && x != pname) (map (x: x.pname or null) (pkg.propagatedBuildInputs or []));
broken = (pkg.meta.hydraPlatforms or [null]) == [];
};
in
diff --git a/third_party/nixpkgs/maintainers/scripts/haskell/hydra-report.hs b/third_party/nixpkgs/maintainers/scripts/haskell/hydra-report.hs
index 8b4f798cc5..debf684abf 100755
--- a/third_party/nixpkgs/maintainers/scripts/haskell/hydra-report.hs
+++ b/third_party/nixpkgs/maintainers/scripts/haskell/hydra-report.hs
@@ -78,12 +78,13 @@ import Network.HTTP.Req (
)
import System.Directory (XdgDirectory (XdgCache), getXdgDirectory)
import System.Environment (getArgs)
+import System.Exit (die)
import System.Process (readProcess)
import Prelude hiding (id)
import Data.List (sortOn)
import Control.Concurrent.Async (concurrently)
import Control.Exception (evaluate)
-import qualified Data.IntMap.Strict as IntMap
+import qualified Data.IntMap.Lazy as IntMap
import qualified Data.IntSet as IntSet
import Data.Bifunctor (second)
import Data.Data (Proxy)
@@ -155,17 +156,20 @@ data Build = Build
data HydraSlownessWorkaroundFlag = HydraSlownessWorkaround | NoHydraSlownessWorkaround
data RequestLogsFlag = RequestLogs | NoRequestLogs
+usage :: IO a
+usage = die "Usage: get-report [--slow] [EVAL-ID] | ping-maintainers | mark-broken-list [--no-request-logs] | eval-info"
+
main :: IO ()
main = do
args <- getArgs
case args of
- ["get-report", "--slow"] -> getBuildReports HydraSlownessWorkaround
- ["get-report"] -> getBuildReports NoHydraSlownessWorkaround
+ "get-report":"--slow":id -> getBuildReports HydraSlownessWorkaround id
+ "get-report":id -> getBuildReports NoHydraSlownessWorkaround id
["ping-maintainers"] -> printMaintainerPing
["mark-broken-list", "--no-request-logs"] -> printMarkBrokenList NoRequestLogs
["mark-broken-list"] -> printMarkBrokenList RequestLogs
["eval-info"] -> printEvalInfo
- _ -> putStrLn "Usage: get-report [--slow] | ping-maintainers | mark-broken-list [--no-request-logs] | eval-info"
+ _ -> usage
reportFileName :: IO FilePath
reportFileName = getXdgDirectory XdgCache "haskell-updates-build-report.json"
@@ -173,23 +177,26 @@ reportFileName = getXdgDirectory XdgCache "haskell-updates-build-report.json"
showT :: Show a => a -> Text
showT = Text.pack . show
-getBuildReports :: HydraSlownessWorkaroundFlag -> IO ()
-getBuildReports opt = runReq defaultHttpConfig do
- evalMay <- Seq.lookup 0 . evals <$> hydraJSONQuery mempty ["jobset", "nixpkgs", "haskell-updates", "evals"]
- eval@Eval{id} <- maybe (liftIO $ fail "No Evaluation found") pure evalMay
+getBuildReports :: HydraSlownessWorkaroundFlag -> [String] -> IO ()
+getBuildReports opt args = runReq defaultHttpConfig do
+ eval@Eval{id} <- case args of
+ [id] -> hydraJSONQuery mempty ["eval", Text.pack id]
+ [] -> do
+ evalMay <- Seq.lookup 0 . evals <$> hydraJSONQuery mempty ["jobset", "nixpkgs", "haskell-updates", "evals"]
+ maybe (liftIO $ fail "No Evaluation found") pure evalMay
+ _ -> liftIO usage
liftIO . putStrLn $ "Fetching evaluation " <> show id <> " from Hydra. This might take a few minutes..."
- buildReports <- getEvalBuilds opt id
+ buildReports <- getEvalBuilds opt eval
liftIO do
fileName <- reportFileName
putStrLn $ "Finished fetching all builds from Hydra, saving report as " <> fileName
now <- getCurrentTime
encodeFile fileName (eval, now, buildReports)
-getEvalBuilds :: HydraSlownessWorkaroundFlag -> Int -> Req (Seq Build)
-getEvalBuilds NoHydraSlownessWorkaround id =
+getEvalBuilds :: HydraSlownessWorkaroundFlag -> Eval -> Req (Seq Build)
+getEvalBuilds NoHydraSlownessWorkaround Eval{id} =
hydraJSONQuery mempty ["eval", showT id, "builds"]
-getEvalBuilds HydraSlownessWorkaround id = do
- Eval{builds} <- hydraJSONQuery mempty [ "eval", showT id ]
+getEvalBuilds HydraSlownessWorkaround Eval{builds} = do
forM builds $ \buildId -> do
liftIO $ putStrLn $ "Querying build " <> show buildId
hydraJSONQuery mempty [ "build", showT buildId ]
@@ -299,7 +306,7 @@ calculateReverseDependencies depMap =
Map.fromDistinctAscList $ zip keys (zip (rdepMap False) (rdepMap True))
where
-- This code tries to efficiently invert the dependency map and calculate
- -- it’s transitive closure by internally identifying every pkg with it’s index
+ -- its transitive closure by internally identifying every pkg with its index
-- in the package list and then using memoization.
keys :: [PkgName]
keys = Map.keys depMap
@@ -317,11 +324,11 @@ calculateReverseDependencies depMap =
intDeps :: [(Int, (Bool, [Int]))]
intDeps = zip [0..] (fmap depInfoToIdx depInfos)
- rdepMap onlyUnbroken = IntSet.size <$> resultList
+ rdepMap onlyUnbroken = IntSet.size <$> IntMap.elems resultList
where
- resultList = go <$> [0..]
+ resultList = IntMap.fromDistinctAscList [(i, go i) | i <- [0..length keys - 1]]
oneStepMap = IntMap.fromListWith IntSet.union $ (\(key,(_,deps)) -> (,IntSet.singleton key) <$> deps) <=< filter (\(_, (broken,_)) -> not (broken && onlyUnbroken)) $ intDeps
- go pkg = IntSet.unions (oneStep:((resultList !!) <$> IntSet.toList oneStep))
+ go pkg = IntSet.unions (oneStep:((resultList IntMap.!) <$> IntSet.toList oneStep))
where oneStep = IntMap.findWithDefault mempty pkg oneStepMap
-- | Generate a mapping of Hydra job names to maintainer GitHub handles. Calls
diff --git a/third_party/nixpkgs/maintainers/scripts/haskell/regenerate-hackage-packages.sh b/third_party/nixpkgs/maintainers/scripts/haskell/regenerate-hackage-packages.sh
index 96a18aa8ed..8f629c5310 100755
--- a/third_party/nixpkgs/maintainers/scripts/haskell/regenerate-hackage-packages.sh
+++ b/third_party/nixpkgs/maintainers/scripts/haskell/regenerate-hackage-packages.sh
@@ -66,10 +66,6 @@ done
HACKAGE2NIX="${HACKAGE2NIX:-hackage2nix}"
-# To prevent hackage2nix fails because of encoding.
-# See: https://github.com/NixOS/nixpkgs/pull/122023
-export LC_ALL=C.UTF-8
-
config_dir=pkgs/development/haskell-modules/configuration-hackage2nix
run_hackage2nix() {
diff --git a/third_party/nixpkgs/maintainers/scripts/haskell/update-stackage.sh b/third_party/nixpkgs/maintainers/scripts/haskell/update-stackage.sh
index 5dc52abdd6..fdb1cd184f 100755
--- a/third_party/nixpkgs/maintainers/scripts/haskell/update-stackage.sh
+++ b/third_party/nixpkgs/maintainers/scripts/haskell/update-stackage.sh
@@ -8,7 +8,7 @@ set -eu -o pipefail
# (should be capitalized like the display name)
SOLVER=LTS
# Stackage solver verson, if any. Use latest if empty
-VERSION=21
+VERSION=
TMP_TEMPLATE=update-stackage.XXXXXXX
readonly SOLVER
readonly VERSION
diff --git a/third_party/nixpkgs/maintainers/scripts/kde/generate-sources.py b/third_party/nixpkgs/maintainers/scripts/kde/generate-sources.py
index e9f8c41ef4..4f43710997 100755
--- a/third_party/nixpkgs/maintainers/scripts/kde/generate-sources.py
+++ b/third_party/nixpkgs/maintainers/scripts/kde/generate-sources.py
@@ -1,9 +1,10 @@
#!/usr/bin/env nix-shell
-#!nix-shell -i python3 -p "python3.withPackages(ps: [ ps.beautifulsoup4 ps.click ps.httpx ps.jinja2 ps.pyyaml ])
+#!nix-shell -i python3 -p "python3.withPackages(ps: [ ps.beautifulsoup4 ps.click ps.httpx ps.jinja2 ps.pyyaml ])"
import base64
import binascii
import json
import pathlib
+from typing import Optional
from urllib.parse import urlparse
import bs4
@@ -57,19 +58,26 @@ def to_sri(hash):
),
default=pathlib.Path(__file__).parent.parent.parent.parent
)
-def main(set: str, version: str, nixpkgs: pathlib.Path):
+@click.option(
+ "--sources-url",
+ type=str,
+ default=None,
+)
+def main(set: str, version: str, nixpkgs: pathlib.Path, sources_url: Optional[str]):
root_dir = nixpkgs / "pkgs/kde"
set_dir = root_dir / set
generated_dir = root_dir / "generated"
metadata = utils.KDERepoMetadata.from_json(generated_dir)
- set_url = {
- "frameworks": "kf",
- "gear": "releases",
- "plasma": "plasma",
- }[set]
+ if sources_url is None:
+ set_url = {
+ "frameworks": "kf",
+ "gear": "releases",
+ "plasma": "plasma",
+ }[set]
+ sources_url = f"https://kde.org/info/sources/source-{set_url}-{version}.html"
- sources = httpx.get(f"https://kde.org/info/sources/source-{set_url}-{version}.html")
+ sources = httpx.get(sources_url)
sources.raise_for_status()
bs = bs4.BeautifulSoup(sources.text, features="html.parser")
@@ -101,7 +109,7 @@ def main(set: str, version: str, nixpkgs: pathlib.Path):
set_dir.mkdir(parents=True, exist_ok=True)
with (set_dir / "default.nix").open("w") as fd:
- fd.write(ROOT_TEMPLATE.render(packages=results.keys()) + "\n")
+ fd.write(ROOT_TEMPLATE.render(packages=sorted(results.keys())) + "\n")
sources_dir = generated_dir / "sources"
sources_dir.mkdir(parents=True, exist_ok=True)
diff --git a/third_party/nixpkgs/maintainers/scripts/kde/utils.py b/third_party/nixpkgs/maintainers/scripts/kde/utils.py
index 7a82c4955c..b3a00093d7 100644
--- a/third_party/nixpkgs/maintainers/scripts/kde/utils.py
+++ b/third_party/nixpkgs/maintainers/scripts/kde/utils.py
@@ -122,10 +122,7 @@ class KDERepoMetadata:
dep_graph={},
)
- dep_specs = [
- "dependency-data-common",
- "dependency-data-kf6-qt6"
- ]
+ dep_specs = ["dependency-data-stable-kf6-qt6"]
dep_graph = collections.defaultdict(set)
for spec in dep_specs:
diff --git a/third_party/nixpkgs/maintainers/scripts/luarocks-packages.csv b/third_party/nixpkgs/maintainers/scripts/luarocks-packages.csv
index 939905ab81..a4e46e6991 100644
--- a/third_party/nixpkgs/maintainers/scripts/luarocks-packages.csv
+++ b/third_party/nixpkgs/maintainers/scripts/luarocks-packages.csv
@@ -8,6 +8,7 @@ busted,,,,,,
cassowary,,,,,,marsam alerque
cldr,,,,,,alerque
compat53,,,,,,vcunat
+commons.nvim,,,,,,mrcjkb
cosmo,,,,,,marsam
coxpcall,,,,1.17.0-1,,
cqueues,,,,,,vcunat
@@ -18,6 +19,8 @@ fennel,,,,,,misterio77
fidget.nvim,,,,,,mrcjkb
fifo,,,,,,
fluent,,,,,,alerque
+funnyfiles.nvim,,,,,,mrcjkb
+fzf-lua,,,,,,mrcjkb
fzy,,,,,,mrcjkb
gitsigns.nvim,https://github.com/lewis6991/gitsigns.nvim.git,,,,5.1,
haskell-tools.nvim,,,,,,
@@ -85,6 +88,7 @@ luaunbound,,,,,,
luaunit,,,,,,lockejan
luautf8,,,,,,pstn
luazip,,,,,,
+lua-utils.nvim,,,,,,mrcjkb
lua-yajl,,,,,,pstn
lua-iconv,,,,7.0.0,,
luuid,,,,20120509-2,,
@@ -95,17 +99,24 @@ magick,,,,,5.1,donovanglover
markdown,,,,,,
mediator_lua,,,,,,
middleclass,,,,,,
+mimetypes,,,,,,
mpack,,,,,,
moonscript,https://github.com/leafo/moonscript.git,dev-1,,,,arobyn
+neotest,,,,,,mrcjkb
nlua,,,,,,teto
nui.nvim,,,,,,mrcjkb
nvim-cmp,https://github.com/hrsh7th/nvim-cmp,,,,,
nvim-nio,,,,,,mrcjkb
+pathlib.nvim,,,,,,
penlight,https://github.com/lunarmodules/Penlight.git,,,,,alerque
plenary.nvim,https://github.com/nvim-lua/plenary.nvim.git,,,,5.1,
rapidjson,https://github.com/xpol/lua-rapidjson.git,,,,,
rocks.nvim,,,,,5.1,teto mrcjkb
rest.nvim,,,,,5.1,teto
+rocks.nvim,,,,,,mrcjkb
+rocks-git.nvim,,,,,,mrcjkb
+rocks-config.nvim,,,,,,mrcjkb
+rocks-dev.nvim,,,,,,mrcjkb
rustaceanvim,,,,,,mrcjkb
say,https://github.com/Olivine-Labs/say.git,,,,,
serpent,,,,,,lockejan
@@ -116,6 +127,7 @@ stdlib,,,,41.2.2,,vyp
teal-language-server,,,http://luarocks.org/dev,,,
telescope.nvim,,,,,5.1,
telescope-manix,,,,,,
+tiktoken_core,,,,,,natsukium
tl,,,,,,mephistophiles
toml,,,,,,mrcjkb
toml-edit,,,,,5.1,mrcjkb
diff --git a/third_party/nixpkgs/maintainers/scripts/mdize-module.sh b/third_party/nixpkgs/maintainers/scripts/mdize-module.sh
deleted file mode 100755
index e2d2e5467a..0000000000
--- a/third_party/nixpkgs/maintainers/scripts/mdize-module.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#! /usr/bin/env nix-shell
-#! nix-shell -I nixpkgs=. -i bash -p delta jq perl
-
-set -euo pipefail
-shopt -s inherit_errexit
-
-cat <<'EOF'
-This script attempts to automatically convert option descriptions from
-DocBook syntax to markdown. Naturally this process is incomplete and
-imperfect, so any changes generated by this script MUST be reviewed.
-
-Possible problems include: incorrectly replaced tags, badly formatted
-markdown, DocBook tags this script doesn't recognize remaining in the
-output and crashing the docs build, incorrect escaping of markdown
-metacharacters, incorrect unescaping of XML entities—and the list goes on.
-
-Always review the generated changes!
-
-Some known limitations:
- - Does not transform literalDocBook items
- - Replacements can occur in non-option code, such as string literals
-
-
-EOF
-
-
-
-build-options-json() {
- nix-build --no-out-link --expr '
- let
- sys = import ./nixos/default.nix {
- configuration = {};
- };
- in
- [
- sys.config.system.build.manual.optionsJSON
- ]
- '
-}
-
-
-
-git diff --quiet || {
- echo "Worktree is dirty. Please stash or commit first."
- exit 1
-}
-
-echo "Building options.json ..."
-old_options=$(build-options-json)
-
-echo "Applying replacements ..."
-perl -pi -e '
- BEGIN {
- undef $/;
- }
-
- s,([^`]*?) ,`$1`,smg;
- s,([^»]*?) ,«$1»,smg;
- s,([^`]*?) ,{file}`$1`,smg;
- s,([^`]*?) ,{option}`$1`,smg;
- s,([^`]*?)
,`$1`,smg;
- s,([^`]*?) ,{command}`$1`,smg;
- s, ,<$1>,smg;
- s, (.*?),[$2]($1),smg;
- s,([^`]*?) ,`$1`,smg;
- s,([^*]*?) ,*$1*,smg;
- s,\s*
- \s*(.*?)\s* \s*
- \s*(.*?)\s* \s*
- ,{manpage}`$1($2)`,smgx;
- s,^( +description =),\1 lib.mdDoc,smg;
-' "$@"
-
-echo "Building options.json again ..."
-new_options=$(build-options-json)
-
-
-! cmp -s {$old_options,$new_options}/share/doc/nixos/options.json && {
- diff -U10 \
- <(jq . <$old_options/share/doc/nixos/options.json) \
- <(jq . <$new_options/share/doc/nixos/options.json) \
- | delta
-}
diff --git a/third_party/nixpkgs/maintainers/scripts/nix-generate-from-cpan.nix b/third_party/nixpkgs/maintainers/scripts/nix-generate-from-cpan.nix
index bf48a53186..a8135f4b30 100644
--- a/third_party/nixpkgs/maintainers/scripts/nix-generate-from-cpan.nix
+++ b/third_party/nixpkgs/maintainers/scripts/nix-generate-from-cpan.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation {
meta = {
maintainers = with lib.maintainers; [ eelco ];
description = "Utility to generate a Nix expression for a Perl package from CPAN";
+ mainProgram = "nix-generate-from-cpan";
platforms = lib.platforms.unix;
};
}
diff --git a/third_party/nixpkgs/maintainers/scripts/nixpkgs-lint.nix b/third_party/nixpkgs/maintainers/scripts/nixpkgs-lint.nix
index 873905373a..b400ce034b 100644
--- a/third_party/nixpkgs/maintainers/scripts/nixpkgs-lint.nix
+++ b/third_party/nixpkgs/maintainers/scripts/nixpkgs-lint.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation {
meta = with lib; {
maintainers = [ maintainers.eelco ];
description = "A utility for Nixpkgs contributors to check Nixpkgs for common errors";
+ mainProgram = "nixpkgs-lint";
platforms = platforms.unix;
};
}
diff --git a/third_party/nixpkgs/maintainers/scripts/pluginupdate.py b/third_party/nixpkgs/maintainers/scripts/pluginupdate.py
index 056abda85b..239f529f9e 100644
--- a/third_party/nixpkgs/maintainers/scripts/pluginupdate.py
+++ b/third_party/nixpkgs/maintainers/scripts/pluginupdate.py
@@ -1,7 +1,7 @@
# python library used to update plugins:
# - pkgs/applications/editors/vim/plugins/update.py
# - pkgs/applications/editors/kakoune/plugins/update.py
-# - maintainers/scripts/update-luarocks-packages
+# - pkgs/development/lua-modules/updater/updater.py
# format:
# $ nix run nixpkgs#black maintainers/scripts/pluginupdate.py
diff --git a/third_party/nixpkgs/maintainers/team-list.nix b/third_party/nixpkgs/maintainers/team-list.nix
index d43d6e975a..412cafb627 100644
--- a/third_party/nixpkgs/maintainers/team-list.nix
+++ b/third_party/nixpkgs/maintainers/team-list.nix
@@ -96,6 +96,15 @@ with lib.maintainers; {
shortName = "Blockchains";
};
+ budgie = {
+ members = [
+ bobby285271
+ federicoschonborn
+ ];
+ scope = "Maintain Budgie desktop environment";
+ shortName = "Budgie";
+ };
+
buildbot = {
members = [
lopsided98
@@ -137,6 +146,15 @@ with lib.maintainers; {
enableFeatureFreezePing = true;
};
+ cloudposse = {
+ members = [
+ dudymas
+ ];
+ scope = "Maintain atmos and applications made by the Cloud Posse team.";
+ shortName = "CloudPosse";
+ enableFeatureFreezePing = true;
+ };
+
coq = {
members = [
cohencyril
@@ -188,6 +206,7 @@ with lib.maintainers; {
ivar
mdarocha
corngood
+ ggg
raphaelr
jamiemagee
anpin
@@ -247,7 +266,6 @@ with lib.maintainers; {
docs = {
members = [
- asymmetric
ryantm
];
scope = "Maintain nixpkgs/NixOS documentation and tools for building it.";
@@ -302,6 +320,8 @@ with lib.maintainers; {
dpausp
frlan
leona
+ osnyx
+ ma27
];
scope = "Team for Flying Circus employees who collectively maintain packages.";
shortName = "Flying Circus employees";
@@ -340,6 +360,7 @@ with lib.maintainers; {
geospatial = {
members = [
imincik
+ l0b0
nh2
nialov
sikmir
@@ -429,8 +450,8 @@ with lib.maintainers; {
helsinki-systems = {
# Verify additions to this team with at least one already existing member of the team.
members = [
- ajs124
das_j
+ conni2461
];
scope = "Group registration for packages maintained by Helsinki Systems";
shortName = "Helsinki Systems employees";
@@ -464,6 +485,7 @@ with lib.maintainers; {
ryantm
lassulus
yayayayaka
+ asymmetric
];
scope = "Maintain Jitsi.";
shortName = "Jitsi";
@@ -494,7 +516,9 @@ with lib.maintainers; {
members = [
aanderse
cpages
+ dschrempf
edwtjo
+ kazenyuk
minijackson
peterhoeg
sephalon
@@ -547,10 +571,13 @@ with lib.maintainers; {
ericson2314
lovek323
qyliss
- raitobezarius
+ RossComputerGuy
rrbutani
sternenseemann
];
+ githubTeams = [
+ "llvm"
+ ];
scope = "Maintain LLVM package sets and related packages";
shortName = "LLVM";
enableFeatureFreezePing = true;
@@ -868,6 +895,7 @@ with lib.maintainers; {
members = [
Madouura
Flakebi
+ mschwaig
];
githubTeams = [
"rocm-maintainers"
@@ -927,6 +955,18 @@ with lib.maintainers; {
shortName = "Serokell employees";
};
+ steam = {
+ members = [
+ atemu
+ eclairevoyant
+ jonringer
+ k900
+ mkg20001
+ ];
+ scope = "Maintain steam module and packages";
+ shortName = "Steam";
+ };
+
systemd = {
members = [ ];
githubTeams = [
diff --git a/third_party/nixpkgs/nixos/doc/manual/administration/cleaning-store.chapter.md b/third_party/nixpkgs/nixos/doc/manual/administration/cleaning-store.chapter.md
index c9140d0869..4f40488205 100644
--- a/third_party/nixpkgs/nixos/doc/manual/administration/cleaning-store.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/administration/cleaning-store.chapter.md
@@ -21,8 +21,10 @@ You can tell NixOS in `configuration.nix` to run this unit automatically
at certain points in time, for instance, every night at 03:15:
```nix
-nix.gc.automatic = true;
-nix.gc.dates = "03:15";
+{
+ nix.gc.automatic = true;
+ nix.gc.dates = "03:15";
+}
```
The commands above do not remove garbage collector roots, such as old
diff --git a/third_party/nixpkgs/nixos/doc/manual/administration/container-networking.section.md b/third_party/nixpkgs/nixos/doc/manual/administration/container-networking.section.md
index 0873768376..723cf211d8 100644
--- a/third_party/nixpkgs/nixos/doc/manual/administration/container-networking.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/administration/container-networking.section.md
@@ -26,9 +26,11 @@ host to rewrite container traffic to use your external IP address. This
can be accomplished using the following configuration on the host:
```nix
-networking.nat.enable = true;
-networking.nat.internalInterfaces = ["ve-+"];
-networking.nat.externalInterface = "eth0";
+{
+ networking.nat.enable = true;
+ networking.nat.internalInterfaces = ["ve-+"];
+ networking.nat.externalInterface = "eth0";
+}
```
where `eth0` should be replaced with the desired external interface.
@@ -38,7 +40,9 @@ If you are using Network Manager, you need to explicitly prevent it from
managing container interfaces:
```nix
-networking.networkmanager.unmanaged = [ "interface-name:ve-*" ];
+{
+ networking.networkmanager.unmanaged = [ "interface-name:ve-*" ];
+}
```
You may need to restart your system for the changes to take effect.
diff --git a/third_party/nixpkgs/nixos/doc/manual/administration/control-groups.chapter.md b/third_party/nixpkgs/nixos/doc/manual/administration/control-groups.chapter.md
index abe8dd80b5..8682236ca1 100644
--- a/third_party/nixpkgs/nixos/doc/manual/administration/control-groups.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/administration/control-groups.chapter.md
@@ -39,7 +39,9 @@ they were in the same cgroup, then the PostgreSQL process would get
`configuration.nix`:
```nix
-systemd.services.httpd.serviceConfig.CPUShares = 512;
+{
+ systemd.services.httpd.serviceConfig.CPUShares = 512;
+}
```
By default, every cgroup has 1024 CPU shares, so this will halve the CPU
@@ -52,7 +54,9 @@ limits can be specified in `configuration.nix`; for instance, to limit
`httpd.service` to 512 MiB of RAM (excluding swap):
```nix
-systemd.services.httpd.serviceConfig.MemoryLimit = "512M";
+{
+ systemd.services.httpd.serviceConfig.MemoryLimit = "512M";
+}
```
The command `systemd-cgtop` shows a continuously updated list of all
diff --git a/third_party/nixpkgs/nixos/doc/manual/administration/declarative-containers.section.md b/third_party/nixpkgs/nixos/doc/manual/administration/declarative-containers.section.md
index eaa50d3c66..f16fa8332b 100644
--- a/third_party/nixpkgs/nixos/doc/manual/administration/declarative-containers.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/administration/declarative-containers.section.md
@@ -5,13 +5,15 @@ You can also specify containers and their configuration in the host's
shall be a container named `database` running PostgreSQL:
```nix
-containers.database =
- { config =
- { config, pkgs, ... }:
- { services.postgresql.enable = true;
- services.postgresql.package = pkgs.postgresql_14;
- };
- };
+{
+ containers.database =
+ { config =
+ { config, pkgs, ... }:
+ { services.postgresql.enable = true;
+ services.postgresql.package = pkgs.postgresql_14;
+ };
+ };
+}
```
If you run `nixos-rebuild switch`, the container will be built. If the
@@ -25,11 +27,13 @@ cannot change the network configuration. You can give a container its
own network as follows:
```nix
-containers.database = {
- privateNetwork = true;
- hostAddress = "192.168.100.10";
- localAddress = "192.168.100.11";
-};
+{
+ containers.database = {
+ privateNetwork = true;
+ hostAddress = "192.168.100.10";
+ localAddress = "192.168.100.11";
+ };
+}
```
This gives the container a private virtual Ethernet interface with IP
diff --git a/third_party/nixpkgs/nixos/doc/manual/administration/service-mgmt.chapter.md b/third_party/nixpkgs/nixos/doc/manual/administration/service-mgmt.chapter.md
index bc9bdbe370..49e8d801fb 100644
--- a/third_party/nixpkgs/nixos/doc/manual/administration/service-mgmt.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/administration/service-mgmt.chapter.md
@@ -82,7 +82,9 @@ In order to enable a systemd *system* service with provided upstream
package, use (e.g):
```nix
-systemd.packages = [ pkgs.packagekit ];
+{
+ systemd.packages = [ pkgs.packagekit ];
+}
```
Usually NixOS modules written by the community do the above, plus take
diff --git a/third_party/nixpkgs/nixos/doc/manual/administration/system-state.chapter.md b/third_party/nixpkgs/nixos/doc/manual/administration/system-state.chapter.md
index 6840cc3902..89013933cd 100644
--- a/third_party/nixpkgs/nixos/doc/manual/administration/system-state.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/administration/system-state.chapter.md
@@ -7,7 +7,7 @@ However, it is possible and not-uncommon to create [impermanent systems], whose
`rootfs` is either a `tmpfs` or reset during boot. While NixOS itself supports
this kind of configuration, special care needs to be taken.
-[impermanent systems]: https://nixos.wiki/wiki/Impermanence
+[impermanent systems]: https://wiki.nixos.org/wiki/Impermanence
```{=include=} sections
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/abstractions.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/abstractions.section.md
index bf26e4c51e..5bc44aa722 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/abstractions.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/abstractions.section.md
@@ -47,9 +47,9 @@ You can write a `let` wherever an expression is allowed. Thus, you also could ha
```nix
{
services.httpd.virtualHosts =
- let commonConfig = ...; in
- { "blog.example.org" = (commonConfig // { ... })
- "wiki.example.org" = (commonConfig // { ... })
+ let commonConfig = { /* ... */ }; in
+ { "blog.example.org" = (commonConfig // { /* ... */ });
+ "wiki.example.org" = (commonConfig // { /* ... */ });
};
}
```
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/ad-hoc-network-config.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/ad-hoc-network-config.section.md
index 4478d77f36..ecb06ad984 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/ad-hoc-network-config.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/ad-hoc-network-config.section.md
@@ -6,8 +6,10 @@ is useful for doing network configuration not covered by the existing NixOS
modules. For instance, to statically configure an IPv6 address:
```nix
-networking.localCommands =
- ''
- ip -6 addr add 2001:610:685:1::1/64 dev eth0
- '';
+{
+ networking.localCommands =
+ ''
+ ip -6 addr add 2001:610:685:1::1/64 dev eth0
+ '';
+}
```
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/adding-custom-packages.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/adding-custom-packages.section.md
index 2340723e07..f9a5221d6c 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/adding-custom-packages.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/adding-custom-packages.section.md
@@ -23,7 +23,9 @@ Then you write and test the package as described in the Nixpkgs manual.
Finally, you add it to [](#opt-environment.systemPackages), e.g.
```nix
-environment.systemPackages = [ pkgs.my-package ];
+{
+ environment.systemPackages = [ pkgs.my-package ];
+}
```
and you run `nixos-rebuild`, specifying your own Nixpkgs tree:
@@ -38,24 +40,28 @@ tree. For instance, here is how you specify a build of the
`configuration.nix`:
```nix
-environment.systemPackages =
- let
- my-hello = with pkgs; stdenv.mkDerivation rec {
- name = "hello-2.8";
- src = fetchurl {
- url = "mirror://gnu/hello/${name}.tar.gz";
- hash = "sha256-5rd/gffPfa761Kn1tl3myunD8TuM+66oy1O7XqVGDXM=";
+{
+ environment.systemPackages =
+ let
+ my-hello = with pkgs; stdenv.mkDerivation rec {
+ name = "hello-2.8";
+ src = fetchurl {
+ url = "mirror://gnu/hello/${name}.tar.gz";
+ hash = "sha256-5rd/gffPfa761Kn1tl3myunD8TuM+66oy1O7XqVGDXM=";
+ };
};
- };
- in
- [ my-hello ];
+ in
+ [ my-hello ];
+}
```
Of course, you can also move the definition of `my-hello` into a
separate Nix expression, e.g.
```nix
-environment.systemPackages = [ (import ./my-hello.nix) ];
+{
+ environment.systemPackages = [ (import ./my-hello.nix) ];
+}
```
where `my-hello.nix` contains:
@@ -88,7 +94,9 @@ section](#module-services-flatpak). AppImages will not run "as-is" on NixOS.
First you need to install `appimage-run`: add to `/etc/nixos/configuration.nix`
```nix
-environment.systemPackages = [ pkgs.appimage-run ];
+{
+ environment.systemPackages = [ pkgs.appimage-run ];
+}
```
Then instead of running the AppImage "as-is", run `appimage-run foo.appimage`.
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/config-file.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/config-file.section.md
index b010026c58..e213aae29a 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/config-file.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/config-file.section.md
@@ -5,7 +5,7 @@ The NixOS configuration file generally looks like this:
```nix
{ config, pkgs, ... }:
-{ option definitions
+{ /* option definitions */
}
```
@@ -80,7 +80,9 @@ Strings
: Strings are enclosed in double quotes, e.g.
```nix
- networking.hostName = "dexter";
+ {
+ networking.hostName = "dexter";
+ }
```
Special characters can be escaped by prefixing them with a backslash
@@ -89,11 +91,13 @@ Strings
Multi-line strings can be enclosed in *double single quotes*, e.g.
```nix
- networking.extraHosts =
- ''
- 127.0.0.2 other-localhost
- 10.0.0.1 server
- '';
+ {
+ networking.extraHosts =
+ ''
+ 127.0.0.2 other-localhost
+ 10.0.0.1 server
+ '';
+ }
```
The main difference is that it strips from each line a number of
@@ -108,8 +112,10 @@ Booleans
: These can be `true` or `false`, e.g.
```nix
- networking.firewall.enable = true;
- networking.firewall.allowPing = false;
+ {
+ networking.firewall.enable = true;
+ networking.firewall.allowPing = false;
+ }
```
Integers
@@ -117,7 +123,9 @@ Integers
: For example,
```nix
- boot.kernel.sysctl."net.ipv4.tcp_keepalive_time" = 60;
+ {
+ boot.kernel.sysctl."net.ipv4.tcp_keepalive_time" = 60;
+ }
```
(Note that here the attribute name `net.ipv4.tcp_keepalive_time` is
@@ -132,11 +140,13 @@ Sets
braces, as in the option definition
```nix
- fileSystems."/boot" =
- { device = "/dev/sda1";
- fsType = "ext4";
- options = [ "rw" "data=ordered" "relatime" ];
- };
+ {
+ fileSystems."/boot" =
+ { device = "/dev/sda1";
+ fsType = "ext4";
+ options = [ "rw" "data=ordered" "relatime" ];
+ };
+ }
```
Lists
@@ -145,13 +155,17 @@ Lists
separated by whitespace, like this:
```nix
- boot.kernelModules = [ "fuse" "kvm-intel" "coretemp" ];
+ {
+ boot.kernelModules = [ "fuse" "kvm-intel" "coretemp" ];
+ }
```
List elements can be any other type, e.g. sets:
```nix
- swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];
+ {
+ swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];
+ }
```
Packages
@@ -161,12 +175,14 @@ Packages
argument `pkgs`. Typical uses:
```nix
- environment.systemPackages =
- [ pkgs.thunderbird
- pkgs.emacs
- ];
+ {
+ environment.systemPackages =
+ [ pkgs.thunderbird
+ pkgs.emacs
+ ];
- services.postgresql.package = pkgs.postgresql_14;
+ services.postgresql.package = pkgs.postgresql_14;
+ }
```
The latter option definition changes the default PostgreSQL package
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/customizing-packages.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/customizing-packages.section.md
index 76413b7d84..074932b3f1 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/customizing-packages.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/customizing-packages.section.md
@@ -1,11 +1,33 @@
# Customising Packages {#sec-customising-packages}
-Some packages in Nixpkgs have options to enable or disable optional
-functionality or change other aspects of the package.
+The Nixpkgs configuration for a NixOS system is set by the {option}`nixpkgs.config` option.
+
+::::{.example}
+# Globally allow unfree packages
+
+```nix
+{
+ nixpkgs.config = {
+ allowUnfree = true;
+ };
+}
+```
+
+:::{.note}
+This only allows unfree software in the given NixOS configuration.
+For users invoking Nix commands such as [`nix-build`](https://nixos.org/manual/nix/stable/command-ref/nix-build), Nixpkgs is configured independently.
+See the [Nixpkgs manual section on global configuration](https://nixos.org/manual/nixpkgs/unstable/#chap-packageconfig) for details.
+:::
+::::
+
+
+
+Some packages in Nixpkgs have options to enable or disable optional functionality, or change other aspects of the package.
::: {.warning}
-Unfortunately, Nixpkgs currently lacks a way to query available
-configuration options.
+Unfortunately, Nixpkgs currently lacks a way to query available package configuration options.
:::
::: {.note}
@@ -16,18 +38,20 @@ Examples include:
You can use them like this:
```nix
-environment.systemPackages = with pkgs; [
- sl
- (pass.withExtensions (subpkgs: with subpkgs; [
- pass-audit
- pass-otp
- pass-genphrase
- ]))
- (python3.withPackages (subpkgs: with subpkgs; [
- requests
- ]))
- cowsay
-];
+{
+ environment.systemPackages = with pkgs; [
+ sl
+ (pass.withExtensions (subpkgs: with subpkgs; [
+ pass-audit
+ pass-otp
+ pass-genphrase
+ ]))
+ (python3.withPackages (subpkgs: with subpkgs; [
+ requests
+ ]))
+ cowsay
+ ];
+}
```
:::
@@ -38,7 +62,9 @@ dependency on GTK 2. If you want to build it against GTK 3, you can
specify that as follows:
```nix
-environment.systemPackages = [ (pkgs.emacs.override { gtk = pkgs.gtk3; }) ];
+{
+ environment.systemPackages = [ (pkgs.emacs.override { gtk = pkgs.gtk3; }) ];
+}
```
The function `override` performs the call to the Nix function that
@@ -58,12 +84,14 @@ of the package, such as the source code. For instance, if you want to
override the source code of Emacs, you can say:
```nix
-environment.systemPackages = [
- (pkgs.emacs.overrideAttrs (oldAttrs: {
- name = "emacs-25.0-pre";
- src = /path/to/my/emacs/tree;
- }))
-];
+{
+ environment.systemPackages = [
+ (pkgs.emacs.overrideAttrs (oldAttrs: {
+ name = "emacs-25.0-pre";
+ src = /path/to/my/emacs/tree;
+ }))
+ ];
+}
```
Here, `overrideAttrs` takes the Nix derivation specified by `pkgs.emacs`
@@ -80,9 +108,11 @@ two instances of the package. If you want to have everything depend on
your customised instance, you can apply a *global* override as follows:
```nix
-nixpkgs.config.packageOverrides = pkgs:
- { emacs = pkgs.emacs.override { gtk = pkgs.gtk3; };
- };
+{
+ nixpkgs.config.packageOverrides = pkgs:
+ { emacs = pkgs.emacs.override { gtk = pkgs.gtk3; };
+ };
+}
```
The effect of this definition is essentially equivalent to modifying the
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/declarative-packages.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/declarative-packages.section.md
index 480e250da8..6cdd520dcf 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/declarative-packages.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/declarative-packages.section.md
@@ -7,7 +7,9 @@ following line to `configuration.nix` enables the Mozilla Thunderbird
email application:
```nix
-environment.systemPackages = [ pkgs.thunderbird ];
+{
+ environment.systemPackages = [ pkgs.thunderbird ];
+}
```
The effect of this specification is that the Thunderbird package from
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/file-systems.chapter.md b/third_party/nixpkgs/nixos/doc/manual/configuration/file-systems.chapter.md
index 3dfdd20ac3..4bdd9c60e3 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/file-systems.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/file-systems.chapter.md
@@ -6,10 +6,12 @@ Ext4 file system on device `/dev/disk/by-label/data` onto the mount
point `/data`:
```nix
-fileSystems."/data" =
- { device = "/dev/disk/by-label/data";
- fsType = "ext4";
- };
+{
+ fileSystems."/data" =
+ { device = "/dev/disk/by-label/data";
+ fsType = "ext4";
+ };
+}
```
This will create an entry in `/etc/fstab`, which will generate a
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/firewall.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/firewall.section.md
index dbf0ffb927..9a71217944 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/firewall.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/firewall.section.md
@@ -5,14 +5,18 @@ and other unexpected packets. The firewall applies to both IPv4 and IPv6
traffic. It is enabled by default. It can be disabled as follows:
```nix
-networking.firewall.enable = false;
+{
+ networking.firewall.enable = false;
+}
```
If the firewall is enabled, you can open specific TCP ports to the
outside world:
```nix
-networking.firewall.allowedTCPPorts = [ 80 443 ];
+{
+ networking.firewall.allowedTCPPorts = [ 80 443 ];
+}
```
Note that TCP port 22 (ssh) is opened automatically if the SSH daemon is
@@ -22,10 +26,12 @@ enabled (`services.openssh.enable = true`). UDP ports can be opened through
To open ranges of TCP ports:
```nix
-networking.firewall.allowedTCPPortRanges = [
- { from = 4000; to = 4007; }
- { from = 8000; to = 8010; }
-];
+{
+ networking.firewall.allowedTCPPortRanges = [
+ { from = 4000; to = 4007; }
+ { from = 8000; to = 8010; }
+ ];
+}
```
Similarly, UDP port ranges can be opened through
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/gpu-accel.chapter.md b/third_party/nixpkgs/nixos/doc/manual/configuration/gpu-accel.chapter.md
index aa63aec616..3b98bdd97c 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/gpu-accel.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/gpu-accel.chapter.md
@@ -55,9 +55,11 @@ supported through the rocmPackages.clr.icd package. Adding this package to
enables OpenCL support:
```nix
-hardware.opengl.extraPackages = [
- rocmPackages.clr.icd
-];
+{
+ hardware.opengl.extraPackages = [
+ rocmPackages.clr.icd
+ ];
+}
```
### Intel {#sec-gpu-accel-opencl-intel}
@@ -74,9 +76,11 @@ to enable OpenCL support. For example, for Gen8 and later GPUs, the following
configuration can be used:
```nix
-hardware.opengl.extraPackages = [
- intel-compute-runtime
-];
+{
+ hardware.opengl.extraPackages = [
+ intel-compute-runtime
+ ];
+}
```
## Vulkan {#sec-gpu-accel-vulkan}
@@ -141,20 +145,22 @@ makes amdvlk the default driver and hides radv and lavapipe from the device list
A specific driver can be forced as follows:
```nix
-hardware.opengl.extraPackages = [
- pkgs.amdvlk
-];
+{
+ hardware.opengl.extraPackages = [
+ pkgs.amdvlk
+ ];
-# To enable Vulkan support for 32-bit applications, also add:
-hardware.opengl.extraPackages32 = [
- pkgs.driversi686Linux.amdvlk
-];
+ # To enable Vulkan support for 32-bit applications, also add:
+ hardware.opengl.extraPackages32 = [
+ pkgs.driversi686Linux.amdvlk
+ ];
-# Force radv
-environment.variables.AMD_VULKAN_ICD = "RADV";
-# Or
-environment.variables.VK_ICD_FILENAMES =
- "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json";
+ # Force radv
+ environment.variables.AMD_VULKAN_ICD = "RADV";
+ # Or
+ environment.variables.VK_ICD_FILENAMES =
+ "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json";
+}
```
## VA-API {#sec-gpu-accel-va-api}
@@ -178,17 +184,21 @@ $ nix-shell -p libva-utils --run vainfo
Modern Intel GPUs use the iHD driver, which can be installed with:
```nix
-hardware.opengl.extraPackages = [
- intel-media-driver
-];
+{
+ hardware.opengl.extraPackages = [
+ intel-media-driver
+ ];
+}
```
Older Intel GPUs use the i965 driver, which can be installed with:
```nix
-hardware.opengl.extraPackages = [
- intel-vaapi-driver
-];
+{
+ hardware.opengl.extraPackages = [
+ intel-vaapi-driver
+ ];
+}
```
## Common issues {#sec-gpu-accel-common-issues}
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/ipv4-config.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/ipv4-config.section.md
index c73024b856..0464f53898 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/ipv4-config.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/ipv4-config.section.md
@@ -5,18 +5,22 @@ configure network interfaces. However, you can configure an interface
manually as follows:
```nix
-networking.interfaces.eth0.ipv4.addresses = [ {
- address = "192.168.1.2";
- prefixLength = 24;
-} ];
+{
+ networking.interfaces.eth0.ipv4.addresses = [ {
+ address = "192.168.1.2";
+ prefixLength = 24;
+ } ];
+}
```
Typically you'll also want to set a default gateway and set of name
servers:
```nix
-networking.defaultGateway = "192.168.1.1";
-networking.nameservers = [ "8.8.8.8" ];
+{
+ networking.defaultGateway = "192.168.1.1";
+ networking.nameservers = [ "8.8.8.8" ];
+}
```
::: {.note}
@@ -28,7 +32,9 @@ configuration is performed by `network-setup.service`.
The host name is set using [](#opt-networking.hostName):
```nix
-networking.hostName = "cartman";
+{
+ networking.hostName = "cartman";
+}
```
The default host name is `nixos`. Set it to the empty string (`""`) to
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/ipv6-config.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/ipv6-config.section.md
index ce66f53ed4..b4fe0d759b 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/ipv6-config.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/ipv6-config.section.md
@@ -9,34 +9,42 @@ may be overridden on a per-interface basis by
IPv6 support globally by setting:
```nix
-networking.enableIPv6 = false;
+{
+ networking.enableIPv6 = false;
+}
```
You can disable IPv6 on a single interface using a normal sysctl (in
this example, we use interface `eth0`):
```nix
-boot.kernel.sysctl."net.ipv6.conf.eth0.disable_ipv6" = true;
+{
+ boot.kernel.sysctl."net.ipv6.conf.eth0.disable_ipv6" = true;
+}
```
As with IPv4 networking interfaces are automatically configured via
DHCPv6. You can configure an interface manually:
```nix
-networking.interfaces.eth0.ipv6.addresses = [ {
- address = "fe00:aa:bb:cc::2";
- prefixLength = 64;
-} ];
+{
+ networking.interfaces.eth0.ipv6.addresses = [ {
+ address = "fe00:aa:bb:cc::2";
+ prefixLength = 64;
+ } ];
+}
```
For configuring a gateway, optionally with explicitly specified
interface:
```nix
-networking.defaultGateway6 = {
- address = "fe00::1";
- interface = "enp0s3";
-};
+{
+ networking.defaultGateway6 = {
+ address = "fe00::1";
+ interface = "enp0s3";
+ };
+}
```
See [](#sec-ipv4) for similar examples and additional information.
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/kubernetes.chapter.md b/third_party/nixpkgs/nixos/doc/manual/configuration/kubernetes.chapter.md
index f39726090e..fba40b6487 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/kubernetes.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/kubernetes.chapter.md
@@ -7,14 +7,16 @@ There are generally two ways of enabling Kubernetes on NixOS. One way is
to enable and configure cluster components appropriately by hand:
```nix
-services.kubernetes = {
- apiserver.enable = true;
- controllerManager.enable = true;
- scheduler.enable = true;
- addonManager.enable = true;
- proxy.enable = true;
- flannel.enable = true;
-};
+{
+ services.kubernetes = {
+ apiserver.enable = true;
+ controllerManager.enable = true;
+ scheduler.enable = true;
+ addonManager.enable = true;
+ proxy.enable = true;
+ flannel.enable = true;
+ };
+}
```
Another way is to assign cluster roles ("master" and/or "node") to
@@ -22,20 +24,26 @@ the host. This enables apiserver, controllerManager, scheduler,
addonManager, kube-proxy and etcd:
```nix
-services.kubernetes.roles = [ "master" ];
+{
+ services.kubernetes.roles = [ "master" ];
+}
```
While this will enable the kubelet and kube-proxy only:
```nix
-services.kubernetes.roles = [ "node" ];
+{
+ services.kubernetes.roles = [ "node" ];
+}
```
Assigning both the master and node roles is usable if you want a single
node Kubernetes cluster for dev or testing purposes:
```nix
-services.kubernetes.roles = [ "master" "node" ];
+{
+ services.kubernetes.roles = [ "master" "node" ];
+}
```
Note: Assigning either role will also default both
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/linux-kernel.chapter.md b/third_party/nixpkgs/nixos/doc/manual/configuration/linux-kernel.chapter.md
index 31d8d1a7d0..3bc97446f4 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/linux-kernel.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/linux-kernel.chapter.md
@@ -5,7 +5,9 @@ option `boot.kernelPackages`. For instance, this selects the Linux 3.10
kernel:
```nix
-boot.kernelPackages = pkgs.linuxKernel.packages.linux_3_10;
+{
+ boot.kernelPackages = pkgs.linuxKernel.packages.linux_3_10;
+}
```
Note that this not only replaces the kernel, but also packages that are
@@ -40,13 +42,15 @@ If you want to change the kernel configuration, you can use the
instance, to enable support for the kernel debugger KGDB:
```nix
-nixpkgs.config.packageOverrides = pkgs: pkgs.lib.recursiveUpdate pkgs {
- linuxKernel.kernels.linux_5_10 = pkgs.linuxKernel.kernels.linux_5_10.override {
- extraConfig = ''
- KGDB y
- '';
+{
+ nixpkgs.config.packageOverrides = pkgs: pkgs.lib.recursiveUpdate pkgs {
+ linuxKernel.kernels.linux_5_10 = pkgs.linuxKernel.kernels.linux_5_10.override {
+ extraConfig = ''
+ KGDB y
+ '';
+ };
};
-};
+}
```
`extraConfig` takes a list of Linux kernel configuration options, one
@@ -59,14 +63,18 @@ by `udev`. You can force a module to be loaded via
[](#opt-boot.kernelModules), e.g.
```nix
-boot.kernelModules = [ "fuse" "kvm-intel" "coretemp" ];
+{
+ boot.kernelModules = [ "fuse" "kvm-intel" "coretemp" ];
+}
```
If the module is required early during the boot (e.g. to mount the root
file system), you can use [](#opt-boot.initrd.kernelModules):
```nix
-boot.initrd.kernelModules = [ "cifs" ];
+{
+ boot.initrd.kernelModules = [ "cifs" ];
+}
```
This causes the specified modules and their dependencies to be added to
@@ -76,7 +84,9 @@ Kernel runtime parameters can be set through
[](#opt-boot.kernel.sysctl), e.g.
```nix
-boot.kernel.sysctl."net.ipv4.tcp_keepalive_time" = 120;
+{
+ boot.kernel.sysctl."net.ipv4.tcp_keepalive_time" = 120;
+}
```
sets the kernel's TCP keepalive time to 120 seconds. To see the
@@ -89,7 +99,9 @@ Please refer to the Nixpkgs manual for the various ways of [building a custom ke
To use your custom kernel package in your NixOS configuration, set
```nix
-boot.kernelPackages = pkgs.linuxPackagesFor yourCustomKernel;
+{
+ boot.kernelPackages = pkgs.linuxPackagesFor yourCustomKernel;
+}
```
## Rust {#sec-linux-rust}
@@ -99,15 +111,17 @@ default. For kernel versions 6.7 or newer, experimental Rust support
can be enabled. In a NixOS configuration, set:
```nix
-boot.kernelPatches = [
- {
- name = "Rust Support";
- patch = null;
- features = {
- rust = true;
- };
- }
-];
+{
+ boot.kernelPatches = [
+ {
+ name = "Rust Support";
+ patch = null;
+ features = {
+ rust = true;
+ };
+ }
+ ];
+}
```
## Developing kernel modules {#sec-linux-config-developing-modules}
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/luks-file-systems.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/luks-file-systems.section.md
index 7615b95aef..4d2f625073 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/luks-file-systems.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/luks-file-systems.section.md
@@ -29,15 +29,19 @@ system is automatically mounted at boot time as `/`, add the following
to `configuration.nix`:
```nix
-boot.initrd.luks.devices.crypted.device = "/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d";
-fileSystems."/".device = "/dev/mapper/crypted";
+{
+ boot.initrd.luks.devices.crypted.device = "/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d";
+ fileSystems."/".device = "/dev/mapper/crypted";
+}
```
Should grub be used as bootloader, and `/boot` is located on an
encrypted partition, it is necessary to add the following grub option:
```nix
-boot.loader.grub.enableCryptodisk = true;
+{
+ boot.loader.grub.enableCryptodisk = true;
+}
```
## FIDO2 {#sec-luks-file-systems-fido2}
@@ -68,8 +72,10 @@ To ensure that this file system is decrypted using the FIDO2 compatible
key, add the following to `configuration.nix`:
```nix
-boot.initrd.luks.fido2Support = true;
-boot.initrd.luks.devices."/dev/sda2".fido2.credential = "f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7";
+{
+ boot.initrd.luks.fido2Support = true;
+ boot.initrd.luks.devices."/dev/sda2".fido2.credential = "f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7";
+}
```
You can also use the FIDO2 passwordless setup, but for security reasons,
@@ -77,7 +83,9 @@ you might want to enable it only when your device is PIN protected, such
as [Trezor](https://trezor.io/).
```nix
-boot.initrd.luks.devices."/dev/sda2".fido2.passwordLess = true;
+{
+ boot.initrd.luks.devices."/dev/sda2".fido2.passwordLess = true;
+}
```
### systemd Stage 1 {#sec-luks-file-systems-fido2-systemd}
@@ -88,13 +96,15 @@ unlocking the existing LUKS2 volume `root` using any enrolled FIDO2 compatible
tokens.
```nix
-boot.initrd = {
- luks.devices.root = {
- crypttabExtraOpts = [ "fido2-device=auto" ];
- device = "/dev/sda2";
+{
+ boot.initrd = {
+ luks.devices.root = {
+ crypttabExtraOpts = [ "fido2-device=auto" ];
+ device = "/dev/sda2";
+ };
+ systemd.enable = true;
};
- systemd.enable = true;
-};
+}
```
All tokens that should be used for unlocking the LUKS2-encrypted volume must
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/modularity.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/modularity.section.md
index f4a566d669..ba3bc79a36 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/modularity.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/modularity.section.md
@@ -16,7 +16,7 @@ including them from `configuration.nix`, e.g.:
{ imports = [ ./vpn.nix ./kde.nix ];
services.httpd.enable = true;
environment.systemPackages = [ pkgs.emacs ];
- ...
+ # ...
}
```
@@ -27,7 +27,7 @@ Here, we include two modules from the same directory, `vpn.nix` and
{ config, pkgs, ... }:
{ services.xserver.enable = true;
- services.xserver.displayManager.sddm.enable = true;
+ services.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
environment.systemPackages = [ pkgs.vim ];
}
@@ -42,7 +42,9 @@ merged last, so for list-type options, it will appear at the end of the
merged list. If you want it to appear first, you can use `mkBefore`:
```nix
-boot.kernelModules = mkBefore [ "kvm-intel" ];
+{
+ boot.kernelModules = mkBefore [ "kvm-intel" ];
+}
```
This causes the `kvm-intel` kernel module to be loaded before any other
@@ -60,7 +62,9 @@ When that happens, it's possible to force one definition take precedence
over the others:
```nix
-services.httpd.adminAddr = pkgs.lib.mkForce "bob@example.org";
+{
+ services.httpd.adminAddr = pkgs.lib.mkForce "bob@example.org";
+}
```
When using multiple modules, you may need to access configuration values
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/network-manager.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/network-manager.section.md
index 4bda21d34a..8e8dfabbf3 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/network-manager.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/network-manager.section.md
@@ -4,7 +4,9 @@ To facilitate network configuration, some desktop environments use
NetworkManager. You can enable NetworkManager by setting:
```nix
-networking.networkmanager.enable = true;
+{
+ networking.networkmanager.enable = true;
+}
```
some desktop managers (e.g., GNOME) enable NetworkManager automatically
@@ -14,7 +16,9 @@ All users that should have permission to change network settings must
belong to the `networkmanager` group:
```nix
-users.users.alice.extraGroups = [ "networkmanager" ];
+{
+ users.users.alice.extraGroups = [ "networkmanager" ];
+}
```
NetworkManager is controlled using either `nmcli` or `nmtui`
@@ -32,9 +36,11 @@ can be used together if desired. To do this you need to instruct
NetworkManager to ignore those interfaces like:
```nix
-networking.networkmanager.unmanaged = [
- "*" "except:type:wwan" "except:type:gsm"
-];
+{
+ networking.networkmanager.unmanaged = [
+ "*" "except:type:wwan" "except:type:gsm"
+ ];
+}
```
Refer to the option description for the exact syntax and references to
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/overlayfs.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/overlayfs.section.md
index 592fb7c2e6..7027a6f426 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/overlayfs.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/overlayfs.section.md
@@ -4,21 +4,23 @@ NixOS offers a convenient abstraction to create both read-only as well writable
overlays.
```nix
-fileSystems = {
- "/writable-overlay" = {
- overlay = {
- lowerdir = [ writableOverlayLowerdir ];
- upperdir = "/.rw-writable-overlay/upper";
- workdir = "/.rw-writable-overlay/work";
+{
+ fileSystems = {
+ "/writable-overlay" = {
+ overlay = {
+ lowerdir = [ writableOverlayLowerdir ];
+ upperdir = "/.rw-writable-overlay/upper";
+ workdir = "/.rw-writable-overlay/work";
+ };
+ # Mount the writable overlay in the initrd.
+ neededForBoot = true;
};
- # Mount the writable overlay in the initrd.
- neededForBoot = true;
+ "/readonly-overlay".overlay.lowerdir = [
+ writableOverlayLowerdir
+ writableOverlayLowerdir2
+ ];
};
- "/readonly-overlay".overlay.lowerdir = [
- writableOverlayLowerdir
- writableOverlayLowerdir2
- ];
-};
+}
```
If `upperdir` and `workdir` are not null, they will be created before the
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/profiles.chapter.md b/third_party/nixpkgs/nixos/doc/manual/configuration/profiles.chapter.md
index 9f6c11b0d5..6161d48e35 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/profiles.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/profiles.chapter.md
@@ -8,9 +8,11 @@ is to say, expected usage is to add them to the imports list of your
`/etc/configuration.nix` as such:
```nix
-imports = [
-
-];
+{
+ imports = [
+
+ ];
+}
```
Even if some of these profiles seem only useful in the context of
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/profiles/demo.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/profiles/demo.section.md
index 0a0df483c1..720fc101dc 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/profiles/demo.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/profiles/demo.section.md
@@ -1,4 +1,4 @@
# Demo {#sec-profile-demo}
This profile just enables a `demo` user, with password `demo`, uid `1000`, `wheel` group and
-[autologin in the SDDM display manager](#opt-services.xserver.displayManager.autoLogin).
+[autologin in the SDDM display manager](#opt-services.displayManager.autoLogin).
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/profiles/graphical.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/profiles/graphical.section.md
index aaea5c8c02..3bd80b52e8 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/profiles/graphical.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/profiles/graphical.section.md
@@ -4,7 +4,7 @@ Defines a NixOS configuration with the Plasma 5 desktop. It's used by the
graphical installation CD.
It sets [](#opt-services.xserver.enable),
-[](#opt-services.xserver.displayManager.sddm.enable),
+[](#opt-services.displayManager.sddm.enable),
[](#opt-services.xserver.desktopManager.plasma5.enable),
and [](#opt-services.xserver.libinput.enable) to true. It also
includes glxinfo and firefox in the system packages list.
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/renaming-interfaces.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/renaming-interfaces.section.md
index 5b515e9f82..4804e35f8a 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/renaming-interfaces.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/renaming-interfaces.section.md
@@ -25,10 +25,12 @@ we assign the name `wan` to the interface with MAC address
`52:54:00:12:01:01` using a netword link unit:
```nix
-systemd.network.links."10-wan" = {
- matchConfig.PermanentMACAddress = "52:54:00:12:01:01";
- linkConfig.Name = "wan";
-};
+{
+ systemd.network.links."10-wan" = {
+ matchConfig.PermanentMACAddress = "52:54:00:12:01:01";
+ linkConfig.Name = "wan";
+ };
+}
```
Note that links are directly read by udev, *not networkd*, and will work
@@ -37,10 +39,12 @@ even if networkd is disabled.
Alternatively, we can use a plain old udev rule:
```nix
-boot.initrd.services.udev.rules = ''
- SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", \
- ATTR{address}=="52:54:00:12:01:01", KERNEL=="eth*", NAME="wan"
-'';
+{
+ boot.initrd.services.udev.rules = ''
+ SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", \
+ ATTR{address}=="52:54:00:12:01:01", KERNEL=="eth*", NAME="wan"
+ '';
+}
```
::: {.warning}
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/ssh.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/ssh.section.md
index 9e239a8481..8754e3d9cc 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/ssh.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/ssh.section.md
@@ -3,7 +3,9 @@
Secure shell (SSH) access to your machine can be enabled by setting:
```nix
-services.openssh.enable = true;
+{
+ services.openssh.enable = true;
+}
```
By default, root logins using a password are disallowed. They can be
@@ -14,6 +16,8 @@ You can declaratively specify authorised RSA/DSA public keys for a user
as follows:
```nix
-users.users.alice.openssh.authorizedKeys.keys =
- [ "ssh-dss AAAAB3NzaC1kc3MAAACBAPIkGWVEt4..." ];
+{
+ users.users.alice.openssh.authorizedKeys.keys =
+ [ "ssh-dss AAAAB3NzaC1kc3MAAACBAPIkGWVEt4..." ];
+}
```
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/sshfs-file-systems.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/sshfs-file-systems.section.md
index e2e37454b7..32b4aac783 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/sshfs-file-systems.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/sshfs-file-systems.section.md
@@ -26,8 +26,8 @@ To create a new key without a passphrase you can do:
```ShellSession
$ ssh-keygen -t ed25519 -P '' -f example-key
Generating public/private ed25519 key pair.
-Your identification has been saved in test-key
-Your public key has been saved in test-key.pub
+Your identification has been saved in example-key
+Your public key has been saved in example-key.pub
The key fingerprint is:
SHA256:yjxl3UbTn31fLWeyLYTAKYJPRmzknjQZoyG8gSNEoIE my-user@workstation
```
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/subversion.chapter.md b/third_party/nixpkgs/nixos/doc/manual/configuration/subversion.chapter.md
index ff870f5c40..2436138669 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/subversion.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/subversion.chapter.md
@@ -21,9 +21,11 @@ Apache HTTP, setting [](#opt-services.httpd.adminAddr)
appropriately:
```nix
-services.httpd.enable = true;
-services.httpd.adminAddr = ...;
-networking.firewall.allowedTCPPorts = [ 80 443 ];
+{
+ services.httpd.enable = true;
+ services.httpd.adminAddr = "...";
+ networking.firewall.allowedTCPPorts = [ 80 443 ];
+}
```
For a simple Subversion server with basic authentication, configure the
@@ -34,25 +36,28 @@ the `.authz` file describing access permission, and `AuthUserFile` to
the password file.
```nix
-services.httpd.extraModules = [
- # note that order is *super* important here
- { name = "dav_svn"; path = "${pkgs.apacheHttpdPackages.subversion}/modules/mod_dav_svn.so"; }
- { name = "authz_svn"; path = "${pkgs.apacheHttpdPackages.subversion}/modules/mod_authz_svn.so"; }
- ];
- services.httpd.virtualHosts = {
- "svn" = {
- hostName = HOSTNAME;
- documentRoot = DOCUMENTROOT;
- locations."/svn".extraConfig = ''
- DAV svn
- SVNParentPath REPO_PARENT
- AuthzSVNAccessFile ACCESS_FILE
- AuthName "SVN Repositories"
- AuthType Basic
- AuthUserFile PASSWORD_FILE
- Require valid-user
- '';
- }
+{
+ services.httpd.extraModules = [
+ # note that order is *super* important here
+ { name = "dav_svn"; path = "${pkgs.apacheHttpdPackages.subversion}/modules/mod_dav_svn.so"; }
+ { name = "authz_svn"; path = "${pkgs.apacheHttpdPackages.subversion}/modules/mod_authz_svn.so"; }
+ ];
+ services.httpd.virtualHosts = {
+ "svn" = {
+ hostName = HOSTNAME;
+ documentRoot = DOCUMENTROOT;
+ locations."/svn".extraConfig = ''
+ DAV svn
+ SVNParentPath REPO_PARENT
+ AuthzSVNAccessFile ACCESS_FILE
+ AuthName "SVN Repositories"
+ AuthType Basic
+ AuthUserFile PASSWORD_FILE
+ Require valid-user
+ '';
+ };
+ };
+}
```
The key `"svn"` is just a symbolic name identifying the virtual host.
@@ -90,7 +95,7 @@ $ htpasswd -s PASSWORD_FILE USER_NAME
The file describing access permissions `ACCESS_FILE` will look something
like the following:
-```nix
+```
[/]
* = r
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/user-mgmt.chapter.md b/third_party/nixpkgs/nixos/doc/manual/configuration/user-mgmt.chapter.md
index 71d61ce4c6..7d83121d41 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/user-mgmt.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/user-mgmt.chapter.md
@@ -6,13 +6,15 @@ management. In the declarative style, users are specified in
account named `alice` shall exist:
```nix
-users.users.alice = {
- isNormalUser = true;
- home = "/home/alice";
- description = "Alice Foobar";
- extraGroups = [ "wheel" "networkmanager" ];
- openssh.authorizedKeys.keys = [ "ssh-dss AAAAB3Nza... alice@foobar" ];
-};
+{
+ users.users.alice = {
+ isNormalUser = true;
+ home = "/home/alice";
+ description = "Alice Foobar";
+ extraGroups = [ "wheel" "networkmanager" ];
+ openssh.authorizedKeys.keys = [ "ssh-dss AAAAB3Nza... alice@foobar" ];
+ };
+}
```
Note that `alice` is a member of the `wheel` and `networkmanager`
@@ -38,7 +40,9 @@ A user ID (uid) is assigned automatically. You can also specify a uid
manually by adding
```nix
-uid = 1000;
+{
+ uid = 1000;
+}
```
to the user specification.
@@ -47,7 +51,9 @@ Groups can be specified similarly. The following states that a group
named `students` shall exist:
```nix
-users.groups.students.gid = 1000;
+{
+ users.groups.students.gid = 1000;
+}
```
As with users, the group ID (gid) is optional and will be assigned
@@ -100,7 +106,9 @@ Instead of using a custom perl script to create users and groups, you can use
systemd-sysusers:
```nix
-systemd.sysusers.enable = true;
+{
+ systemd.sysusers.enable = true;
+}
```
The primary benefit of this is to remove a dependency on perl.
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/wayland.chapter.md b/third_party/nixpkgs/nixos/doc/manual/configuration/wayland.chapter.md
index 0f195bd665..27c027d385 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/wayland.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/wayland.chapter.md
@@ -9,7 +9,9 @@ a Wayland Compositor such as sway without separately enabling a Wayland
server:
```nix
+{
programs.sway.enable = true;
+}
```
This installs the sway compositor along with some essential utilities.
@@ -19,7 +21,9 @@ If you are using a wlroots-based compositor, like sway, and want to be
able to share your screen, you might want to activate this option:
```nix
-xdg.portal.wlr.enable = true;
+{
+ xdg.portal.wlr.enable = true;
+}
```
and configure Pipewire using
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/wireless.section.md b/third_party/nixpkgs/nixos/doc/manual/configuration/wireless.section.md
index 3299d2d7ec..df828698cf 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/wireless.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/wireless.section.md
@@ -7,25 +7,29 @@ skip the rest of this section on wireless networks.
NixOS will start wpa_supplicant for you if you enable this setting:
```nix
-networking.wireless.enable = true;
+{
+ networking.wireless.enable = true;
+}
```
NixOS lets you specify networks for wpa_supplicant declaratively:
```nix
-networking.wireless.networks = {
- echelon = { # SSID with no spaces or special characters
- psk = "abcdefgh";
+{
+ networking.wireless.networks = {
+ echelon = { # SSID with no spaces or special characters
+ psk = "abcdefgh";
+ };
+ "echelon's AP" = { # SSID with spaces and/or special characters
+ psk = "ijklmnop";
+ };
+ echelon = { # Hidden SSID
+ hidden = true;
+ psk = "qrstuvwx";
+ };
+ free.wifi = {}; # Public wireless network
};
- "echelon's AP" = { # SSID with spaces and/or special characters
- psk = "ijklmnop";
- };
- echelon = { # Hidden SSID
- hidden = true;
- psk = "qrstuvwx";
- };
- free.wifi = {}; # Public wireless network
-};
+}
```
Be aware that keys will be written to the nix store in plaintext! When
@@ -46,11 +50,13 @@ network={
```
```nix
-networking.wireless.networks = {
- echelon = {
- pskRaw = "dca6d6ed41f4ab5a984c9f55f6f66d4efdc720ebf66959810f4329bb391c5435";
+{
+ networking.wireless.networks = {
+ echelon = {
+ pskRaw = "dca6d6ed41f4ab5a984c9f55f6f66d4efdc720ebf66959810f4329bb391c5435";
+ };
};
-};
+}
```
or you can use it to directly generate the `wpa_supplicant.conf`:
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/x-windows.chapter.md b/third_party/nixpkgs/nixos/doc/manual/configuration/x-windows.chapter.md
index 0451e4d252..c09e0877e8 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/x-windows.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/x-windows.chapter.md
@@ -4,7 +4,9 @@ The X Window System (X11) provides the basis of NixOS' graphical user
interface. It can be enabled as follows:
```nix
-services.xserver.enable = true;
+{
+ services.xserver.enable = true;
+}
```
The X server will automatically detect and use the appropriate video
@@ -12,7 +14,9 @@ driver from a set of X.org drivers (such as `vesa` and `intel`). You can
also specify a driver manually, e.g.
```nix
-services.xserver.videoDrivers = [ "r128" ];
+{
+ services.xserver.videoDrivers = [ "r128" ];
+}
```
to enable X.org's `xf86-video-r128` driver.
@@ -22,15 +26,17 @@ Otherwise, you can only log into a plain undecorated `xterm` window.
Thus you should pick one or more of the following lines:
```nix
-services.xserver.desktopManager.plasma5.enable = true;
-services.xserver.desktopManager.xfce.enable = true;
-services.xserver.desktopManager.gnome.enable = true;
-services.xserver.desktopManager.mate.enable = true;
-services.xserver.windowManager.xmonad.enable = true;
-services.xserver.windowManager.twm.enable = true;
-services.xserver.windowManager.icewm.enable = true;
-services.xserver.windowManager.i3.enable = true;
-services.xserver.windowManager.herbstluftwm.enable = true;
+{
+ services.xserver.desktopManager.plasma5.enable = true;
+ services.xserver.desktopManager.xfce.enable = true;
+ services.xserver.desktopManager.gnome.enable = true;
+ services.xserver.desktopManager.mate.enable = true;
+ services.xserver.windowManager.xmonad.enable = true;
+ services.xserver.windowManager.twm.enable = true;
+ services.xserver.windowManager.icewm.enable = true;
+ services.xserver.windowManager.i3.enable = true;
+ services.xserver.windowManager.herbstluftwm.enable = true;
+}
```
NixOS's default *display manager* (the program that provides a graphical
@@ -38,22 +44,28 @@ login prompt and manages the X server) is LightDM. You can select an
alternative one by picking one of the following lines:
```nix
-services.xserver.displayManager.sddm.enable = true;
-services.xserver.displayManager.gdm.enable = true;
+{
+ services.displayManager.sddm.enable = true;
+ services.xserver.displayManager.gdm.enable = true;
+}
```
You can set the keyboard layout (and optionally the layout variant):
```nix
-services.xserver.xkb.layout = "de";
-services.xserver.xkb.variant = "neo";
+{
+ services.xserver.xkb.layout = "de";
+ services.xserver.xkb.variant = "neo";
+}
```
The X server is started automatically at boot time. If you don't want
this to happen, you can set:
```nix
-services.xserver.autorun = false;
+{
+ services.xserver.autorun = false;
+}
```
The X server can then be started manually:
@@ -66,7 +78,9 @@ On 64-bit systems, if you want OpenGL for 32-bit programs such as in
Wine, you should also set the following:
```nix
-hardware.opengl.driSupport32Bit = true;
+{
+ hardware.opengl.driSupport32Bit = true;
+}
```
## Auto-login {#sec-x11-auto-login}
@@ -84,16 +98,20 @@ desktop environment. If you wanted no desktop environment and i3 as your
your window manager, you'd define:
```nix
-services.xserver.displayManager.defaultSession = "none+i3";
+{
+ services.displayManager.defaultSession = "none+i3";
+}
```
Every display manager in NixOS supports auto-login, here is an example
using lightdm for a user `alice`:
```nix
-services.xserver.displayManager.lightdm.enable = true;
-services.xserver.displayManager.autoLogin.enable = true;
-services.xserver.displayManager.autoLogin.user = "alice";
+{
+ services.xserver.displayManager.lightdm.enable = true;
+ services.displayManager.autoLogin.enable = true;
+ services.displayManager.autoLogin.user = "alice";
+}
```
## Intel Graphics drivers {#sec-x11--graphics-cards-intel}
@@ -119,18 +137,22 @@ drivers. Use the option
to set one. The recommended configuration for modern systems is:
```nix
-services.xserver.videoDrivers = [ "modesetting" ];
+{
+ services.xserver.videoDrivers = [ "modesetting" ];
+}
```
If you experience screen tearing no matter what, this configuration was
reported to resolve the issue:
```nix
-services.xserver.videoDrivers = [ "intel" ];
-services.xserver.deviceSection = ''
- Option "DRI" "2"
- Option "TearFree" "true"
-'';
+{
+ services.xserver.videoDrivers = [ "intel" ];
+ services.xserver.deviceSection = ''
+ Option "DRI" "2"
+ Option "TearFree" "true"
+ '';
+}
```
Note that this will likely downgrade the performance compared to
@@ -143,16 +165,19 @@ better 3D performance than the X.org drivers. It is not enabled by
default because it's not free software. You can enable it as follows:
```nix
-services.xserver.videoDrivers = [ "nvidia" ];
+{
+ services.xserver.videoDrivers = [ "nvidia" ];
+}
```
-Or if you have an older card, you may have to use one of the legacy
-drivers:
+If you have an older card, you may have to use one of the legacy drivers:
```nix
-services.xserver.videoDrivers = [ "nvidiaLegacy390" ];
-services.xserver.videoDrivers = [ "nvidiaLegacy340" ];
-services.xserver.videoDrivers = [ "nvidiaLegacy304" ];
+{
+ hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
+ hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_390;
+ hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_340;
+}
```
You may need to reboot after enabling this driver to prevent a clash
@@ -167,7 +192,9 @@ performance. If you still want to use it anyway, you need to explicitly
set:
```nix
-services.xserver.videoDrivers = [ "amdgpu-pro" ];
+{
+ services.xserver.videoDrivers = [ "amdgpu-pro" ];
+}
```
You will need to reboot after enabling this driver to prevent a clash
@@ -179,14 +206,18 @@ Support for Synaptics touchpads (found in many laptops such as the Dell
Latitude series) can be enabled as follows:
```nix
-services.xserver.libinput.enable = true;
+{
+ services.xserver.libinput.enable = true;
+}
```
The driver has many options (see [](#ch-options)).
For instance, the following disables tap-to-click behavior:
```nix
-services.xserver.libinput.touchpad.tapping = false;
+{
+ services.xserver.libinput.touchpad.tapping = false;
+}
```
Note: the use of `services.xserver.synaptics` is deprecated since NixOS
@@ -199,9 +230,11 @@ GTK themes can be installed either to user profile or system-wide (via
GTK ones, you can use the following configuration:
```nix
-qt.enable = true;
-qt.platformTheme = "gtk2";
-qt.style = "gtk2";
+{
+ qt.enable = true;
+ qt.platformTheme = "gtk2";
+ qt.style = "gtk2";
+}
```
## Custom XKB layouts {#custom-xkb-layouts}
@@ -218,7 +251,7 @@ Create a file called `us-greek` with the following content (under a
directory called `symbols`; it's an XKB peculiarity that will help with
testing):
-```nix
+```
xkb_symbols "us-greek"
{
include "us(basic)" // includes the base US keys
@@ -235,11 +268,13 @@ xkb_symbols "us-greek"
A minimal layout specification must include the following:
```nix
-services.xserver.xkb.extraLayouts.us-greek = {
- description = "US layout with alt-gr greek";
- languages = [ "eng" ];
- symbolsFile = /yourpath/symbols/us-greek;
-};
+{
+ services.xserver.xkb.extraLayouts.us-greek = {
+ description = "US layout with alt-gr greek";
+ languages = [ "eng" ];
+ symbolsFile = /yourpath/symbols/us-greek;
+ };
+}
```
::: {.note}
@@ -276,7 +311,7 @@ Use the *xev* utility from `pkgs.xorg.xev` to find the codes of the keys
of interest, then create a `media-key` file to hold the keycodes
definitions
-```nix
+```
xkb_keycodes "media"
{
= 123;
@@ -286,7 +321,7 @@ xkb_keycodes "media"
Now use the newly define keycodes in `media-sym`:
-```nix
+```
xkb_symbols "media"
{
key.type = "ONE_LEVEL";
@@ -298,12 +333,14 @@ xkb_symbols "media"
As before, to install the layout do
```nix
-services.xserver.xkb.extraLayouts.media = {
- description = "Multimedia keys remapping";
- languages = [ "eng" ];
- symbolsFile = /path/to/media-key;
- keycodesFile = /path/to/media-sym;
-};
+{
+ services.xserver.xkb.extraLayouts.media = {
+ description = "Multimedia keys remapping";
+ languages = [ "eng" ];
+ symbolsFile = /path/to/media-key;
+ keycodesFile = /path/to/media-sym;
+ };
+}
```
::: {.note}
@@ -319,7 +356,9 @@ workaround, you can set the keymap using `setxkbmap` at the start of the
session with:
```nix
-services.xserver.displayManager.sessionCommands = "setxkbmap -keycodes media";
+{
+ services.xserver.displayManager.sessionCommands = "setxkbmap -keycodes media";
+}
```
If you are manually starting the X server, you should set the argument
diff --git a/third_party/nixpkgs/nixos/doc/manual/configuration/xfce.chapter.md b/third_party/nixpkgs/nixos/doc/manual/configuration/xfce.chapter.md
index 9ec4a51d6e..302cf9fa09 100644
--- a/third_party/nixpkgs/nixos/doc/manual/configuration/xfce.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/configuration/xfce.chapter.md
@@ -3,21 +3,25 @@
To enable the Xfce Desktop Environment, set
```nix
-services.xserver.desktopManager.xfce.enable = true;
-services.xserver.displayManager.defaultSession = "xfce";
+{
+ services.xserver.desktopManager.xfce.enable = true;
+ services.displayManager.defaultSession = "xfce";
+}
```
Optionally, *picom* can be enabled for nice graphical effects, some
example settings:
```nix
-services.picom = {
- enable = true;
- fade = true;
- inactiveOpacity = 0.9;
- shadow = true;
- fadeDelta = 4;
-};
+{
+ services.picom = {
+ enable = true;
+ fade = true;
+ inactiveOpacity = 0.9;
+ shadow = true;
+ fadeDelta = 4;
+ };
+}
```
Some Xfce programs are not installed automatically. To install them
diff --git a/third_party/nixpkgs/nixos/doc/manual/default.nix b/third_party/nixpkgs/nixos/doc/manual/default.nix
index a368b16201..558fec4cab 100644
--- a/third_party/nixpkgs/nixos/doc/manual/default.nix
+++ b/third_party/nixpkgs/nixos/doc/manual/default.nix
@@ -9,12 +9,20 @@
, prefix ? ../../..
}:
-with pkgs;
-
let
- inherit (lib) hasPrefix removePrefix;
+ inherit (pkgs) buildPackages runCommand docbook_xsl_ns;
- lib = pkgs.lib;
+ inherit (pkgs.lib)
+ hasPrefix
+ removePrefix
+ flip
+ foldr
+ types
+ mkOption
+ escapeShellArg
+ concatMapStringsSep
+ sourceFilesBySuffices
+ ;
common = import ./common.nix;
@@ -27,7 +35,7 @@ let
# E.g. if some `options` came from modules in ${pkgs.customModules}/nix,
# you'd need to include `extraSources = [ pkgs.customModules ]`
prefixesToStrip = map (p: "${toString p}/") ([ prefix ] ++ extraSources);
- stripAnyPrefixes = lib.flip (lib.foldr lib.removePrefix) prefixesToStrip;
+ stripAnyPrefixes = flip (foldr removePrefix) prefixesToStrip;
optionsDoc = buildPackages.nixosOptionsDoc {
inherit options revision baseOptionsJSON warningsAreErrors;
@@ -42,8 +50,8 @@ let
testOptionsDoc = let
eval = nixos-lib.evalTest {
# Avoid evaluating a NixOS config prototype.
- config.node.type = lib.types.deferredModule;
- options._module.args = lib.mkOption { internal = true; };
+ config.node.type = types.deferredModule;
+ options._module.args = mkOption { internal = true; };
};
in buildPackages.nixosOptionsDoc {
inherit (eval) options;
@@ -76,7 +84,7 @@ let
substituteInPlace ./configuration/configuration.md \
--replace \
'@MODULE_CHAPTERS@' \
- ${lib.escapeShellArg (lib.concatMapStringsSep "\n" (p: "${p.value}") config.meta.doc)}
+ ${escapeShellArg (concatMapStringsSep "\n" (p: "${p.value}") config.meta.doc)}
substituteInPlace ./nixos-options.md \
--replace \
'@NIXOS_OPTIONS_JSON@' \
@@ -95,7 +103,7 @@ in rec {
# Generate the NixOS manual.
manualHTML = runCommand "nixos-manual-html"
{ nativeBuildInputs = [ buildPackages.nixos-render-docs ];
- inputs = lib.sourceFilesBySuffices ./. [ ".md" ];
+ inputs = sourceFilesBySuffices ./. [ ".md" ];
meta.description = "The NixOS manual in HTML format";
allowedReferences = ["out"];
}
@@ -105,20 +113,23 @@ in rec {
mkdir -p $dst
cp ${../../../doc/style.css} $dst/style.css
- cp ${../../../doc/overrides.css} $dst/overrides.css
+ cp ${../../../doc/anchor.min.js} $dst/anchor.min.js
+ cp ${../../../doc/anchor-use.js} $dst/anchor-use.js
+
cp -r ${pkgs.documentation-highlighter} $dst/highlightjs
${prepareManualFromMD}
nixos-render-docs -j $NIX_BUILD_CORES manual html \
--manpage-urls ${manpageUrls} \
- --revision ${lib.escapeShellArg revision} \
- --generator "nixos-render-docs ${lib.version}" \
+ --revision ${escapeShellArg revision} \
+ --generator "nixos-render-docs ${pkgs.lib.version}" \
--stylesheet style.css \
- --stylesheet overrides.css \
--stylesheet highlightjs/mono-blue.css \
--script ./highlightjs/highlight.pack.js \
--script ./highlightjs/loader.js \
+ --script ./anchor.min.js \
+ --script ./anchor-use.js \
--toc-depth 1 \
--chunk-toc-depth 1 \
./manual.md \
@@ -144,7 +155,7 @@ in rec {
xml:id="book-nixos-manual">
NixOS Manual
- Version ${lib.version}
+ Version ${pkgs.lib.version}
Temporarily unavailable
@@ -196,7 +207,7 @@ in rec {
# Generate manpages.
mkdir -p $out/share/man/man5
nixos-render-docs -j $NIX_BUILD_CORES options manpage \
- --revision ${lib.escapeShellArg revision} \
+ --revision ${escapeShellArg revision} \
${optionsJSON}/${common.outputPath}/options.json \
$out/share/man/man5/configuration.nix.5
'';
diff --git a/third_party/nixpkgs/nixos/doc/manual/development/activation-script.section.md b/third_party/nixpkgs/nixos/doc/manual/development/activation-script.section.md
index cc317a6a01..f771c3524b 100644
--- a/third_party/nixpkgs/nixos/doc/manual/development/activation-script.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/development/activation-script.section.md
@@ -17,13 +17,15 @@ activation script will take these dependencies into account and order the
snippets accordingly. As a simple example:
```nix
-system.activationScripts.my-activation-script = {
- deps = [ "etc" ];
- # supportsDryActivation = true;
- text = ''
- echo "Hallo i bims"
- '';
-};
+{
+ system.activationScripts.my-activation-script = {
+ deps = [ "etc" ];
+ # supportsDryActivation = true;
+ text = ''
+ echo "Hallo i bims"
+ '';
+ };
+}
```
This example creates an activation script snippet that is run after the `etc`
diff --git a/third_party/nixpkgs/nixos/doc/manual/development/assertions.section.md b/third_party/nixpkgs/nixos/doc/manual/development/assertions.section.md
index cc6d81e569..eb5158c90f 100644
--- a/third_party/nixpkgs/nixos/doc/manual/development/assertions.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/development/assertions.section.md
@@ -18,7 +18,7 @@ This is an example of using `warnings`.
This is known to cause some specific problems in certain situations.
'' ]
else [];
- }
+ };
}
```
@@ -35,6 +35,6 @@ This example, extracted from the [`syslogd` module](https://github.com/NixOS/nix
message = "rsyslogd conflicts with syslogd";
}
];
- }
+ };
}
```
diff --git a/third_party/nixpkgs/nixos/doc/manual/development/etc-overlay.section.md b/third_party/nixpkgs/nixos/doc/manual/development/etc-overlay.section.md
index e6f6d8d4ca..d8588f508a 100644
--- a/third_party/nixpkgs/nixos/doc/manual/development/etc-overlay.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/development/etc-overlay.section.md
@@ -9,7 +9,9 @@ Instead of using a custom perl script to activate `/etc`, you activate it via an
overlay filesystem:
```nix
-system.etc.overlay.enable = true;
+{
+ system.etc.overlay.enable = true;
+}
```
Using an overlay has two benefits:
@@ -22,7 +24,9 @@ upper layer). However, you can also mount `/etc` immutably (i.e. read-only) by
setting:
```nix
-system.etc.overlay.mutable = false;
+{
+ system.etc.overlay.mutable = false;
+}
```
The overlay is atomically replaced during system switch. However, files that
diff --git a/third_party/nixpkgs/nixos/doc/manual/development/meta-attributes.section.md b/third_party/nixpkgs/nixos/doc/manual/development/meta-attributes.section.md
index 33b41fe74d..b2ad23e58b 100644
--- a/third_party/nixpkgs/nixos/doc/manual/development/meta-attributes.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/development/meta-attributes.section.md
@@ -14,11 +14,11 @@ file.
{ config, lib, pkgs, ... }:
{
options = {
- ...
+ # ...
};
config = {
- ...
+ # ...
};
meta = {
diff --git a/third_party/nixpkgs/nixos/doc/manual/development/non-switchable-systems.section.md b/third_party/nixpkgs/nixos/doc/manual/development/non-switchable-systems.section.md
index 87bb46c789..a51e8233f3 100644
--- a/third_party/nixpkgs/nixos/doc/manual/development/non-switchable-systems.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/development/non-switchable-systems.section.md
@@ -9,7 +9,7 @@ profile:
```nix
{ modulesPath, ... }: {
- imports = [ "${modulesPath}/profiles/image-based-appliance.nix" ]
+ imports = [ "${modulesPath}/profiles/image-based-appliance.nix" ];
}
```
diff --git a/third_party/nixpkgs/nixos/doc/manual/development/option-declarations.section.md b/third_party/nixpkgs/nixos/doc/manual/development/option-declarations.section.md
index 7620704161..325f4d11cb 100644
--- a/third_party/nixpkgs/nixos/doc/manual/development/option-declarations.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/development/option-declarations.section.md
@@ -6,14 +6,16 @@ hasn't been declared in any module. An option declaration generally
looks like this:
```nix
-options = {
- name = mkOption {
- type = type specification;
- default = default value;
- example = example value;
- description = lib.mdDoc "Description for use in the NixOS manual.";
+{
+ options = {
+ name = mkOption {
+ type = type specification;
+ default = default value;
+ example = example value;
+ description = "Description for use in the NixOS manual.";
+ };
};
-};
+}
```
The attribute names within the `name` attribute path must be camel
@@ -56,12 +58,9 @@ The function `mkOption` accepts the following arguments.
`description`
-: A textual description of the option, in [Nixpkgs-flavored Markdown](
- https://nixos.org/nixpkgs/manual/#sec-contributing-markup) format, that will be
- included in the NixOS manual. During the migration process from DocBook
- it is necessary to mark descriptions written in CommonMark with `lib.mdDoc`.
- The description may still be written in DocBook (without any marker), but this
- is discouraged and will be deprecated in the future.
+: A textual description of the option in [Nixpkgs-flavored Markdown](
+ https://nixos.org/nixpkgs/manual/#sec-contributing-markup) format that will be
+ included in the NixOS manual.
## Utility functions for common option patterns {#sec-option-declarations-util}
@@ -79,13 +78,13 @@ For example:
::: {#ex-options-declarations-util-mkEnableOption-magic .example}
### `mkEnableOption` usage
```nix
-lib.mkEnableOption (lib.mdDoc "magic")
+lib.mkEnableOption "magic"
# is like
lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
- description = lib.mdDoc "Whether to enable magic.";
+ description = "Whether to enable magic.";
}
```
:::
@@ -133,7 +132,7 @@ lib.mkOption {
type = lib.types.package;
default = pkgs.hello;
defaultText = lib.literalExpression "pkgs.hello";
- description = lib.mdDoc "The hello package to use.";
+ description = "The hello package to use.";
}
```
:::
@@ -151,7 +150,7 @@ lib.mkOption {
default = pkgs.ghc;
defaultText = lib.literalExpression "pkgs.ghc";
example = lib.literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";
- description = lib.mdDoc "The GHC package to use.";
+ description = "The GHC package to use.";
}
```
:::
@@ -221,28 +220,34 @@ enforces that there can only be a single display manager enabled.
::: {#ex-option-declaration-eot-service .example}
### Extensible type placeholder in the service module
```nix
-services.xserver.displayManager.enable = mkOption {
- description = "Display manager to use";
- type = with types; nullOr (enum [ ]);
-};
+{
+ services.xserver.displayManager.enable = mkOption {
+ description = "Display manager to use";
+ type = with types; nullOr (enum [ ]);
+ };
+}
```
:::
::: {#ex-option-declaration-eot-backend-gdm .example}
### Extending `services.xserver.displayManager.enable` in the `gdm` module
```nix
-services.xserver.displayManager.enable = mkOption {
- type = with types; nullOr (enum [ "gdm" ]);
-};
+{
+ services.xserver.displayManager.enable = mkOption {
+ type = with types; nullOr (enum [ "gdm" ]);
+ };
+}
```
:::
::: {#ex-option-declaration-eot-backend-sddm .example}
### Extending `services.xserver.displayManager.enable` in the `sddm` module
```nix
-services.xserver.displayManager.enable = mkOption {
- type = with types; nullOr (enum [ "sddm" ]);
-};
+{
+ services.xserver.displayManager.enable = mkOption {
+ type = with types; nullOr (enum [ "sddm" ]);
+ };
+}
```
:::
diff --git a/third_party/nixpkgs/nixos/doc/manual/development/option-def.section.md b/third_party/nixpkgs/nixos/doc/manual/development/option-def.section.md
index 6a3dc26b99..227f41d812 100644
--- a/third_party/nixpkgs/nixos/doc/manual/development/option-def.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/development/option-def.section.md
@@ -4,9 +4,11 @@ Option definitions are generally straight-forward bindings of values to
option names, like
```nix
-config = {
- services.httpd.enable = true;
-};
+{
+ config = {
+ services.httpd.enable = true;
+ };
+}
```
However, sometimes you need to wrap an option definition or set of
@@ -18,10 +20,12 @@ If a set of option definitions is conditional on the value of another
option, you may need to use `mkIf`. Consider, for instance:
```nix
-config = if config.services.httpd.enable then {
- environment.systemPackages = [ ... ];
- ...
-} else {};
+{
+ config = if config.services.httpd.enable then {
+ environment.systemPackages = [ /* ... */ ];
+ # ...
+ } else {};
+}
```
This definition will cause Nix to fail with an "infinite recursion"
@@ -30,30 +34,36 @@ on the value being constructed here. After all, you could also write the
clearly circular and contradictory:
```nix
-config = if config.services.httpd.enable then {
- services.httpd.enable = false;
-} else {
- services.httpd.enable = true;
-};
+{
+ config = if config.services.httpd.enable then {
+ services.httpd.enable = false;
+ } else {
+ services.httpd.enable = true;
+ };
+}
```
The solution is to write:
```nix
-config = mkIf config.services.httpd.enable {
- environment.systemPackages = [ ... ];
- ...
-};
+{
+ config = mkIf config.services.httpd.enable {
+ environment.systemPackages = [ /* ... */ ];
+ # ...
+ };
+}
```
The special function `mkIf` causes the evaluation of the conditional to
be "pushed down" into the individual definitions, as if you had written:
```nix
-config = {
- environment.systemPackages = if config.services.httpd.enable then [ ... ] else [];
- ...
-};
+{
+ config = {
+ environment.systemPackages = if config.services.httpd.enable then [ /* ... */ ] else [];
+ # ...
+ };
+}
```
## Setting Priorities {#sec-option-definitions-setting-priorities}
@@ -65,7 +75,9 @@ priority 100 and option defaults have priority 1500.
You can specify an explicit priority by using `mkOverride`, e.g.
```nix
-services.openssh.enable = mkOverride 10 false;
+{
+ services.openssh.enable = mkOverride 10 false;
+}
```
This definition causes all other definitions with priorities above 10 to
@@ -80,7 +92,9 @@ The functions `mkBefore` and `mkAfter` are equal to `mkOrder 500` and `mkOrder 1
As an example,
```nix
-hardware.firmware = mkBefore [ myFirmware ];
+{
+ hardware.firmware = mkBefore [ myFirmware ];
+}
```
This definition ensures that `myFirmware` comes before other unordered
@@ -97,13 +111,15 @@ they were declared in separate modules. This can be done using
`mkMerge`:
```nix
-config = mkMerge
- [ # Unconditional stuff.
- { environment.systemPackages = [ ... ];
- }
- # Conditional stuff.
- (mkIf config.services.bla.enable {
- environment.systemPackages = [ ... ];
- })
- ];
+{
+ config = mkMerge
+ [ # Unconditional stuff.
+ { environment.systemPackages = [ /* ... */ ];
+ }
+ # Conditional stuff.
+ (mkIf config.services.bla.enable {
+ environment.systemPackages = [ /* ... */ ];
+ })
+ ];
+}
```
diff --git a/third_party/nixpkgs/nixos/doc/manual/development/option-types.section.md b/third_party/nixpkgs/nixos/doc/manual/development/option-types.section.md
index 04edf99e70..b44a84553b 100644
--- a/third_party/nixpkgs/nixos/doc/manual/development/option-types.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/development/option-types.section.md
@@ -42,6 +42,9 @@ merging is handled.
: One element of the list *`l`*, e.g. `types.enum [ "left" "right" ]`.
Multiple definitions cannot be merged.
+ If you want to pair these values with more information, possibly of
+ distinct types, consider using a [sum type](#sec-option-types-sums).
+
`types.anything`
: A type that accepts any value and recursively merges attribute sets
@@ -279,6 +282,84 @@ Submodules are detailed in [Submodule](#section-option-types-submodule).
more convenient and discoverable than expecting the module user to
type-merge with the `attrsOf submodule` option.
+## Union types {#sec-option-types-unions}
+
+A union of types is a type such that a value is valid when it is valid for at least one of those types.
+
+If some values are instances of more than one of the types, it is not possible to distinguish which type they are meant to be instances of. If that's needed, consider using a [sum type](#sec-option-types-sums).
+
+`types.either` *`t1 t2`*
+
+: Type *`t1`* or type *`t2`*, e.g. `with types; either int str`.
+ Multiple definitions cannot be merged.
+
+`types.oneOf` \[ *`t1 t2`* ... \]
+
+: Type *`t1`* or type *`t2`* and so forth, e.g.
+ `with types; oneOf [ int str bool ]`. Multiple definitions cannot be
+ merged.
+
+`types.nullOr` *`t`*
+
+: `null` or type *`t`*. Multiple definitions are merged according to
+ type *`t`*.
+
+
+## Sum types {#sec-option-types-sums}
+
+A sum type can be thought of, conceptually, as a *`types.enum`* where each valid item is paired with at least a type, through some value syntax.
+Nix does not have a built-in syntax for this pairing of a label and a type or value, so sum types may be represented in multiple ways.
+
+If the you're interested in can be distinguished without a label, you may simplify your value syntax with a [union type](#sec-option-types-unions) instead.
+
+`types.attrTag` *`{ attr1 = option1; attr2 = option2; ... }`*
+
+: An attribute set containing one attribute, whose name must be picked from
+ the attribute set (`attr1`, etc) and whose value consists of definitions that are valid for the corresponding option (`option1`, etc).
+
+ This type appears in the documentation as _attribute-tagged union_.
+
+ Example:
+
+ ```nix
+ { lib, ... }:
+ let inherit (lib) type mkOption;
+ in {
+ options.toyRouter.rules = mkOption {
+ description = ''
+ Rules for a fictional packet routing service.
+ '';
+ type = types.attrsOf (
+ types.attrTag {
+ bounce = mkOption {
+ description = "Send back a packet explaining why it wasn't forwarded.";
+ type = types.submodule {
+ options.errorMessage = mkOption { … };
+ };
+ };
+ forward = mkOption {
+ description = "Forward the packet.";
+ type = types.submodule {
+ options.destination = mkOption { … };
+ };
+ };
+ ignore = types.mkOption {
+ description = "Drop the packet without sending anything back.";
+ type = types.submodule {};
+ };
+ });
+ };
+ config.toyRouter.rules = {
+ http = {
+ bounce = {
+ errorMessage = "Unencrypted HTTP is banned. You must always use https://.";
+ };
+ };
+ ssh = { drop = {}; };
+ };
+ }
+ ```
+
## Composed types {#sec-option-types-composed}
Composed types are types that take a type as parameter. `listOf
@@ -318,11 +399,6 @@ Composed types are types that take a type as parameter. `listOf
returned instead for the same `mkIf false` definition.
:::
-`types.nullOr` *`t`*
-
-: `null` or type *`t`*. Multiple definitions are merged according to
- type *`t`*.
-
`types.uniq` *`t`*
: Ensures that type *`t`* cannot be merged. It is used to ensure option
@@ -334,17 +410,6 @@ Composed types are types that take a type as parameter. `listOf
the line `The option is defined multiple times.` and before
a list of definition locations.
-`types.either` *`t1 t2`*
-
-: Type *`t1`* or type *`t2`*, e.g. `with types; either int str`.
- Multiple definitions cannot be merged.
-
-`types.oneOf` \[ *`t1 t2`* ... \]
-
-: Type *`t1`* or type *`t2`* and so forth, e.g.
- `with types; oneOf [ int str bool ]`. Multiple definitions cannot be
- merged.
-
`types.coercedTo` *`from f to`*
: Type *`to`* or type *`from`* which will be coerced to type *`to`* using
@@ -374,19 +439,21 @@ if you want to allow users to leave it undefined.
::: {#ex-submodule-direct .example}
### Directly defined submodule
```nix
-options.mod = mkOption {
- description = "submodule example";
- type = with types; submodule {
- options = {
- foo = mkOption {
- type = int;
- };
- bar = mkOption {
- type = str;
+{
+ options.mod = mkOption {
+ description = "submodule example";
+ type = with types; submodule {
+ options = {
+ foo = mkOption {
+ type = int;
+ };
+ bar = mkOption {
+ type = str;
+ };
};
};
};
-};
+}
```
:::
@@ -405,10 +472,12 @@ let
};
};
in
-options.mod = mkOption {
- description = "submodule example";
- type = with types; submodule modOptions;
-};
+{
+ options.mod = mkOption {
+ description = "submodule example";
+ type = with types; submodule modOptions;
+ };
+}
```
:::
@@ -421,29 +490,33 @@ multiple definitions of the submodule option set
::: {#ex-submodule-listof-declaration .example}
### Declaration of a list of submodules
```nix
-options.mod = mkOption {
- description = "submodule example";
- type = with types; listOf (submodule {
- options = {
- foo = mkOption {
- type = int;
+{
+ options.mod = mkOption {
+ description = "submodule example";
+ type = with types; listOf (submodule {
+ options = {
+ foo = mkOption {
+ type = int;
+ };
+ bar = mkOption {
+ type = str;
+ };
};
- bar = mkOption {
- type = str;
- };
- };
- });
-};
+ });
+ };
+}
```
:::
::: {#ex-submodule-listof-definition .example}
### Definition of a list of submodules
```nix
-config.mod = [
- { foo = 1; bar = "one"; }
- { foo = 2; bar = "two"; }
-];
+{
+ config.mod = [
+ { foo = 1; bar = "one"; }
+ { foo = 2; bar = "two"; }
+ ];
+}
```
:::
@@ -455,27 +528,31 @@ multiple named definitions of the submodule option set
::: {#ex-submodule-attrsof-declaration .example}
### Declaration of attribute sets of submodules
```nix
-options.mod = mkOption {
- description = "submodule example";
- type = with types; attrsOf (submodule {
- options = {
- foo = mkOption {
- type = int;
+{
+ options.mod = mkOption {
+ description = "submodule example";
+ type = with types; attrsOf (submodule {
+ options = {
+ foo = mkOption {
+ type = int;
+ };
+ bar = mkOption {
+ type = str;
+ };
};
- bar = mkOption {
- type = str;
- };
- };
- });
-};
+ });
+ };
+}
```
:::
::: {#ex-submodule-attrsof-definition .example}
### Definition of attribute sets of submodules
```nix
-config.mod.one = { foo = 1; bar = "one"; };
-config.mod.two = { foo = 2; bar = "two"; };
+{
+ config.mod.one = { foo = 1; bar = "one"; };
+ config.mod.two = { foo = 2; bar = "two"; };
+}
```
:::
@@ -495,10 +572,12 @@ Types are mainly characterized by their `check` and `merge` functions.
### Adding a type check
```nix
- byte = mkOption {
- description = "An integer between 0 and 255.";
- type = types.addCheck types.int (x: x >= 0 && x <= 255);
- };
+ {
+ byte = mkOption {
+ description = "An integer between 0 and 255.";
+ type = types.addCheck types.int (x: x >= 0 && x <= 255);
+ };
+ }
```
:::
@@ -506,12 +585,14 @@ Types are mainly characterized by their `check` and `merge` functions.
### Overriding a type check
```nix
- nixThings = mkOption {
- description = "words that start with 'nix'";
- type = types.str // {
- check = (x: lib.hasPrefix "nix" x)
+ {
+ nixThings = mkOption {
+ description = "words that start with 'nix'";
+ type = types.str // {
+ check = (x: lib.hasPrefix "nix" x);
+ };
};
- };
+ }
```
:::
diff --git a/third_party/nixpkgs/nixos/doc/manual/development/replace-modules.section.md b/third_party/nixpkgs/nixos/doc/manual/development/replace-modules.section.md
index ac9f5adbaf..45e2adbc26 100644
--- a/third_party/nixpkgs/nixos/doc/manual/development/replace-modules.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/development/replace-modules.section.md
@@ -47,9 +47,8 @@ without having to know its implementation details.
```nix
{ config, lib, pkgs, ... }:
-with lib;
-
let
+ inherit (lib) mkIf mkOption types;
cfg = config.programs.man;
in
diff --git a/third_party/nixpkgs/nixos/doc/manual/development/running-nixos-tests.section.md b/third_party/nixpkgs/nixos/doc/manual/development/running-nixos-tests.section.md
index 33076f5dc2..b8191ebd31 100644
--- a/third_party/nixpkgs/nixos/doc/manual/development/running-nixos-tests.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/development/running-nixos-tests.section.md
@@ -18,3 +18,13 @@ you can view a log of the test:
```ShellSession
$ nix-store --read-log result
```
+
+## System Requirements {#sec-running-nixos-tests-requirements}
+
+NixOS tests require virtualization support.
+This means that the machine must have `kvm` in its [system features](https://nixos.org/manual/nix/stable/command-ref/conf-file.html?highlight=system-features#conf-system-features) list, or `apple-virt` in case of macOS.
+These features are autodetected locally, but `apple-virt` is only autodetected since Nix 2.19.0.
+
+Features of **remote builders** must additionally be configured manually on the client, e.g. on NixOS with [`nix.buildMachines.*.supportedFeatures`](https://search.nixos.org/options?show=nix.buildMachines.*.supportedFeatures&sort=alpha_asc&query=nix.buildMachines) or through general [Nix configuration](https://nixos.org/manual/nix/stable/advanced-topics/distributed-builds).
+
+If you run the tests on a **macOS** machine, you also need a "remote" builder for Linux; possibly a VM. [nix-darwin](https://daiderd.com/nix-darwin/) users may enable [`nix.linux-builder.enable`](https://daiderd.com/nix-darwin/manual/index.html#opt-nix.linux-builder.enable) to launch such a VM.
diff --git a/third_party/nixpkgs/nixos/doc/manual/development/settings-options.section.md b/third_party/nixpkgs/nixos/doc/manual/development/settings-options.section.md
index 71ec9bbc88..806eee5637 100644
--- a/third_party/nixpkgs/nixos/doc/manual/development/settings-options.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/development/settings-options.section.md
@@ -248,28 +248,30 @@ up in the manual.
::: {#ex-settings-typed-attrs .example}
### Declaring a type-checked `settings` attribute
```nix
-settings = lib.mkOption {
- type = lib.types.submodule {
+{
+ settings = lib.mkOption {
+ type = lib.types.submodule {
- freeformType = settingsFormat.type;
+ freeformType = settingsFormat.type;
+
+ # Declare an option for the port such that the type is checked and this option
+ # is shown in the manual.
+ options.port = lib.mkOption {
+ type = lib.types.port;
+ default = 8080;
+ description = ''
+ Which port this service should listen on.
+ '';
+ };
- # Declare an option for the port such that the type is checked and this option
- # is shown in the manual.
- options.port = lib.mkOption {
- type = lib.types.port;
- default = 8080;
- description = ''
- Which port this service should listen on.
- '';
};
-
+ default = {};
+ description = ''
+ Configuration for Foo, see
+
+ for supported values.
+ '';
};
- default = {};
- description = ''
- Configuration for Foo, see
-
- for supported values.
- '';
-};
+}
```
:::
diff --git a/third_party/nixpkgs/nixos/doc/manual/development/unit-handling.section.md b/third_party/nixpkgs/nixos/doc/manual/development/unit-handling.section.md
index d5ba6a9529..1f6a30d6ef 100644
--- a/third_party/nixpkgs/nixos/doc/manual/development/unit-handling.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/development/unit-handling.section.md
@@ -94,11 +94,13 @@ To make an existing sysinit service restart correctly during system switch, you
have to declare:
```nix
-systemd.services.my-sysinit = {
- requiredBy = [ "sysinit-reactivation.target" ];
- before = [ "sysinit-reactivation.target" ];
- restartTriggers = [ config.environment.etc."my-sysinit.d".source ];
-};
+{
+ systemd.services.my-sysinit = {
+ requiredBy = [ "sysinit-reactivation.target" ];
+ before = [ "sysinit-reactivation.target" ];
+ restartTriggers = [ config.environment.etc."my-sysinit.d".source ];
+ };
+}
```
You need to configure appropriate `restartTriggers` specific to your service.
diff --git a/third_party/nixpkgs/nixos/doc/manual/development/writing-modules.chapter.md b/third_party/nixpkgs/nixos/doc/manual/development/writing-modules.chapter.md
index e07b899e6d..67a5cc23a6 100644
--- a/third_party/nixpkgs/nixos/doc/manual/development/writing-modules.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/development/writing-modules.chapter.md
@@ -28,7 +28,7 @@ NixOS modules:
```nix
{ config, pkgs, ... }:
-{ option definitions
+{ # option definitions
}
```
@@ -43,15 +43,15 @@ is shown in [Example: Structure of NixOS Modules](#ex-module-syntax).
{
imports =
- [ paths of other modules
+ [ # paths of other modules
];
options = {
- option declarations
+ # option declarations
};
config = {
- option definitions
+ # option definitions
};
}
```
@@ -104,9 +104,8 @@ functions system environment substitution should *not* be disabled explicitly.
```nix
{ config, lib, pkgs, ... }:
-with lib;
-
let
+ inherit (lib) concatStringsSep mkIf mkOption optionalString types;
cfg = config.services.locate;
in {
options.services.locate = {
@@ -163,9 +162,7 @@ in {
::: {#exec-escaping-example .example}
### Escaping in Exec directives
```nix
-{ config, lib, pkgs, utils, ... }:
-
-with lib;
+{ config, pkgs, utils, ... }:
let
cfg = config.services.echo;
diff --git a/third_party/nixpkgs/nixos/doc/manual/development/writing-nixos-tests.section.md b/third_party/nixpkgs/nixos/doc/manual/development/writing-nixos-tests.section.md
index 84b247fd20..3ce12f41c6 100644
--- a/third_party/nixpkgs/nixos/doc/manual/development/writing-nixos-tests.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/development/writing-nixos-tests.section.md
@@ -8,10 +8,10 @@ A NixOS test is a module that has the following structure:
# One or more machines:
nodes =
{ machine =
- { config, pkgs, ... }: { … };
+ { config, pkgs, ... }: { /* ... */ };
machine2 =
- { config, pkgs, ... }: { … };
- …
+ { config, pkgs, ... }: { /* ... */ };
+ # …
};
testScript =
@@ -46,16 +46,20 @@ Tests are invoked differently depending on whether the test is part of NixOS or
Tests that are part of NixOS are added to [`nixos/tests/all-tests.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/all-tests.nix).
```nix
+{
hostname = runTest ./hostname.nix;
+}
```
Overrides can be added by defining an anonymous module in `all-tests.nix`.
```nix
+{
hostname = runTest {
imports = [ ./hostname.nix ];
defaults.networking.firewall.enable = false;
};
+}
```
You can run a test with attribute name `hostname` in `nixos/tests/all-tests.nix` by invoking:
@@ -161,7 +165,7 @@ For faster dev cycles it's also possible to disable the code-linters
skipLint = true;
nodes.machine =
{ config, pkgs, ... }:
- { configuration…
+ { # configuration…
};
testScript =
@@ -177,12 +181,14 @@ linter directly (again, don't commit this within the Nixpkgs
repository):
```nix
+{
testScript =
''
# fmt: off
Python code…
# fmt: on
'';
+}
```
Similarly, the type checking of test scripts can be disabled in the following
@@ -193,7 +199,7 @@ way:
skipTypeCheck = true;
nodes.machine =
{ config, pkgs, ... }:
- { configuration…
+ { # configuration…
};
}
```
@@ -261,7 +267,7 @@ added using the parameter `extraPythonPackages`. For example, you could add
testScript = ''
import numpy as np
- assert str(np.zeros(4) == "array([0., 0., 0., 0.])")
+ assert str(np.zeros(4)) == "[0. 0. 0. 0.]"
'';
}
```
diff --git a/third_party/nixpkgs/nixos/doc/manual/installation/building-images-via-systemd-repart.chapter.md b/third_party/nixpkgs/nixos/doc/manual/installation/building-images-via-systemd-repart.chapter.md
index 10bee156d1..5a552a54f5 100644
--- a/third_party/nixpkgs/nixos/doc/manual/installation/building-images-via-systemd-repart.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/installation/building-images-via-systemd-repart.chapter.md
@@ -18,11 +18,11 @@ An example of how to build an image:
partitions = {
"esp" = {
contents = {
- ...
+ # ...
};
repartConfig = {
Type = "esp";
- ...
+ # ...
};
};
"root" = {
@@ -30,7 +30,7 @@ An example of how to build an image:
repartConfig = {
Type = "root";
Label = "nixos";
- ...
+ # ...
};
};
};
@@ -47,19 +47,21 @@ determined by the mount point, you have to set `stripNixStorePrefix = true;` so
that the prefix is stripped from the paths before copying them into the image.
```nix
-fileSystems."/nix/store".device = "/dev/disk/by-partlabel/nix-store"
+{
+ fileSystems."/nix/store".device = "/dev/disk/by-partlabel/nix-store";
-image.repart.partitions = {
- "store" = {
- storePaths = [ config.system.build.toplevel ];
- stripNixStorePrefix = true;
- repartConfig = {
- Type = "linux-generic";
- Label = "nix-store";
- ...
+ image.repart.partitions = {
+ "store" = {
+ storePaths = [ config.system.build.toplevel ];
+ stripNixStorePrefix = true;
+ repartConfig = {
+ Type = "linux-generic";
+ Label = "nix-store";
+ # ...
+ };
};
};
-};
+}
```
## Appliance Image {#sec-image-repart-appliance}
diff --git a/third_party/nixpkgs/nixos/doc/manual/installation/changing-config.chapter.md b/third_party/nixpkgs/nixos/doc/manual/installation/changing-config.chapter.md
index 9e56b15a88..07a0074d17 100644
--- a/third_party/nixpkgs/nixos/doc/manual/installation/changing-config.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/installation/changing-config.chapter.md
@@ -87,7 +87,9 @@ set `mutableUsers = false`. Another way is to temporarily add the
following to your configuration:
```nix
-users.users.your-user.initialHashedPassword = "test";
+{
+ users.users.your-user.initialHashedPassword = "test";
+}
```
*Important:* delete the \$hostname.qcow2 file if you have started the
diff --git a/third_party/nixpkgs/nixos/doc/manual/installation/installing-behind-a-proxy.section.md b/third_party/nixpkgs/nixos/doc/manual/installation/installing-behind-a-proxy.section.md
index aca151531d..691f9c9ccf 100644
--- a/third_party/nixpkgs/nixos/doc/manual/installation/installing-behind-a-proxy.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/installation/installing-behind-a-proxy.section.md
@@ -7,8 +7,10 @@ To install NixOS behind a proxy, do the following before running
keep the internet accessible after reboot.
```nix
- networking.proxy.default = "http://user:password@proxy:port/";
- networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
+ {
+ networking.proxy.default = "http://user:password@proxy:port/";
+ networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
+ }
```
1. Setup the proxy environment variables in the shell where you are
diff --git a/third_party/nixpkgs/nixos/doc/manual/installation/installing-from-other-distro.section.md b/third_party/nixpkgs/nixos/doc/manual/installation/installing-from-other-distro.section.md
index 921592fe53..10ac2be4e1 100644
--- a/third_party/nixpkgs/nixos/doc/manual/installation/installing-from-other-distro.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/installation/installing-from-other-distro.section.md
@@ -89,12 +89,14 @@ The first steps to all these are the same:
want to add something like this to your `configuration.nix`:
```nix
- boot.loader.grub.extraEntries = ''
- menuentry "Ubuntu" {
- search --set=ubuntu --fs-uuid 3cc3e652-0c1f-4800-8451-033754f68e6e
- configfile "($ubuntu)/boot/grub/grub.cfg"
- }
- '';
+ {
+ boot.loader.grub.extraEntries = ''
+ menuentry "Ubuntu" {
+ search --set=ubuntu --fs-uuid 3cc3e652-0c1f-4800-8451-033754f68e6e
+ configfile "($ubuntu)/boot/grub/grub.cfg"
+ }
+ '';
+ }
```
(You can find the appropriate UUID for your partition in
@@ -164,7 +166,9 @@ The first steps to all these are the same:
`sudo passwd -l root` if you use `sudo`)
```nix
- users.users.root.initialHashedPassword = "";
+ {
+ users.users.root.initialHashedPassword = "";
+ }
```
1. Build the NixOS closure and install it in the `system` profile:
diff --git a/third_party/nixpkgs/nixos/doc/manual/installation/installing-virtualbox-guest.section.md b/third_party/nixpkgs/nixos/doc/manual/installation/installing-virtualbox-guest.section.md
index 004838e586..4b9ae0a9c5 100644
--- a/third_party/nixpkgs/nixos/doc/manual/installation/installing-virtualbox-guest.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/installation/installing-virtualbox-guest.section.md
@@ -29,14 +29,18 @@ There are a few modifications you should make in configuration.nix.
Enable booting:
```nix
-boot.loader.grub.device = "/dev/sda";
+{
+ boot.loader.grub.device = "/dev/sda";
+}
```
Also remove the fsck that runs at startup. It will always fail to run,
stopping your boot until you press `*`.
```nix
-boot.initrd.checkJournalingFS = false;
+{
+ boot.initrd.checkJournalingFS = false;
+}
```
Shared folders can be given a name and a path in the host system in the
diff --git a/third_party/nixpkgs/nixos/doc/manual/installation/installing.chapter.md b/third_party/nixpkgs/nixos/doc/manual/installation/installing.chapter.md
index 815bcc071c..b6db40878b 100644
--- a/third_party/nixpkgs/nixos/doc/manual/installation/installing.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/installation/installing.chapter.md
@@ -272,6 +272,9 @@ update /etc/fstab.
# parted /dev/sda -- mkpart ESP fat32 1MB 512MB
# parted /dev/sda -- set 3 esp on
```
+ ::: {.note}
+ In case you decided to not create a swap partition, replace `3` by `2`. To be sure of the id number of ESP, run `parted --list`.
+ :::
Once complete, you can follow with
[](#sec-installation-manual-partitioning-formatting).
@@ -373,7 +376,7 @@ Use the following commands:
```ShellSession
# mkdir -p /mnt/boot
- # mount /dev/disk/by-label/boot /mnt/boot
+ # mount -o umask=077 /dev/disk/by-label/boot /mnt/boot
```
3. If your machine has a limited amount of memory, you may want to
@@ -569,7 +572,7 @@ With a partitioned disk.
# mkfs.fat -F 32 -n boot /dev/sda3 # (for UEFI systems only)
# mount /dev/disk/by-label/nixos /mnt
# mkdir -p /mnt/boot # (for UEFI systems only)
-# mount /dev/disk/by-label/boot /mnt/boot # (for UEFI systems only)
+# mount -o umask=077 /dev/disk/by-label/boot /mnt/boot # (for UEFI systems only)
# nixos-generate-config --root /mnt
# nano /mnt/etc/nixos/configuration.nix
# nixos-install
diff --git a/third_party/nixpkgs/nixos/doc/manual/installation/upgrading.chapter.md b/third_party/nixpkgs/nixos/doc/manual/installation/upgrading.chapter.md
index 79cd4e55be..09338bf872 100644
--- a/third_party/nixpkgs/nixos/doc/manual/installation/upgrading.chapter.md
+++ b/third_party/nixpkgs/nixos/doc/manual/installation/upgrading.chapter.md
@@ -101,8 +101,10 @@ You can keep a NixOS system up-to-date automatically by adding the
following to `configuration.nix`:
```nix
-system.autoUpgrade.enable = true;
-system.autoUpgrade.allowReboot = true;
+{
+ system.autoUpgrade.enable = true;
+ system.autoUpgrade.allowReboot = true;
+}
```
This enables a periodically executed systemd service named
@@ -114,5 +116,7 @@ the new generation contains a different kernel, initrd or kernel
modules. You can also specify a channel explicitly, e.g.
```nix
-system.autoUpgrade.channel = "https://channels.nixos.org/nixos-23.11";
+{
+ system.autoUpgrade.channel = "https://channels.nixos.org/nixos-23.11";
+}
```
diff --git a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-1509.section.md b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-1509.section.md
index f47d130081..c2ac89a095 100644
--- a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-1509.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-1509.section.md
@@ -253,9 +253,9 @@ Installing Haskell _libraries_ this way, however, is no longer supported. See th
{
options = {
- foo = mkOption { … };
+ foo = mkOption { /* … */ };
};
- config = mkIf config.foo { … };
+ config = mkIf config.foo { /* … */ };
}
```
@@ -268,9 +268,9 @@ Installing Haskell _libraries_ this way, however, is no longer supported. See th
{
options = {
- foo = mkOption { option declaration };
+ foo = mkOption { /* option declaration */ };
};
- config = mkIf config.foo { option definition };
+ config = mkIf config.foo { /* option definition */ };
}
```
diff --git a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-1703.section.md b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-1703.section.md
index b82c41e28c..e20d84d306 100644
--- a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-1703.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-1703.section.md
@@ -246,7 +246,7 @@ When upgrading from a previous release, please be aware of the following incompa
let
pkgs = import {};
in
- pkgs.overridePackages (self: super: ...)
+ pkgs.overridePackages (self: super: { /* ... */ })
```
should be replaced by:
@@ -255,7 +255,7 @@ When upgrading from a previous release, please be aware of the following incompa
let
pkgs = import {};
in
- import pkgs.path { overlays = [(self: super: ...)]; }
+ import pkgs.path { overlays = [(self: super: { /* ... */ })]; }
```
- Autoloading connection tracking helpers is now disabled by default. This default was also changed in the Linux kernel and is considered insecure if not configured properly in your firewall. If you need connection tracking helpers (i.e. for active FTP) please enable `networking.firewall.autoLoadConntrackHelpers` and tune `networking.firewall.connectionTrackingModules` to suit your needs.
diff --git a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-1909.section.md b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-1909.section.md
index 2bd04f8dd4..49fc98c313 100644
--- a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-1909.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-1909.section.md
@@ -230,7 +230,7 @@ When upgrading from a previous release, please be aware of the following incompa
- The `documentation` module gained an option named `documentation.nixos.includeAllModules` which makes the generated configuration.nix 5 manual page include all options from all NixOS modules included in a given `configuration.nix` configuration file. Currently, it is set to `false` by default as enabling it frequently prevents evaluation. But the plan is to eventually have it set to `true` by default. Please set it to `true` now in your `configuration.nix` and fix all the bugs it uncovers.
-- The `vlc` package gained support for Chromecast streaming, enabled by default. TCP port 8010 must be open for it to work, so something like `networking.firewall.allowedTCPPorts = [ 8010 ];` may be required in your configuration. Also consider enabling [ Accelerated Video Playback](https://nixos.wiki/wiki/Accelerated_Video_Playback) for better transcoding performance.
+- The `vlc` package gained support for Chromecast streaming, enabled by default. TCP port 8010 must be open for it to work, so something like `networking.firewall.allowedTCPPorts = [ 8010 ];` may be required in your configuration. Also consider enabling [ Accelerated Video Playback](https://wiki.nixos.org/wiki/Accelerated_Video_Playback) for better transcoding performance.
- The following changes apply if the `stateVersion` is changed to 19.09 or higher. For `stateVersion = "19.03"` or lower the old behavior is preserved.
diff --git a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2009.section.md b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2009.section.md
index eac02a8ff4..900c20dbe7 100644
--- a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2009.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2009.section.md
@@ -334,22 +334,18 @@ When upgrading from a previous release, please be aware of the following incompa
- The remaining configuration flags can now be set directly on the `php` attribute. For example, instead of
```nix
- {
- php.override {
- config.php.embed = true;
- config.php.apxs2 = false;
- }
+ php.override {
+ config.php.embed = true;
+ config.php.apxs2 = false;
}
```
you should now write
```nix
- {
- php.override {
- embedSupport = true;
- apxs2Support = false;
- }
+ php.override {
+ embedSupport = true;
+ apxs2Support = false;
}
```
@@ -383,9 +379,10 @@ When upgrading from a previous release, please be aware of the following incompa
{
specialisation.example-sub-configuration = {
configuration = {
- ...
+ # ...
};
- };
+ };
+ }
```
Replace a `nesting.children` entry with:
@@ -395,9 +392,10 @@ When upgrading from a previous release, please be aware of the following incompa
specialisation.example-sub-configuration = {
inheritParentConfig = false;
configuration = {
- ...
+ # ...
};
- };
+ };
+ }
```
To switch to a specialised configuration at runtime you need to run:
@@ -469,7 +467,7 @@ When upgrading from a previous release, please be aware of the following incompa
services.bitcoind = {
enable = true;
extraConfig = "...";
- ...
+ # ...
};
}
```
@@ -483,7 +481,7 @@ When upgrading from a previous release, please be aware of the following incompa
dataDir = "/var/lib/bitcoind";
user = "bitcoin";
extraConfig = "...";
- ...
+ # ...
};
}
```
@@ -502,7 +500,7 @@ When upgrading from a previous release, please be aware of the following incompa
{
services.dokuwiki = {
enable = true;
- ...
+ # ...
};
}
```
@@ -517,7 +515,7 @@ When upgrading from a previous release, please be aware of the following incompa
forceSSL = true;
enableACME = true;
};
- ...
+ # ...
};
}
```
diff --git a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2205.section.md b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2205.section.md
index 6f5a807f47..3a2c70fb7a 100644
--- a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2205.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2205.section.md
@@ -462,6 +462,7 @@ In addition to numerous new and upgraded packages, this release has the followin
Before:
```nix
+ {
services.keycloak = {
enable = true;
httpPort = "8080";
@@ -471,10 +472,12 @@ In addition to numerous new and upgraded packages, this release has the followin
"subsystem=undertow"."server=default-server"."http-listener=default".proxy-address-forwarding = true;
};
};
+ }
```
After:
```nix
+ {
services.keycloak = {
enable = true;
settings = {
@@ -485,6 +488,7 @@ In addition to numerous new and upgraded packages, this release has the followin
};
database.passwordFile = "/run/keys/db_password";
};
+ }
```
- The MoinMoin wiki engine (`services.moinmoin`) has been removed, because Python 2 is being retired from nixpkgs.
diff --git a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2211.section.md b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2211.section.md
index 1c73d0c979..77cb6c9baa 100644
--- a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2211.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2211.section.md
@@ -254,10 +254,12 @@ In addition to numerous new and upgraded packages, this release includes the fol
- `services.github-runner` and `services.github-runners.` gained the option `serviceOverrides` which allows overriding the systemd `serviceConfig`. If you have been overriding the systemd service configuration (i.e., by defining `systemd.services.github-runner.serviceConfig`), you have to use the `serviceOverrides` option now. Example:
- ```
- services.github-runner.serviceOverrides.SupplementaryGroups = [
- "docker"
- ];
+ ```nix
+ {
+ services.github-runner.serviceOverrides.SupplementaryGroups = [
+ "docker"
+ ];
+ }
```
diff --git a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2305.section.md b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2305.section.md
index 21c798b3b4..f5d1d3016a 100644
--- a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2305.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2305.section.md
@@ -25,7 +25,9 @@ In addition to numerous new and updated packages, this release has the following
- NixOS now defaults to using [nsncd](https://github.com/twosigma/nsncd), a non-caching reimplementation of nscd in Rust, as its NSS lookup dispatcher. This replaces the buggy and deprecated nscd implementation provided through glibc. When you find problems, you can switch back by disabling it:
```nix
- services.nscd.enableNsncd = false;
+ {
+ services.nscd.enableNsncd = false;
+ }
```
- The internal option `boot.bootspec.enable` is now enabled by default because [RFC 0125](https://github.com/NixOS/rfcs/pull/125) was merged. This means you will have a bootspec document called `boot.json` generated for each system and specialisation in the top-level. This is useful to enable advanced boot use cases in NixOS, such as Secure Boot.
@@ -51,7 +53,7 @@ In addition to numerous new and updated packages, this release has the following
- [alertmanager-irc-relay](https://github.com/google/alertmanager-irc-relay), a Prometheus Alertmanager IRC Relay. Available as [services.prometheus.alertmanagerIrcRelay](options.html#opt-services.prometheus.alertmanagerIrcRelay.enable).
-- [alice-lg](github.com/alice-lg/alice-lg), a looking-glass for BGP sessions. Available as [services.alice-lg](#opt-services.alice-lg.enable).
+- [alice-lg](https://github.com/alice-lg/alice-lg), a looking-glass for BGP sessions. Available as [services.alice-lg](#opt-services.alice-lg.enable).
- [atuin](https://github.com/ellie/atuin), a sync server for shell history. Available as [services.atuin](#opt-services.atuin.enable).
@@ -190,11 +192,13 @@ In addition to numerous new and updated packages, this release has the following
- MAC-then-encrypt algorithms were removed from the default selection of `services.openssh.settings.Macs`. If you still require these [MACs](https://en.wikipedia.org/wiki/Message_authentication_code), for example when you are relying on libssh2 (e.g. VLC) or the SSH library shipped on the iPhone, you can re-add them like this:
```nix
- services.openssh.settings.Macs = [
- "hmac-sha2-512"
- "hmac-sha2-256"
- "umac-128@openssh.com"
- ];
+ {
+ services.openssh.settings.Macs = [
+ "hmac-sha2-512"
+ "hmac-sha2-256"
+ "umac-128@openssh.com"
+ ];
+ }
```
- `podman` now uses the `netavark` network stack. Users will need to delete all of their local containers, images, volumes, etc, by running `podman system reset --force` once before upgrading their systems.
@@ -227,21 +231,25 @@ In addition to numerous new and updated packages, this release has the following
- The attributes used by `services.snapper.configs.` have changed. Migrate from this:
```nix
- services.snapper.configs.example = {
- subvolume = "/example";
- extraConfig = ''
- ALLOW_USERS="alice"
- '';
- };
+ {
+ services.snapper.configs.example = {
+ subvolume = "/example";
+ extraConfig = ''
+ ALLOW_USERS="alice"
+ '';
+ };
+ }
```
to this:
```nix
- services.snapper.configs.example = {
- SUBVOLUME = "/example";
- ALLOW_USERS = [ "alice" ];
- };
+ {
+ services.snapper.configs.example = {
+ SUBVOLUME = "/example";
+ ALLOW_USERS = [ "alice" ];
+ };
+ }
```
- The default module options for [services.snapserver.openFirewall](#opt-services.snapserver.openFirewall), [services.tmate-ssh-server.openFirewall](#opt-services.tmate-ssh-server.openFirewall) and [services.unifi-video.openFirewall](#opt-services.unifi-video.openFirewall) have been changed from `true` to `false`. You will need to explicitly set this option to `true`, or configure your firewall.
@@ -446,15 +454,17 @@ In addition to numerous new and updated packages, this release has the following
- NixOS swap partitions with random encryption can now control the sector size, cipher, and key size used to set up the plain encryption device over the underlying block device rather than allowing them to be determined by `cryptsetup(8)`. One can use these features like so:
```nix
- swapDevices = [ {
- device = "/dev/disk/by-partlabel/swapspace";
- randomEncryption = {
- enable = true;
- cipher = "aes-xts-plain64";
- keySize = 512;
- sectorSize = 4096;
- };
- } ];
+ {
+ swapDevices = [ {
+ device = "/dev/disk/by-partlabel/swapspace";
+ randomEncryption = {
+ enable = true;
+ cipher = "aes-xts-plain64";
+ keySize = 512;
+ sectorSize = 4096;
+ };
+ } ];
+ }
```
- New option `security.pam.zfs` to enable unlocking and mounting of encrypted ZFS home dataset at login.
@@ -465,7 +475,9 @@ In addition to numerous new and updated packages, this release has the following
- PostgreSQL has added opt-in support for [JIT compilation](https://www.postgresql.org/docs/current/jit-reason.html). It can be enabled like this:
```nix
- services.postgresql.enableJIT = true;
+ {
+ services.postgresql.enableJIT = true;
+ }
```
- `services.netdata` offers a [`services.netdata.deadlineBeforeStopSec`](#opt-services.netdata.deadlineBeforeStopSec) option which will control the deadline (in seconds) after which systemd will consider your netdata instance as dead if it didn't start in the elapsed time. It is helpful when your netdata instance takes longer to start because of a large amount of state or upgrades.
diff --git a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2311.section.md b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2311.section.md
index 1aef182890..d837e0ff68 100644
--- a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2311.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2311.section.md
@@ -700,11 +700,13 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2
will probably be removed eventually.
```nix
- qt = {
- enable = true;
- platformTheme = "gnome";
- style = "adwaita";
- };
+ {
+ qt = {
+ enable = true;
+ platformTheme = "gnome";
+ style = "adwaita";
+ };
+ }
```
- DocBook option documentation is no longer supported, all module documentation
@@ -885,11 +887,13 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2
to a compatible major version, so they can move at their own pace.
```nix
- python = python3.override {
- packageOverrides = self: super: {
- django = super.django_3;
+ {
+ python = python3.override {
+ packageOverrides = self: super: {
+ django = super.django_3;
+ };
};
- };
+ }
```
- The `qemu-vm.nix` module by default now identifies block devices via
@@ -997,7 +1001,7 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2
Satellite](https://github.com/synesthesiam/homeassistant-satellite), a
streaming audio satellite for Home Assistant voice pipelines, where you can
reuse existing mic and speaker hardware. Available as
- [services.homeassistant-satellite](#opt-services.homeassistant-satellite.enable).
+ `services.homeassistant-satellite`.
- [Apache Guacamole](https://guacamole.apache.org/), a cross-platform,
clientless remote desktop gateway. Available as
@@ -1228,16 +1232,18 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2
- CoreDNS may be built with external plugins now. This may be done by
overriding `externalPlugins` and `vendorHash` arguments like this:
- ```
- services.coredns = {
- enable = true;
- package = pkgs.coredns.override {
- externalPlugins = [
- {name = "fanout"; repo = "github.com/networkservicemesh/fanout"; version = "v1.9.1";}
- ];
- vendorHash = "";
+ ```nix
+ {
+ services.coredns = {
+ enable = true;
+ package = pkgs.coredns.override {
+ externalPlugins = [
+ {name = "fanout"; repo = "github.com/networkservicemesh/fanout"; version = "v1.9.1";}
+ ];
+ vendorHash = "";
+ };
};
- };
+ }
```
To get the necessary SRI hash, set `vendorHash = "";`. The build will fail
diff --git a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2405.section.md b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2405.section.md
index 84314f4bec..0fd44f0673 100644
--- a/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2405.section.md
+++ b/third_party/nixpkgs/nixos/doc/manual/release-notes/rl-2405.section.md
@@ -32,9 +32,20 @@ In addition to numerous new and upgraded packages, this release has the followin
- Julia environments can now be built with arbitrary packages from the ecosystem using the `.withPackages` function. For example: `julia.withPackages ["Plots"]`.
+- The PipeWire and WirePlumber modules have removed support for using
+`environment.etc."pipewire/..."` and `environment.etc."wireplumber/..."`.
+Use `services.pipewire.extraConfig` or `services.pipewire.configPackages` for PipeWire and
+`services.pipewire.wireplumber.configPackages` for WirePlumber instead."
+
+- `teleport` has been upgraded from major version 14 to major version 15.
+ Refer to upstream [upgrade instructions](https://goteleport.com/docs/management/operations/upgrading/)
+ and release notes for [v15](https://goteleport.com/docs/changelog/#1500-013124).
+
- A new option `systemd.sysusers.enable` was added. If enabled, users and
groups are created with systemd-sysusers instead of with a custom perl script.
+- The default dbus implementation has transitioned to dbus-broker from the classic dbus daemon for better performance and reliability. Users can revert to the classic dbus daemon by setting `services.dbus.implementation = "dbus";`. For detailed deviations, refer to [dbus-broker's deviations page](https://github.com/bus1/dbus-broker/wiki/Deviations).
+
- A new option `virtualisation.containers.cdi` was added. It contains `static` and `dynamic` attributes (corresponding to `/etc/cdi` and `/run/cdi` respectively) to configure the Container Device Interface (CDI).
- `virtualisation.docker.enableNvidia` and `virtualisation.podman.enableNvidia` options are deprecated. `virtualisation.containers.cdi.dynamic.nvidia.enable` should be used instead. This option will expose GPUs on containers with the `--device` CLI option. This is supported by Docker 25, Podman 3.2.0 and Singularity 4. Any container runtime that supports the CDI specification will take advantage of this feature.
@@ -42,89 +53,196 @@ In addition to numerous new and upgraded packages, this release has the followin
- A new option `system.etc.overlay.enable` was added. If enabled, `/etc` is
mounted via an overlayfs instead of being created by a custom perl script.
+- NixOS AMIs are now uploaded regularly to a new AWS Account.
+ Instructions on how to use them can be found on .
+ We are working on integration the data into the NixOS homepage.
+ The list in `nixos/modules/virtualisation/amazon-ec2-amis.nix` will stop
+ being updated and will be removed in the future.
+
- It is now possible to have a completely perlless system (i.e. a system
without perl). Previously, the NixOS activation depended on two perl scripts
which can now be replaced via an opt-in mechanism. To make your system
perlless, you can use the new perlless profile:
- ```
+ ```nix
{ modulesPath, ... }: {
imports = [ "${modulesPath}/profiles/perlless.nix" ];
}
```
+- The initial Incus LTS release (v6.0.x) is now available through `virtualisation.incus` as the default. Users who wish to continue using the non-LTS release will need to set `virtualisation.incus.package = pkgs.incus`. Stable release users are encouraged to stay on the LTS release as non-LTS releases will by default not be backported.
+
+- Canonical LXD has been upgraded to v5.21.x, an LTS release. The LTS release is now the only supported LXD release. Users are encouraged to [migrate to Incus](https://linuxcontainers.org/incus/docs/main/howto/server_migrate_lxd/) for better support on NixOS.
+
+- lua interpreters default LUA_PATH and LUA_CPATH are not overriden by nixpkgs
+ anymore, we patch LUA_ROOT instead which is more respectful to upstream.
+
- Plasma 6 is now available and can be installed with `services.xserver.desktopManager.plasma6.enable = true;`. Plasma 5 will likely be deprecated in the next release (24.11). Note that Plasma 6 runs as Wayland by default, and the X11 session needs to be explicitly selected if necessary.
+- The desktop mode of Lomiri (formerly known as Unity8), using Mir 2.x to function as a Wayland compositor, is now available and can be installed with `services.desktopManager.lomiri.enable = true`. Note that some core applications, services and indicators have yet to be packaged, and some functions may remain incomplete, but the base experience should be there.
+
## New Services {#sec-release-24.05-new-services}
+- [ownCloud Infinite Scale Stack](https://owncloud.com/infinite-scale-4-0/), a modern and scalable rewrite of ownCloud.
+
- [Handheld Daemon](https://github.com/hhd-dev/hhd), support for gaming handhelds like the Legion Go, ROG Ally, and GPD Win. Available as [services.handheld-daemon](#opt-services.handheld-daemon.enable).
- [Guix](https://guix.gnu.org), a functional package manager inspired by Nix. Available as [services.guix](#opt-services.guix.enable).
+- [PhotonVision](https://photonvision.org/), a free, fast, and easy-to-use computer vision solution for the FIRST® Robotics Competition.
+
- [pyLoad](https://pyload.net/), a FOSS download manager written in Python. Available as [services.pyload](#opt-services.pyload.enable)
- [maubot](https://github.com/maubot/maubot), a plugin-based Matrix bot framework. Available as [services.maubot](#opt-services.maubot.enable).
+- [ryzen-monitor-ng](https://github.com/mann1x/ryzen_monitor_ng), a desktop AMD CPU power monitor and controller, similar to Ryzen Master but for Linux. Available as [programs.ryzen-monitor-ng](#opt-programs.ryzen-monitor-ng.enable)
+
+- [ryzen-smu](https://gitlab.com/leogx9r/ryzen_smu), Linux kernel driver to expose the SMU (System Management Unit) for certain AMD Ryzen Processors. Includes the userspace program `monitor_cpu`. Available at [hardward.cpu.amd.ryzen-smu](#opt-hardware.cpu.amd.ryzen-smu.enable)
+
- systemd's gateway, upload, and remote services, which provides ways of sending journals across the network. Enable using [services.journald.gateway](#opt-services.journald.gateway.enable), [services.journald.upload](#opt-services.journald.upload.enable), and [services.journald.remote](#opt-services.journald.remote.enable).
- [GNS3](https://www.gns3.com/), a network software emulator. Available as [services.gns3-server](#opt-services.gns3-server.enable).
- [pretalx](https://github.com/pretalx/pretalx), a conference planning tool. Available as [services.pretalx](#opt-services.pretalx.enable).
+- [dnsproxy](https://github.com/AdguardTeam/dnsproxy), a simple DNS proxy with DoH, DoT, DoQ and DNSCrypt support. Available as [services.dnsproxy](#opt-services.dnsproxy.enable).
+
+- [manticoresearch](https://manticoresearch.com), easy to use open source fast database for search. Available as [services.manticore](#opt-services.manticore.enable).
+
- [rspamd-trainer](https://gitlab.com/onlime/rspamd-trainer), script triggered by a helper which reads mails from a specific mail inbox and feeds them into rspamd for spam/ham training.
- [ollama](https://ollama.ai), server for running large language models locally.
+- [Mihomo](https://github.com/MetaCubeX/mihomo/tree/Alpha), a rule-based proxy in Go. Available as [services.mihomo.enable](#opt-services.mihomo.enable).
+
- [hebbot](https://github.com/haecker-felix/hebbot), a Matrix bot to generate "This Week in X" like blog posts. Available as [services.hebbot](#opt-services.hebbot.enable).
+- [Workout-tracker](https://github.com/jovandeginste/workout-tracker), a workout tracking web application for personal use.
+
+- [Python Matter Server](https://github.com/home-assistant-libs/python-matter-server), a
+ Matter Controller Server exposing websocket connections for use with other services, notably Home Assistant.
+ Available as [services.matter-server](#opt-services.matter-server.enable)
+
+- [db-rest](https://github.com/derhuerst/db-rest), a wrapper around Deutsche Bahn's internal API for public transport data. Available as [services.db-rest](#opt-services.db-rest.enable).
+
- [Anki Sync Server](https://docs.ankiweb.net/sync-server.html), the official sync server built into recent versions of Anki. Available as [services.anki-sync-server](#opt-services.anki-sync-server.enable).
The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been marked deprecated and will be dropped after 24.05 due to lack of maintenance of the anki-sync-server softwares.
+- [mautrix-meta](https://github.com/mautrix/meta), a Matrix <-> Facebook and Matrix <-> Instagram hybrid puppeting/relaybot bridge. Available as services.mautrix-meta
+
+- [transfer-sh](https://github.com/dutchcoders/transfer.sh), a tool that supports easy and fast file sharing from the command-line. Available as [services.transfer-sh](#opt-services.transfer-sh.enable).
+
+- [FCast Receiver](https://fcast.org), an open-source alternative to Chromecast and AirPlay. Available as [programs.fcast-receiver](#opt-programs.fcast-receiver.enable).
+
+- [MollySocket](https://github.com/mollyim/mollysocket) which allows getting Signal notifications via UnifiedPush.
+
- [Suwayomi Server](https://github.com/Suwayomi/Suwayomi-Server), a free and open source manga reader server that runs extensions built for [Tachiyomi](https://tachiyomi.org). Available as [services.suwayomi-server](#opt-services.suwayomi-server.enable).
+- A self-hosted management server for the [Netbird](https://netbird.io). Available as [services.netbird.server](#opt-services.netbird.server.enable).
+
- [ping_exporter](https://github.com/czerwonk/ping_exporter), a Prometheus exporter for ICMP echo requests. Available as [services.prometheus.exporters.ping](#opt-services.prometheus.exporters.ping.enable).
+- [Prometheus DNSSEC Exporter](https://github.com/chrj/prometheus-dnssec-exporter), check for validity and expiration in DNSSEC signatures and expose metrics for Prometheus. Available as [services.prometheus.exporters.dnssec](#opt-services.prometheus.exporters.dnssec.enable).
+
- [TigerBeetle](https://tigerbeetle.com/), a distributed financial accounting database designed for mission critical safety and performance. Available as [services.tigerbeetle](#opt-services.tigerbeetle.enable).
- [go-camo](https://github.com/cactus/go-camo), a secure image proxy server. Available as [services.go-camo](#opt-services.go-camo.enable).
- [Monado](https://monado.freedesktop.org/), an open source XR runtime. Available as [services.monado](#opt-services.monado.enable).
+- [Pretix](https://pretix.eu/about/en/), an open source ticketing software for events. Available as [services.pretix]($opt-services-pretix.enable).
+
+- [microsocks](https://github.com/rofl0r/microsocks), a tiny, portable SOCKS5 server with very moderate resource usage. Available as [services.microsocks]($opt-services-microsocks.enable).
+
- [Clevis](https://github.com/latchset/clevis), a pluggable framework for automated decryption, used to unlock encrypted devices in initrd. Available as [boot.initrd.clevis.enable](#opt-boot.initrd.clevis.enable).
+- [fritz-exporter](https://github.com/pdreker/fritz_exporter), a Prometheus exporter for extracting metrics from [FRITZ!](https://avm.de/produkte/) devices. Available as [services.prometheus.exporters.fritz](#opt-services.prometheus.exporters.fritz.enable).
+
+- [armagetronad](https://wiki.armagetronad.org), a mid-2000s 3D lightcycle game widely played at iD Tech Camps. You can define multiple servers using `services.armagetronad..enable`.
+
+- [wyoming-satellite](https://github.com/rhasspy/wyoming-satellite), a voice assistant satellite for Home Assistant using the Wyoming protocol. Available as [services.wyoming.satellite]($opt-services.wyoming.satellite.enable).
+
- [TuxClocker](https://github.com/Lurkki14/tuxclocker), a hardware control and monitoring program. Available as [programs.tuxclocker](#opt-programs.tuxclocker.enable).
+- binfmt option for AppImage-run to support running [AppImage](https://appimage.org/)'s seamlessly on NixOS.. Available as [programs.appimage.binfmt](#opt-programs.appimage.binfmt).
+
+- [nh](https://github.com/viperML/nh), yet another Nix CLI helper. Available as [programs.nh](#opt-programs.nh.enable).
+
- [ALVR](https://github.com/alvr-org/alvr), a VR desktop streamer. Available as [programs.alvr](#opt-programs.alvr.enable)
- [RustDesk](https://rustdesk.com), a full-featured open source remote control alternative for self-hosting and security with minimal configuration. Alternative to TeamViewer.
- [Scrutiny](https://github.com/AnalogJ/scrutiny), a S.M.A.R.T monitoring tool for hard disks with a web frontend.
+- [davis](https://github.com/tchapi/davis), a simple CardDav and CalDav server inspired by Baïkal. Available as [services.davis]($opt-services-davis.enable).
+
+- [Firefly-iii](https://www.firefly-iii.org), a free and open source personal finance manager. Available as [services.firefly-iii](#opt-services.firefly-iii.enable)
+
- [systemd-lock-handler](https://git.sr.ht/~whynothugo/systemd-lock-handler/), a bridge between logind D-Bus events and systemd targets. Available as [services.systemd-lock-handler.enable](#opt-services.systemd-lock-handler.enable).
+- [wastebin](https://github.com/matze/wastebin), a pastebin server written in rust. Available as [services.wastebin](#opt-services.wastebin.enable).
+
- [Mealie](https://nightly.mealie.io/), a self-hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in NuxtJS for a pleasant user experience for the whole family. Available as [services.mealie](#opt-services.mealie.enable)
+- [Sunshine](https://app.lizardbyte.dev/Sunshine), a self-hosted game stream host for Moonlight. Available as [services.sunshine](#opt-services.sunshine.enable).
+
+- [Uni-Sync](https://github.com/EightB1ts/uni-sync), a synchronization tool for Lian Li Uni Controllers. Available as [hardware.uni-sync](#opt-hardware.uni-sync.enable)
+
+- [prometheus-nats-exporter](https://github.com/nats-io/prometheus-nats-exporter), a Prometheus exporter for NATS. Available as [services.prometheus.exporters.nats](#opt-services.prometheus.exporters.nats.enable).
+
## Backward Incompatibilities {#sec-release-24.05-incompatibilities}
-- `himalaya` was updated to `v1.0.0-beta.3`, which introduces breaking changes. Check out the [release note](https://github.com/soywod/himalaya/releases/tag/v1.0.0-beta.3) for details.
+- `k3s`: was updated to version [v1.29](https://github.com/k3s-io/k3s/releases/tag/v1.29.1%2Bk3s2), all previous versions (k3s_1_26, k3s_1_27, k3s_1_28) will be removed. See [changelog and upgrade notes](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.29.md#urgent-upgrade-notes) for more information.
+
+- `himalaya` was updated to `v1.0.0-beta.4`, which introduces breaking changes. Check out the [release note](https://github.com/soywod/himalaya/releases/tag/v1.0.0-beta.4) for details.
- The `power.ups` module now generates `upsd.conf`, `upsd.users` and `upsmon.conf` automatically from a set of new configuration options. This breaks compatibility with existing `power.ups` setups where these files were created manually. Back up these files before upgrading NixOS.
+- `programs.nix-ld.libraries` no longer sets `baseLibraries` via the option's default but in config and now merges any additional libraries with the default ones.
+ This means that `lib.mkForce` must be used to clear the list of default libraries.
+
+- `cudaPackages.autoAddOpenGLRunpathHook` and `cudaPackages.autoAddDriverRunpath` have been deprecated for `pkgs.autoAddDriverRunpath`. Functionality has not changed, but the setuphook has been renamed and moved to the top-level package scope.
+
+- `cudaPackages.autoFixElfFiles` has been deprecated for `pkgs.autoFixElfFiles`. Functionality has not changed, but the setuphook has been renamed and moved to the top-level package scope.
+
+- `pdns` was updated to version [v4.9.x](https://doc.powerdns.com/authoritative/changelog/4.9.html), which introduces breaking changes. Check out the [Upgrade Notes](https://doc.powerdns.com/authoritative/upgrading.html#to-4-9-0) for details.
+
+- `unrar` was updated to v7. See [changelog](https://www.rarlab.com/unrar7notes.htm) for more information.
+
+- `git-town` was updated from version `11` to `13`. See the [changelog](https://github.com/git-town/git-town/blob/main/CHANGELOG.md#1300-2024-03-22) for breaking changes.
+
- `k9s` was updated to v0.31. There have been various breaking changes in the config file format,
check out the changelog of [v0.29](https://github.com/derailed/k9s/releases/tag/v0.29.0),
[v0.30](https://github.com/derailed/k9s/releases/tag/v0.30.0) and
[v0.31](https://github.com/derailed/k9s/releases/tag/v0.31.0) for details. It is recommended
to back up your current configuration and let k9s recreate the new base configuration.
+- NixOS AMIs are now uploaded regularly to a new AWS Account.
+ Instructions on how to use them can be found on .
+ We are working on integration the data into the NixOS homepage.
+ The list in `nixos/modules/virtualisation/amazon-ec2-amis.nix` will stop
+ being updated and will be removed in the future.
+
+- The option `services.postgresql.ensureUsers._.ensurePermissions` has been removed as it's
+ not declarative and is broken with newer postgresql versions. Consider using
+ [](#opt-services.postgresql.ensureUsers._.ensureDBOwnership)
+ instead or a tool that's more suited for managing the data inside a postgresql database.
+
- `idris2` was updated to v0.7.0. This version introduces breaking changes. Check out the [changelog](https://github.com/idris-lang/Idris2/blob/v0.7.0/CHANGELOG.md#v070) for details.
+- `nvtop` family of packages was reorganized into nested attrset. `nvtop` has been renamed to `nvtopPackages.full`, and all `nvtop-{amd,nvidia,intel,msm}` packages are now named as `nvtopPackages.{amd,nvidia,intel,msm}`
+
- `neo4j` has been updated to 5, you may want to read the [release notes for Neo4j 5](https://neo4j.com/release-notes/database/neo4j-5/)
- `services.neo4j.allowUpgrade` was removed and no longer has any effect. Neo4j 5 supports automatic rolling upgrades.
+- `unifiLTS`, `unifi5` and `unifi6` have been removed, as they require MongoDB versions which are end-of-life. All these versions can be upgraded to `unifi7` directly.
+
+- `mongodb-4_4` has been removed as it has reached end of life. Consequently, `unifi7` and `unifi8` now use MongoDB 5.0 by default.
+
- `nitter` requires a `guest_accounts.jsonl` to be provided as a path or loaded into the default location at `/var/lib/nitter/guest_accounts.jsonl`. See [Guest Account Branch Deployment](https://github.com/zedeus/nitter/wiki/Guest-Account-Branch-Deployment) for details.
- `boot.supportedFilesystems` and `boot.initrd.supportedFilesystems` are now attribute sets instead of lists. Assignment from lists as done previously is still supported, but checking whether a filesystem is enabled must now by done using `supportedFilesystems.fs or false` instead of using `lib.elem "fs" supportedFilesystems` as was done previously.
@@ -136,14 +254,37 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
"mysecret"` becomes `services.aria2.rpcSecretFile = "/path/to/secret_file"`
where the file `secret_file` contains the string `mysecret`.
+- `openssh`, `openssh_hpn` and `openssh_gssapi` are now compiled without support for the DSA signature algorithm as it is being deprecated upstream. Users still relying on DSA keys should consider upgrading
+ to another signature algorithm. It is however possible, for the time being, to restore the DSA keys support using `override` to set `dsaKeysSupport = true`.
+
+- `buildGoModule` now throws error when `vendorHash` is not specified. `vendorSha256`, deprecated in Nixpkgs 23.11, is now ignored and is no longer a `vendorHash` alias.
+
- Invidious has changed its default database username from `kemal` to `invidious`. Setups involving an externally provisioned database (i.e. `services.invidious.database.createLocally == false`) should adjust their configuration accordingly. The old `kemal` user will not be removed automatically even when the database is provisioned automatically.(https://github.com/NixOS/nixpkgs/pull/265857)
+- `writeReferencesToFile` is deprecated in favour of the new trivial build helper `writeClosure`. The latter accepts a list of paths and has an unambiguous name and cleaner implementation.
+
- `inetutils` now has a lower priority to avoid shadowing the commonly used `util-linux`. If one wishes to restore the default priority, simply use `lib.setPrio 5 inetutils` or override with `meta.priority = 5`.
- `paperless`' `services.paperless.extraConfig` setting has been removed and converted to the freeform type and option named `services.paperless.settings`.
+- `davfs2`' `services.davfs2.extraConfig` setting has been deprecated and converted to the freeform type option named `services.davfs2.settings` according to RFC42.
+
+- `services.homepage-dashboard` now takes it's configuration using native Nix expressions, rather than dumping templated configurations into `/var/lib/homepage-dashboard` where they were previously managed manually. There are now new options which allow the configuration of bookmarks, services, widgets and custom CSS/JS natively in Nix.
+
+- `hare` may now be cross-compiled. For that to work, however, `haredoc` needed to stop being built together with it. Thus, the latter is now its own package with the name of `haredoc`.
+
- The legacy and long deprecated systemd target `network-interfaces.target` has been removed. Use `network.target` instead.
+- `azure-cli` now has extension support. For example, to install the `aks-preview` extension, use
+
+ ```nix
+ environment.systemPackages = [
+ (azure-cli.withExtensions [ azure-cli.extensions.aks-preview ]);
+ ];
+ ```
+ To make the `azure-cli` immutable and prevent clashes in case `azure-cli` is also installed via other package managers, some configuration files were moved into the derivation.
+ This can be disabled by overriding `withImmutableConfig = false` when building `azure-cli`.
+
- `services.frp.settings` now generates the frp configuration file in TOML format as [recommended by upstream](https://github.com/fatedier/frp#configuration-files), instead of the legacy INI format. This has also introduced other changes in the configuration file structure and options.
- The `settings.common` section in the configuration is no longer valid and all the options form inside it now goes directly under `settings`.
- The `_` separating words in the configuration options is removed so the options are now in camel case. For example: `server_addr` becomes `serverAddr`, `server_port` becomes `serverPort` etc.
@@ -154,19 +295,26 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
release notes of [v19](https://github.com/systemd/mkosi/releases/tag/v19) and
[v20](https://github.com/systemd/mkosi/releases/tag/v20) for a list of changes.
+- `gonic` has been updated to v0.16.4. Config now requires `playlists-path` to be set. See the rest of the [v0.16.0 release notes](https://github.com/sentriz/gonic/releases/tag/v0.16.0) for more details.
+
+- The `services.vikunja` systemd service now uses `vikunja` as dynamic user instead of `vikunja-api`. Database users might need to be changed.
+
+- The `services.vikunja.setupNginx` setting has been removed. Users now need to setup the webserver configuration on their own with a proxy pass to the vikunja service.
+
- The `woodpecker-*` packages have been updated to v2 which includes [breaking changes](https://woodpecker-ci.org/docs/next/migrations#200).
- `services.nginx` will no longer advertise HTTP/3 availability automatically. This must now be manually added, preferably to each location block.
Example:
```nix
+ {
locations."/".extraConfig = ''
add_header Alt-Svc 'h3=":$server_port"; ma=86400';
'';
locations."^~ /assets/".extraConfig = ''
add_header Alt-Svc 'h3=":$server_port"; ma=86400';
'';
-
+ }
```
- The package `optparse-bash` is now dropped due to upstream inactivity. Alternatives available in Nixpkgs include [`argc`](https://github.com/sigoden/argc), [`argbash`](https://github.com/matejak/argbash), [`bashly`](https://github.com/DannyBen/bashly) and [`gum`](https://github.com/charmbracelet/gum), to name a few.
@@ -191,12 +339,27 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- The `cudaPackages` package scope has been updated to `cudaPackages_12`.
+- The deprecated `cudaPackages.cudatoolkit` has been replaced with a
+ symlink-based wrapper for the splayed redistributable CUDA packages. The
+ wrapper only includes tools and libraries necessary to build common packages
+ like e.g. tensorflow. The original runfile-based `cudatoolkit` is still
+ available as `cudatoolkit-legacy-runfile`.
+
+- The `halloy` package was updated past 2024.5 which introduced a breaking change by switching the config format from YAML to TOML. See https://github.com/squidowl/halloy/releases/tag/2024.5 for details.
+
- Ada packages (libraries and tools) have been moved into the `gnatPackages` scope. `gnatPackages` uses the default GNAT compiler, `gnat12Packages` and `gnat13Packages` use the respective matching compiler version.
- `spark2014` has been renamed to `gnatprove`. A version of `gnatprove` matching different GNAT versions is available from the different `gnatPackages` sets.
- `services.resolved.fallbackDns` can now be used to disable the upstream fallback servers entirely by setting it to an empty list. To get the previous behaviour of the upstream defaults set it to null, the new default, instead.
+- `services.hledger-web.capabilities` options has been replaced by a new option `services.hledger-web.allow`.
+
+ - `allow = "view"` means `capabilities = { view = true; }`;
+ - `allow = "add"` means `capabilities = { view = true; add = true; }`;
+ - `allow = "edit"` means `capabilities = { view = true; add = true; edit = true }`;
+ - `allow = "sandstorm"` reads permissions from the `X-Sandstorm-Permissions` request header.
+
- `xxd` has been moved from `vim` default output to its own output to reduce closure size. The canonical way to reference it across all platforms is `unixtools.xxd`.
- The `stalwart-mail` package has been updated to v0.5.3, which includes [breaking changes](https://github.com/stalwartlabs/mail-server/blob/v0.5.3/UPGRADING.md).
@@ -216,6 +379,10 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `services.archisteamfarm` no longer uses the abbreviation `asf` for its state directory (`/var/lib/asf`), user and group (both `asf`). Instead the long name `archisteamfarm` is used.
Configurations with `system.stateVersion` 23.11 or earlier, default to the old stateDirectory until the 24.11 release and must either set the option explicitly or move the data to the new directory.
+- `xfsprogs` was updated to version 6.6.0, which enables reverse mapping (rmapbt) and large extent counts (nrext64) by default.
+ Support for these features was added in kernel 4.9 and 5.19 and nrext64 was deemed stable in kernel 6.5.
+ Format your filesystems with `mkfs.xfs -i nrext64=0`, if they need to be readable by GRUB2 before 2.12 or kernels older than 5.19.
+
- `networking.iproute2.enable` now does not set `environment.etc."iproute2/rt_tables".text`.
Setting `environment.etc."iproute2/{CONFIG_FILE_NAME}".text` will override the whole configuration file instead of appending it to the upstream configuration file.
@@ -270,20 +437,44 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `nomad_1_4` has been removed, as it is now unsupported upstream.
+- Dwarf Fortress has been updated to version 50, and its derivations continue to menace with spikes of Nix and bash. Version 50 is identical to the version on Steam, but without the paid elements like tilepacks.
+ dfhack and Dwarf Therapist still work, and older versions are still packaged in case you'd like to roll back. Note that DF 50 saves will not be compatible with DF 0.47 and earlier.
+ See [Bay 12 Games](http://www.bay12games.com/dwarves/) for more details on what's new in Dwarf Fortress.
+
+ - Running an earlier version can be achieved through an override: `dwarf-fortress-packages.dwarf-fortress-full.override { dfVersion = "0.47.5"; }`
+
+ - Ruby plugin support has been disabled in DFHack. Many of the Ruby plugins have been converted to Lua, and support was removed upstream due to frequent crashes.
+
- The `livebook` package is now built as a `mix release` instead of an `escript`.
This means that configuration now has to be done using [environment variables](https://hexdocs.pm/livebook/readme.html#environment-variables) instead of command line arguments.
This has the further implication that the `livebook` service configuration has changed:
- - The `erlang_node_short_name`, `erlang_node_name`, `port` and `options` configuration parameters are gone, and have been replaced with an `environment` parameter.
+- The `erlang_node_short_name`, `erlang_node_name`, `port` and `options` configuration parameters are gone, and have been replaced with an `environment` parameter.
Use the appropriate [environment variables](https://hexdocs.pm/livebook/readme.html#environment-variables) inside `environment` to configure the service instead.
+- `akkoma` now requires explicitly setting the base URL for uploaded media (`settings."Pleroma.Upload".base_url`), as well as for the media proxy if enabled (`settings."Media"`).
+ This is recommended to be a separate (sub)domain to the one Akkoma is hosted at.
+ See [here](https://meta.akkoma.dev/t/akkoma-stable-2024-03-securer-i-barely-know-her/681#explicit-upload-and-media-proxy-domains-5) for more details.
+
+- The `crystal` package has been updated to 1.11.x, which has some breaking changes.
+ Refer to crystal's changelog for more information. ([v1.10](https://github.com/crystal-lang/crystal/blob/master/CHANGELOG.md#1100-2023-10-09), [v1.11](https://github.com/crystal-lang/crystal/blob/master/CHANGELOG.md#1110-2024-01-08))
+
+- The `erlang-ls` package no longer ships the `els_dap` binary as of v0.51.0.
+
## Other Notable Changes {#sec-release-24.05-notable-changes}
- `addDriverRunpath` has been added to facilitate the deprecation of the old `addOpenGLRunpath` setuphook. This change is motivated by the evolution of the setuphook to include all hardware acceleration.
-- Cinnamon has been updated to 6.0. Please beware that the [Wayland session](https://blog.linuxmint.com/?p=4591) is still experimental in this release.
+- Cinnamon has been updated to 6.0. Please beware that the [Wayland session](https://blog.linuxmint.com/?p=4591) is still experimental in this release and could potentially [affect Xorg sessions](https://blog.linuxmint.com/?p=4639). We suggest a reboot when switching between sessions.
+
+- MATE has been updated to 1.28.
+ - To properly support panel plugins built with Wayland (in-process) support, we are introducing `services.xserver.desktopManager.mate.extraPanelApplets` option, please use that for installing panel applets.
+ - Similarly, please use `services.xserver.desktopManager.mate.extraCajaExtensions` option for installing Caja extensions.
+ - To use the Wayland session, enable `services.xserver.desktopManager.mate.enableWaylandSession`. This is opt-in for now as it is in early stage and introduces a new set of Wayfire closure. Due to [known issues with LightDM](https://github.com/canonical/lightdm/issues/63), we suggest using SDDM for display manager.
+
+- The Budgie module installs gnome-terminal by default (instead of mate-terminal).
- New `boot.loader.systemd-boot.xbootldrMountPoint` allows setting up a separate [XBOOTLDR partition](https://uapi-group.org/specifications/specs/boot_loader_specification/) to store boot files. Useful on systems with a small EFI System partition that cannot be easily repartitioned.
@@ -295,10 +486,15 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- The Matrix homeserver [Synapse](https://element-hq.github.io/synapse/) module now supports configuring UNIX domain socket [listeners](#opt-services.matrix-synapse.settings.listeners) through the `path` option.
The default replication worker on the main instance has been migrated away from TCP sockets to UNIX domain sockets.
+- The initrd ssh daemon module got a new option to add authorized keys via a list of files using `boot.initrd.network.ssh.authorizedKeyFiles`.
+
- Programs written in [Nim](https://nim-lang.org/) are built with libraries selected by lockfiles.
The `nimPackages` and `nim2Packages` sets have been removed.
See https://nixos.org/manual/nixpkgs/unstable#nim for more information.
+- Programs written in [D](https://dlang.org/) using the `dub` build system and package manager can now be built using `buildDubPackage` utilizing lockfiles provided by the new `dub-to-nix` helper program.
+ See the [D section](https://nixos.org/manual/nixpkgs/unstable#dlang) in the manual for more information.
+
- [Portunus](https://github.com/majewsky/portunus) has been updated to major version 2.
This version of Portunus supports strong password hashes, but the legacy hash SHA-256 is also still supported to ensure a smooth migration of existing user accounts.
After upgrading, follow the instructions on the [upstream release notes](https://github.com/majewsky/portunus/releases/tag/v2.0.0) to upgrade all user accounts to strong password hashes.
@@ -310,6 +506,10 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- [Lilypond](https://lilypond.org/index.html) and [Denemo](https://www.denemo.org) are now compiled with Guile 3.0.
+- Garage has been updated to v1.x.x. Users should read the [upstream release notes](https://git.deuxfleurs.fr/Deuxfleurs/garage/releases/tag/v1.0.0) and follow the documentation when changing over their `services.garage.package` and performing this manual upgrade.
+
+- The EC2 image module now enables the [Amazon SSM Agent](https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-agent.html) by default.
+
- The following options of the Nextcloud module were moved into [`services.nextcloud.settings`](#opt-services.nextcloud.settings) and renamed to match the name from Nextcloud's `config.php`:
- `logLevel` -> [`loglevel`](#opt-services.nextcloud.settings.loglevel),
- `logType` -> [`log_type`](#opt-services.nextcloud.settings.log_type),
@@ -336,6 +536,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- A new hardening flag, `zerocallusedregs` was made available, corresponding to the gcc/clang option `-fzero-call-used-regs=used-gpr`.
+- A new hardening flag, `trivialautovarinit` was made available, corresponding to the gcc/clang option `-ftrivial-auto-var-init=pattern`.
+
- New options were added to the dnsdist module to enable and configure a DNSCrypt endpoint (see `services.dnsdist.dnscrypt.enable`, etc.).
The module can generate the DNSCrypt provider key pair, certificates and also performs their rotation automatically with no downtime.
@@ -350,6 +552,9 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- [Nginx virtual hosts](#opt-services.nginx.virtualHosts) using `forceSSL` or
`globalRedirect` can now have redirect codes other than 301 through
+
+- `bacula` now allows to configure `TLS` for encrypted communication.
+
`redirectCode`.
- `libjxl` 0.9.0 [dropped support for the butteraugli API](https://github.com/libjxl/libjxl/pull/2576). You will no longer be able to set `enableButteraugli` on `libaom`.
@@ -367,10 +572,21 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `services.zfs.zed.enableMail` now uses the global `sendmail` wrapper defined by an email module
(such as msmtp or Postfix). It no longer requires using a special ZFS build with email support.
+- `castopod` has some migration actions to be taken in case of a S3 setup. Some new features may also need some manual migration actions. See [https://code.castopod.org/adaures/castopod/-/releases](https://code.castopod.org/adaures/castopod/-/releases) for more informations.
+
- `nextcloud-setup.service` no longer changes the group of each file & directory inside `/var/lib/nextcloud/{config,data,store-apps}` if one of these directories has the wrong owner group. This was part of transitioning the group used for `/var/lib/nextcloud`, but isn't necessary anymore.
+- `services.kavita` now uses the freeform option `services.kavita.settings` for the application settings file.
+ The options `services.kavita.ipAdresses` and `services.kavita.port` now exist at `services.kavita.settings.IpAddresses`
+ and `services.kavita.settings.IpAddresses`. The file at `services.kavita.tokenKeyFile` now needs to contain a secret with
+ 512+ bits instead of 128+ bits.
+
+- `kavita` has been updated to 0.8.0, requiring a manual forced library scan on all libraries for migration. Refer to upstream's [release notes](https://github.com/Kareadita/Kavita/releases/tag/v0.8.0) for details.
+
- The `krb5` module has been rewritten and moved to `security.krb5`, moving all options but `security.krb5.enable` and `security.krb5.package` into `security.krb5.settings`.
+- `services.soju` now has a wrapper for the `sojuctl` command, pointed at the service config file. It also has the new option `adminSocket.enable`, which creates a unix admin socket at `/run/soju/admin`.
+
- Gitea 1.21 upgrade has several breaking changes, including:
- Custom themes and other assets that were previously stored in `custom/public/*` now belong in `custom/public/assets/*`
- New instances of Gitea using MySQL now ignore the `[database].CHARSET` config option and always use the `utf8mb4` charset, existing instances should migrate via the `gitea doctor convert` CLI command.
@@ -381,8 +597,16 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- The `hardware.pulseaudio` module now sets permission of pulse user home directory to 755 when running in "systemWide" mode. It fixes [issue 114399](https://github.com/NixOS/nixpkgs/issues/114399).
+- The `services.networkmanager.extraConfig` was renamed to `services.networkmanager.settings` and was changed to use the ini type instead of using a multiline string.
+
- The module `services.github-runner` has been removed. To configure a single GitHub Actions Runner refer to `services.github-runners.*`. Note that this will trigger a new runner registration.
+- The `services.slskd` has been refactored to include more configuation options in
+ the freeform `services.slskd.settings` option, and some defaults (including listen ports)
+ have been changed to match the upstream defaults. Additionally, disk logging is now
+ disabled by default, and the log rotation timer has been removed.
+ The nginx virtualhost option is now of the `vhost-options` type.
+
- The `btrbk` module now automatically selects and provides required compression
program depending on the configured `stream_compress` option. Since this
replaces the need for the `extraPackages` option, this option will be
@@ -400,4 +624,11 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- QtMultimedia has changed its default backend to `QT_MEDIA_BACKEND=ffmpeg` (previously `gstreamer` on Linux or `darwin` on MacOS).
The previous native backends remain available but are now minimally maintained. Refer to [upstream documentation](https://doc.qt.io/qt-6/qtmultimedia-index.html#ffmpeg-as-the-default-backend) for further details about each platform.
-- The oil shell is now using the c++ version by default. The python based build is still available as `oil-python`
+- The `drbd` out-of-tree Linux kernel driver has been added in version `9.2.7`. With it the DRBD 9.x features can be used instead of the 8.x features provided by the `8.4.11` in-tree driver.
+
+- The oil shell's c++ version is now available as `oils-for-unix`. The python version is still available as `oil`
+
+- `documentation.man.mandoc` now by default uses `MANPATH` to set the directories where mandoc will search for manual pages.
+ This enables mandoc to find manual pages in Nix profiles. To set the manual search paths via the `mandoc.conf` configuration file like before, use `documentation.man.mandoc.settings.manpath` instead.
+
+- The `grafana-loki` package was updated to 3.0.0 which includes [breaking changes](https://github.com/grafana/loki/releases/tag/v3.0.0)
diff --git a/third_party/nixpkgs/nixos/lib/make-disk-image.nix b/third_party/nixpkgs/nixos/lib/make-disk-image.nix
index da94ef1665..9bdbf4e071 100644
--- a/third_party/nixpkgs/nixos/lib/make-disk-image.nix
+++ b/third_party/nixpkgs/nixos/lib/make-disk-image.nix
@@ -609,6 +609,13 @@ let format' = format; in let
''}
# Set up core system link, bootloader (sd-boot, GRUB, uboot, etc.), etc.
+
+ # NOTE: systemd-boot-builder.py calls nix-env --list-generations which
+ # clobbers $HOME/.nix-defexpr/channels/nixos This would cause a folder
+ # /homeless-shelter to show up in the final image which in turn breaks
+ # nix builds in the target image if sandboxing is turned off (through
+ # __noChroot for example).
+ export HOME=$TMPDIR
NIXOS_INSTALL_BOOTLOADER=1 nixos-enter --root $mountPoint -- /nix/var/nix/profiles/system/bin/switch-to-configuration boot
# The above scripts will generate a random machine-id and we don't want to bake a single ID into all our images
diff --git a/third_party/nixpkgs/nixos/lib/make-iso9660-image.nix b/third_party/nixpkgs/nixos/lib/make-iso9660-image.nix
index 2f7dcf519a..ec520f5706 100644
--- a/third_party/nixpkgs/nixos/lib/make-iso9660-image.nix
+++ b/third_party/nixpkgs/nixos/lib/make-iso9660-image.nix
@@ -1,4 +1,4 @@
-{ stdenv, closureInfo, xorriso, syslinux, libossp_uuid
+{ lib, stdenv, callPackage, closureInfo, xorriso, syslinux, libossp_uuid, squashfsTools
, # The file name of the resulting ISO image.
isoName ? "cd.iso"
@@ -16,6 +16,17 @@
# symlink to `object' that will be added to the CD.
storeContents ? []
+, # In addition to `contents', the closure of the store paths listed
+ # in `squashfsContents' is compressed as squashfs and the result is
+ # placed in /nix-store.squashfs on the CD.
+ # FIXME: This is a performance optimization to avoid Hydra copying
+ # the squashfs between builders and should be removed when Hydra
+ # is smarter about scheduling.
+ squashfsContents ? []
+
+, # Compression settings for squashfs
+ squashfsCompression ? "xz -Xdict-size 100%"
+
, # Whether this should be an El-Torito bootable CD.
bootable ? false
@@ -45,12 +56,20 @@ assert bootable -> bootImage != "";
assert efiBootable -> efiBootImage != "";
assert usbBootable -> isohybridMbrImage != "";
+let
+ needSquashfs = squashfsContents != [];
+ makeSquashfsDrv = callPackage ./make-squashfs.nix {
+ storeContents = squashfsContents;
+ comp = squashfsCompression;
+ };
+in
stdenv.mkDerivation {
name = isoName;
__structuredAttrs = true;
buildCommandPath = ./make-iso9660-image.sh;
- nativeBuildInputs = [ xorriso syslinux zstd libossp_uuid ];
+ nativeBuildInputs = [ xorriso syslinux zstd libossp_uuid ]
+ ++ lib.optionals needSquashfs makeSquashfsDrv.nativeBuildInputs;
inherit isoName bootable bootImage compressImage volumeID efiBootImage efiBootable isohybridMbrImage usbBootable;
@@ -60,6 +79,8 @@ stdenv.mkDerivation {
objects = map (x: x.object) storeContents;
symlinks = map (x: x.symlink) storeContents;
+ squashfsCommand = lib.optionalString needSquashfs makeSquashfsDrv.buildCommand;
+
# For obtaining the closure of `storeContents'.
closureInfo = closureInfo { rootPaths = map (x: x.object) storeContents; };
}
diff --git a/third_party/nixpkgs/nixos/lib/make-iso9660-image.sh b/third_party/nixpkgs/nixos/lib/make-iso9660-image.sh
index 34febe9cfe..5881195e46 100644
--- a/third_party/nixpkgs/nixos/lib/make-iso9660-image.sh
+++ b/third_party/nixpkgs/nixos/lib/make-iso9660-image.sh
@@ -68,6 +68,11 @@ for i in $(< $closureInfo/store-paths); do
addPath "${i:1}" "$i"
done
+# If needed, build a squashfs and add that
+if [[ -n "$squashfsCommand" ]]; then
+ (out="nix-store.squashfs" eval "$squashfsCommand")
+ addPath "nix-store.squashfs" "nix-store.squashfs"
+fi
# Also include a manifest of the closures in a format suitable for
# nix-store --load-db.
diff --git a/third_party/nixpkgs/nixos/lib/make-options-doc/default.nix b/third_party/nixpkgs/nixos/lib/make-options-doc/default.nix
index 284934a760..17e03baf3b 100644
--- a/third_party/nixpkgs/nixos/lib/make-options-doc/default.nix
+++ b/third_party/nixpkgs/nixos/lib/make-options-doc/default.nix
@@ -1,20 +1,95 @@
-/* Generate JSON, XML and DocBook documentation for given NixOS options.
+/**
+ Generates documentation for [nix modules](https://nix.dev/tutorials/module-system/module-system.html).
- Minimal example:
+ It uses the declared `options` to generate documentation in various formats.
- { pkgs, }:
+ # Outputs
- let
- eval = import (pkgs.path + "/nixos/lib/eval-config.nix") {
- baseModules = [
- ../module.nix
- ];
- modules = [];
- };
- in pkgs.nixosOptionsDoc {
- options = eval.options;
+ This function returns an attribute set with the following entries.
+
+ ## optionsCommonMark
+
+ Documentation in CommonMark text format.
+
+ ## optionsJSON
+
+ All options in a JSON format suitable for further automated processing.
+
+ `example.json`
+ ```json
+ {
+ ...
+ "fileSystems..options": {
+ "declarations": ["nixos/modules/tasks/filesystems.nix"],
+ "default": {
+ "_type": "literalExpression",
+ "text": "[\n \"defaults\"\n]"
+ },
+ "description": "Options used to mount the file system.",
+ "example": {
+ "_type": "literalExpression",
+ "text": "[\n \"data=journal\"\n]"
+ },
+ "loc": ["fileSystems", "", "options"],
+ "readOnly": false,
+ "type": "non-empty (list of string (with check: non-empty))"
+ "relatedPackages": "- [`pkgs.tmux`](\n https://search.nixos.org/packages?show=tmux&sort=relevance&query=tmux\n )\n",
+ },
+ ...
+ }
+ ```
+
+ ## optionsDocBook
+
+ deprecated since 23.11 and will be removed in 24.05.
+
+ ## optionsAsciiDoc
+
+ Documentation rendered as AsciiDoc. This is useful for e.g. man pages.
+
+ > Note: NixOS itself uses this ouput to to build the configuration.nix man page"
+
+ ## optionsNix
+
+ All options as a Nix attribute set value, with the same schema as `optionsJSON`.
+
+ # Example
+
+ ## Example: NixOS configuration
+
+ ```nix
+ let
+ # Evaluate a NixOS configuration
+ eval = import (pkgs.path + "/nixos/lib/eval-config.nix") {
+ # Overriden explicitly here, this would include all modules from NixOS otherwise.
+ # See: docs of eval-config.nix for more details
+ baseModules = [];
+ modules = [
+ ./module.nix
+ ];
+ };
+ in
+ pkgs.nixosOptionsDoc {
+ inherit (eval) options;
}
+ ```
+ ## Example: non-NixOS modules
+
+ `nixosOptionsDoc` can also be used to build documentation for non-NixOS modules.
+
+ ```nix
+ let
+ eval = lib.evalModules {
+ modules = [
+ ./module.nix
+ ];
+ };
+ in
+ pkgs.nixosOptionsDoc {
+ inherit (eval) options;
+ }
+ ```
*/
{ pkgs
, lib
@@ -42,9 +117,7 @@
# deprecated since 23.11.
# TODO remove in a while.
, allowDocBook ? false
-# whether lib.mdDoc is required for descriptions to be read as markdown.
-# deprecated since 23.11.
-# TODO remove in a while.
+# TODO remove in a while (see https://github.com/NixOS/nixpkgs/issues/300735)
, markdownByDefault ? true
}:
@@ -157,19 +230,5 @@ in rec {
echo "file json-br $dst/options.json.br" >> $out/nix-support/hydra-build-products
'';
- optionsDocBook = lib.warn "optionsDocBook is deprecated since 23.11 and will be removed in 24.05"
- (pkgs.runCommand "options-docbook.xml" {
- nativeBuildInputs = [
- pkgs.nixos-render-docs
- ];
- } ''
- nixos-render-docs -j $NIX_BUILD_CORES options docbook \
- --manpage-urls ${pkgs.path + "/doc/manpage-urls.json"} \
- --revision ${lib.escapeShellArg revision} \
- --document-type ${lib.escapeShellArg documentType} \
- --varlist-id ${lib.escapeShellArg variablelistId} \
- --id-prefix ${lib.escapeShellArg optionIdPrefix} \
- ${optionsJSON}/share/doc/nixos/options.json \
- "$out"
- '');
+ optionsDocBook = throw "optionsDocBook has been removed in 24.05";
}
diff --git a/third_party/nixpkgs/nixos/lib/systemd-lib.nix b/third_party/nixpkgs/nixos/lib/systemd-lib.nix
index ef218e674e..198a710f05 100644
--- a/third_party/nixpkgs/nixos/lib/systemd-lib.nix
+++ b/third_party/nixpkgs/nixos/lib/systemd-lib.nix
@@ -1,8 +1,47 @@
{ config, lib, pkgs }:
-with lib;
-
let
+ inherit (lib)
+ all
+ attrByPath
+ attrNames
+ concatLists
+ concatMap
+ concatMapStrings
+ concatStrings
+ concatStringsSep
+ const
+ elem
+ filter
+ filterAttrs
+ flip
+ head
+ isInt
+ isList
+ length
+ makeBinPath
+ makeSearchPathOutput
+ mapAttrs
+ mapAttrsToList
+ mkAfter
+ mkIf
+ optional
+ optionalAttrs
+ optionalString
+ range
+ replaceStrings
+ reverseList
+ splitString
+ stringLength
+ stringToCharacters
+ tail
+ toIntBase10
+ trace
+ types
+ ;
+
+ inherit (lib.strings) toJSON;
+
cfg = config.systemd;
lndir = "${pkgs.buildPackages.xorg.lndir}/bin/lndir";
systemd = cfg.package;
@@ -10,7 +49,7 @@ in rec {
shellEscape = s: (replaceStrings [ "\\" ] [ "\\\\" ] s);
- mkPathSafeName = lib.replaceStrings ["@" ":" "\\" "[" "]"] ["-" "-" "-" "" ""];
+ mkPathSafeName = replaceStrings ["@" ":" "\\" "[" "]"] ["-" "-" "-" "" ""];
# a type for options that take a unit name
unitNameType = types.strMatching "[a-zA-Z0-9@%:_.\\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)";
@@ -73,13 +112,26 @@ in rec {
optional (attr ? ${name} && (! isMacAddress attr.${name} && attr.${name} != "none"))
"Systemd ${group} field `${name}` must be a valid MAC address or the special value `none`.";
-
+ isNumberOrRangeOf = check: v:
+ if isInt v
+ then check v
+ else let
+ parts = splitString "-" v;
+ lower = toIntBase10 (head parts);
+ upper = if tail parts != [] then toIntBase10 (head (tail parts)) else lower;
+ in
+ length parts <= 2 && lower <= upper && check lower && check upper;
isPort = i: i >= 0 && i <= 65535;
+ isPortOrPortRange = isNumberOrRangeOf isPort;
assertPort = name: group: attr:
optional (attr ? ${name} && ! isPort attr.${name})
"Error on the systemd ${group} field `${name}': ${attr.name} is not a valid port number.";
+ assertPortOrPortRange = name: group: attr:
+ optional (attr ? ${name} && ! isPortOrPortRange attr.${name})
+ "Error on the systemd ${group} field `${name}': ${attr.name} is not a valid port number or range of port numbers.";
+
assertValueOneOf = name: values: group: attr:
optional (attr ? ${name} && !elem attr.${name} values)
"Systemd ${group} field `${name}' cannot have value `${toString attr.${name}}'.";
@@ -96,6 +148,10 @@ in rec {
optional (attr ? ${name} && !(min <= attr.${name} && max >= attr.${name}))
"Systemd ${group} field `${name}' is outside the range [${toString min},${toString max}]";
+ assertRangeOrOneOf = name: min: max: values: group: attr:
+ optional (attr ? ${name} && !((min <= attr.${name} && max >= attr.${name}) || elem attr.${name} values))
+ "Systemd ${group} field `${name}' is not a value in range [${toString min},${toString max}], or one of ${toString values}";
+
assertMinimum = name: min: group: attr:
optional (attr ? ${name} && attr.${name} < min)
"Systemd ${group} field `${name}' must be greater than or equal to ${toString min}";
@@ -120,7 +176,7 @@ in rec {
)) attrs;
errors = concatMap (c: c group defs) checks;
in if errors == [] then true
- else builtins.trace (concatStringsSep "\n" errors) false;
+ else trace (concatStringsSep "\n" errors) false;
toOption = x:
if x == true then "true"
@@ -207,7 +263,7 @@ in rec {
# upstream unit.
for i in ${toString (mapAttrsToList
(n: v: v.unit)
- (lib.filterAttrs (n: v: (attrByPath [ "overrideStrategy" ] "asDropinIfExists" v) == "asDropinIfExists") units))}; do
+ (filterAttrs (n: v: (attrByPath [ "overrideStrategy" ] "asDropinIfExists" v) == "asDropinIfExists") units))}; do
fn=$(basename $i/*)
if [ -e $out/$fn ]; then
if [ "$(readlink -f $i/$fn)" = /dev/null ]; then
@@ -230,7 +286,7 @@ in rec {
# treated as drop-in file.
for i in ${toString (mapAttrsToList
(n: v: v.unit)
- (lib.filterAttrs (n: v: v ? overrideStrategy && v.overrideStrategy == "asDropin") units))}; do
+ (filterAttrs (n: v: v ? overrideStrategy && v.overrideStrategy == "asDropin") units))}; do
fn=$(basename $i/*)
mkdir -p $out/$fn.d
ln -s $i/$fn $out/$fn.d/overrides.conf
@@ -371,7 +427,7 @@ in rec {
commonUnitText = def: lines: ''
[Unit]
${attrsToSection def.unitConfig}
- '' + lines + lib.optionalString (def.wantedBy != [ ]) ''
+ '' + lines + optionalString (def.wantedBy != [ ]) ''
[Install]
WantedBy=${concatStringsSep " " def.wantedBy}
@@ -393,7 +449,7 @@ in rec {
'' + (let env = cfg.globalEnvironment // def.environment;
in concatMapStrings (n:
let s = optionalString (env.${n} != null)
- "Environment=${builtins.toJSON "${n}=${env.${n}}"}\n";
+ "Environment=${toJSON "${n}=${env.${n}}"}\n";
# systemd max line length is now 1MiB
# https://github.com/systemd/systemd/commit/e6dde451a51dc5aaa7f4d98d39b8fe735f73d2af
in if stringLength s >= 1048576 then throw "The value of the environment variable ‘${n}’ in systemd service ‘${name}.service’ is too long." else s) (attrNames env))
@@ -462,15 +518,20 @@ in rec {
# in that attrset are determined by the supplied format.
definitions = directoryName: format: definitionAttrs:
let
- listOfDefinitions = lib.mapAttrsToList
+ listOfDefinitions = mapAttrsToList
(name: format.generate "${name}.conf")
definitionAttrs;
in
pkgs.runCommand directoryName { } ''
mkdir -p $out
- ${(lib.concatStringsSep "\n"
+ ${(concatStringsSep "\n"
(map (pkg: "cp ${pkg} $out/${pkg.name}") listOfDefinitions)
)}
'';
+ # The maximum number of characters allowed in a GPT partition label. This
+ # limit is specified by UEFI and enforced by systemd-repart.
+ # Corresponds to GPT_LABEL_MAX from systemd's gpt.h.
+ GPTMaxLabelLength = 36;
+
}
diff --git a/third_party/nixpkgs/nixos/lib/systemd-network-units.nix b/third_party/nixpkgs/nixos/lib/systemd-network-units.nix
index 1d5f823f36..ae58149577 100644
--- a/third_party/nixpkgs/nixos/lib/systemd-network-units.nix
+++ b/third_party/nixpkgs/nixos/lib/systemd-network-units.nix
@@ -1,8 +1,13 @@
{ lib, systemdUtils }:
-with lib;
-
let
+ inherit (lib)
+ concatMapStrings
+ concatStringsSep
+ flip
+ optionalString
+ ;
+
attrsToSection = systemdUtils.lib.attrsToSection;
commonMatchText = def:
optionalString (def.matchConfig != { }) ''
@@ -20,6 +25,9 @@ in {
commonMatchText def + ''
[NetDev]
${attrsToSection def.netdevConfig}
+ '' + optionalString (def.bridgeConfig != { }) ''
+ [Bridge]
+ ${attrsToSection def.bridgeConfig}
'' + optionalString (def.vlanConfig != { }) ''
[VLAN]
${attrsToSection def.vlanConfig}
diff --git a/third_party/nixpkgs/nixos/lib/systemd-types.nix b/third_party/nixpkgs/nixos/lib/systemd-types.nix
index a109f248b1..c4c5771cff 100644
--- a/third_party/nixpkgs/nixos/lib/systemd-types.nix
+++ b/third_party/nixpkgs/nixos/lib/systemd-types.nix
@@ -1,47 +1,90 @@
{ lib, systemdUtils, pkgs }:
-with systemdUtils.lib;
-with systemdUtils.unitOptions;
-with lib;
+let
+ inherit (systemdUtils.lib)
+ automountConfig
+ makeUnit
+ mountConfig
+ stage1ServiceConfig
+ stage2ServiceConfig
+ unitConfig
+ ;
+
+ inherit (systemdUtils.unitOptions)
+ concreteUnitOptions
+ stage1AutomountOptions
+ stage1CommonUnitOptions
+ stage1MountOptions
+ stage1PathOptions
+ stage1ServiceOptions
+ stage1SliceOptions
+ stage1SocketOptions
+ stage1TimerOptions
+ stage2AutomountOptions
+ stage2CommonUnitOptions
+ stage2MountOptions
+ stage2PathOptions
+ stage2ServiceOptions
+ stage2SliceOptions
+ stage2SocketOptions
+ stage2TimerOptions
+ ;
+
+ inherit (lib)
+ mkDefault
+ mkDerivedConfig
+ mkEnableOption
+ mkIf
+ mkOption
+ ;
+
+ inherit (lib.types)
+ attrsOf
+ lines
+ listOf
+ nullOr
+ path
+ submodule
+ ;
+in
rec {
- units = with types;
- attrsOf (submodule ({ name, config, ... }: {
- options = concreteUnitOptions;
- config = { unit = mkDefault (systemdUtils.lib.makeUnit name config); };
- }));
+ units = attrsOf (submodule ({ name, config, ... }: {
+ options = concreteUnitOptions;
+ config = { unit = mkDefault (makeUnit name config); };
+ }));
- services = with types; attrsOf (submodule [ stage2ServiceOptions unitConfig stage2ServiceConfig ]);
- initrdServices = with types; attrsOf (submodule [ stage1ServiceOptions unitConfig stage1ServiceConfig ]);
+ services = attrsOf (submodule [ stage2ServiceOptions unitConfig stage2ServiceConfig ]);
+ initrdServices = attrsOf (submodule [ stage1ServiceOptions unitConfig stage1ServiceConfig ]);
- targets = with types; attrsOf (submodule [ stage2CommonUnitOptions unitConfig ]);
- initrdTargets = with types; attrsOf (submodule [ stage1CommonUnitOptions unitConfig ]);
+ targets = attrsOf (submodule [ stage2CommonUnitOptions unitConfig ]);
+ initrdTargets = attrsOf (submodule [ stage1CommonUnitOptions unitConfig ]);
- sockets = with types; attrsOf (submodule [ stage2SocketOptions unitConfig ]);
- initrdSockets = with types; attrsOf (submodule [ stage1SocketOptions unitConfig ]);
+ sockets = attrsOf (submodule [ stage2SocketOptions unitConfig ]);
+ initrdSockets = attrsOf (submodule [ stage1SocketOptions unitConfig ]);
- timers = with types; attrsOf (submodule [ stage2TimerOptions unitConfig ]);
- initrdTimers = with types; attrsOf (submodule [ stage1TimerOptions unitConfig ]);
+ timers = attrsOf (submodule [ stage2TimerOptions unitConfig ]);
+ initrdTimers = attrsOf (submodule [ stage1TimerOptions unitConfig ]);
- paths = with types; attrsOf (submodule [ stage2PathOptions unitConfig ]);
- initrdPaths = with types; attrsOf (submodule [ stage1PathOptions unitConfig ]);
+ paths = attrsOf (submodule [ stage2PathOptions unitConfig ]);
+ initrdPaths = attrsOf (submodule [ stage1PathOptions unitConfig ]);
- slices = with types; attrsOf (submodule [ stage2SliceOptions unitConfig ]);
- initrdSlices = with types; attrsOf (submodule [ stage1SliceOptions unitConfig ]);
+ slices = attrsOf (submodule [ stage2SliceOptions unitConfig ]);
+ initrdSlices = attrsOf (submodule [ stage1SliceOptions unitConfig ]);
- mounts = with types; listOf (submodule [ stage2MountOptions unitConfig mountConfig ]);
- initrdMounts = with types; listOf (submodule [ stage1MountOptions unitConfig mountConfig ]);
+ mounts = listOf (submodule [ stage2MountOptions unitConfig mountConfig ]);
+ initrdMounts = listOf (submodule [ stage1MountOptions unitConfig mountConfig ]);
- automounts = with types; listOf (submodule [ stage2AutomountOptions unitConfig automountConfig ]);
- initrdAutomounts = with types; attrsOf (submodule [ stage1AutomountOptions unitConfig automountConfig ]);
+ automounts = listOf (submodule [ stage2AutomountOptions unitConfig automountConfig ]);
+ initrdAutomounts = attrsOf (submodule [ stage1AutomountOptions unitConfig automountConfig ]);
- initrdContents = types.attrsOf (types.submodule ({ config, options, name, ... }: {
+ initrdContents = attrsOf (submodule ({ config, options, name, ... }: {
options = {
- enable = mkEnableOption (lib.mdDoc "copying of this file and symlinking it") // { default = true; };
+ enable = (mkEnableOption "copying of this file and symlinking it") // { default = true; };
target = mkOption {
- type = types.path;
- description = lib.mdDoc ''
+ type = path;
+ description = ''
Path of the symlink.
'';
default = name;
@@ -49,13 +92,13 @@ rec {
text = mkOption {
default = null;
- type = types.nullOr types.lines;
- description = lib.mdDoc "Text of the file.";
+ type = nullOr lines;
+ description = "Text of the file.";
};
source = mkOption {
- type = types.path;
- description = lib.mdDoc "Path of the source file.";
+ type = path;
+ description = "Path of the source file.";
};
};
diff --git a/third_party/nixpkgs/nixos/lib/systemd-unit-options.nix b/third_party/nixpkgs/nixos/lib/systemd-unit-options.nix
index e4953ba72d..fc990a87f0 100644
--- a/third_party/nixpkgs/nixos/lib/systemd-unit-options.nix
+++ b/third_party/nixpkgs/nixos/lib/systemd-unit-options.nix
@@ -1,9 +1,32 @@
{ lib, systemdUtils }:
-with systemdUtils.lib;
-with lib;
-
let
+ inherit (systemdUtils.lib)
+ assertValueOneOf
+ automountConfig
+ checkUnitConfig
+ makeJobScript
+ mountConfig
+ serviceConfig
+ unitConfig
+ unitNameType
+ ;
+
+ inherit (lib)
+ any
+ concatMap
+ filterOverrides
+ isList
+ mergeEqualOption
+ mkIf
+ mkMerge
+ mkOption
+ mkOptionType
+ singleton
+ toList
+ types
+ ;
+
checkService = checkUnitConfig "Service" [
(assertValueOneOf "Type" [
"exec" "simple" "forking" "oneshot" "dbus" "notify" "notify-reload" "idle"
@@ -31,7 +54,7 @@ in rec {
enable = mkOption {
default = true;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set to false, this unit will be a symlink to
/dev/null. This is primarily useful to prevent specific
template instances
@@ -45,7 +68,7 @@ in rec {
overrideStrategy = mkOption {
default = "asDropinIfExists";
type = types.enum [ "asDropinIfExists" "asDropin" ];
- description = lib.mdDoc ''
+ description = ''
Defines how unit configuration is provided for systemd:
`asDropinIfExists` creates a unit file when no unit file is provided by the package
@@ -61,7 +84,7 @@ in rec {
requiredBy = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc ''
+ description = ''
Units that require (i.e. depend on and need to go down with) this unit.
As discussed in the `wantedBy` option description this also creates
`.requires` symlinks automatically.
@@ -71,7 +94,7 @@ in rec {
upheldBy = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc ''
+ description = ''
Keep this unit running as long as the listed units are running. This is a continuously
enforced version of wantedBy.
'';
@@ -80,7 +103,7 @@ in rec {
wantedBy = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc ''
+ description = ''
Units that want (i.e. depend on) this unit. The default method for
starting a unit by default at boot time is to set this option to
`["multi-user.target"]` for system services. Likewise for user units
@@ -98,7 +121,7 @@ in rec {
aliases = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc "Aliases of that unit.";
+ description = "Aliases of that unit.";
};
};
@@ -108,12 +131,12 @@ in rec {
text = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "Text of this systemd unit.";
+ description = "Text of this systemd unit.";
};
unit = mkOption {
internal = true;
- description = lib.mdDoc "The generated unit.";
+ description = "The generated unit.";
};
};
@@ -124,19 +147,19 @@ in rec {
description = mkOption {
default = "";
type = types.singleLineStr;
- description = lib.mdDoc "Description of this unit used in systemd messages and progress indicators.";
+ description = "Description of this unit used in systemd messages and progress indicators.";
};
documentation = mkOption {
default = [];
type = types.listOf types.str;
- description = lib.mdDoc "A list of URIs referencing documentation for this unit or its configuration.";
+ description = "A list of URIs referencing documentation for this unit or its configuration.";
};
requires = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc ''
+ description = ''
Start the specified units when this unit is started, and stop
this unit when the specified units are stopped or fail.
'';
@@ -145,7 +168,7 @@ in rec {
wants = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc ''
+ description = ''
Start the specified units when this unit is started.
'';
};
@@ -153,7 +176,7 @@ in rec {
upholds = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc ''
+ description = ''
Keeps the specified running while this unit is running. A continuous version of `wants`.
'';
};
@@ -161,7 +184,7 @@ in rec {
after = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc ''
+ description = ''
If the specified units are started at the same time as
this unit, delay this unit until they have started.
'';
@@ -170,7 +193,7 @@ in rec {
before = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc ''
+ description = ''
If the specified units are started at the same time as
this unit, delay them until this unit has started.
'';
@@ -179,7 +202,7 @@ in rec {
bindsTo = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc ''
+ description = ''
Like ‘requires’, but in addition, if the specified units
unexpectedly disappear, this unit will be stopped as well.
'';
@@ -188,7 +211,7 @@ in rec {
partOf = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc ''
+ description = ''
If the specified units are stopped or restarted, then this
unit is stopped or restarted as well.
'';
@@ -197,7 +220,7 @@ in rec {
conflicts = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc ''
+ description = ''
If the specified units are started, then this unit is stopped
and vice versa.
'';
@@ -206,7 +229,7 @@ in rec {
requisite = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc ''
+ description = ''
Similar to requires. However if the units listed are not started,
they will not be started and the transaction will fail.
'';
@@ -216,7 +239,7 @@ in rec {
default = {};
example = { RequiresMountsFor = "/data"; };
type = types.attrsOf unitOption;
- description = lib.mdDoc ''
+ description = ''
Each attribute in this set specifies an option in the
`[Unit]` section of the unit. See
{manpage}`systemd.unit(5)` for details.
@@ -226,7 +249,7 @@ in rec {
onFailure = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc ''
+ description = ''
A list of one or more units that are activated when
this unit enters the "failed" state.
'';
@@ -235,7 +258,7 @@ in rec {
onSuccess = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc ''
+ description = ''
A list of one or more units that are activated when
this unit enters the "inactive" state.
'';
@@ -243,7 +266,7 @@ in rec {
startLimitBurst = mkOption {
type = types.int;
- description = lib.mdDoc ''
+ description = ''
Configure unit start rate limiting. Units which are started
more than startLimitBurst times within an interval time
interval are not permitted to start any more.
@@ -252,7 +275,7 @@ in rec {
startLimitIntervalSec = mkOption {
type = types.int;
- description = lib.mdDoc ''
+ description = ''
Configure unit start rate limiting. Units which are started
more than startLimitBurst times within an interval time
interval are not permitted to start any more.
@@ -271,7 +294,7 @@ in rec {
restartTriggers = mkOption {
default = [];
type = types.listOf types.unspecified;
- description = lib.mdDoc ''
+ description = ''
An arbitrary list of items such as derivations. If any item
in the list changes between reconfigurations, the service will
be restarted.
@@ -281,7 +304,7 @@ in rec {
reloadTriggers = mkOption {
default = [];
type = types.listOf unitOption;
- description = lib.mdDoc ''
+ description = ''
An arbitrary list of items such as derivations. If any item
in the list changes between reconfigurations, the service will
be reloaded. If anything but a reload trigger changes in the
@@ -299,13 +322,13 @@ in rec {
default = {};
type = with types; attrsOf (nullOr (oneOf [ str path package ]));
example = { PATH = "/foo/bar/bin"; LANG = "nl_NL.UTF-8"; };
- description = lib.mdDoc "Environment variables passed to the service's processes.";
+ description = "Environment variables passed to the service's processes.";
};
path = mkOption {
default = [];
type = with types; listOf (oneOf [ package str ]);
- description = lib.mdDoc ''
+ description = ''
Packages added to the service's {env}`PATH`
environment variable. Both the {file}`bin`
and {file}`sbin` subdirectories of each
@@ -319,7 +342,7 @@ in rec {
{ RestartSec = 5;
};
type = types.addCheck (types.attrsOf unitOption) checkService;
- description = lib.mdDoc ''
+ description = ''
Each attribute in this set specifies an option in the
`[Service]` section of the unit. See
{manpage}`systemd.service(5)` for details.
@@ -329,14 +352,14 @@ in rec {
script = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Shell commands executed as the service's main process.";
+ description = "Shell commands executed as the service's main process.";
};
scriptArgs = mkOption {
type = types.str;
default = "";
example = "%i";
- description = lib.mdDoc ''
+ description = ''
Arguments passed to the main process script.
Can contain specifiers (`%` placeholders expanded by systemd, see {manpage}`systemd.unit(5)`).
'';
@@ -345,7 +368,7 @@ in rec {
preStart = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell commands executed before the service's main process
is started.
'';
@@ -354,7 +377,7 @@ in rec {
postStart = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell commands executed after the service's main process
is started.
'';
@@ -363,7 +386,7 @@ in rec {
reload = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell commands executed when the service's main process
is reloaded.
'';
@@ -372,7 +395,7 @@ in rec {
preStop = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell commands executed to stop the service.
'';
};
@@ -380,7 +403,7 @@ in rec {
postStop = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell commands executed after the service's main process
has exited.
'';
@@ -389,7 +412,7 @@ in rec {
jobScripts = mkOption {
type = with types; coercedTo path singleton (listOf path);
internal = true;
- description = lib.mdDoc "A list of all job script derivations of this unit.";
+ description = "A list of all job script derivations of this unit.";
default = [];
};
@@ -434,7 +457,7 @@ in rec {
restartIfChanged = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether the service should be restarted during a NixOS
configuration switch if its definition has changed.
'';
@@ -443,7 +466,7 @@ in rec {
reloadIfChanged = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether the service should be reloaded during a NixOS
configuration switch if its definition has changed. If
enabled, the value of {option}`restartIfChanged` is
@@ -459,7 +482,7 @@ in rec {
stopIfChanged = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
If set, a changed unit is restarted by calling
{command}`systemctl stop` in the old configuration,
then {command}`systemctl start` in the new one.
@@ -475,7 +498,7 @@ in rec {
type = with types; either str (listOf str);
default = [];
example = "Sun 14:00:00";
- description = lib.mdDoc ''
+ description = ''
Automatically start this unit at the given date/time, which
must be in the format described in
{manpage}`systemd.time(7)`. This is equivalent
@@ -502,7 +525,7 @@ in rec {
default = [];
type = types.listOf types.str;
example = [ "0.0.0.0:993" "/run/my-socket" ];
- description = lib.mdDoc ''
+ description = ''
For each item in this list, a `ListenStream`
option in the `[Socket]` section will be created.
'';
@@ -512,7 +535,7 @@ in rec {
default = [];
type = types.listOf types.str;
example = [ "0.0.0.0:993" "/run/my-socket" ];
- description = lib.mdDoc ''
+ description = ''
For each item in this list, a `ListenDatagram`
option in the `[Socket]` section will be created.
'';
@@ -522,7 +545,7 @@ in rec {
default = {};
example = { ListenStream = "/run/my-socket"; };
type = types.attrsOf unitOption;
- description = lib.mdDoc ''
+ description = ''
Each attribute in this set specifies an option in the
`[Socket]` section of the unit. See
{manpage}`systemd.socket(5)` for details.
@@ -554,7 +577,7 @@ in rec {
default = {};
example = { OnCalendar = "Sun 14:00:00"; Unit = "foo.service"; };
type = types.attrsOf unitOption;
- description = lib.mdDoc ''
+ description = ''
Each attribute in this set specifies an option in the
`[Timer]` section of the unit. See
{manpage}`systemd.timer(5)` and
@@ -587,7 +610,7 @@ in rec {
default = {};
example = { PathChanged = "/some/path"; Unit = "changedpath.service"; };
type = types.attrsOf unitOption;
- description = lib.mdDoc ''
+ description = ''
Each attribute in this set specifies an option in the
`[Path]` section of the unit. See
{manpage}`systemd.path(5)` for details.
@@ -618,13 +641,13 @@ in rec {
what = mkOption {
example = "/dev/sda1";
type = types.str;
- description = lib.mdDoc "Absolute path of device node, file or other resource. (Mandatory)";
+ description = "Absolute path of device node, file or other resource. (Mandatory)";
};
where = mkOption {
example = "/mnt";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Absolute path of a directory of the mount point.
Will be created if it doesn't exist. (Mandatory)
'';
@@ -634,21 +657,21 @@ in rec {
default = "";
example = "ext4";
type = types.str;
- description = lib.mdDoc "File system type.";
+ description = "File system type.";
};
options = mkOption {
default = "";
example = "noatime";
type = types.commas;
- description = lib.mdDoc "Options used to mount the file system.";
+ description = "Options used to mount the file system.";
};
mountConfig = mkOption {
default = {};
example = { DirectoryMode = "0775"; };
type = types.attrsOf unitOption;
- description = lib.mdDoc ''
+ description = ''
Each attribute in this set specifies an option in the
`[Mount]` section of the unit. See
{manpage}`systemd.mount(5)` for details.
@@ -678,7 +701,7 @@ in rec {
where = mkOption {
example = "/mnt";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Absolute path of a directory of the mount point.
Will be created if it doesn't exist. (Mandatory)
'';
@@ -688,7 +711,7 @@ in rec {
default = {};
example = { DirectoryMode = "0775"; };
type = types.attrsOf unitOption;
- description = lib.mdDoc ''
+ description = ''
Each attribute in this set specifies an option in the
`[Automount]` section of the unit. See
{manpage}`systemd.automount(5)` for details.
@@ -719,7 +742,7 @@ in rec {
default = {};
example = { MemoryMax = "2G"; };
type = types.attrsOf unitOption;
- description = lib.mdDoc ''
+ description = ''
Each attribute in this set specifies an option in the
`[Slice]` section of the unit. See
{manpage}`systemd.slice(5)` for details.
diff --git a/third_party/nixpkgs/nixos/lib/test-driver/test_driver/driver.py b/third_party/nixpkgs/nixos/lib/test-driver/test_driver/driver.py
index 72a33e0b2d..f792c04591 100644
--- a/third_party/nixpkgs/nixos/lib/test-driver/test_driver/driver.py
+++ b/third_party/nixpkgs/nixos/lib/test-driver/test_driver/driver.py
@@ -7,6 +7,8 @@ from contextlib import contextmanager
from pathlib import Path
from typing import Any, Callable, ContextManager, Dict, Iterator, List, Optional, Union
+from colorama import Fore, Style
+
from test_driver.logger import rootlog
from test_driver.machine import Machine, NixStartScript, retry
from test_driver.polling_condition import PollingCondition
@@ -226,7 +228,10 @@ class Driver:
)
rootlog.warning(
- "Using create_machine with a single dictionary argument is deprecated, and will be removed in NixOS 24.11"
+ Fore.YELLOW
+ + Style.BRIGHT
+ + "WARNING: Using create_machine with a single dictionary argument is deprecated and will be removed in NixOS 24.11"
+ + Style.RESET_ALL
)
# End legacy args handling
diff --git a/third_party/nixpkgs/nixos/lib/test-driver/test_driver/logger.py b/third_party/nixpkgs/nixos/lib/test-driver/test_driver/logger.py
index 116244b5e4..0b0623bddf 100644
--- a/third_party/nixpkgs/nixos/lib/test-driver/test_driver/logger.py
+++ b/third_party/nixpkgs/nixos/lib/test-driver/test_driver/logger.py
@@ -1,6 +1,3 @@
-# mypy: disable-error-code="no-untyped-call"
-# drop the above line when mypy is upgraded to include
-# https://github.com/python/typeshed/commit/49b717ca52bf0781a538b04c0d76a5513f7119b8
import codecs
import os
import sys
@@ -10,6 +7,7 @@ from contextlib import contextmanager
from queue import Empty, Queue
from typing import Any, Dict, Iterator
from xml.sax.saxutils import XMLGenerator
+from xml.sax.xmlreader import AttributesImpl
from colorama import Fore, Style
@@ -22,7 +20,7 @@ class Logger:
self.queue: "Queue[Dict[str, str]]" = Queue()
self.xml.startDocument()
- self.xml.startElement("logfile", attrs={})
+ self.xml.startElement("logfile", attrs=AttributesImpl({}))
self._print_serial_logs = True
@@ -44,7 +42,7 @@ class Logger:
return message
def log_line(self, message: str, attributes: Dict[str, str]) -> None:
- self.xml.startElement("line", attributes)
+ self.xml.startElement("line", attrs=AttributesImpl(attributes))
self.xml.characters(message)
self.xml.endElement("line")
@@ -89,8 +87,8 @@ class Logger:
)
)
- self.xml.startElement("nest", attrs={})
- self.xml.startElement("head", attributes)
+ self.xml.startElement("nest", attrs=AttributesImpl({}))
+ self.xml.startElement("head", attrs=AttributesImpl(attributes))
self.xml.characters(message)
self.xml.endElement("head")
diff --git a/third_party/nixpkgs/nixos/lib/test-driver/test_driver/machine.py b/third_party/nixpkgs/nixos/lib/test-driver/test_driver/machine.py
index df8628bce9..652cc600fa 100644
--- a/third_party/nixpkgs/nixos/lib/test-driver/test_driver/machine.py
+++ b/third_party/nixpkgs/nixos/lib/test-driver/test_driver/machine.py
@@ -165,8 +165,6 @@ class StartCommand:
)
if not allow_reboot:
qemu_opts += " -no-reboot"
- # TODO: qemu script already catpures this env variable, legacy?
- qemu_opts += " " + os.environ.get("QEMU_OPTS", "")
return (
f"{self._cmd}"
@@ -1250,6 +1248,5 @@ class Machine:
check_return=False,
check_output=False,
)
- self.wait_for_console_text(r"systemd\[1\]:.*Switching root\.")
self.connected = False
self.connect()
diff --git a/third_party/nixpkgs/nixos/lib/testing/driver.nix b/third_party/nixpkgs/nixos/lib/testing/driver.nix
index b6f01c3819..7eb06e0239 100644
--- a/third_party/nixpkgs/nixos/lib/testing/driver.nix
+++ b/third_party/nixpkgs/nixos/lib/testing/driver.nix
@@ -1,6 +1,6 @@
{ config, lib, hostPkgs, ... }:
let
- inherit (lib) mkOption types literalMD mdDoc;
+ inherit (lib) mkOption types literalMD;
# Reifies and correctly wraps the python test driver for
# the respective qemu version and with or without ocr support
@@ -104,13 +104,13 @@ in
options = {
driver = mkOption {
- description = mdDoc "Package containing a script that runs the test.";
+ description = "Package containing a script that runs the test.";
type = types.package;
defaultText = literalMD "set by the test framework";
};
hostPkgs = mkOption {
- description = mdDoc "Nixpkgs attrset used outside the nodes.";
+ description = "Nixpkgs attrset used outside the nodes.";
type = types.raw;
example = lib.literalExpression ''
import nixpkgs { inherit system config overlays; }
@@ -118,14 +118,14 @@ in
};
qemu.package = mkOption {
- description = mdDoc "Which qemu package to use for the virtualisation of [{option}`nodes`](#test-opt-nodes).";
+ description = "Which qemu package to use for the virtualisation of [{option}`nodes`](#test-opt-nodes).";
type = types.package;
default = hostPkgs.qemu_test;
defaultText = "hostPkgs.qemu_test";
};
globalTimeout = mkOption {
- description = mdDoc ''
+ description = ''
A global timeout for the complete test, expressed in seconds.
Beyond that timeout, every resource will be killed and released and the test will fail.
@@ -137,7 +137,7 @@ in
};
enableOCR = mkOption {
- description = mdDoc ''
+ description = ''
Whether to enable Optical Character Recognition functionality for
testing graphical programs. See [Machine objects](`ssec-machine-objects`).
'';
@@ -146,7 +146,7 @@ in
};
extraPythonPackages = mkOption {
- description = mdDoc ''
+ description = ''
Python packages to add to the test driver.
The argument is a Python package set, similar to `pkgs.pythonPackages`.
@@ -159,7 +159,7 @@ in
};
extraDriverArgs = mkOption {
- description = mdDoc ''
+ description = ''
Extra arguments to pass to the test driver.
They become part of [{option}`driver`](#test-opt-driver) via `wrapProgram`.
@@ -171,7 +171,7 @@ in
skipLint = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Do not run the linters. This may speed up your iteration cycle, but it is not something you should commit.
'';
};
@@ -179,7 +179,7 @@ in
skipTypeCheck = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Disable type checking. This must not be enabled for new NixOS tests.
This may speed up your iteration cycle, unless you're working on the [{option}`testScript`](#test-opt-testScript).
diff --git a/third_party/nixpkgs/nixos/lib/testing/interactive.nix b/third_party/nixpkgs/nixos/lib/testing/interactive.nix
index 317ed42418..0b12096692 100644
--- a/third_party/nixpkgs/nixos/lib/testing/interactive.nix
+++ b/third_party/nixpkgs/nixos/lib/testing/interactive.nix
@@ -1,11 +1,11 @@
{ config, lib, moduleType, hostPkgs, ... }:
let
- inherit (lib) mkOption types mdDoc;
+ inherit (lib) mkOption types;
in
{
options = {
interactive = mkOption {
- description = mdDoc ''
+ description = ''
Tests [can be run interactively](#sec-running-nixos-tests-interactively)
using the program in the test derivation's `.driverInteractive` attribute.
diff --git a/third_party/nixpkgs/nixos/lib/testing/meta.nix b/third_party/nixpkgs/nixos/lib/testing/meta.nix
index 805b7520ed..bdf313e5b1 100644
--- a/third_party/nixpkgs/nixos/lib/testing/meta.nix
+++ b/third_party/nixpkgs/nixos/lib/testing/meta.nix
@@ -1,11 +1,11 @@
{ lib, ... }:
let
- inherit (lib) types mkOption mdDoc;
+ inherit (lib) types mkOption;
in
{
options = {
meta = lib.mkOption {
- description = mdDoc ''
+ description = ''
The [`meta`](https://nixos.org/manual/nixpkgs/stable/#chap-meta) attributes that will be set on the returned derivations.
Not all [`meta`](https://nixos.org/manual/nixpkgs/stable/#chap-meta) attributes are supported, but more can be added as desired.
@@ -16,24 +16,31 @@ in
maintainers = lib.mkOption {
type = types.listOf types.raw;
default = [];
- description = mdDoc ''
+ description = ''
The [list of maintainers](https://nixos.org/manual/nixpkgs/stable/#var-meta-maintainers) for this test.
'';
};
timeout = lib.mkOption {
type = types.nullOr types.int;
default = 3600; # 1 hour
- description = mdDoc ''
+ description = ''
The [{option}`test`](#test-opt-test)'s [`meta.timeout`](https://nixos.org/manual/nixpkgs/stable/#var-meta-timeout) in seconds.
'';
};
broken = lib.mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Sets the [`meta.broken`](https://nixos.org/manual/nixpkgs/stable/#var-meta-broken) attribute on the [{option}`test`](#test-opt-test) derivation.
'';
};
+ platforms = lib.mkOption {
+ type = types.listOf types.raw;
+ default = lib.platforms.linux ++ lib.platforms.darwin;
+ description = ''
+ Sets the [`meta.platforms`](https://nixos.org/manual/nixpkgs/stable/#var-meta-platforms) attribute on the [{option}`test`](#test-opt-test) derivation.
+ '';
+ };
};
};
default = {};
diff --git a/third_party/nixpkgs/nixos/lib/testing/name.nix b/third_party/nixpkgs/nixos/lib/testing/name.nix
index 0af593169e..0682873c7b 100644
--- a/third_party/nixpkgs/nixos/lib/testing/name.nix
+++ b/third_party/nixpkgs/nixos/lib/testing/name.nix
@@ -1,10 +1,10 @@
{ lib, ... }:
let
- inherit (lib) mkOption types mdDoc;
+ inherit (lib) mkOption types;
in
{
options.name = mkOption {
- description = mdDoc ''
+ description = ''
The name of the test.
This is used in the derivation names of the [{option}`driver`](#test-opt-driver) and [{option}`test`](#test-opt-test) runner.
diff --git a/third_party/nixpkgs/nixos/lib/testing/network.nix b/third_party/nixpkgs/nixos/lib/testing/network.nix
index 1edc9e2765..0f1615a0ad 100644
--- a/third_party/nixpkgs/nixos/lib/testing/network.nix
+++ b/third_party/nixpkgs/nixos/lib/testing/network.nix
@@ -5,7 +5,6 @@ let
attrNames concatMap concatMapStrings flip forEach head
listToAttrs mkDefault mkOption nameValuePair optionalString
range toLower types zipListsWith zipLists
- mdDoc
;
nodeNumbers =
@@ -89,7 +88,7 @@ let
default = name;
# We need to force this in specilisations, otherwise it'd be
# readOnly = true;
- description = mdDoc ''
+ description = ''
The `name` in `nodes.`; stable across `specialisations`.
'';
};
@@ -98,7 +97,7 @@ let
type = types.int;
readOnly = true;
default = nodeNumbers.${config.virtualisation.test.nodeName};
- description = mdDoc ''
+ description = ''
A unique number assigned for each node in `nodes`.
'';
};
diff --git a/third_party/nixpkgs/nixos/lib/testing/nodes.nix b/third_party/nixpkgs/nixos/lib/testing/nodes.nix
index 73e6d386fd..9aecca10ac 100644
--- a/third_party/nixpkgs/nixos/lib/testing/nodes.nix
+++ b/third_party/nixpkgs/nixos/lib/testing/nodes.nix
@@ -5,7 +5,6 @@ let
literalExpression
literalMD
mapAttrs
- mdDoc
mkDefault
mkIf
mkOption mkForce
@@ -14,6 +13,25 @@ let
types
;
+ inherit (hostPkgs) hostPlatform;
+
+ guestSystem =
+ if hostPlatform.isLinux
+ then hostPlatform.system
+ else
+ let
+ hostToGuest = {
+ "x86_64-darwin" = "x86_64-linux";
+ "aarch64-darwin" = "aarch64-linux";
+ };
+
+ supportedHosts = lib.concatStringsSep ", " (lib.attrNames hostToGuest);
+
+ message =
+ "NixOS Test: don't know which VM guest system to pair with VM host system: ${hostPlatform.system}. Perhaps you intended to run the tests on a Linux host, or one of the following systems that may run NixOS tests: ${supportedHosts}";
+ in
+ hostToGuest.${hostPlatform.system} or (throw message);
+
baseOS =
import ../eval-config.nix {
inherit lib;
@@ -27,13 +45,14 @@ let
({ config, ... }:
{
virtualisation.qemu.package = testModuleArgs.config.qemu.package;
+ virtualisation.host.pkgs = hostPkgs;
})
({ options, ... }: {
key = "nodes.nix-pkgs";
config = optionalAttrs (!config.node.pkgsReadOnly) (
mkIf (!options.nixpkgs.pkgs.isDefined) {
# TODO: switch to nixpkgs.hostPlatform and make sure containers-imperative test still evaluates.
- nixpkgs.system = hostPkgs.stdenv.hostPlatform.system;
+ nixpkgs.system = guestSystem;
}
);
})
@@ -56,7 +75,7 @@ in
nodes = mkOption {
type = types.lazyAttrsOf config.node.type;
visible = "shallow";
- description = mdDoc ''
+ description = ''
An attribute set of NixOS configuration modules.
The configurations are augmented by the [`defaults`](#test-opt-defaults) option.
@@ -68,7 +87,7 @@ in
};
defaults = mkOption {
- description = mdDoc ''
+ description = ''
NixOS configuration that is applied to all [{option}`nodes`](#test-opt-nodes).
'';
type = types.deferredModule;
@@ -76,7 +95,7 @@ in
};
extraBaseModules = mkOption {
- description = mdDoc ''
+ description = ''
NixOS configuration that, like [{option}`defaults`](#test-opt-defaults), is applied to all [{option}`nodes`](#test-opt-nodes) and can not be undone with [`specialisation..inheritParentConfig`](https://search.nixos.org/options?show=specialisation.%3Cname%3E.inheritParentConfig&from=0&size=50&sort=relevance&type=packages&query=specialisation).
'';
type = types.deferredModule;
@@ -84,7 +103,7 @@ in
};
node.pkgs = mkOption {
- description = mdDoc ''
+ description = ''
The Nixpkgs to use for the nodes.
Setting this will make the `nixpkgs.*` options read-only, to avoid mistakenly testing with a Nixpkgs configuration that diverges from regular use.
@@ -97,7 +116,7 @@ in
};
node.pkgsReadOnly = mkOption {
- description = mdDoc ''
+ description = ''
Whether to make the `nixpkgs.*` options read-only. This is only relevant when [`node.pkgs`](#test-opt-node.pkgs) is set.
Set this to `false` when any of the [`nodes`](#test-opt-nodes) needs to configure any of the `nixpkgs.*` options. This will slow down evaluation of your test a bit.
@@ -110,7 +129,7 @@ in
node.specialArgs = mkOption {
type = types.lazyAttrsOf types.raw;
default = { };
- description = mdDoc ''
+ description = ''
An attribute set of arbitrary values that will be made available as module arguments during the resolution of module `imports`.
Note that it is not possible to override these from within the NixOS configurations. If you argument is not relevant to `imports`, consider setting {option}`defaults._module.args.` instead.
@@ -119,7 +138,7 @@ in
nodesCompat = mkOption {
internal = true;
- description = mdDoc ''
+ description = ''
Basically `_module.args.nodes`, but with backcompat and warnings added.
This will go away.
diff --git a/third_party/nixpkgs/nixos/lib/testing/pkgs.nix b/third_party/nixpkgs/nixos/lib/testing/pkgs.nix
index 22dd586868..46d82c65d2 100644
--- a/third_party/nixpkgs/nixos/lib/testing/pkgs.nix
+++ b/third_party/nixpkgs/nixos/lib/testing/pkgs.nix
@@ -2,7 +2,11 @@
{
config = {
# default pkgs for use in VMs
- _module.args.pkgs = hostPkgs;
+ _module.args.pkgs =
+ # TODO: deprecate it everywhere; not just on darwin. Throw on darwin?
+ lib.warnIf hostPkgs.stdenv.hostPlatform.isDarwin
+ "Do not use the `pkgs` module argument in tests you want to run on darwin. It is ambiguous, and many tests are broken because of it. If you need to use a package on the VM host, use `hostPkgs`. Otherwise, use `config.node.pkgs`, or `config.nodes..nixpkgs.pkgs`."
+ hostPkgs;
defaults = {
# TODO: a module to set a shared pkgs, if options.nixpkgs.* is untouched by user (highestPrio) */
diff --git a/third_party/nixpkgs/nixos/lib/testing/run.nix b/third_party/nixpkgs/nixos/lib/testing/run.nix
index 9440c1acdf..218292121e 100644
--- a/third_party/nixpkgs/nixos/lib/testing/run.nix
+++ b/third_party/nixpkgs/nixos/lib/testing/run.nix
@@ -1,12 +1,12 @@
{ config, hostPkgs, lib, ... }:
let
- inherit (lib) types mkOption mdDoc;
+ inherit (lib) types mkOption;
in
{
options = {
passthru = mkOption {
type = types.lazyAttrsOf types.raw;
- description = mdDoc ''
+ description = ''
Attributes to add to the returned derivations,
which are not necessarily part of the build.
@@ -18,7 +18,7 @@ in
rawTestDerivation = mkOption {
type = types.package;
- description = mdDoc ''
+ description = ''
Unfiltered version of `test`, for troubleshooting the test framework and `testBuildFailure` in the test framework's test suite.
This is not intended for general use. Use `test` instead.
'';
@@ -28,7 +28,7 @@ in
test = mkOption {
type = types.package;
# TODO: can the interactive driver be configured to access the network?
- description = mdDoc ''
+ description = ''
Derivation that runs the test as its "build" process.
This implies that NixOS tests run isolated from the network, making them
@@ -41,7 +41,9 @@ in
rawTestDerivation = hostPkgs.stdenv.mkDerivation {
name = "vm-test-run-${config.name}";
- requiredSystemFeatures = [ "kvm" "nixos-test" ];
+ requiredSystemFeatures = [ "nixos-test" ]
+ ++ lib.optionals hostPkgs.stdenv.hostPlatform.isLinux [ "kvm" ]
+ ++ lib.optionals hostPkgs.stdenv.hostPlatform.isDarwin [ "apple-virt" ];
buildCommand = ''
mkdir -p $out
diff --git a/third_party/nixpkgs/nixos/lib/testing/testScript.nix b/third_party/nixpkgs/nixos/lib/testing/testScript.nix
index 5c36d754d7..09964777bd 100644
--- a/third_party/nixpkgs/nixos/lib/testing/testScript.nix
+++ b/third_party/nixpkgs/nixos/lib/testing/testScript.nix
@@ -1,13 +1,13 @@
testModuleArgs@{ config, lib, hostPkgs, nodes, moduleType, ... }:
let
- inherit (lib) mkOption types mdDoc;
+ inherit (lib) mkOption types;
inherit (types) either str functionTo;
in
{
options = {
testScript = mkOption {
type = either str (functionTo str);
- description = mdDoc ''
+ description = ''
A series of python declarations and statements that you write to perform
the test.
'';
@@ -25,7 +25,7 @@ in
};
withoutTestScriptReferences = mkOption {
type = moduleType;
- description = mdDoc ''
+ description = ''
A parallel universe where the testScript is invalid and has no references.
'';
internal = true;
diff --git a/third_party/nixpkgs/nixos/lib/utils.nix b/third_party/nixpkgs/nixos/lib/utils.nix
index 49ba2e5c83..4992113bdb 100644
--- a/third_party/nixpkgs/nixos/lib/utils.nix
+++ b/third_party/nixpkgs/nixos/lib/utils.nix
@@ -1,9 +1,44 @@
-{ lib, config, pkgs }: with lib;
+{ lib, config, pkgs }:
+
+let
+ inherit (lib)
+ any
+ attrNames
+ concatMapStringsSep
+ concatStringsSep
+ elem
+ escapeShellArg
+ filter
+ flatten
+ getName
+ hasPrefix
+ hasSuffix
+ imap0
+ imap1
+ isAttrs
+ isDerivation
+ isFloat
+ isInt
+ isList
+ isPath
+ isString
+ listToAttrs
+ nameValuePair
+ optionalString
+ removePrefix
+ removeSuffix
+ replaceStrings
+ stringToCharacters
+ types
+ ;
+
+ inherit (lib.strings) toJSON normalizePath escapeC;
+in
rec {
# Copy configuration files to avoid having the entire sources in the system closure
- copyFile = filePath: pkgs.runCommand (builtins.unsafeDiscardStringContext (builtins.baseNameOf filePath)) {} ''
+ copyFile = filePath: pkgs.runCommand (builtins.unsafeDiscardStringContext (baseNameOf filePath)) {} ''
cp ${filePath} $out
'';
@@ -46,11 +81,11 @@ rec {
escapeSystemdPath = s: let
replacePrefix = p: r: s: (if (hasPrefix p s) then r + (removePrefix p s) else s);
trim = s: removeSuffix "/" (removePrefix "/" s);
- normalizedPath = strings.normalizePath s;
+ normalizedPath = normalizePath s;
in
replaceStrings ["/"] ["-"]
- (replacePrefix "." (strings.escapeC ["."] ".")
- (strings.escapeC (stringToCharacters " !\"#$%&'()*+,;<=>=@[\\]^`{|}~-")
+ (replacePrefix "." (escapeC ["."] ".")
+ (escapeC (stringToCharacters " !\"#$%&'()*+,;<=>=@[\\]^`{|}~-")
(if normalizedPath == "/" then normalizedPath else trim normalizedPath)));
# Quotes an argument for use in Exec* service lines.
@@ -62,12 +97,12 @@ rec {
# substitution for the directive.
escapeSystemdExecArg = arg:
let
- s = if builtins.isPath arg then "${arg}"
- else if builtins.isString arg then arg
- else if builtins.isInt arg || builtins.isFloat arg then toString arg
- else throw "escapeSystemdExecArg only allows strings, paths and numbers";
+ s = if isPath arg then "${arg}"
+ else if isString arg then arg
+ else if isInt arg || isFloat arg || isDerivation arg then toString arg
+ else throw "escapeSystemdExecArg only allows strings, paths, numbers and derivations";
in
- replaceStrings [ "%" "$" ] [ "%%" "$$" ] (builtins.toJSON s);
+ replaceStrings [ "%" "$" ] [ "%%" "$$" ] (toJSON s);
# Quotes a list of arguments into a single string for use in a Exec*
# line.
@@ -197,7 +232,7 @@ rec {
(attrNames secrets))
+ "\n"
+ "${pkgs.jq}/bin/jq >'${output}' "
- + lib.escapeShellArg (stringOrDefault
+ + escapeShellArg (stringOrDefault
(concatStringsSep
" | "
(imap1 (index: name: ''${name} = $ENV.secret${toString index}'')
@@ -205,7 +240,7 @@ rec {
".")
+ ''
<<'EOF'
- ${builtins.toJSON set}
+ ${toJSON set}
EOF
(( ! $inherit_errexit_enabled )) && shopt -u inherit_errexit
'';
@@ -222,9 +257,9 @@ rec {
*/
removePackagesByName = packages: packagesToRemove:
let
- namesToRemove = map lib.getName packagesToRemove;
+ namesToRemove = map getName packagesToRemove;
in
- lib.filter (x: !(builtins.elem (lib.getName x) namesToRemove)) packages;
+ filter (x: !(elem (getName x) namesToRemove)) packages;
systemdUtils = {
lib = import ./systemd-lib.nix { inherit lib config pkgs; };
diff --git a/third_party/nixpkgs/nixos/maintainers/scripts/ec2/amazon-image.nix b/third_party/nixpkgs/nixos/maintainers/scripts/ec2/amazon-image.nix
index 055d44ba65..357b86367d 100644
--- a/third_party/nixpkgs/nixos/maintainers/scripts/ec2/amazon-image.nix
+++ b/third_party/nixpkgs/nixos/maintainers/scripts/ec2/amazon-image.nix
@@ -23,7 +23,7 @@ in {
options.amazonImage = {
name = mkOption {
type = types.str;
- description = lib.mdDoc "The name of the generated derivation";
+ description = "The name of the generated derivation";
default = "nixos-amazon-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
};
@@ -35,7 +35,7 @@ in {
]
'';
default = [];
- description = lib.mdDoc ''
+ description = ''
This option lists files to be copied to fixed locations in the
generated image. Glob patterns work.
'';
@@ -45,13 +45,13 @@ in {
type = with types; either (enum [ "auto" ]) int;
default = 3072;
example = 8192;
- description = lib.mdDoc "The size in MB of the image";
+ description = "The size in MB of the image";
};
format = mkOption {
type = types.enum [ "raw" "qcow2" "vpc" ];
default = "vpc";
- description = lib.mdDoc "The image format to output";
+ description = "The image format to output";
};
};
diff --git a/third_party/nixpkgs/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix b/third_party/nixpkgs/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix
index 60f0535854..9799f333ae 100644
--- a/third_party/nixpkgs/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix
+++ b/third_party/nixpkgs/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix
@@ -16,26 +16,26 @@ in
options.openstackImage = {
name = mkOption {
type = types.str;
- description = lib.mdDoc "The name of the generated derivation";
+ description = "The name of the generated derivation";
default = "nixos-openstack-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
};
ramMB = mkOption {
type = types.int;
default = 1024;
- description = lib.mdDoc "RAM allocation for build VM";
+ description = "RAM allocation for build VM";
};
sizeMB = mkOption {
type = types.int;
default = 8192;
- description = lib.mdDoc "The size in MB of the image";
+ description = "The size in MB of the image";
};
format = mkOption {
type = types.enum [ "raw" "qcow2" ];
default = "qcow2";
- description = lib.mdDoc "The image format to output";
+ description = "The image format to output";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/config/appstream.nix b/third_party/nixpkgs/nixos/modules/config/appstream.nix
index 5b48f6e170..1712273eff 100644
--- a/third_party/nixpkgs/nixos/modules/config/appstream.nix
+++ b/third_party/nixpkgs/nixos/modules/config/appstream.nix
@@ -6,7 +6,7 @@ with lib;
appstream.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to install files to support the
[AppStream metadata specification](https://www.freedesktop.org/software/appstream/docs/index.html).
'';
diff --git a/third_party/nixpkgs/nixos/modules/config/console.nix b/third_party/nixpkgs/nixos/modules/config/console.nix
index 0a931c6918..5aadc0836f 100644
--- a/third_party/nixpkgs/nixos/modules/config/console.nix
+++ b/third_party/nixpkgs/nixos/modules/config/console.nix
@@ -40,7 +40,7 @@ in
###### interface
options.console = {
- enable = mkEnableOption (lib.mdDoc "virtual console") // {
+ enable = mkEnableOption "virtual console" // {
default = true;
};
@@ -48,7 +48,7 @@ in
type = with types; nullOr (either str path);
default = null;
example = "LatArCyrHeb-16";
- description = mdDoc ''
+ description = ''
The font used for the virtual consoles.
Can be `null`, a font name, or a path to a PSF font file.
@@ -65,7 +65,7 @@ in
type = with types; either str path;
default = "us";
example = "fr";
- description = lib.mdDoc ''
+ description = ''
The keyboard mapping table for the virtual consoles.
'';
};
@@ -79,7 +79,7 @@ in
"002b36" "cb4b16" "586e75" "657b83"
"839496" "6c71c4" "93a1a1" "fdf6e3"
];
- description = lib.mdDoc ''
+ description = ''
The 16 colors palette used by the virtual consoles.
Leave empty to use the default colors.
Colors must be in hexadecimal format and listed in
@@ -91,7 +91,7 @@ in
packages = mkOption {
type = types.listOf types.package;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
List of additional packages that provide console fonts, keymaps and
other resources for virtual consoles use.
'';
@@ -100,7 +100,7 @@ in
useXkbConfig = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If set, configure the virtual console keymap from the xserver
keyboard settings.
'';
@@ -109,7 +109,7 @@ in
earlySetup = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enable setting virtual console options as early as possible (in initrd).
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/config/debug-info.nix b/third_party/nixpkgs/nixos/modules/config/debug-info.nix
index 78de26fda4..05a2fd2cee 100644
--- a/third_party/nixpkgs/nixos/modules/config/debug-info.nix
+++ b/third_party/nixpkgs/nixos/modules/config/debug-info.nix
@@ -9,7 +9,7 @@ with lib;
environment.enableDebugInfo = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Some NixOS packages provide debug symbols. However, these are
not included in the system closure by default to save disk
space. Enabling this option causes the debug symbols to appear
diff --git a/third_party/nixpkgs/nixos/modules/config/fanout.nix b/third_party/nixpkgs/nixos/modules/config/fanout.nix
index 60ee145f19..f775d2e9f2 100644
--- a/third_party/nixpkgs/nixos/modules/config/fanout.nix
+++ b/third_party/nixpkgs/nixos/modules/config/fanout.nix
@@ -7,7 +7,7 @@ let
in
{
options.services.fanout = {
- enable = lib.mkEnableOption (lib.mdDoc "fanout");
+ enable = lib.mkEnableOption "fanout";
fanoutDevices = lib.mkOption {
type = lib.types.int;
default = 1;
diff --git a/third_party/nixpkgs/nixos/modules/config/fonts/fontconfig.nix b/third_party/nixpkgs/nixos/modules/config/fonts/fontconfig.nix
index 5e2e054f7c..9a9ac08eef 100644
--- a/third_party/nixpkgs/nixos/modules/config/fonts/fontconfig.nix
+++ b/third_party/nixpkgs/nixos/modules/config/fonts/fontconfig.nix
@@ -278,7 +278,7 @@ in
enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
If enabled, a Fontconfig configuration file will be built
pointing to a set of default fonts. If you don't care about
running X11 applications or any other program that uses
@@ -291,7 +291,7 @@ in
internal = true;
type = with types; listOf path;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
Fontconfig configuration packages.
'';
};
@@ -299,7 +299,7 @@ in
antialias = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Enable font antialiasing. At high resolution (> 200 DPI),
antialiasing has no visible effect; users of such displays may want
to disable this option.
@@ -309,7 +309,7 @@ in
localConf = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
System-wide customization file contents, has higher priority than
`defaultFonts` settings.
'';
@@ -319,7 +319,7 @@ in
monospace = mkOption {
type = types.listOf types.str;
default = ["DejaVu Sans Mono"];
- description = lib.mdDoc ''
+ description = ''
System-wide default monospace font(s). Multiple fonts may be
listed in case multiple languages must be supported.
'';
@@ -328,7 +328,7 @@ in
sansSerif = mkOption {
type = types.listOf types.str;
default = ["DejaVu Sans"];
- description = lib.mdDoc ''
+ description = ''
System-wide default sans serif font(s). Multiple fonts may be
listed in case multiple languages must be supported.
'';
@@ -337,7 +337,7 @@ in
serif = mkOption {
type = types.listOf types.str;
default = ["DejaVu Serif"];
- description = lib.mdDoc ''
+ description = ''
System-wide default serif font(s). Multiple fonts may be listed
in case multiple languages must be supported.
'';
@@ -346,7 +346,7 @@ in
emoji = mkOption {
type = types.listOf types.str;
default = ["Noto Color Emoji"];
- description = lib.mdDoc ''
+ description = ''
System-wide default emoji font(s). Multiple fonts may be listed
in case a font does not support all emoji.
@@ -363,7 +363,7 @@ in
enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Enable font hinting. Hinting aligns glyphs to pixel boundaries to
improve rendering sharpness at low resolution. At high resolution
(> 200 dpi) hinting will do nothing (at best); users of such
@@ -374,7 +374,7 @@ in
autohint = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable the autohinter in place of the default interpreter.
The results are usually lower quality than correctly-hinted
fonts, but better than unhinted fonts.
@@ -384,7 +384,7 @@ in
style = mkOption {
type = types.enum ["none" "slight" "medium" "full"];
default = "slight";
- description = lib.mdDoc ''
+ description = ''
Hintstyle is the amount of font reshaping done to line up
to the grid.
@@ -407,7 +407,7 @@ in
includeUserConf = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Include the user configuration from
{file}`~/.config/fontconfig/fonts.conf` or
{file}`~/.config/fontconfig/conf.d`.
@@ -419,7 +419,7 @@ in
rgba = mkOption {
default = "none";
type = types.enum ["rgb" "bgr" "vrgb" "vbgr" "none"];
- description = lib.mdDoc ''
+ description = ''
Subpixel order. The overwhelming majority of displays are
`rgb` in their normal orientation. Select
`vrgb` for mounting such a display 90 degrees
@@ -435,7 +435,7 @@ in
lcdfilter = mkOption {
default = "default";
type = types.enum ["none" "default" "light" "legacy"];
- description = lib.mdDoc ''
+ description = ''
FreeType LCD filter. At high resolution (> 200 DPI), LCD filtering
has no visible effect; users of such displays may want to select
`none`.
@@ -447,7 +447,7 @@ in
cache32Bit = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Generate system fonts cache for 32-bit applications.
'';
};
@@ -455,7 +455,7 @@ in
allowBitmaps = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Allow bitmap fonts. Set to `false` to ban all
bitmap fonts.
'';
@@ -464,7 +464,7 @@ in
allowType1 = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Allow Type-1 fonts. Default is `false` because of
poor rendering.
'';
@@ -473,7 +473,7 @@ in
useEmbeddedBitmaps = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Use embedded bitmaps in fonts like Calibri.";
+ description = "Use embedded bitmaps in fonts like Calibri.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/config/fonts/fontdir.nix b/third_party/nixpkgs/nixos/modules/config/fonts/fontdir.nix
index 3b5eaf5b2d..7b21fe30f6 100644
--- a/third_party/nixpkgs/nixos/modules/config/fonts/fontdir.nix
+++ b/third_party/nixpkgs/nixos/modules/config/fonts/fontdir.nix
@@ -30,7 +30,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to create a directory with links to all fonts in
{file}`/run/current-system/sw/share/X11/fonts`.
'';
@@ -40,7 +40,7 @@ in
type = types.bool;
default = config.programs.xwayland.enable;
defaultText = literalExpression "config.programs.xwayland.enable";
- description = lib.mdDoc ''
+ description = ''
Whether to decompress fonts in
{file}`/run/current-system/sw/share/X11/fonts`.
'';
diff --git a/third_party/nixpkgs/nixos/modules/config/fonts/ghostscript.nix b/third_party/nixpkgs/nixos/modules/config/fonts/ghostscript.nix
index c41fcdaaa3..a5508b9489 100644
--- a/third_party/nixpkgs/nixos/modules/config/fonts/ghostscript.nix
+++ b/third_party/nixpkgs/nixos/modules/config/fonts/ghostscript.nix
@@ -7,7 +7,7 @@ with lib;
fonts.enableGhostscriptFonts = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to add the fonts provided by Ghostscript (such as
various URW fonts and the “Base-14” Postscript fonts) to the
list of system fonts, making them available to X11
diff --git a/third_party/nixpkgs/nixos/modules/config/fonts/packages.nix b/third_party/nixpkgs/nixos/modules/config/fonts/packages.nix
index 37b705ecb3..36eaa5791d 100644
--- a/third_party/nixpkgs/nixos/modules/config/fonts/packages.nix
+++ b/third_party/nixpkgs/nixos/modules/config/fonts/packages.nix
@@ -16,13 +16,13 @@ in
type = with lib.types; listOf path;
default = [];
example = lib.literalExpression "[ pkgs.dejavu_fonts ]";
- description = lib.mdDoc "List of primary font packages.";
+ description = "List of primary font packages.";
};
enableDefaultPackages = lib.mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable a basic set of fonts providing several styles
and families and reasonable coverage of Unicode.
'';
diff --git a/third_party/nixpkgs/nixos/modules/config/gtk/gtk-icon-cache.nix b/third_party/nixpkgs/nixos/modules/config/gtk/gtk-icon-cache.nix
index 62f0cc3f09..0898260d4a 100644
--- a/third_party/nixpkgs/nixos/modules/config/gtk/gtk-icon-cache.nix
+++ b/third_party/nixpkgs/nixos/modules/config/gtk/gtk-icon-cache.nix
@@ -7,7 +7,7 @@ with lib;
type = types.bool;
default = config.services.xserver.enable;
defaultText = literalExpression "config.services.xserver.enable";
- description = lib.mdDoc ''
+ description = ''
Whether to build icon theme caches for GTK applications.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/config/i18n.nix b/third_party/nixpkgs/nixos/modules/config/i18n.nix
index b19d38091e..9d2d3c23be 100644
--- a/third_party/nixpkgs/nixos/modules/config/i18n.nix
+++ b/third_party/nixpkgs/nixos/modules/config/i18n.nix
@@ -21,7 +21,7 @@ with lib;
}
'';
example = literalExpression "pkgs.glibcLocales";
- description = lib.mdDoc ''
+ description = ''
Customized pkg.glibcLocales package.
Changing this option can disable handling of i18n.defaultLocale
@@ -33,7 +33,7 @@ with lib;
type = types.str;
default = "en_US.UTF-8";
example = "nl_NL.UTF-8";
- description = lib.mdDoc ''
+ description = ''
The default locale. It determines the language for program
messages, the format for dates and times, sort order, and so on.
It also determines the character set, such as UTF-8.
@@ -44,7 +44,7 @@ with lib;
type = types.attrsOf types.str;
default = {};
example = { LC_MESSAGES = "en_US.UTF-8"; LC_TIME = "de_DE.UTF-8"; };
- description = lib.mdDoc ''
+ description = ''
A set of additional system-wide locale settings other than
`LANG` which can be configured with
{option}`i18n.defaultLocale`.
@@ -72,7 +72,7 @@ with lib;
))
'';
example = ["en_US.UTF-8/UTF-8" "nl_NL.UTF-8/UTF-8" "nl_NL/ISO-8859-1"];
- description = lib.mdDoc ''
+ description = ''
List of locales that the system should support. The value
`"all"` means that all locales supported by
Glibc will be installed. A full list of supported locales
diff --git a/third_party/nixpkgs/nixos/modules/config/iproute2.nix b/third_party/nixpkgs/nixos/modules/config/iproute2.nix
index 0cde57b759..90f53c0eab 100644
--- a/third_party/nixpkgs/nixos/modules/config/iproute2.nix
+++ b/third_party/nixpkgs/nixos/modules/config/iproute2.nix
@@ -7,11 +7,11 @@ let
in
{
options.networking.iproute2 = {
- enable = mkEnableOption (lib.mdDoc "copying IP route configuration files");
+ enable = mkEnableOption "copying IP route configuration files";
rttablesExtraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Verbatim lines to add to /etc/iproute2/rt_tables
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/config/ldap.nix b/third_party/nixpkgs/nixos/modules/config/ldap.nix
index e374e4a7a2..7f79db8d0a 100644
--- a/third_party/nixpkgs/nixos/modules/config/ldap.nix
+++ b/third_party/nixpkgs/nixos/modules/config/ldap.nix
@@ -59,36 +59,36 @@ in
users.ldap = {
- enable = mkEnableOption (lib.mdDoc "authentication against an LDAP server");
+ enable = mkEnableOption "authentication against an LDAP server";
loginPam = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to include authentication against LDAP in login PAM.";
+ description = "Whether to include authentication against LDAP in login PAM.";
};
nsswitch = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to include lookup against LDAP in NSS.";
+ description = "Whether to include lookup against LDAP in NSS.";
};
server = mkOption {
type = types.str;
example = "ldap://ldap.example.org/";
- description = lib.mdDoc "The URL of the LDAP server.";
+ description = "The URL of the LDAP server.";
};
base = mkOption {
type = types.str;
example = "dc=example,dc=org";
- description = lib.mdDoc "The distinguished name of the search base.";
+ description = "The distinguished name of the search base.";
};
useTLS = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If enabled, use TLS (encryption) over an LDAP (port 389)
connection. The alternative is to specify an LDAPS server (port
636) in {option}`users.ldap.server` or to forego
@@ -99,7 +99,7 @@ in
timeLimit = mkOption {
default = 0;
type = types.int;
- description = lib.mdDoc ''
+ description = ''
Specifies the time limit (in seconds) to use when performing
searches. A value of zero (0), which is the default, is to
wait indefinitely for searches to be completed.
@@ -110,7 +110,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to let the nslcd daemon (nss-pam-ldapd) handle the
LDAP lookups for NSS and PAM. This can improve performance,
and if you need to bind to the LDAP server with a password,
@@ -125,17 +125,17 @@ in
extraConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra configuration options that will be added verbatim at
the end of the nslcd configuration file (`nslcd.conf(5)`).
- '' ;
+ '';
} ;
rootpwmoddn = mkOption {
default = "";
example = "cn=admin,dc=example,dc=com";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The distinguished name to use to bind to the LDAP server
when the root user tries to modify a user's password.
'';
@@ -145,7 +145,7 @@ in
default = "";
example = "/run/keys/nslcd.rootpwmodpw";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The path to a file containing the credentials with which to bind to
the LDAP server if the root user tries to change a user's password.
'';
@@ -157,7 +157,7 @@ in
default = "";
example = "cn=admin,dc=example,dc=com";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The distinguished name to bind to the LDAP server with. If this
is not specified, an anonymous bind will be done.
'';
@@ -166,7 +166,7 @@ in
passwordFile = mkOption {
default = "/etc/ldap/bind.password";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The path to a file containing the credentials to use when binding
to the LDAP server (if not binding anonymously).
'';
@@ -175,7 +175,7 @@ in
timeLimit = mkOption {
default = 30;
type = types.int;
- description = lib.mdDoc ''
+ description = ''
Specifies the time limit (in seconds) to use when connecting
to the directory server. This is distinct from the time limit
specified in {option}`users.ldap.timeLimit` and affects
@@ -186,7 +186,7 @@ in
policy = mkOption {
default = "hard_open";
type = types.enum [ "hard_open" "hard_init" "soft" ];
- description = lib.mdDoc ''
+ description = ''
Specifies the policy to use for reconnecting to an unavailable
LDAP server. The default is `hard_open`, which
reconnects if opening the connection to the directory server
@@ -205,13 +205,13 @@ in
extraConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra configuration options that will be added verbatim at
the end of the ldap configuration file (`ldap.conf(5)`).
If {option}`users.ldap.daemon` is enabled, this
configuration will not be used. In that case, use
{option}`users.ldap.daemon.extraConfig` instead.
- '' ;
+ '';
};
};
diff --git a/third_party/nixpkgs/nixos/modules/config/ldso.nix b/third_party/nixpkgs/nixos/modules/config/ldso.nix
index bd6f0dc5a8..60156dd040 100644
--- a/third_party/nixpkgs/nixos/modules/config/ldso.nix
+++ b/third_party/nixpkgs/nixos/modules/config/ldso.nix
@@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
let
- inherit (lib) last splitString mkOption types mdDoc optionals;
+ inherit (lib) last splitString mkOption types optionals;
libDir = pkgs.stdenv.hostPlatform.libDir;
ldsoBasename = builtins.unsafeDiscardStringContext (last (splitString "/" pkgs.stdenv.cc.bintools.dynamicLinker));
@@ -14,7 +14,7 @@ in {
environment.ldso = mkOption {
type = types.nullOr types.path;
default = null;
- description = mdDoc ''
+ description = ''
The executable to link into the normal FHS location of the ELF loader.
'';
};
@@ -22,7 +22,7 @@ in {
environment.ldso32 = mkOption {
type = types.nullOr types.path;
default = null;
- description = mdDoc ''
+ description = ''
The executable to link into the normal FHS location of the 32-bit ELF loader.
This currently only works on x86_64 architectures.
diff --git a/third_party/nixpkgs/nixos/modules/config/locale.nix b/third_party/nixpkgs/nixos/modules/config/locale.nix
index 7716e121c7..486246081e 100644
--- a/third_party/nixpkgs/nixos/modules/config/locale.nix
+++ b/third_party/nixpkgs/nixos/modules/config/locale.nix
@@ -22,7 +22,7 @@ in
default = null;
type = timezone;
example = "America/New_York";
- description = lib.mdDoc ''
+ description = ''
The time zone used when displaying times and dates. See
for a comprehensive list of possible values for this setting.
@@ -34,7 +34,7 @@ in
hardwareClockInLocalTime = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "If set, keep the hardware clock in local time instead of UTC.";
+ description = "If set, keep the hardware clock in local time instead of UTC.";
};
};
@@ -43,7 +43,7 @@ in
latitude = mkOption {
type = types.float;
- description = lib.mdDoc ''
+ description = ''
Your current latitude, between
`-90.0` and `90.0`. Must be provided
along with longitude.
@@ -52,7 +52,7 @@ in
longitude = mkOption {
type = types.float;
- description = lib.mdDoc ''
+ description = ''
Your current longitude, between
between `-180.0` and `180.0`. Must be
provided along with latitude.
@@ -62,7 +62,7 @@ in
provider = mkOption {
type = types.enum [ "manual" "geoclue2" ];
default = "manual";
- description = lib.mdDoc ''
+ description = ''
The location provider to use for determining your location. If set to
`manual` you must also provide latitude/longitude.
'';
diff --git a/third_party/nixpkgs/nixos/modules/config/malloc.nix b/third_party/nixpkgs/nixos/modules/config/malloc.nix
index 043f78c821..4214ae5983 100644
--- a/third_party/nixpkgs/nixos/modules/config/malloc.nix
+++ b/third_party/nixpkgs/nixos/modules/config/malloc.nix
@@ -77,7 +77,7 @@ in
environment.memoryAllocator.provider = mkOption {
type = types.enum ([ "libc" ] ++ attrNames providers);
default = "libc";
- description = lib.mdDoc ''
+ description = ''
The system-wide memory allocator.
Briefly, the system-wide memory allocator providers are:
diff --git a/third_party/nixpkgs/nixos/modules/config/mysql.nix b/third_party/nixpkgs/nixos/modules/config/mysql.nix
index 4f72d22c4f..e1f9e223cc 100644
--- a/third_party/nixpkgs/nixos/modules/config/mysql.nix
+++ b/third_party/nixpkgs/nixos/modules/config/mysql.nix
@@ -10,41 +10,41 @@ in
options = {
users.mysql = {
- enable = mkEnableOption (lib.mdDoc "Authentication against a MySQL/MariaDB database");
+ enable = mkEnableOption "authentication against a MySQL/MariaDB database";
host = mkOption {
type = types.str;
example = "localhost";
- description = lib.mdDoc "The hostname of the MySQL/MariaDB server";
+ description = "The hostname of the MySQL/MariaDB server";
};
database = mkOption {
type = types.str;
example = "auth";
- description = lib.mdDoc "The name of the database containing the users";
+ description = "The name of the database containing the users";
};
user = mkOption {
type = types.str;
example = "nss-user";
- description = lib.mdDoc "The username to use when connecting to the database";
+ description = "The username to use when connecting to the database";
};
passwordFile = mkOption {
type = types.path;
example = "/run/secrets/mysql-auth-db-passwd";
- description = lib.mdDoc "The path to the file containing the password for the user";
+ description = "The path to the file containing the password for the user";
};
pam = mkOption {
- description = lib.mdDoc "Settings for `pam_mysql`";
+ description = "Settings for `pam_mysql`";
type = types.submodule {
options = {
table = mkOption {
type = types.str;
example = "users";
- description = lib.mdDoc "The name of table that maps unique login names to the passwords.";
+ description = "The name of table that maps unique login names to the passwords.";
};
updateTable = mkOption {
type = types.nullOr types.str;
default = null;
example = "users_updates";
- description = lib.mdDoc ''
+ description = ''
The name of the table used for password alteration. If not defined, the value
of the `table` option will be used instead.
'';
@@ -52,18 +52,18 @@ in
userColumn = mkOption {
type = types.str;
example = "username";
- description = lib.mdDoc "The name of the column that contains a unix login name.";
+ description = "The name of the column that contains a unix login name.";
};
passwordColumn = mkOption {
type = types.str;
example = "password";
- description = lib.mdDoc "The name of the column that contains a (encrypted) password string.";
+ description = "The name of the column that contains a (encrypted) password string.";
};
statusColumn = mkOption {
type = types.nullOr types.str;
default = null;
example = "status";
- description = lib.mdDoc ''
+ description = ''
The name of the column or an SQL expression that indicates the status of
the user. The status is expressed by the combination of two bitfields
shown below:
@@ -93,7 +93,7 @@ in
"8" "sha512"
"9" "sha256"
];
- description = lib.mdDoc ''
+ description = ''
The method to encrypt the user's password:
- `0` (or `"plain"`):
@@ -125,18 +125,18 @@ in
type = types.nullOr (types.enum [ "md5" "sha256" "sha512" "blowfish" ]);
default = null;
example = "blowfish";
- description = lib.mdDoc "The default encryption method to use for `passwordCrypt = 1`.";
+ description = "The default encryption method to use for `passwordCrypt = 1`.";
};
where = mkOption {
type = types.nullOr types.str;
default = null;
example = "host.name='web' AND user.active=1";
- description = lib.mdDoc "Additional criteria for the query.";
+ description = "Additional criteria for the query.";
};
verbose = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If enabled, produces logs with detailed messages that describes what
`pam_mysql` is doing. May be useful for debugging.
'';
@@ -144,7 +144,7 @@ in
disconnectEveryOperation = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
By default, `pam_mysql` keeps the connection to the MySQL
database until the session is closed. If this option is set to true it
disconnects every time the PAM operation has finished. This option may
@@ -155,17 +155,17 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enables logging of authentication attempts in the MySQL database.";
+ description = "Enables logging of authentication attempts in the MySQL database.";
};
table = mkOption {
type = types.str;
example = "logs";
- description = lib.mdDoc "The name of the table to which logs are written.";
+ description = "The name of the table to which logs are written.";
};
msgColumn = mkOption {
type = types.str;
example = "msg";
- description = lib.mdDoc ''
+ description = ''
The name of the column in the log table to which the description
of the performed operation is stored.
'';
@@ -173,7 +173,7 @@ in
userColumn = mkOption {
type = types.str;
example = "user";
- description = lib.mdDoc ''
+ description = ''
The name of the column in the log table to which the name of the
user being authenticated is stored.
'';
@@ -181,7 +181,7 @@ in
pidColumn = mkOption {
type = types.str;
example = "pid";
- description = lib.mdDoc ''
+ description = ''
The name of the column in the log table to which the pid of the
process utilising the `pam_mysql` authentication
service is stored.
@@ -190,7 +190,7 @@ in
hostColumn = mkOption {
type = types.str;
example = "host";
- description = lib.mdDoc ''
+ description = ''
The name of the column in the log table to which the name of the user
being authenticated is stored.
'';
@@ -198,7 +198,7 @@ in
rHostColumn = mkOption {
type = types.str;
example = "rhost";
- description = lib.mdDoc ''
+ description = ''
The name of the column in the log table to which the name of the remote
host that initiates the session is stored. The value is supposed to be
set by the PAM-aware application with `pam_set_item(PAM_RHOST)`.
@@ -207,7 +207,7 @@ in
timeColumn = mkOption {
type = types.str;
example = "timestamp";
- description = lib.mdDoc ''
+ description = ''
The name of the column in the log table to which the timestamp of the
log entry is stored.
'';
@@ -217,7 +217,7 @@ in
};
};
nss = mkOption {
- description = lib.mdDoc ''
+ description = ''
Settings for `libnss-mysql`.
All examples are from the [minimal example](https://github.com/saknopper/libnss-mysql/tree/master/sample/minimal)
@@ -234,7 +234,7 @@ in
WHERE username='%1$s' \
LIMIT 1
'';
- description = lib.mdDoc ''
+ description = ''
SQL query for the [getpwnam](https://man7.org/linux/man-pages/man3/getpwnam.3.html)
syscall.
'';
@@ -248,7 +248,7 @@ in
WHERE uid='%1$u' \
LIMIT 1
'';
- description = lib.mdDoc ''
+ description = ''
SQL query for the [getpwuid](https://man7.org/linux/man-pages/man3/getpwuid.3.html)
syscall.
'';
@@ -262,7 +262,7 @@ in
WHERE username='%1$s' \
LIMIT 1
'';
- description = lib.mdDoc ''
+ description = ''
SQL query for the [getspnam](https://man7.org/linux/man-pages/man3/getspnam.3.html)
syscall.
'';
@@ -273,7 +273,7 @@ in
example = literalExpression ''
SELECT username,'x',uid,'5000','MySQL User', CONCAT('/home/',username),'/run/sw/current-system/bin/bash' FROM users
'';
- description = lib.mdDoc ''
+ description = ''
SQL query for the [getpwent](https://man7.org/linux/man-pages/man3/getpwent.3.html)
syscall.
'';
@@ -284,7 +284,7 @@ in
example = literalExpression ''
SELECT username,password,'1','0','99999','0','0','-1','0' FROM users
'';
- description = lib.mdDoc ''
+ description = ''
SQL query for the [getspent](https://man7.org/linux/man-pages/man3/getspent.3.html)
syscall.
'';
@@ -295,7 +295,7 @@ in
example = literalExpression ''
SELECT name,password,gid FROM groups WHERE name='%1$s' LIMIT 1
'';
- description = lib.mdDoc ''
+ description = ''
SQL query for the [getgrnam](https://man7.org/linux/man-pages/man3/getgrnam.3.html)
syscall.
'';
@@ -306,7 +306,7 @@ in
example = literalExpression ''
SELECT name,password,gid FROM groups WHERE gid='%1$u' LIMIT 1
'';
- description = lib.mdDoc ''
+ description = ''
SQL query for the [getgrgid](https://man7.org/linux/man-pages/man3/getgrgid.3.html)
syscall.
'';
@@ -317,7 +317,7 @@ in
example = literalExpression ''
SELECT name,password,gid FROM groups
'';
- description = lib.mdDoc ''
+ description = ''
SQL query for the [getgrent](https://man7.org/linux/man-pages/man3/getgrent.3.html)
syscall.
'';
@@ -328,7 +328,7 @@ in
example = literalExpression ''
SELECT username FROM grouplist WHERE gid='%1$u'
'';
- description = lib.mdDoc ''
+ description = ''
SQL query for the [memsbygid](https://man7.org/linux/man-pages/man3/memsbygid.3.html)
syscall.
'';
@@ -339,7 +339,7 @@ in
example = literalExpression ''
SELECT gid FROM grouplist WHERE username='%1$s'
'';
- description = lib.mdDoc ''
+ description = ''
SQL query for the [gidsbymem](https://man7.org/linux/man-pages/man3/gidsbymem.3.html)
syscall.
'';
diff --git a/third_party/nixpkgs/nixos/modules/config/networking.nix b/third_party/nixpkgs/nixos/modules/config/networking.nix
index aa6d75e199..72242b263c 100644
--- a/third_party/nixpkgs/nixos/modules/config/networking.nix
+++ b/third_party/nixpkgs/nixos/modules/config/networking.nix
@@ -28,7 +28,7 @@ in
"192.168.0.2" = [ "fileserver.local" "nameserver.local" ];
};
'';
- description = lib.mdDoc ''
+ description = ''
Locally defined maps of hostnames to IP addresses.
'';
};
@@ -37,7 +37,7 @@ in
type = types.listOf types.path;
defaultText = literalMD "Hosts from {option}`networking.hosts` and {option}`networking.extraHosts`";
example = literalExpression ''[ "''${pkgs.my-blocklist-package}/share/my-blocklist/hosts" ]'';
- description = lib.mdDoc ''
+ description = ''
Files that should be concatenated together to form {file}`/etc/hosts`.
'';
};
@@ -46,7 +46,7 @@ in
type = types.lines;
default = "";
example = "192.168.0.1 lanlocalhost";
- description = lib.mdDoc ''
+ description = ''
Additional verbatim entries to be appended to {file}`/etc/hosts`.
For adding hosts from derivation results, use {option}`networking.hostFiles` instead.
'';
@@ -60,7 +60,7 @@ in
"3.nixos.pool.ntp.org"
];
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
The set of NTP servers from which to synchronise.
'';
};
@@ -70,7 +70,7 @@ in
default = lib.mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
This option specifies the default value for httpProxy, httpsProxy, ftpProxy and rsyncProxy.
'';
example = "http://127.0.0.1:3128";
@@ -80,7 +80,7 @@ in
type = types.nullOr types.str;
default = cfg.proxy.default;
defaultText = literalExpression "config.${opt.proxy.default}";
- description = lib.mdDoc ''
+ description = ''
This option specifies the http_proxy environment variable.
'';
example = "http://127.0.0.1:3128";
@@ -90,7 +90,7 @@ in
type = types.nullOr types.str;
default = cfg.proxy.default;
defaultText = literalExpression "config.${opt.proxy.default}";
- description = lib.mdDoc ''
+ description = ''
This option specifies the https_proxy environment variable.
'';
example = "http://127.0.0.1:3128";
@@ -100,7 +100,7 @@ in
type = types.nullOr types.str;
default = cfg.proxy.default;
defaultText = literalExpression "config.${opt.proxy.default}";
- description = lib.mdDoc ''
+ description = ''
This option specifies the ftp_proxy environment variable.
'';
example = "http://127.0.0.1:3128";
@@ -110,7 +110,7 @@ in
type = types.nullOr types.str;
default = cfg.proxy.default;
defaultText = literalExpression "config.${opt.proxy.default}";
- description = lib.mdDoc ''
+ description = ''
This option specifies the rsync_proxy environment variable.
'';
example = "http://127.0.0.1:3128";
@@ -120,7 +120,7 @@ in
type = types.nullOr types.str;
default = cfg.proxy.default;
defaultText = literalExpression "config.${opt.proxy.default}";
- description = lib.mdDoc ''
+ description = ''
This option specifies the all_proxy environment variable.
'';
example = "http://127.0.0.1:3128";
@@ -129,7 +129,7 @@ in
noProxy = lib.mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
This option specifies the no_proxy environment variable.
If a default proxy is used and noProxy is null,
then noProxy will be set to 127.0.0.1,localhost.
@@ -141,7 +141,7 @@ in
type = types.attrs;
internal = true;
default = {};
- description = lib.mdDoc ''
+ description = ''
Environment variables used for the network proxy.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/config/nix-channel.nix b/third_party/nixpkgs/nixos/modules/config/nix-channel.nix
index dd97cb730a..6498ce6c46 100644
--- a/third_party/nixpkgs/nixos/modules/config/nix-channel.nix
+++ b/third_party/nixpkgs/nixos/modules/config/nix-channel.nix
@@ -23,7 +23,7 @@ in
nix = {
channel = {
enable = mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether the `nix-channel` command and state files are made available on the machine.
The following files are initialized when enabled:
@@ -57,7 +57,7 @@ in
]
else [];
'';
- description = lib.mdDoc ''
+ description = ''
The default Nix expression search path, used by the Nix
evaluator to look up paths enclosed in angle brackets
(e.g. ``).
@@ -70,7 +70,7 @@ in
internal = true;
type = types.str;
default = "https://nixos.org/channels/nixos-unstable";
- description = lib.mdDoc "Default NixOS channel to which the root user is subscribed.";
+ description = "Default NixOS channel to which the root user is subscribed.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/config/nix-flakes.nix b/third_party/nixpkgs/nixos/modules/config/nix-flakes.nix
index 242d8d3b82..d6c31735a6 100644
--- a/third_party/nixpkgs/nixos/modules/config/nix-flakes.nix
+++ b/third_party/nixpkgs/nixos/modules/config/nix-flakes.nix
@@ -40,25 +40,25 @@ in
from = mkOption {
type = referenceAttrs;
example = { type = "indirect"; id = "nixpkgs"; };
- description = lib.mdDoc "The flake reference to be rewritten.";
+ description = "The flake reference to be rewritten.";
};
to = mkOption {
type = referenceAttrs;
example = { type = "github"; owner = "my-org"; repo = "my-nixpkgs"; };
- description = lib.mdDoc "The flake reference {option}`from` is rewritten to.";
+ description = "The flake reference {option}`from` is rewritten to.";
};
flake = mkOption {
type = types.nullOr types.attrs;
default = null;
example = literalExpression "nixpkgs";
- description = lib.mdDoc ''
+ description = ''
The flake input {option}`from` is rewritten to.
'';
};
exact = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether the {option}`from` reference needs to match exactly. If set,
a {option}`from` reference like `nixpkgs` does not
match with a reference like `nixpkgs/nixos-20.03`.
@@ -79,7 +79,7 @@ in
}
));
default = { };
- description = lib.mdDoc ''
+ description = ''
A system-wide flake registry.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/config/nix-remote-build.nix b/third_party/nixpkgs/nixos/modules/config/nix-remote-build.nix
index 98c8fc06d2..e8aa438a26 100644
--- a/third_party/nixpkgs/nixos/modules/config/nix-remote-build.nix
+++ b/third_party/nixpkgs/nixos/modules/config/nix-remote-build.nix
@@ -58,7 +58,7 @@ in
hostName = mkOption {
type = types.str;
example = "nixbuilder.example.org";
- description = lib.mdDoc ''
+ description = ''
The hostname of the build machine.
'';
};
@@ -66,7 +66,7 @@ in
type = types.enum [ null "ssh" "ssh-ng" ];
default = "ssh";
example = "ssh-ng";
- description = lib.mdDoc ''
+ description = ''
The protocol used for communicating with the build machine.
Use `ssh-ng` if your remote builder and your
local Nix version support that improved protocol.
@@ -79,7 +79,7 @@ in
type = types.nullOr types.str;
default = null;
example = "x86_64-linux";
- description = lib.mdDoc ''
+ description = ''
The system type the build machine can execute derivations on.
Either this attribute or {var}`systems` must be
present, where {var}`system` takes precedence if
@@ -90,7 +90,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "x86_64-linux" "aarch64-linux" ];
- description = lib.mdDoc ''
+ description = ''
The system types the build machine can execute derivations on.
Either this attribute or {var}`system` must be
present, where {var}`system` takes precedence if
@@ -101,7 +101,7 @@ in
type = types.nullOr types.str;
default = null;
example = "builder";
- description = lib.mdDoc ''
+ description = ''
The username to log in as on the remote host. This user must be
able to log in and run nix commands non-interactively. It must
also be privileged to build derivations, so must be included in
@@ -112,7 +112,7 @@ in
type = types.nullOr types.str;
default = null;
example = "/root/.ssh/id_buildhost_builduser";
- description = lib.mdDoc ''
+ description = ''
The path to the SSH private key with which to authenticate on
the build machine. The private key must not have a passphrase.
If null, the building user (root on NixOS machines) must have an
@@ -125,7 +125,7 @@ in
maxJobs = mkOption {
type = types.int;
default = 1;
- description = lib.mdDoc ''
+ description = ''
The number of concurrent jobs the build machine supports. The
build machine will enforce its own limits, but this allows hydra
to schedule better since there is no work-stealing between build
@@ -135,7 +135,7 @@ in
speedFactor = mkOption {
type = types.int;
default = 1;
- description = lib.mdDoc ''
+ description = ''
The relative speed of this builder. This is an arbitrary integer
that indicates the speed of this builder, relative to other
builders. Higher is faster.
@@ -145,7 +145,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "big-parallel" ];
- description = lib.mdDoc ''
+ description = ''
A list of features mandatory for this builder. The builder will
be ignored for derivations that don't require all features in
this list. All mandatory features are automatically included in
@@ -156,7 +156,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "kvm" "big-parallel" ];
- description = lib.mdDoc ''
+ description = ''
A list of features supported by this builder. The builder will
be ignored for derivations that require features not in this
list.
@@ -165,7 +165,7 @@ in
publicHostKey = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The (base64-encoded) public host key of this builder. The field
is calculated via {command}`base64 -w0 /etc/ssh/ssh_host_type_key.pub`.
If null, SSH will use its regular known-hosts file when connecting.
@@ -174,7 +174,7 @@ in
};
});
default = [ ];
- description = lib.mdDoc ''
+ description = ''
This option lists the machines to be used if distributed builds are
enabled (see {option}`nix.distributedBuilds`).
Nix will perform derivations on those machines via SSH by copying the
@@ -186,7 +186,7 @@ in
distributedBuilds = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to distribute builds to the machines listed in
{option}`nix.buildMachines`.
'';
diff --git a/third_party/nixpkgs/nixos/modules/config/nix.nix b/third_party/nixpkgs/nixos/modules/config/nix.nix
index e6a74bbb73..b5fe0a3bd1 100644
--- a/third_party/nixpkgs/nixos/modules/config/nix.nix
+++ b/third_party/nixpkgs/nixos/modules/config/nix.nix
@@ -14,8 +14,10 @@ let
concatStringsSep
boolToString
escape
+ filterAttrs
floatToString
getVersion
+ hasPrefix
isBool
isDerivation
isFloat
@@ -95,14 +97,19 @@ let
mkKeyValuePairs = attrs: concatStringsSep "\n" (mapAttrsToList mkKeyValue attrs);
+ isExtra = key: hasPrefix "extra-" key;
+
in
pkgs.writeTextFile {
name = "nix.conf";
+ # workaround for https://github.com/NixOS/nix/issues/9487
+ # extra-* settings must come after their non-extra counterpart
text = ''
# WARNING: this file is generated from the nix.* options in
# your NixOS configuration, typically
# /etc/nixos/configuration.nix. Do not edit it!
- ${mkKeyValuePairs cfg.settings}
+ ${mkKeyValuePairs (filterAttrs (key: value: !(isExtra key)) cfg.settings)}
+ ${mkKeyValuePairs (filterAttrs (key: value: isExtra key) cfg.settings)}
${cfg.extraOptions}
'';
checkPhase = lib.optionalString cfg.checkConfig (
@@ -147,7 +154,7 @@ in
checkConfig = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
If enabled, checks that Nix can parse the generated nix.conf.
'';
};
@@ -155,7 +162,7 @@ in
checkAllErrors = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
If enabled, checks the nix.conf parsing for any kind of error. When disabled, checks only for unknown settings.
'';
};
@@ -167,7 +174,7 @@ in
keep-outputs = true
keep-derivations = true
'';
- description = lib.mdDoc "Additional text appended to {file}`nix.conf`.";
+ description = "Additional text appended to {file}`nix.conf`.";
};
settings = mkOption {
@@ -179,7 +186,7 @@ in
type = types.either types.int (types.enum [ "auto" ]);
default = "auto";
example = 64;
- description = lib.mdDoc ''
+ description = ''
This option defines the maximum number of jobs that Nix will try to
build in parallel. The default is auto, which means it will use all
available logical cores. It is recommend to set it to the total
@@ -192,7 +199,7 @@ in
type = types.bool;
default = false;
example = true;
- description = lib.mdDoc ''
+ description = ''
If set to true, Nix automatically detects files in the store that have
identical contents, and replaces them with hard links to a single copy.
This saves disk space. If set to false (the default), you can still run
@@ -204,7 +211,7 @@ in
type = types.int;
default = 0;
example = 64;
- description = lib.mdDoc ''
+ description = ''
This option defines the maximum number of concurrent tasks during
one build. It affects, e.g., -j option for make.
The special value 0 means that the builder should use all
@@ -217,7 +224,7 @@ in
sandbox = mkOption {
type = types.either types.bool (types.enum [ "relaxed" ]);
default = true;
- description = lib.mdDoc ''
+ description = ''
If set, Nix will perform builds in a sandboxed environment that it
will set up automatically for each build. This prevents impurities
in builds by disallowing access to dependencies outside of the Nix
@@ -240,7 +247,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "/dev" "/proc" ];
- description = lib.mdDoc ''
+ description = ''
Directories from the host filesystem to be included
in the sandbox.
'';
@@ -248,7 +255,7 @@ in
substituters = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
List of binary cache URLs used to obtain pre-built binaries
of Nix packages.
@@ -260,7 +267,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "https://hydra.nixos.org/" ];
- description = lib.mdDoc ''
+ description = ''
List of binary cache URLs that non-root users can use (in
addition to those specified using
{option}`nix.settings.substituters`) by passing
@@ -271,7 +278,7 @@ in
require-sigs = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
If enabled (the default), Nix will only download binaries from binary caches if
they are cryptographically signed with any of the keys listed in
{option}`nix.settings.trusted-public-keys`. If disabled, signatures are neither
@@ -283,7 +290,7 @@ in
trusted-public-keys = mkOption {
type = types.listOf types.str;
example = [ "hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs=" ];
- description = lib.mdDoc ''
+ description = ''
List of public keys used to sign binary caches. If
{option}`nix.settings.trusted-public-keys` is enabled,
then Nix will use a binary from a binary cache if and only
@@ -297,7 +304,7 @@ in
type = types.listOf types.str;
default = [ "root" ];
example = [ "root" "alice" "@wheel" ];
- description = lib.mdDoc ''
+ description = ''
A list of names of users that have additional rights when
connecting to the Nix daemon, such as the ability to specify
additional binary caches, or to import unsigned NARs. You
@@ -311,7 +318,7 @@ in
system-features = mkOption {
type = types.listOf types.str;
example = [ "kvm" "big-parallel" "gccarch-skylake" ];
- description = lib.mdDoc ''
+ description = ''
The set of features supported by the machine. Derivations
can express dependencies on system features through the
`requiredSystemFeatures` attribute.
@@ -326,7 +333,7 @@ in
type = types.listOf types.str;
default = [ "*" ];
example = [ "@wheel" "@builders" "alice" "bob" ];
- description = lib.mdDoc ''
+ description = ''
A list of names of users (separated by whitespace) that are
allowed to connect to the Nix daemon. As with
{option}`nix.settings.trusted-users`, you can specify groups by
@@ -345,10 +352,10 @@ in
show-trace = true;
system-features = [ "big-parallel" "kvm" "recursive-nix" ];
- sandbox-paths = { "/bin/sh" = "''${pkgs.busybox-sandbox-shell.out}/bin/busybox"; };
+ sandbox-paths = [ "/bin/sh=''${pkgs.busybox-sandbox-shell.out}/bin/busybox" ];
}
'';
- description = lib.mdDoc ''
+ description = ''
Configuration for Nix, see
or
{manpage}`nix.conf(5)` for available options.
diff --git a/third_party/nixpkgs/nixos/modules/config/no-x-libs.nix b/third_party/nixpkgs/nixos/modules/config/no-x-libs.nix
index 870b3fe77c..c9a133d055 100644
--- a/third_party/nixpkgs/nixos/modules/config/no-x-libs.nix
+++ b/third_party/nixpkgs/nixos/modules/config/no-x-libs.nix
@@ -10,7 +10,7 @@ with lib;
environment.noXlibs = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Switch off the options in the default configuration that
require X11 libraries. This includes client-side font
configuration and SSH forwarding of X11 authentication
@@ -66,7 +66,7 @@ with lib;
networkmanager-sstp = super.networkmanager-vpnc.override { withGnome = false; };
networkmanager-vpnc = super.networkmanager-vpnc.override { withGnome = false; };
pango = super.pango.override { x11Support = false; };
- pinentry = super.pinentry.override { enabledFlavors = [ "curses" "tty" "emacs" ]; withLibsecret = false; };
+ pinentry-curses = super.pinentry-curses.override { withLibsecret = false; };
pipewire = super.pipewire.override { vulkanSupport = false; x11Support = false; };
pythonPackagesExtensions = super.pythonPackagesExtensions ++ [
(python-final: python-prev: {
diff --git a/third_party/nixpkgs/nixos/modules/config/nsswitch.nix b/third_party/nixpkgs/nixos/modules/config/nsswitch.nix
index b004072813..c7ba9b8eec 100644
--- a/third_party/nixpkgs/nixos/modules/config/nsswitch.nix
+++ b/third_party/nixpkgs/nixos/modules/config/nsswitch.nix
@@ -13,7 +13,7 @@ with lib;
type = types.listOf types.path;
internal = true;
default = [];
- description = lib.mdDoc ''
+ description = ''
Search path for NSS (Name Service Switch) modules. This allows
several DNS resolution methods to be specified via
{file}`/etc/nsswitch.conf`.
@@ -28,7 +28,7 @@ with lib;
system.nssDatabases = {
passwd = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
List of passwd entries to configure in {file}`/etc/nsswitch.conf`.
Note that "files" is always prepended while "systemd" is appended if nscd is enabled.
@@ -40,7 +40,7 @@ with lib;
group = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
List of group entries to configure in {file}`/etc/nsswitch.conf`.
Note that "files" is always prepended while "systemd" is appended if nscd is enabled.
@@ -52,7 +52,7 @@ with lib;
shadow = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
List of shadow entries to configure in {file}`/etc/nsswitch.conf`.
Note that "files" is always prepended.
@@ -64,7 +64,7 @@ with lib;
hosts = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
List of hosts entries to configure in {file}`/etc/nsswitch.conf`.
Note that "files" is always prepended, and "dns" and "myhostname" are always appended.
@@ -76,7 +76,7 @@ with lib;
services = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
List of services entries to configure in {file}`/etc/nsswitch.conf`.
Note that "files" is always prepended.
diff --git a/third_party/nixpkgs/nixos/modules/config/power-management.nix b/third_party/nixpkgs/nixos/modules/config/power-management.nix
index e7fd02920e..70f2d199df 100644
--- a/third_party/nixpkgs/nixos/modules/config/power-management.nix
+++ b/third_party/nixpkgs/nixos/modules/config/power-management.nix
@@ -19,8 +19,7 @@ in
enable = mkOption {
type = types.bool;
default = true;
- description =
- lib.mdDoc ''
+ description = ''
Whether to enable power management. This includes support
for suspend-to-RAM and powersave features on laptops.
'';
@@ -29,7 +28,7 @@ in
resumeCommands = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Commands executed after the system resumes from suspend-to-RAM.";
+ description = "Commands executed after the system resumes from suspend-to-RAM.";
};
powerUpCommands = mkOption {
@@ -38,8 +37,7 @@ in
example = literalExpression ''
"''${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda"
'';
- description =
- lib.mdDoc ''
+ description = ''
Commands executed when the machine powers up. That is,
they're executed both when the system first boots and when
it resumes from suspend or hibernation.
@@ -52,8 +50,7 @@ in
example = literalExpression ''
"''${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda"
'';
- description =
- lib.mdDoc ''
+ description = ''
Commands executed when the machine powers down. That is,
they're executed both when the system shuts down and when
it goes to suspend or hibernation.
diff --git a/third_party/nixpkgs/nixos/modules/config/pulseaudio.nix b/third_party/nixpkgs/nixos/modules/config/pulseaudio.nix
index 662959bf00..7c3a284e87 100644
--- a/third_party/nixpkgs/nixos/modules/config/pulseaudio.nix
+++ b/third_party/nixpkgs/nixos/modules/config/pulseaudio.nix
@@ -87,7 +87,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the PulseAudio sound server.
'';
};
@@ -95,7 +95,7 @@ in {
systemWide = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If false, a PulseAudio server is launched automatically for
each user that tries to use the sound system. The server runs
with user privileges. If true, one system-wide PulseAudio
@@ -110,7 +110,7 @@ in {
support32Bit = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to include the 32-bit pulseaudio libraries in the system or not.
This is only useful on 64-bit systems and currently limited to x86_64-linux.
'';
@@ -118,7 +118,7 @@ in {
configFile = mkOption {
type = types.nullOr types.path;
- description = lib.mdDoc ''
+ description = ''
The path to the default configuration options the PulseAudio server
should use. By default, the "default.pa" configuration
from the PulseAudio distribution is used.
@@ -128,7 +128,7 @@ in {
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Literal string to append to `configFile`
and the config file generated by the pulseaudio module.
'';
@@ -137,7 +137,7 @@ in {
extraClientConf = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra configuration appended to pulse/client.conf file.
'';
};
@@ -149,7 +149,7 @@ in {
else pkgs.pulseaudio;
defaultText = literalExpression "pkgs.pulseaudio";
example = literalExpression "pkgs.pulseaudioFull";
- description = lib.mdDoc ''
+ description = ''
The PulseAudio derivation to use. This can be used to enable
features (such as JACK support, Bluetooth) via the
`pulseaudioFull` package.
@@ -160,7 +160,7 @@ in {
type = types.listOf types.package;
default = [];
example = literalExpression "[ pkgs.pulseaudio-modules-bt ]";
- description = lib.mdDoc ''
+ description = ''
Extra pulseaudio modules to use. This is intended for out-of-tree
pulseaudio modules like extra bluetooth codecs.
@@ -172,7 +172,7 @@ in {
logLevel = mkOption {
type = types.str;
default = "notice";
- description = lib.mdDoc ''
+ description = ''
The log level that the system-wide pulseaudio daemon should use,
if activated.
'';
@@ -181,29 +181,29 @@ in {
config = mkOption {
type = types.attrsOf types.unspecified;
default = {};
- description = lib.mdDoc "Config of the pulse daemon. See `man pulse-daemon.conf`.";
+ description = "Config of the pulse daemon. See `man pulse-daemon.conf`.";
example = literalExpression ''{ realtime-scheduling = "yes"; }'';
};
};
zeroconf = {
discovery.enable =
- mkEnableOption (lib.mdDoc "discovery of pulseaudio sinks in the local network");
+ mkEnableOption "discovery of pulseaudio sinks in the local network";
publish.enable =
- mkEnableOption (lib.mdDoc "publishing the pulseaudio sink in the local network");
+ mkEnableOption "publishing the pulseaudio sink in the local network";
};
# TODO: enable by default?
tcp = {
- enable = mkEnableOption (lib.mdDoc "tcp streaming support");
+ enable = mkEnableOption "tcp streaming support";
anonymousClients = {
- allowAll = mkEnableOption (lib.mdDoc "all anonymous clients to stream to the server");
+ allowAll = mkEnableOption "all anonymous clients to stream to the server";
allowedIpRanges = mkOption {
type = types.listOf types.str;
default = [];
example = literalExpression ''[ "127.0.0.1" "192.168.1.0/24" ]'';
- description = lib.mdDoc ''
+ description = ''
A list of IP subnets that are allowed to stream to the server.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/config/qt.nix b/third_party/nixpkgs/nixos/modules/config/qt.nix
index f82b7ab85a..bf050f1762 100644
--- a/third_party/nixpkgs/nixos/modules/config/qt.nix
+++ b/third_party/nixpkgs/nixos/modules/config/qt.nix
@@ -42,7 +42,7 @@ in
options = {
qt = {
enable = lib.mkEnableOption "" // {
- description = lib.mdDoc ''
+ description = ''
Whether to enable Qt configuration, including theming.
Enabling this option is necessary for Qt plugins to work in the
@@ -66,7 +66,7 @@ in
[ "qt6Packages" "qt6ct" ]
[ "qt6Packages" "qt6gtk2" ]
];
- description = lib.mdDoc ''
+ description = ''
Selects the platform theme to use for Qt applications.
The options are
@@ -93,7 +93,7 @@ in
[ "qt6Packages" "qt6gtk2" ]
[ "qt6Packages" "qtstyleplugin-kvantum" ]
];
- description = lib.mdDoc ''
+ description = ''
Selects the style to use for Qt applications.
The options are
diff --git a/third_party/nixpkgs/nixos/modules/config/resolvconf.nix b/third_party/nixpkgs/nixos/modules/config/resolvconf.nix
index e9ae4d651d..002a06be39 100644
--- a/third_party/nixpkgs/nixos/modules/config/resolvconf.nix
+++ b/third_party/nixpkgs/nixos/modules/config/resolvconf.nix
@@ -10,7 +10,8 @@ let
resolvconfOptions = cfg.extraOptions
++ optional cfg.dnsSingleRequest "single-request"
- ++ optional cfg.dnsExtensionMechanism "edns0";
+ ++ optional cfg.dnsExtensionMechanism "edns0"
+ ++ optional cfg.useLocalResolver "trust-ad";
configText =
''
@@ -27,7 +28,7 @@ let
resolv_conf_options='${concatStringsSep " " resolvconfOptions}'
'' + optionalString cfg.useLocalResolver ''
# This hosts runs a full-blown DNS resolver.
- name_servers='127.0.0.1'
+ name_servers='127.0.0.1${optionalString config.networking.enableIPv6 " ::1"}'
'' + cfg.extraConfig;
in
@@ -49,7 +50,7 @@ in
type = types.bool;
default = !(config.environment.etc ? "resolv.conf");
defaultText = literalExpression ''!(config.environment.etc ? "resolv.conf")'';
- description = lib.mdDoc ''
+ description = ''
Whether DNS configuration is managed by resolvconf.
'';
};
@@ -58,7 +59,7 @@ in
type = types.package;
default = pkgs.openresolv;
defaultText = literalExpression "pkgs.openresolv";
- description = lib.mdDoc ''
+ description = ''
The package that provides the system-wide resolvconf command. Defaults to `openresolv`
if this module is enabled. Otherwise, can be used by other modules (for example {option}`services.resolved`) to
provide a compatibility layer.
@@ -70,7 +71,7 @@ in
dnsSingleRequest = lib.mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Recent versions of glibc will issue both ipv4 (A) and ipv6 (AAAA)
address queries at the same time, from the same port. Sometimes upstream
routers will systemically drop the ipv4 queries. The symptom of this problem is
@@ -83,7 +84,7 @@ in
dnsExtensionMechanism = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Enable the `edns0` option in {file}`resolv.conf`. With
that option set, `glibc` supports use of the extension mechanisms for
DNS (EDNS) specified in RFC 2671. The most popular user of that feature is DNSSEC,
@@ -95,7 +96,7 @@ in
type = types.lines;
default = "";
example = "libc=NO";
- description = lib.mdDoc ''
+ description = ''
Extra configuration to append to {file}`resolvconf.conf`.
'';
};
@@ -104,7 +105,7 @@ in
type = types.listOf types.str;
default = [];
example = [ "ndots:1" "rotate" ];
- description = lib.mdDoc ''
+ description = ''
Set the options in {file}`/etc/resolv.conf`.
'';
};
@@ -112,7 +113,7 @@ in
useLocalResolver = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Use local DNS server for resolving.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/config/shells-environment.nix b/third_party/nixpkgs/nixos/modules/config/shells-environment.nix
index a8476bd2aa..2c19fb8a02 100644
--- a/third_party/nixpkgs/nixos/modules/config/shells-environment.nix
+++ b/third_party/nixpkgs/nixos/modules/config/shells-environment.nix
@@ -35,20 +35,20 @@ in
environment.variables = mkOption {
default = {};
example = { EDITOR = "nvim"; VISUAL = "nvim"; };
- description = lib.mdDoc ''
+ description = ''
A set of environment variables used in the global environment.
These variables will be set on shell initialisation (e.g. in /etc/profile).
The value of each variable can be either a string or a list of
strings. The latter is concatenated, interspersed with colon
characters.
'';
- type = with types; attrsOf (oneOf [ (listOf str) str path ]);
- apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v else "${v}");
+ type = with types; attrsOf (oneOf [ (listOf (oneOf [ float int str ])) float int str path ]);
+ apply = mapAttrs (n: v: if isList v then concatMapStringsSep ":" toString v else toString v);
};
environment.profiles = mkOption {
default = [];
- description = lib.mdDoc ''
+ description = ''
A list of profiles used to setup the global environment.
'';
type = types.listOf types.str;
@@ -57,7 +57,7 @@ in
environment.profileRelativeEnvVars = mkOption {
type = types.attrsOf (types.listOf types.str);
example = { PATH = [ "/bin" ]; MANPATH = [ "/man" "/share/man" ]; };
- description = lib.mdDoc ''
+ description = ''
Attribute set of environment variable. Each attribute maps to a list
of relative paths. Each relative path is appended to the each profile
of {option}`environment.profiles` to form the content of the
@@ -68,7 +68,7 @@ in
# !!! isn't there a better way?
environment.extraInit = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell script code called during global environment initialisation
after all variables and profileVariables have been set.
This code is assumed to be shell-independent, which means you should
@@ -79,7 +79,7 @@ in
environment.shellInit = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell script code called during shell initialisation.
This code is assumed to be shell-independent, which means you should
stick to pure sh without sh word split.
@@ -89,7 +89,7 @@ in
environment.loginShellInit = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell script code called during login shell initialisation.
This code is assumed to be shell-independent, which means you should
stick to pure sh without sh word split.
@@ -99,7 +99,7 @@ in
environment.interactiveShellInit = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell script code called during interactive shell initialisation.
This code is assumed to be shell-independent, which means you should
stick to pure sh without sh word split.
@@ -109,7 +109,7 @@ in
environment.shellAliases = mkOption {
example = { l = null; ll = "ls -l"; };
- description = lib.mdDoc ''
+ description = ''
An attribute set that maps aliases (the top level attribute names in
this option) to command strings or directly to build outputs. The
aliases are added to all users' shells.
@@ -119,7 +119,7 @@ in
};
environment.homeBinInPath = mkOption {
- description = lib.mdDoc ''
+ description = ''
Include ~/bin/ in $PATH.
'';
default = false;
@@ -127,7 +127,7 @@ in
};
environment.localBinInPath = mkOption {
- description = lib.mdDoc ''
+ description = ''
Add ~/.local/bin/ to $PATH
'';
default = false;
@@ -140,7 +140,7 @@ in
example = literalExpression ''"''${pkgs.dash}/bin/dash"'';
type = types.path;
visible = false;
- description = lib.mdDoc ''
+ description = ''
The shell executable that is linked system-wide to
`/bin/sh`. Please note that NixOS assumes all
over the place that shell to be Bash, so override the default
@@ -151,7 +151,7 @@ in
environment.shells = mkOption {
default = [];
example = literalExpression "[ pkgs.bashInteractive pkgs.zsh ]";
- description = lib.mdDoc ''
+ description = ''
A list of permissible login shells for user accounts.
No need to mention `/bin/sh`
here, it is placed into this list implicitly.
diff --git a/third_party/nixpkgs/nixos/modules/config/stevenblack.nix b/third_party/nixpkgs/nixos/modules/config/stevenblack.nix
index 7e62351698..5b85073c69 100644
--- a/third_party/nixpkgs/nixos/modules/config/stevenblack.nix
+++ b/third_party/nixpkgs/nixos/modules/config/stevenblack.nix
@@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
let
- inherit (lib) optionals mkOption mkEnableOption types mkIf elem concatStringsSep maintainers mdDoc;
+ inherit (lib) optionals mkOption mkEnableOption types mkIf elem concatStringsSep maintainers;
cfg = config.networking.stevenblack;
# needs to be in a specific order
@@ -15,12 +15,12 @@ let
in
{
options.networking.stevenblack = {
- enable = mkEnableOption (mdDoc "the stevenblack hosts file blocklist");
+ enable = mkEnableOption "the stevenblack hosts file blocklist";
block = mkOption {
type = types.listOf (types.enum [ "fakenews" "gambling" "porn" "social" ]);
default = [ ];
- description = mdDoc "Additional blocklist extensions.";
+ description = "Additional blocklist extensions.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/config/stub-ld.nix b/third_party/nixpkgs/nixos/modules/config/stub-ld.nix
index 14c07466d0..87b7bdf07a 100644
--- a/third_party/nixpkgs/nixos/modules/config/stub-ld.nix
+++ b/third_party/nixpkgs/nixos/modules/config/stub-ld.nix
@@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
let
- inherit (lib) optionalString mkOption types mdDoc mkIf mkDefault;
+ inherit (lib) optionalString mkOption types mkIf mkDefault;
cfg = config.environment.stub-ld;
@@ -38,7 +38,7 @@ in {
type = types.bool;
default = true;
example = false;
- description = mdDoc ''
+ description = ''
Install a stub ELF loader to print an informative error message
in the event that a user attempts to run an ELF binary not
compiled for NixOS.
diff --git a/third_party/nixpkgs/nixos/modules/config/swap.nix b/third_party/nixpkgs/nixos/modules/config/swap.nix
index 21046d6f16..a606ebd767 100644
--- a/third_party/nixpkgs/nixos/modules/config/swap.nix
+++ b/third_party/nixpkgs/nixos/modules/config/swap.nix
@@ -14,7 +14,7 @@ let
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Encrypt swap device with a random key. This way you won't have a persistent swap device.
WARNING: Don't try to hibernate when you have at least one swap partition with
@@ -31,7 +31,7 @@ let
default = "aes-xts-plain64";
example = "serpent-xts-plain64";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Use specified cipher for randomEncryption.
Hint: Run "cryptsetup benchmark" to see which one is fastest on your machine.
@@ -42,7 +42,7 @@ let
default = null;
example = "512";
type = types.nullOr types.int;
- description = lib.mdDoc ''
+ description = ''
Set the encryption key size for the plain device.
If not specified, the amount of data to read from `source` will be
@@ -56,7 +56,7 @@ let
default = null;
example = "4096";
type = types.nullOr types.int;
- description = lib.mdDoc ''
+ description = ''
Set the sector size for the plain encrypted device type.
If not specified, the default sector size is determined from the
@@ -70,7 +70,7 @@ let
default = "/dev/urandom";
example = "/dev/random";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Define the source of randomness to obtain a random key for encryption.
'';
};
@@ -78,7 +78,7 @@ let
allowDiscards = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to allow TRIM requests to the underlying device. This option
has security implications; please read the LUKS documentation before
activating it.
@@ -95,13 +95,13 @@ let
device = mkOption {
example = "/dev/sda3";
type = types.nonEmptyStr;
- description = lib.mdDoc "Path of the device or swap file.";
+ description = "Path of the device or swap file.";
};
label = mkOption {
example = "swap";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Label of the device. Can be used instead of {var}`device`.
'';
};
@@ -110,7 +110,7 @@ let
default = null;
example = 2048;
type = types.nullOr types.int;
- description = lib.mdDoc ''
+ description = ''
If this option is set, ‘device’ is interpreted as the
path of a swapfile that will be created automatically
with the indicated size (in megabytes).
@@ -121,7 +121,7 @@ let
default = null;
example = 2048;
type = types.nullOr types.int;
- description = lib.mdDoc ''
+ description = ''
Specify the priority of the swap device. Priority is a value between 0 and 32767.
Higher numbers indicate higher priority.
null lets the kernel choose a priority, which will show up as a negative value.
@@ -136,7 +136,7 @@ let
source = "/dev/random";
};
type = types.coercedTo types.bool randomEncryptionCoerce (types.submodule randomEncryptionOpts);
- description = lib.mdDoc ''
+ description = ''
Encrypt swap device with a random key. This way you won't have a persistent swap device.
HINT: run "cryptsetup benchmark" to test cipher performance on your machine.
@@ -155,7 +155,7 @@ let
default = null;
example = "once";
type = types.nullOr (types.enum ["once" "pages" "both" ]);
- description = lib.mdDoc ''
+ description = ''
Specify the discard policy for the swap device. If "once", then the
whole swap space is discarded at swapon invocation. If "pages",
asynchronous discard on freed pages is performed, before returning to
@@ -168,7 +168,7 @@ let
default = [ "defaults" ];
example = [ "nofail" ];
type = types.listOf types.nonEmptyStr;
- description = lib.mdDoc ''
+ description = ''
Options used to mount the swap.
'';
};
@@ -209,7 +209,7 @@ in
{ device = "/var/swapfile"; }
{ label = "bigswap"; }
];
- description = lib.mdDoc ''
+ description = ''
The swap devices and swap files. These must have been
initialised using {command}`mkswap`. Each element
should be an attribute set specifying either the path of the
diff --git a/third_party/nixpkgs/nixos/modules/config/sysctl.nix b/third_party/nixpkgs/nixos/modules/config/sysctl.nix
index bedba984a3..34028ce82d 100644
--- a/third_party/nixpkgs/nixos/modules/config/sysctl.nix
+++ b/third_party/nixpkgs/nixos/modules/config/sysctl.nix
@@ -35,13 +35,13 @@ in
"net.core.rmem_max" = mkOption {
type = types.nullOr highestValueType;
default = null;
- description = lib.mdDoc "The maximum receive socket buffer size in bytes. In case of conflicting values, the highest will be used.";
+ description = "The maximum receive socket buffer size in bytes. In case of conflicting values, the highest will be used.";
};
"net.core.wmem_max" = mkOption {
type = types.nullOr highestValueType;
default = null;
- description = lib.mdDoc "The maximum send socket buffer size in bytes. In case of conflicting values, the highest will be used.";
+ description = "The maximum send socket buffer size in bytes. In case of conflicting values, the highest will be used.";
};
};
};
@@ -49,7 +49,7 @@ in
example = literalExpression ''
{ "net.ipv4.tcp_syncookies" = false; "vm.swappiness" = 60; }
'';
- description = lib.mdDoc ''
+ description = ''
Runtime parameters of the Linux kernel, as set by
{manpage}`sysctl(8)`. Note that sysctl
parameters names must be enclosed in quotes
diff --git a/third_party/nixpkgs/nixos/modules/config/system-environment.nix b/third_party/nixpkgs/nixos/modules/config/system-environment.nix
index 3993041852..3fd4ac730a 100644
--- a/third_party/nixpkgs/nixos/modules/config/system-environment.nix
+++ b/third_party/nixpkgs/nixos/modules/config/system-environment.nix
@@ -16,7 +16,7 @@ in
environment.sessionVariables = mkOption {
default = {};
- description = lib.mdDoc ''
+ description = ''
A set of environment variables used in the global environment.
These variables will be set by PAM early in the login process.
@@ -38,7 +38,7 @@ in
environment.profileRelativeSessionVariables = mkOption {
type = types.attrsOf (types.listOf types.str);
example = { PATH = [ "/bin" ]; MANPATH = [ "/man" "/share/man" ]; };
- description = lib.mdDoc ''
+ description = ''
Attribute set of environment variable used in the global
environment. These variables will be set by PAM early in the
login process.
diff --git a/third_party/nixpkgs/nixos/modules/config/system-path.nix b/third_party/nixpkgs/nixos/modules/config/system-path.nix
index 71274ea899..562100ad62 100644
--- a/third_party/nixpkgs/nixos/modules/config/system-path.nix
+++ b/third_party/nixpkgs/nixos/modules/config/system-path.nix
@@ -63,7 +63,7 @@ in
type = types.listOf types.package;
default = [];
example = literalExpression "[ pkgs.firefox pkgs.thunderbird ]";
- description = lib.mdDoc ''
+ description = ''
The set of packages that appear in
/run/current-system/sw. These packages are
automatically available to all users, and are
@@ -84,7 +84,7 @@ in
${defaultPackagesText}
'';
example = [];
- description = lib.mdDoc ''
+ description = ''
Set of default packages that aren't strictly necessary
for a running system, entries can be removed for a more
minimal NixOS installation.
@@ -103,14 +103,14 @@ in
# to work.
default = [];
example = ["/"];
- description = lib.mdDoc "List of directories to be symlinked in {file}`/run/current-system/sw`.";
+ description = "List of directories to be symlinked in {file}`/run/current-system/sw`.";
};
extraOutputsToInstall = mkOption {
type = types.listOf types.str;
default = [ ];
example = [ "dev" "info" ];
- description = lib.mdDoc ''
+ description = ''
Entries listed here will be appended to the `meta.outputsToInstall` attribute for each package in `environment.systemPackages`, and the files from the corresponding derivation outputs symlinked into {file}`/run/current-system/sw`.
For example, this can be used to install the `dev` and `info` outputs for all packages in the system environment, if they are available.
@@ -122,7 +122,7 @@ in
extraSetup = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Shell fragments to be run after the system environment has been created. This should only be used for things that need to modify the internals of the environment, e.g. generating MIME caches. The environment being built can be accessed at $out.";
+ description = "Shell fragments to be run after the system environment has been created. This should only be used for things that need to modify the internals of the environment, e.g. generating MIME caches. The environment being built can be accessed at $out.";
};
};
@@ -131,7 +131,7 @@ in
path = mkOption {
internal = true;
- description = lib.mdDoc ''
+ description = ''
The packages you want in the boot environment.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/config/terminfo.nix b/third_party/nixpkgs/nixos/modules/config/terminfo.nix
index ebd1aaea8f..4b58605aa7 100644
--- a/third_party/nixpkgs/nixos/modules/config/terminfo.nix
+++ b/third_party/nixpkgs/nixos/modules/config/terminfo.nix
@@ -10,7 +10,7 @@ with lib;
environment.enableAllTerminfo = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to install all terminfo outputs
'';
};
@@ -18,7 +18,7 @@ with lib;
security.sudo.keepTerminfo = mkOption {
default = true;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to preserve the `TERMINFO` and `TERMINFO_DIRS`
environment variables, for `root` and the `wheel` group.
'';
diff --git a/third_party/nixpkgs/nixos/modules/config/unix-odbc-drivers.nix b/third_party/nixpkgs/nixos/modules/config/unix-odbc-drivers.nix
index 7bd3fa1600..28cf7e84b7 100644
--- a/third_party/nixpkgs/nixos/modules/config/unix-odbc-drivers.nix
+++ b/third_party/nixpkgs/nixos/modules/config/unix-odbc-drivers.nix
@@ -20,7 +20,7 @@ in {
type = types.listOf types.package;
default = [];
example = literalExpression "with pkgs.unixODBCDrivers; [ sqlite psql ]";
- description = lib.mdDoc ''
+ description = ''
Specifies Unix ODBC drivers to be registered in
{file}`/etc/odbcinst.ini`. You may also want to
add `pkgs.unixODBC` to the system path to get
diff --git a/third_party/nixpkgs/nixos/modules/config/users-groups.nix b/third_party/nixpkgs/nixos/modules/config/users-groups.nix
index dd34771c0b..3ef8993fa6 100644
--- a/third_party/nixpkgs/nixos/modules/config/users-groups.nix
+++ b/third_party/nixpkgs/nixos/modules/config/users-groups.nix
@@ -56,7 +56,7 @@ let
name = mkOption {
type = types.passwdEntry types.str;
apply = x: assert (builtins.stringLength x < 32 || abort "Username '${x}' is longer than 31 characters which is not allowed!"); x;
- description = lib.mdDoc ''
+ description = ''
The name of the user account. If undefined, the name of the
attribute set will be used.
'';
@@ -66,7 +66,7 @@ let
type = types.passwdEntry types.str;
default = "";
example = "Alice Q. User";
- description = lib.mdDoc ''
+ description = ''
A short description of the user account, typically the
user's full name. This is actually the “GECOS” or “comment”
field in {file}`/etc/passwd`.
@@ -76,7 +76,7 @@ let
uid = mkOption {
type = with types; nullOr int;
default = null;
- description = lib.mdDoc ''
+ description = ''
The account UID. If the UID is null, a free UID is picked on
activation.
'';
@@ -85,7 +85,7 @@ let
isSystemUser = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Indicates if the user is a system user or not. This option
only has an effect if {option}`uid` is
{option}`null`, in which case it determines whether
@@ -100,7 +100,7 @@ let
isNormalUser = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Indicates whether this is an account for a “real” user.
This automatically sets {option}`group` to `users`,
{option}`createHome` to `true`,
@@ -115,31 +115,31 @@ let
type = types.str;
apply = x: assert (builtins.stringLength x < 32 || abort "Group name '${x}' is longer than 31 characters which is not allowed!"); x;
default = "";
- description = lib.mdDoc "The user's primary group.";
+ description = "The user's primary group.";
};
extraGroups = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "The user's auxiliary groups.";
+ description = "The user's auxiliary groups.";
};
home = mkOption {
type = types.passwdEntry types.path;
default = "/var/empty";
- description = lib.mdDoc "The user's home directory.";
+ description = "The user's home directory.";
};
homeMode = mkOption {
type = types.strMatching "[0-7]{1,5}";
default = "700";
- description = lib.mdDoc "The user's home directory mode in numeric format. See chmod(1). The mode is only applied if {option}`users.users..createHome` is true.";
+ description = "The user's home directory mode in numeric format. See chmod(1). The mode is only applied if {option}`users.users..createHome` is true.";
};
cryptHomeLuks = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to encrypted luks device that contains
the user's home directory.
'';
@@ -148,7 +148,7 @@ let
pamMount = mkOption {
type = with types; attrsOf str;
default = {};
- description = lib.mdDoc ''
+ description = ''
Attributes for user's entry in
{file}`pam_mount.conf.xml`.
Useful attributes might include `path`,
@@ -163,7 +163,7 @@ let
default = pkgs.shadow;
defaultText = literalExpression "pkgs.shadow";
example = literalExpression "pkgs.bashInteractive";
- description = lib.mdDoc ''
+ description = ''
The path to the user's shell. Can use shell derivations,
like `pkgs.bashInteractive`. Don’t
forget to enable your shell in
@@ -175,7 +175,7 @@ let
ignoreShellProgramCheck = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
By default, nixos will check that programs.SHELL.enable is set to
true if the user has a custom shell specified. If that behavior isn't
required and there are custom overrides in place to make sure that the
@@ -190,7 +190,7 @@ let
{ startUid = 1000; count = 1; }
{ startUid = 100001; count = 65534; }
];
- description = lib.mdDoc ''
+ description = ''
Subordinate user ids that user is allowed to use.
They are set into {file}`/etc/subuid` and are used
by `newuidmap` for user namespaces.
@@ -204,7 +204,7 @@ let
{ startGid = 100; count = 1; }
{ startGid = 1001; count = 999; }
];
- description = lib.mdDoc ''
+ description = ''
Subordinate group ids that user is allowed to use.
They are set into {file}`/etc/subgid` and are used
by `newgidmap` for user namespaces.
@@ -215,7 +215,7 @@ let
type = types.bool;
default = false;
example = true;
- description = lib.mdDoc ''
+ description = ''
Automatically allocate subordinate user and group ids for this user.
Allocated range is currently always of size 65536.
'';
@@ -224,7 +224,7 @@ let
createHome = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to create the home directory and ensure ownership as well as
permissions to match the user.
'';
@@ -233,7 +233,7 @@ let
useDefaultShell = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If true, the user's shell will be set to
{option}`users.defaultUserShell`.
'';
@@ -242,7 +242,7 @@ let
hashedPassword = mkOption {
type = with types; nullOr (passwdEntry str);
default = null;
- description = lib.mdDoc ''
+ description = ''
Specifies the hashed password for the user.
${passwordDescription}
${hashedPasswordDescription}
@@ -252,7 +252,7 @@ let
password = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Specifies the (clear text) password for the user.
Warning: do not set confidential information here
because it is world-readable in the Nix store. This option
@@ -265,7 +265,7 @@ let
type = with types; nullOr str;
default = cfg.users.${name}.passwordFile;
defaultText = literalExpression "null";
- description = lib.mdDoc ''
+ description = ''
The full path to a file that contains the hash of the user's
password. The password file is read on each system activation. The
file should contain exactly one line, which should be the password in
@@ -278,13 +278,13 @@ let
type = with types; nullOr str;
default = null;
visible = false;
- description = lib.mdDoc "Deprecated alias of hashedPasswordFile";
+ description = "Deprecated alias of hashedPasswordFile";
};
initialHashedPassword = mkOption {
type = with types; nullOr (passwdEntry str);
default = null;
- description = lib.mdDoc ''
+ description = ''
Specifies the initial hashed password for the user, i.e. the
hashed password assigned if the user does not already
exist. If {option}`users.mutableUsers` is true, the
@@ -302,7 +302,7 @@ let
initialPassword = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Specifies the initial password for the user, i.e. the
password assigned if the user does not already exist. If
{option}`users.mutableUsers` is true, the password
@@ -323,7 +323,7 @@ let
type = types.listOf types.package;
default = [];
example = literalExpression "[ pkgs.firefox pkgs.thunderbird ]";
- description = lib.mdDoc ''
+ description = ''
The set of packages that should be made available to the user.
This is in contrast to {option}`environment.systemPackages`,
which adds packages to all users.
@@ -333,7 +333,7 @@ let
expires = mkOption {
type = types.nullOr (types.strMatching "[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}");
default = null;
- description = lib.mdDoc ''
+ description = ''
Set the date on which the user's account will no longer be
accessible. The date is expressed in the format YYYY-MM-DD, or null
to disable the expiry.
@@ -345,7 +345,7 @@ let
linger = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable lingering for this user. If true, systemd user
units will start at boot, rather than starting at login and stopping
at logout. This is the declarative equivalent of running
@@ -390,7 +390,7 @@ let
name = mkOption {
type = types.passwdEntry types.str;
- description = lib.mdDoc ''
+ description = ''
The name of the group. If undefined, the name of the attribute set
will be used.
'';
@@ -399,7 +399,7 @@ let
gid = mkOption {
type = with types; nullOr int;
default = null;
- description = lib.mdDoc ''
+ description = ''
The group GID. If the GID is null, a free GID is picked on
activation.
'';
@@ -408,7 +408,7 @@ let
members = mkOption {
type = with types; listOf (passwdEntry str);
default = [];
- description = lib.mdDoc ''
+ description = ''
The user names of the group members, added to the
`/etc/group` file.
'';
@@ -430,7 +430,7 @@ let
options = {
startUid = mkOption {
type = types.int;
- description = lib.mdDoc ''
+ description = ''
Start of the range of subordinate user ids that user is
allowed to use.
'';
@@ -438,7 +438,7 @@ let
count = mkOption {
type = types.int;
default = 1;
- description = lib.mdDoc "Count of subordinate user ids";
+ description = "Count of subordinate user ids";
};
};
};
@@ -447,7 +447,7 @@ let
options = {
startGid = mkOption {
type = types.int;
- description = lib.mdDoc ''
+ description = ''
Start of the range of subordinate group ids that user is
allowed to use.
'';
@@ -455,7 +455,7 @@ let
count = mkOption {
type = types.int;
default = 1;
- description = lib.mdDoc "Count of subordinate group ids";
+ description = "Count of subordinate group ids";
};
};
};
@@ -496,6 +496,7 @@ let
in
filter types.shellPackage.check shells;
+ lingeringUsers = map (u: u.name) (attrValues (flip filterAttrs cfg.users (n: u: u.linger)));
in {
imports = [
(mkAliasOptionModuleMD [ "users" "extraUsers" ] [ "users" "users" ])
@@ -509,7 +510,7 @@ in {
users.mutableUsers = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
If set to `true`, you are free to add new users and groups to the system
with the ordinary `useradd` and
`groupadd` commands. On system activation, the
@@ -534,7 +535,7 @@ in {
users.enforceIdUniqueness = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to require that no two users/groups share the same uid/gid.
'';
};
@@ -553,7 +554,7 @@ in {
shell = "/bin/sh";
};
};
- description = lib.mdDoc ''
+ description = ''
Additional user accounts to be created automatically by the system.
This can also be used to set options for root.
'';
@@ -566,7 +567,7 @@ in {
hackers = { };
};
type = with types; attrsOf (submodule groupOpts);
- description = lib.mdDoc ''
+ description = ''
Additional groups to be created automatically by the system.
'';
};
@@ -575,7 +576,7 @@ in {
users.allowNoPasswordLogin = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Disable checking that at least the `root` user or a user in the `wheel` group can log in using
a password or an SSH key.
@@ -695,19 +696,31 @@ in {
'';
} else ""; # keep around for backwards compatibility
- system.activationScripts.update-lingering = let
- lingerDir = "/var/lib/systemd/linger";
- lingeringUsers = map (u: u.name) (attrValues (flip filterAttrs cfg.users (n: u: u.linger)));
- lingeringUsersFile = builtins.toFile "lingering-users"
- (concatStrings (map (s: "${s}\n")
- (sort (a: b: a < b) lingeringUsers))); # this sorting is important for `comm` to work correctly
- in stringAfter [ "users" ] ''
- if [ -e ${lingerDir} ] ; then
+ systemd.services.linger-users = lib.mkIf ((builtins.length lingeringUsers) > 0) {
+ wantedBy = ["multi-user.target"];
+ after = ["systemd-logind.service"];
+ requires = ["systemd-logind.service"];
+
+ script = let
+ lingerDir = "/var/lib/systemd/linger";
+ lingeringUsersFile = builtins.toFile "lingering-users"
+ (concatStrings (map (s: "${s}\n")
+ (sort (a: b: a < b) lingeringUsers))); # this sorting is important for `comm` to work correctly
+ in ''
+ mkdir -vp ${lingerDir}
cd ${lingerDir}
- ls ${lingerDir} | sort | comm -3 -1 ${lingeringUsersFile} - | xargs -r ${pkgs.systemd}/bin/loginctl disable-linger
- ls ${lingerDir} | sort | comm -3 -2 ${lingeringUsersFile} - | xargs -r ${pkgs.systemd}/bin/loginctl enable-linger
- fi
- '';
+ for user in $(ls); do
+ if ! id "$user" >/dev/null; then
+ echo "Removing linger for missing user $user"
+ rm --force -- "$user"
+ fi
+ done
+ ls | sort | comm -3 -1 ${lingeringUsersFile} - | xargs -r ${pkgs.systemd}/bin/loginctl disable-linger
+ ls | sort | comm -3 -2 ${lingeringUsersFile} - | xargs -r ${pkgs.systemd}/bin/loginctl enable-linger
+ '';
+
+ serviceConfig.Type = "oneshot";
+ };
# Warn about user accounts with deprecated password hashing schemes
# This does not work when the users and groups are created by
@@ -858,7 +871,6 @@ in {
}
{
assertion = let
- xor = a: b: a && !b || b && !a;
isEffectivelySystemUser = user.isSystemUser || (user.uid != null && user.uid < 1000);
in xor isEffectivelySystemUser user.isNormalUser;
message = ''
diff --git a/third_party/nixpkgs/nixos/modules/config/vte.nix b/third_party/nixpkgs/nixos/modules/config/vte.nix
index 48f8524656..e0b48c3fb4 100644
--- a/third_party/nixpkgs/nixos/modules/config/vte.nix
+++ b/third_party/nixpkgs/nixos/modules/config/vte.nix
@@ -23,7 +23,7 @@ in
programs.bash.vteIntegration = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Bash integration for VTE terminals.
This allows it to preserve the current directory of the shell
across terminals.
@@ -33,7 +33,7 @@ in
programs.zsh.vteIntegration = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Zsh integration for VTE terminals.
This allows it to preserve the current directory of the shell
across terminals.
diff --git a/third_party/nixpkgs/nixos/modules/config/xdg/autostart.nix b/third_party/nixpkgs/nixos/modules/config/xdg/autostart.nix
index a4fdbda911..acdb7cd3ad 100644
--- a/third_party/nixpkgs/nixos/modules/config/xdg/autostart.nix
+++ b/third_party/nixpkgs/nixos/modules/config/xdg/autostart.nix
@@ -10,7 +10,7 @@ with lib;
xdg.autostart.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to install files to support the
[XDG Autostart specification](https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html).
'';
diff --git a/third_party/nixpkgs/nixos/modules/config/xdg/icons.nix b/third_party/nixpkgs/nixos/modules/config/xdg/icons.nix
index 8d44a43144..3f198101d3 100644
--- a/third_party/nixpkgs/nixos/modules/config/xdg/icons.nix
+++ b/third_party/nixpkgs/nixos/modules/config/xdg/icons.nix
@@ -10,7 +10,7 @@ with lib;
xdg.icons.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to install files to support the
[XDG Icon Theme specification](https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html).
'';
diff --git a/third_party/nixpkgs/nixos/modules/config/xdg/menus.nix b/third_party/nixpkgs/nixos/modules/config/xdg/menus.nix
index b8f829e815..8510c2db65 100644
--- a/third_party/nixpkgs/nixos/modules/config/xdg/menus.nix
+++ b/third_party/nixpkgs/nixos/modules/config/xdg/menus.nix
@@ -10,7 +10,7 @@ with lib;
xdg.menus.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to install files to support the
[XDG Desktop Menu specification](https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html).
'';
diff --git a/third_party/nixpkgs/nixos/modules/config/xdg/mime.nix b/third_party/nixpkgs/nixos/modules/config/xdg/mime.nix
index 3aa8630832..2cd88be5b0 100644
--- a/third_party/nixpkgs/nixos/modules/config/xdg/mime.nix
+++ b/third_party/nixpkgs/nixos/modules/config/xdg/mime.nix
@@ -18,7 +18,7 @@ in
xdg.mime.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to install files to support the
[XDG Shared MIME-info specification](https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html) and the
[XDG MIME Applications specification](https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html).
@@ -32,7 +32,7 @@ in
"application/pdf" = "firefox.desktop";
"text/xml" = [ "nvim.desktop" "codium.desktop" ];
};
- description = lib.mdDoc ''
+ description = ''
Adds associations between mimetypes and applications. See the
[
specifications](https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html#associations) for more information.
@@ -46,7 +46,7 @@ in
"application/pdf" = "firefox.desktop";
"image/png" = [ "sxiv.desktop" "gimp.desktop" ];
};
- description = lib.mdDoc ''
+ description = ''
Sets the default applications for given mimetypes. See the
[
specifications](https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html#default) for more information.
@@ -60,7 +60,7 @@ in
"audio/mp3" = [ "mpv.desktop" "umpv.desktop" ];
"inode/directory" = "codium.desktop";
};
- description = lib.mdDoc ''
+ description = ''
Removes associations between mimetypes and applications. See the
[
specifications](https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html#associations) for more information.
diff --git a/third_party/nixpkgs/nixos/modules/config/xdg/portal.nix b/third_party/nixpkgs/nixos/modules/config/xdg/portal.nix
index 5aa23377f9..2c4d07c495 100644
--- a/third_party/nixpkgs/nixos/modules/config/xdg/portal.nix
+++ b/third_party/nixpkgs/nixos/modules/config/xdg/portal.nix
@@ -37,14 +37,14 @@ in
options.xdg.portal = {
enable =
- mkEnableOption (lib.mdDoc ''[xdg desktop integration](https://github.com/flatpak/xdg-desktop-portal)'') // {
+ mkEnableOption ''[xdg desktop integration](https://github.com/flatpak/xdg-desktop-portal)'' // {
default = false;
};
extraPortals = mkOption {
type = types.listOf types.package;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
List of additional portals to add to path. Portals allow interaction
with system, like choosing files or taking screenshots. At minimum,
a desktop portal implementation should be listed. GNOME and KDE already
@@ -58,7 +58,7 @@ in
type = types.bool;
visible = false;
default = false;
- description = lib.mdDoc ''
+ description = ''
Sets environment variable `GTK_USE_PORTAL` to `1`.
This will force GTK-based programs ran outside Flatpak to respect and use XDG Desktop Portals
for features like file chooser but it is an unsupported hack that can easily break things.
@@ -69,7 +69,7 @@ in
xdgOpenUsePortal = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Sets environment variable `NIXOS_XDG_OPEN_USE_PORTAL` to `1`
This will make `xdg-open` use the portal to open programs, which resolves bugs involving
programs opening inside FHS envs or with unexpected env vars set from wrappers.
@@ -92,7 +92,7 @@ in
default = [ "gtk" ];
};
};
- description = lib.mdDoc ''
+ description = ''
Sets which portal backend should be used to provide the implementation
for the requested interface. For details check {manpage}`portals.conf(5)`.
@@ -106,7 +106,7 @@ in
type = types.listOf types.package;
default = [ ];
example = lib.literalExpression "[ pkgs.gnome.gnome-session ]";
- description = lib.mdDoc ''
+ description = ''
List of packages that provide XDG desktop portal configuration, usually in
the form of `share/xdg-desktop-portal/$desktop-portals.conf`.
diff --git a/third_party/nixpkgs/nixos/modules/config/xdg/portals/lxqt.nix b/third_party/nixpkgs/nixos/modules/config/xdg/portals/lxqt.nix
index 18fcf3d81c..23a1622308 100644
--- a/third_party/nixpkgs/nixos/modules/config/xdg/portals/lxqt.nix
+++ b/third_party/nixpkgs/nixos/modules/config/xdg/portals/lxqt.nix
@@ -12,13 +12,13 @@ in
};
options.xdg.portal.lxqt = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
the desktop portal for the LXQt desktop environment.
This will add the `lxqt.xdg-desktop-portal-lxqt`
package (with the extra Qt styles) into the
{option}`xdg.portal.extraPortals` option
- '');
+ '';
styles = mkOption {
type = types.listOf types.package;
@@ -29,7 +29,7 @@ in
pkgs.qtcurve
];
'';
- description = lib.mdDoc ''
+ description = ''
Extra Qt styles that will be available to the
`lxqt.xdg-desktop-portal-lxqt`.
'';
diff --git a/third_party/nixpkgs/nixos/modules/config/xdg/portals/wlr.nix b/third_party/nixpkgs/nixos/modules/config/xdg/portals/wlr.nix
index d84ae794e3..954830eff2 100644
--- a/third_party/nixpkgs/nixos/modules/config/xdg/portals/wlr.nix
+++ b/third_party/nixpkgs/nixos/modules/config/xdg/portals/wlr.nix
@@ -14,16 +14,16 @@ in
};
options.xdg.portal.wlr = {
- enable = mkEnableOption (lib.mdDoc ''
- desktop portal for wlroots-based desktops
+ enable = mkEnableOption ''
+ desktop portal for wlroots-based desktops.
This will add the `xdg-desktop-portal-wlr` package into
the {option}`xdg.portal.extraPortals` option, and provide the
configuration file
- '');
+ '';
settings = mkOption {
- description = lib.mdDoc ''
+ description = ''
Configuration for `xdg-desktop-portal-wlr`.
See `xdg-desktop-portal-wlr(5)` for supported
diff --git a/third_party/nixpkgs/nixos/modules/config/xdg/sounds.nix b/third_party/nixpkgs/nixos/modules/config/xdg/sounds.nix
index 713d68131f..0aae77fe01 100644
--- a/third_party/nixpkgs/nixos/modules/config/xdg/sounds.nix
+++ b/third_party/nixpkgs/nixos/modules/config/xdg/sounds.nix
@@ -10,7 +10,7 @@ with lib;
xdg.sounds.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to install files to support the
[XDG Sound Theme specification](https://www.freedesktop.org/wiki/Specifications/sound-theme-spec/).
'';
diff --git a/third_party/nixpkgs/nixos/modules/config/zram.nix b/third_party/nixpkgs/nixos/modules/config/zram.nix
index ec8b4ed6e9..1846ac51ee 100644
--- a/third_party/nixpkgs/nixos/modules/config/zram.nix
+++ b/third_party/nixpkgs/nixos/modules/config/zram.nix
@@ -22,7 +22,7 @@ in
enable = lib.mkOption {
default = false;
type = lib.types.bool;
- description = lib.mdDoc ''
+ description = ''
Enable in-memory compressed devices and swap space provided by the zram
kernel module.
See [
@@ -34,7 +34,7 @@ in
swapDevices = lib.mkOption {
default = 1;
type = lib.types.int;
- description = lib.mdDoc ''
+ description = ''
Number of zram devices to be used as swap, recommended is 1.
'';
};
@@ -42,7 +42,7 @@ in
memoryPercent = lib.mkOption {
default = 50;
type = lib.types.int;
- description = lib.mdDoc ''
+ description = ''
Maximum total amount of memory that can be stored in the zram swap devices
(as a percentage of your total memory). Defaults to 1/2 of your total
RAM. Run `zramctl` to check how good memory is compressed.
@@ -53,7 +53,7 @@ in
memoryMax = lib.mkOption {
default = null;
type = with lib.types; nullOr int;
- description = lib.mdDoc ''
+ description = ''
Maximum total amount of memory (in bytes) that can be stored in the zram
swap devices.
This doesn't define how much memory will be used by the zram swap devices.
@@ -63,7 +63,7 @@ in
priority = lib.mkOption {
default = 5;
type = lib.types.int;
- description = lib.mdDoc ''
+ description = ''
Priority of the zram swap devices. It should be a number higher than
the priority of your disk-based swap devices (so that the system will
fill the zram swap devices before falling back to disk swap).
@@ -73,8 +73,8 @@ in
algorithm = lib.mkOption {
default = "zstd";
example = "lz4";
- type = with lib.types; either (enum [ "lzo" "lz4" "zstd" ]) str;
- description = lib.mdDoc ''
+ type = with lib.types; either (enum [ "842" "lzo" "lzo-rle" "lz4" "lz4hc" "zstd" ]) str;
+ description = ''
Compression algorithm. `lzo` has good compression,
but is slow. `lz4` has bad compression, but is fast.
`zstd` is both good compression and fast, but requires newer kernel.
@@ -87,7 +87,7 @@ in
default = null;
example = "/dev/zvol/tarta-zoot/swap-writeback";
type = lib.types.nullOr lib.types.path;
- description = lib.mdDoc ''
+ description = ''
Write incompressible pages to this device,
as there's no gain from keeping them in RAM.
'';
diff --git a/third_party/nixpkgs/nixos/modules/hardware/acpilight.nix b/third_party/nixpkgs/nixos/modules/hardware/acpilight.nix
index d8d82b0e81..2de448a265 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/acpilight.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/acpilight.nix
@@ -10,7 +10,7 @@ in
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enable acpilight.
This will allow brightness control via xbacklight from users in the video group
'';
diff --git a/third_party/nixpkgs/nixos/modules/hardware/bladeRF.nix b/third_party/nixpkgs/nixos/modules/hardware/bladeRF.nix
index 52a1f52024..35b74b8382 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/bladeRF.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/bladeRF.nix
@@ -12,7 +12,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enables udev rules for BladeRF devices. By default grants access
to users in the "bladerf" group. You may want to install the
libbladeRF package.
diff --git a/third_party/nixpkgs/nixos/modules/hardware/brillo.nix b/third_party/nixpkgs/nixos/modules/hardware/brillo.nix
index 612061718f..8e36022a9a 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/brillo.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/brillo.nix
@@ -7,10 +7,10 @@ in
{
options = {
hardware.brillo = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
brillo in userspace.
This will allow brightness control from users in the video group
- '');
+ '';
};
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/ckb-next.nix b/third_party/nixpkgs/nixos/modules/hardware/ckb-next.nix
index 34f951a744..65e73833a7 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/ckb-next.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/ckb-next.nix
@@ -13,13 +13,13 @@ in
];
options.hardware.ckb-next = {
- enable = mkEnableOption (lib.mdDoc "the Corsair keyboard/mouse driver");
+ enable = mkEnableOption "the Corsair keyboard/mouse driver";
gid = mkOption {
type = types.nullOr types.int;
default = null;
example = 100;
- description = lib.mdDoc ''
+ description = ''
Limit access to the ckb daemon to a particular group.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/corectrl.nix b/third_party/nixpkgs/nixos/modules/hardware/corectrl.nix
index b1d3f2f0ce..9e8b69cf62 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/corectrl.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/corectrl.nix
@@ -7,24 +7,24 @@ let
in
{
options.programs.corectrl = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
CoreCtrl, a tool to overclock amd graphics cards and processors.
Add your user to the corectrl group to run corectrl without needing to enter your password
- '');
+ '';
package = mkPackageOption pkgs "corectrl" {
extraDescription = "Useful for overriding the configuration options used for the package.";
};
gpuOverclock = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
GPU overclocking
- '');
+ '';
ppfeaturemask = mkOption {
type = types.str;
default = "0xfffd7fff";
example = "0xffffffff";
- description = lib.mdDoc ''
+ description = ''
Sets the `amdgpu.ppfeaturemask` kernel option.
In particular, it is used here to set the overdrive bit.
Default is `0xfffd7fff` as it is less likely to cause flicker issues.
diff --git a/third_party/nixpkgs/nixos/modules/hardware/cpu/amd-microcode.nix b/third_party/nixpkgs/nixos/modules/hardware/cpu/amd-microcode.nix
index 3f52cb1fca..621c7066bf 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/cpu/amd-microcode.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/cpu/amd-microcode.nix
@@ -11,7 +11,7 @@ with lib;
hardware.cpu.amd.updateMicrocode = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Update the CPU microcode for AMD processors.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/cpu/amd-ryzen-smu.nix b/third_party/nixpkgs/nixos/modules/hardware/cpu/amd-ryzen-smu.nix
new file mode 100644
index 0000000000..b1a5895aaa
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/hardware/cpu/amd-ryzen-smu.nix
@@ -0,0 +1,26 @@
+{ config
+, lib
+, ...
+}:
+let
+ inherit (lib) mkEnableOption mkIf;
+ cfg = config.hardware.cpu.amd.ryzen-smu;
+ ryzen-smu = config.boot.kernelPackages.ryzen-smu;
+in
+{
+ options.hardware.cpu.amd.ryzen-smu = {
+ enable = mkEnableOption ''
+ ryzen_smu, a linux kernel driver that exposes access to the SMU (System Management Unit) for certain AMD Ryzen Processors.
+
+ WARNING: Damage cause by use of your AMD processor outside of official AMD specifications or outside of factory settings are not covered under any AMD product warranty and may not be covered by your board or system manufacturer's warranty
+ '';
+ };
+
+ config = mkIf cfg.enable {
+ boot.kernelModules = [ "ryzen-smu" ];
+ boot.extraModulePackages = [ ryzen-smu ];
+ environment.systemPackages = [ ryzen-smu ];
+ };
+
+ meta.maintainers = with lib.maintainers; [ Cryolitia phdyellow ];
+}
diff --git a/third_party/nixpkgs/nixos/modules/hardware/cpu/amd-sev.nix b/third_party/nixpkgs/nixos/modules/hardware/cpu/amd-sev.nix
index 08e1de4963..d6225bc35a 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/cpu/amd-sev.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/cpu/amd-sev.nix
@@ -5,19 +5,19 @@ let
cfgSevGuest = config.hardware.cpu.amd.sevGuest;
optionsFor = device: group: {
- enable = mkEnableOption (lib.mdDoc "access to the AMD ${device} device");
+ enable = mkEnableOption "access to the AMD ${device} device";
user = mkOption {
- description = lib.mdDoc "Owner to assign to the ${device} device.";
+ description = "Owner to assign to the ${device} device.";
type = types.str;
default = "root";
};
group = mkOption {
- description = lib.mdDoc "Group to assign to the ${device} device.";
+ description = "Group to assign to the ${device} device.";
type = types.str;
default = group;
};
mode = mkOption {
- description = lib.mdDoc "Mode to set for the ${device} device.";
+ description = "Mode to set for the ${device} device.";
type = types.str;
default = "0660";
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/cpu/intel-microcode.nix b/third_party/nixpkgs/nixos/modules/hardware/cpu/intel-microcode.nix
index d30ebfefee..acce565fd8 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/cpu/intel-microcode.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/cpu/intel-microcode.nix
@@ -11,7 +11,7 @@ with lib;
hardware.cpu.intel.updateMicrocode = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Update the CPU microcode for Intel processors.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/cpu/intel-sgx.nix b/third_party/nixpkgs/nixos/modules/hardware/cpu/intel-sgx.nix
index 38a484cb12..c66b43a2ec 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/cpu/intel-sgx.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/cpu/intel-sgx.nix
@@ -6,7 +6,7 @@ let
in
{
options.hardware.cpu.intel.sgx.enableDcapCompat = mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether to enable backward compatibility for SGX software build for the
out-of-tree Intel SGX DCAP driver.
@@ -20,19 +20,19 @@ in
};
options.hardware.cpu.intel.sgx.provision = {
- enable = mkEnableOption (lib.mdDoc "access to the Intel SGX provisioning device");
+ enable = mkEnableOption "access to the Intel SGX provisioning device";
user = mkOption {
- description = lib.mdDoc "Owner to assign to the SGX provisioning device.";
+ description = "Owner to assign to the SGX provisioning device.";
type = types.str;
default = "root";
};
group = mkOption {
- description = lib.mdDoc "Group to assign to the SGX provisioning device.";
+ description = "Group to assign to the SGX provisioning device.";
type = types.str;
default = defaultPrvGroup;
};
mode = mkOption {
- description = lib.mdDoc "Mode to set for the SGX provisioning device.";
+ description = "Mode to set for the SGX provisioning device.";
type = types.str;
default = "0660";
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/cpu/x86-msr.nix b/third_party/nixpkgs/nixos/modules/hardware/cpu/x86-msr.nix
index 554bec1b7d..95e1be23cd 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/cpu/x86-msr.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/cpu/x86-msr.nix
@@ -5,7 +5,7 @@
}:
let
inherit (builtins) hasAttr;
- inherit (lib) mkIf mdDoc;
+ inherit (lib) mkIf;
cfg = config.hardware.cpu.x86.msr;
opt = options.hardware.cpu.x86.msr;
defaultGroup = "msr";
@@ -28,24 +28,24 @@ let
in
{
options.hardware.cpu.x86.msr = with lib.options; with lib.types; {
- enable = mkEnableOption (mdDoc "the `msr` (Model-Specific Registers) kernel module and configure `udev` rules for its devices (usually `/dev/cpu/*/msr`)");
+ enable = mkEnableOption "the `msr` (Model-Specific Registers) kernel module and configure `udev` rules for its devices (usually `/dev/cpu/*/msr`)";
owner = mkOption {
type = str;
default = "root";
example = "nobody";
- description = mdDoc "Owner ${set}";
+ description = "Owner ${set}";
};
group = mkOption {
type = str;
default = defaultGroup;
example = "nobody";
- description = mdDoc "Group ${set}";
+ description = "Group ${set}";
};
mode = mkOption {
type = str;
default = "0640";
example = "0660";
- description = mdDoc "Mode ${set}";
+ description = "Mode ${set}";
};
settings = mkOption {
type = submodule {
diff --git a/third_party/nixpkgs/nixos/modules/hardware/device-tree.nix b/third_party/nixpkgs/nixos/modules/hardware/device-tree.nix
index 6ab13c0eb7..a29cc76ea8 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/device-tree.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/device-tree.nix
@@ -9,7 +9,7 @@ let
options = {
name = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Name of this overlay
'';
};
@@ -18,14 +18,14 @@ let
type = types.nullOr types.str;
default = null;
example = "*rpi*.dtb";
- description = lib.mdDoc ''
+ description = ''
Only apply to .dtb files matching glob expression.
'';
};
dtsFile = mkOption {
type = types.nullOr types.path;
- description = lib.mdDoc ''
+ description = ''
Path to .dts overlay file, overlay is applied to
each .dtb file matching "compatible" of the overlay.
'';
@@ -36,7 +36,7 @@ let
dtsText = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Literal DTS contents, overlay is applied to
each .dtb file matching "compatible" of the overlay.
'';
@@ -58,7 +58,7 @@ let
dtboFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to .dtbo compiled overlay file.
'';
};
@@ -105,7 +105,7 @@ in
enable = mkOption {
default = pkgs.stdenv.hostPlatform.linux-kernel.DTB or false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Build device tree files. These are used to describe the
non-discoverable hardware of a system.
'';
@@ -116,7 +116,7 @@ in
defaultText = literalExpression "config.boot.kernelPackages.kernel";
example = literalExpression "pkgs.linux_latest";
type = types.path;
- description = lib.mdDoc ''
+ description = ''
Kernel package where device tree include directory is from. Also used as default source of dtb package to apply overlays to
'';
};
@@ -125,7 +125,7 @@ in
default = [];
example = literalExpression "[ \"-DMY_DTB_DEFINE\" ]";
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
Additional flags to pass to the preprocessor during dtbo compilations
'';
};
@@ -139,7 +139,7 @@ in
]
'';
type = types.listOf types.path;
- description = lib.mdDoc ''
+ description = ''
Additional include paths that will be passed to the preprocessor when creating the final .dts to compile into .dtbo
'';
};
@@ -148,7 +148,7 @@ in
default = "${cfg.kernelPackage}/dtbs";
defaultText = literalExpression "\${cfg.kernelPackage}/dtbs";
type = types.path;
- description = lib.mdDoc ''
+ description = ''
Path to dtb directory that overlays and other processing will be applied to. Uses
device trees bundled with the Linux kernel by default.
'';
@@ -158,7 +158,7 @@ in
default = null;
example = "some-dtb.dtb";
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
The name of an explicit dtb to be loaded, relative to the dtb base.
Useful in extlinux scenarios if the bootloader doesn't pick the
right .dtb file from FDTDIR.
@@ -169,7 +169,7 @@ in
type = types.nullOr types.str;
default = null;
example = "*rpi*.dtb";
- description = lib.mdDoc ''
+ description = ''
Only include .dtb files matching glob expression.
'';
};
@@ -190,7 +190,7 @@ in
filter = null;
dtboFile = path;
}) overlayType);
- description = lib.mdDoc ''
+ description = ''
List of overlays to apply to base device-tree (.dtb) files.
'';
};
@@ -199,7 +199,7 @@ in
default = null;
type = types.nullOr types.path;
internal = true;
- description = lib.mdDoc ''
+ description = ''
A path containing the result of applying `overlays` to `kernelPackage`.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/digitalbitbox.nix b/third_party/nixpkgs/nixos/modules/hardware/digitalbitbox.nix
index ea04d72a63..7df15288ec 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/digitalbitbox.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/digitalbitbox.nix
@@ -11,7 +11,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enables udev rules for Digital Bitbox devices.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/flipperzero.nix b/third_party/nixpkgs/nixos/modules/hardware/flipperzero.nix
index 82f9b76fa3..3a6d29d0f9 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/flipperzero.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/flipperzero.nix
@@ -9,7 +9,7 @@ let
in
{
- options.hardware.flipperzero.enable = mkEnableOption (mdDoc "udev rules and software for Flipper Zero devices");
+ options.hardware.flipperzero.enable = mkEnableOption "udev rules and software for Flipper Zero devices";
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.qFlipper ];
diff --git a/third_party/nixpkgs/nixos/modules/hardware/flirc.nix b/third_party/nixpkgs/nixos/modules/hardware/flirc.nix
index 2fe40db947..94ec715b9f 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/flirc.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/flirc.nix
@@ -3,7 +3,7 @@ let
cfg = config.hardware.flirc;
in
{
- options.hardware.flirc.enable = lib.mkEnableOption (lib.mdDoc "software to configure a Flirc USB device");
+ options.hardware.flirc.enable = lib.mkEnableOption "software to configure a Flirc USB device";
config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.flirc ];
diff --git a/third_party/nixpkgs/nixos/modules/hardware/gkraken.nix b/third_party/nixpkgs/nixos/modules/hardware/gkraken.nix
index f427fec0a7..97d15369db 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/gkraken.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/gkraken.nix
@@ -7,7 +7,7 @@ let
in
{
options.hardware.gkraken = {
- enable = mkEnableOption (lib.mdDoc "gkraken's udev rules for NZXT AIO liquid coolers");
+ enable = mkEnableOption "gkraken's udev rules for NZXT AIO liquid coolers";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/hardware/glasgow.nix b/third_party/nixpkgs/nixos/modules/hardware/glasgow.nix
index f8ebb772c4..e63aa8bdb4 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/glasgow.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/glasgow.nix
@@ -9,7 +9,7 @@ in
enable = lib.mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enables Glasgow udev rules and ensures 'plugdev' group exists.
This is a prerequisite to using Glasgow without being root.
'';
diff --git a/third_party/nixpkgs/nixos/modules/hardware/gpgsmartcards.nix b/third_party/nixpkgs/nixos/modules/hardware/gpgsmartcards.nix
index 68e1e5f74e..cc3f4c7699 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/gpgsmartcards.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/gpgsmartcards.nix
@@ -28,7 +28,7 @@ let
cfg = config.hardware.gpgSmartcards;
in {
options.hardware.gpgSmartcards = {
- enable = mkEnableOption (lib.mdDoc "udev rules for gnupg smart cards");
+ enable = mkEnableOption "udev rules for gnupg smart cards";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/hardware/hackrf.nix b/third_party/nixpkgs/nixos/modules/hardware/hackrf.nix
index 38ef7fa6d3..7f03b765bb 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/hackrf.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/hackrf.nix
@@ -9,7 +9,7 @@ in
enable = lib.mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enables hackrf udev rules and ensures 'plugdev' group exists.
This is a prerequisite to using HackRF devices without being root, since HackRF USB descriptors will be owned by plugdev through udev.
'';
diff --git a/third_party/nixpkgs/nixos/modules/hardware/i2c.nix b/third_party/nixpkgs/nixos/modules/hardware/i2c.nix
index bd4c4ebe21..b1e5cfd9e0 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/i2c.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/i2c.nix
@@ -8,16 +8,16 @@ in
{
options.hardware.i2c = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
i2c devices support. By default access is granted to users in the "i2c"
group (will be created if non-existent) and any user with a seat, meaning
logged on the computer locally
- '');
+ '';
group = mkOption {
type = types.str;
default = "i2c";
- description = lib.mdDoc ''
+ description = ''
Grant access to i2c devices (/dev/i2c-*) to users in this group.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/infiniband.nix b/third_party/nixpkgs/nixos/modules/hardware/infiniband.nix
index 962883fa79..6780aee9f3 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/infiniband.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/infiniband.nix
@@ -36,7 +36,7 @@ in
type = with types; listOf str;
default = [];
example = [ "0xe8ebd30000eee2e1" ];
- description = lib.mdDoc ''
+ description = ''
A list of infiniband port guids on the system. This is discoverable using `ibstat -p`
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/keyboard/qmk.nix b/third_party/nixpkgs/nixos/modules/hardware/keyboard/qmk.nix
index d95d36dedb..b3e752ad66 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/keyboard/qmk.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/keyboard/qmk.nix
@@ -2,12 +2,12 @@
let
cfg = config.hardware.keyboard.qmk;
- inherit (lib) mdDoc mkEnableOption mkIf;
+ inherit (lib) mkEnableOption mkIf;
in
{
options.hardware.keyboard.qmk = {
- enable = mkEnableOption (mdDoc "non-root access to the firmware of QMK keyboards");
+ enable = mkEnableOption "non-root access to the firmware of QMK keyboards";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/hardware/keyboard/teck.nix b/third_party/nixpkgs/nixos/modules/hardware/keyboard/teck.nix
index 8376c6b9c5..8cb736deda 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/keyboard/teck.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/keyboard/teck.nix
@@ -2,12 +2,12 @@
let
cfg = config.hardware.keyboard.teck;
- inherit (lib) mdDoc mkEnableOption mkIf;
+ inherit (lib) mkEnableOption mkIf;
in
{
options.hardware.keyboard.teck = {
- enable = mkEnableOption (mdDoc "non-root access to the firmware of TECK keyboards");
+ enable = mkEnableOption "non-root access to the firmware of TECK keyboards";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/hardware/keyboard/uhk.nix b/third_party/nixpkgs/nixos/modules/hardware/keyboard/uhk.nix
index ff984fa5da..a5bd35c2a5 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/keyboard/uhk.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/keyboard/uhk.nix
@@ -2,17 +2,17 @@
let
cfg = config.hardware.keyboard.uhk;
- inherit (lib) mdDoc mkEnableOption mkIf;
+ inherit (lib) mkEnableOption mkIf;
in
{
options.hardware.keyboard.uhk = {
- enable = mkEnableOption (mdDoc ''
+ enable = mkEnableOption ''
non-root access to the firmware of UHK keyboards.
You need it when you want to flash a new firmware on the keyboard.
Access to the keyboard is granted to users in the "input" group.
You may want to install the uhk-agent package
- '');
+ '';
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/keyboard/zsa.nix b/third_party/nixpkgs/nixos/modules/hardware/keyboard/zsa.nix
index 191fb12cca..42fac3b45b 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/keyboard/zsa.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/keyboard/zsa.nix
@@ -2,17 +2,17 @@
let
cfg = config.hardware.keyboard.zsa;
- inherit (lib) mkEnableOption mkIf mdDoc;
+ inherit (lib) mkEnableOption mkIf;
in
{
options.hardware.keyboard.zsa = {
- enable = mkEnableOption (mdDoc ''
+ enable = mkEnableOption ''
udev rules for keyboards from ZSA like the ErgoDox EZ, Planck EZ and Moonlander Mark I.
You need it when you want to flash a new configuration on the keyboard
or use their live training in the browser.
You may want to install the wally-cli package
- '');
+ '';
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/hardware/ksm.nix b/third_party/nixpkgs/nixos/modules/hardware/ksm.nix
index 82d94e6ab5..e0b5949ffb 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/ksm.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/ksm.nix
@@ -11,11 +11,11 @@ in {
];
options.hardware.ksm = {
- enable = mkEnableOption (lib.mdDoc "Kernel Same-Page Merging");
+ enable = mkEnableOption "Linux kernel Same-Page Merging";
sleep = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
How many milliseconds ksmd should sleep between scans.
Setting it to `null` uses the kernel's default time.
'';
diff --git a/third_party/nixpkgs/nixos/modules/hardware/ledger.nix b/third_party/nixpkgs/nixos/modules/hardware/ledger.nix
index fcce4f61a8..41abe74315 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/ledger.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/ledger.nix
@@ -6,7 +6,7 @@ let
cfg = config.hardware.ledger;
in {
- options.hardware.ledger.enable = mkEnableOption (lib.mdDoc "udev rules for Ledger devices");
+ options.hardware.ledger.enable = mkEnableOption "udev rules for Ledger devices";
config = mkIf cfg.enable {
services.udev.packages = [ pkgs.ledger-udev-rules ];
diff --git a/third_party/nixpkgs/nixos/modules/hardware/logitech.nix b/third_party/nixpkgs/nixos/modules/hardware/logitech.nix
index 9b06eb8a8b..94a1287e05 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/logitech.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/logitech.nix
@@ -19,12 +19,12 @@ in
options.hardware.logitech = {
lcd = {
- enable = mkEnableOption (lib.mdDoc "Logitech LCD Devices");
+ enable = mkEnableOption "support for Logitech LCD Devices";
startWhenNeeded = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Only run the service when an actual supported device is plugged.
'';
};
@@ -32,7 +32,7 @@ in
devices = mkOption {
type = types.listOf types.str;
default = [ "0a07" "c222" "c225" "c227" "c251" ];
- description = lib.mdDoc ''
+ description = ''
List of USB device ids supported by g15daemon.
You most likely do not need to change this.
@@ -41,12 +41,12 @@ in
};
wireless = {
- enable = mkEnableOption (lib.mdDoc "Logitech Wireless Devices");
+ enable = mkEnableOption "support for Logitech Wireless Devices";
enableGraphical = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable graphical support applications.";
+ description = "Enable graphical support applications.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/mcelog.nix b/third_party/nixpkgs/nixos/modules/hardware/mcelog.nix
index be8fc8cd19..13ad238870 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/mcelog.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/mcelog.nix
@@ -10,7 +10,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable the Machine Check Exception logger.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/network/ath-user-regd.nix b/third_party/nixpkgs/nixos/modules/hardware/network/ath-user-regd.nix
index a7f023d26c..b5ade5ed50 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/network/ath-user-regd.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/network/ath-user-regd.nix
@@ -14,7 +14,7 @@ in
options.networking.wireless.athUserRegulatoryDomain = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If enabled, sets the ATH_USER_REGD kernel config switch to true to
disable the enforcement of EEPROM regulatory restrictions for ath
drivers. Requires at least Linux ${linuxKernelMinVersion}.
diff --git a/third_party/nixpkgs/nixos/modules/hardware/network/b43.nix b/third_party/nixpkgs/nixos/modules/hardware/network/b43.nix
index 7f045f7b70..eb03bf223c 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/network/b43.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/network/b43.nix
@@ -13,7 +13,7 @@ let kernelVersion = config.boot.kernelPackages.kernel.version; in
networking.enableB43Firmware = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Turn on this option if you want firmware for the NICs supported by the b43 module.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/network/intel-2200bg.nix b/third_party/nixpkgs/nixos/modules/hardware/network/intel-2200bg.nix
index e1ec813412..17b973474c 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/network/intel-2200bg.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/network/intel-2200bg.nix
@@ -9,7 +9,7 @@
networking.enableIntel2200BGFirmware = lib.mkOption {
default = false;
type = lib.types.bool;
- description = lib.mdDoc ''
+ description = ''
Turn on this option if you want firmware for the Intel
PRO/Wireless 2200BG to be loaded automatically. This is
required if you want to use this device.
diff --git a/third_party/nixpkgs/nixos/modules/hardware/new-lg4ff.nix b/third_party/nixpkgs/nixos/modules/hardware/new-lg4ff.nix
index fac376eb7a..3c7f66f8d8 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/new-lg4ff.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/new-lg4ff.nix
@@ -10,7 +10,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enables improved Linux module drivers for Logitech driving wheels.
This will replace the existing in-kernel hid-logitech modules.
Works most notably on the Logitech G25, G27, G29 and Driving Force (GT).
diff --git a/third_party/nixpkgs/nixos/modules/hardware/nitrokey.nix b/third_party/nixpkgs/nixos/modules/hardware/nitrokey.nix
index e2e88a8ead..9bc8da41a4 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/nitrokey.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/nitrokey.nix
@@ -13,7 +13,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enables udev rules for Nitrokey devices. By default grants access
to users in the "nitrokey" group. You may want to install the
nitrokey-app package, depending on your device and needs.
diff --git a/third_party/nixpkgs/nixos/modules/hardware/onlykey/default.nix b/third_party/nixpkgs/nixos/modules/hardware/onlykey/default.nix
index 59e159dce4..07358c8a87 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/onlykey/default.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/onlykey/default.nix
@@ -12,7 +12,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable OnlyKey device (https://crp.to/p/) support.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/opengl.nix b/third_party/nixpkgs/nixos/modules/hardware/opengl.nix
index 0ff018ddc4..25324fd8b0 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/opengl.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/opengl.nix
@@ -33,7 +33,7 @@ in
hardware.opengl = {
enable = mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether to enable OpenGL drivers. This is needed to enable
OpenGL support in X11 systems, as well as for Wayland compositors
like sway and Weston. It is enabled by default
@@ -49,7 +49,7 @@ in
driSupport = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable accelerated OpenGL rendering through the
Direct Rendering Interface (DRI).
'';
@@ -58,7 +58,7 @@ in
driSupport32Bit = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
On 64-bit systems, whether to support Direct Rendering for
32-bit applications (such as Wine). This is currently only
supported for the `nvidia` as well as
@@ -69,7 +69,7 @@ in
package = mkOption {
type = types.package;
internal = true;
- description = lib.mdDoc ''
+ description = ''
The package that provides the OpenGL implementation.
'';
};
@@ -77,7 +77,7 @@ in
package32 = mkOption {
type = types.package;
internal = true;
- description = lib.mdDoc ''
+ description = ''
The package that provides the 32-bit OpenGL implementation on
64-bit systems. Used when {option}`driSupport32Bit` is
set.
@@ -88,7 +88,7 @@ in
type = types.listOf types.package;
default = [];
example = literalExpression "with pkgs; [ intel-media-driver intel-ocl intel-vaapi-driver ]";
- description = lib.mdDoc ''
+ description = ''
Additional packages to add to OpenGL drivers.
This can be used to add OpenCL drivers, VA-API/VDPAU drivers etc.
@@ -102,7 +102,7 @@ in
type = types.listOf types.package;
default = [];
example = literalExpression "with pkgs.pkgsi686Linux; [ intel-media-driver intel-vaapi-driver ]";
- description = lib.mdDoc ''
+ description = ''
Additional packages to add to 32-bit OpenGL drivers on 64-bit systems.
Used when {option}`driSupport32Bit` is set. This can be used to add OpenCL drivers, VA-API/VDPAU drivers etc.
@@ -116,7 +116,7 @@ in
type = types.bool;
internal = true;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether the `LD_LIBRARY_PATH` environment variable
should be set to the locations of driver libraries. Drivers which
rely on overriding libraries should set this to true. Drivers which
diff --git a/third_party/nixpkgs/nixos/modules/hardware/openrazer.nix b/third_party/nixpkgs/nixos/modules/hardware/openrazer.nix
index abbafaee89..99b5510543 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/openrazer.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/openrazer.nix
@@ -49,14 +49,14 @@ in
{
options = {
hardware.openrazer = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
OpenRazer drivers and userspace daemon
- '');
+ '';
verboseLogging = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable verbose logging. Logs debug messages.
'';
};
@@ -64,7 +64,7 @@ in
syncEffectsEnabled = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Set the sync effects flag to true so any assignment of
effects will work across devices.
'';
@@ -73,7 +73,7 @@ in
devicesOffOnScreensaver = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Turn off the devices when the systems screensaver kicks in.
'';
};
@@ -81,7 +81,7 @@ in
mouseBatteryNotifier = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Mouse battery notifier.
'';
};
@@ -89,7 +89,7 @@ in
keyStatistics = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Collects number of keypresses per hour per key used to
generate a heatmap.
'';
@@ -98,7 +98,7 @@ in
users = mkOption {
type = with types; listOf str;
default = [];
- description = lib.mdDoc ''
+ description = ''
Usernames to be added to the "openrazer" group, so that they
can start and interact with the OpenRazer userspace daemon.
'';
diff --git a/third_party/nixpkgs/nixos/modules/hardware/opentabletdriver.nix b/third_party/nixpkgs/nixos/modules/hardware/opentabletdriver.nix
index f103da14c9..d8958ed4f6 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/opentabletdriver.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/opentabletdriver.nix
@@ -12,7 +12,7 @@ in
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enable OpenTabletDriver udev rules, user service and blacklist kernel
modules known to conflict with OpenTabletDriver.
'';
@@ -21,7 +21,7 @@ in
blacklistedKernelModules = mkOption {
type = types.listOf types.str;
default = [ "hid-uclogic" "wacom" ];
- description = lib.mdDoc ''
+ description = ''
Blacklist of kernel modules known to conflict with OpenTabletDriver.
'';
};
@@ -32,7 +32,7 @@ in
enable = mkOption {
default = true;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to start OpenTabletDriver daemon as a systemd user service.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/pcmcia.nix b/third_party/nixpkgs/nixos/modules/hardware/pcmcia.nix
index f7a5565d77..aef35a28e5 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/pcmcia.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/pcmcia.nix
@@ -20,7 +20,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable this option to support PCMCIA card.
'';
};
@@ -28,7 +28,7 @@ in
firmware = mkOption {
type = types.listOf types.path;
default = [];
- description = lib.mdDoc ''
+ description = ''
List of firmware used to handle specific PCMCIA card.
'';
};
@@ -36,7 +36,7 @@ in
config = mkOption {
default = null;
type = types.nullOr types.path;
- description = lib.mdDoc ''
+ description = ''
Path to the configuration file which maps the memory, IRQs
and ports used by the PCMCIA hardware.
'';
diff --git a/third_party/nixpkgs/nixos/modules/hardware/printers.nix b/third_party/nixpkgs/nixos/modules/hardware/printers.nix
index 4fb6a192cd..de2f84d483 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/printers.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/printers.nix
@@ -35,12 +35,12 @@ in {
ensureDefaultPrinter = mkOption {
type = types.nullOr printerName;
default = null;
- description = lib.mdDoc ''
+ description = ''
Ensures the named printer is the default CUPS printer / printer queue.
'';
};
ensurePrinters = mkOption {
- description = lib.mdDoc ''
+ description = ''
Will regularly ensure that the given CUPS printers are configured as declared here.
If a printer's options are manually changed afterwards, they will be overwritten eventually.
This option will never delete any printer, even if removed from this list.
@@ -54,7 +54,7 @@ in {
name = mkOption {
type = printerName;
example = "BrotherHL_Workroom";
- description = lib.mdDoc ''
+ description = ''
Name of the printer / printer queue.
May contain any printable characters except "/", "#", and space.
'';
@@ -63,7 +63,7 @@ in {
type = types.nullOr types.str;
default = null;
example = "Workroom";
- description = lib.mdDoc ''
+ description = ''
Optional human-readable location.
'';
};
@@ -71,7 +71,7 @@ in {
type = types.nullOr types.str;
default = null;
example = "Brother HL-5140";
- description = lib.mdDoc ''
+ description = ''
Optional human-readable description.
'';
};
@@ -81,7 +81,7 @@ in {
"ipp://printserver.local/printers/BrotherHL_Workroom"
"usb://HP/DESKJET%20940C?serial=CN16E6C364BH"
'';
- description = lib.mdDoc ''
+ description = ''
How to reach the printer.
{command}`lpinfo -v` shows a list of supported device URIs and schemes.
'';
@@ -91,7 +91,7 @@ in {
example = literalExpression ''
"gutenprint.''${lib.versions.majorMinor (lib.getVersion pkgs.gutenprint)}://brother-hl-5140/expert"
'';
- description = lib.mdDoc ''
+ description = ''
Location of the ppd driver file for the printer.
{command}`lpinfo -m` shows a list of supported models.
'';
@@ -103,7 +103,7 @@ in {
Duplex = "DuplexNoTumble";
};
default = {};
- description = lib.mdDoc ''
+ description = ''
Sets PPD options for the printer.
{command}`lpoptions [-p printername] -l` shows supported PPD options for the given printer.
'';
diff --git a/third_party/nixpkgs/nixos/modules/hardware/raid/hpsa.nix b/third_party/nixpkgs/nixos/modules/hardware/raid/hpsa.nix
index 2934cd19a8..120348a74b 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/raid/hpsa.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/raid/hpsa.nix
@@ -48,7 +48,7 @@ in {
options = {
hardware.raid.HPSmartArray = {
- enable = mkEnableOption (lib.mdDoc "HP Smart Array kernel modules and CLI utility");
+ enable = mkEnableOption "HP Smart Array kernel modules and CLI utility";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/rtl-sdr.nix b/third_party/nixpkgs/nixos/modules/hardware/rtl-sdr.nix
index 7f462005f1..e85fc04e29 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/rtl-sdr.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/rtl-sdr.nix
@@ -8,7 +8,7 @@ in {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enables rtl-sdr udev rules, ensures 'plugdev' group exists, and blacklists DVB kernel modules.
This is a prerequisite to using devices supported by rtl-sdr without being root, since rtl-sdr USB descriptors will be owned by plugdev through udev.
'';
diff --git a/third_party/nixpkgs/nixos/modules/hardware/saleae-logic.nix b/third_party/nixpkgs/nixos/modules/hardware/saleae-logic.nix
index f144814a06..a3810d640c 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/saleae-logic.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/saleae-logic.nix
@@ -5,13 +5,13 @@ let
in
{
options.hardware.saleae-logic = {
- enable = lib.mkEnableOption (lib.mdDoc "udev rules for Saleae Logic devices");
+ enable = lib.mkEnableOption "udev rules for Saleae Logic devices";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.saleae-logic-2;
defaultText = lib.literalExpression "pkgs.saleae-logic-2";
- description = lib.mdDoc ''
+ description = ''
Saleae Logic package to use.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/sata.nix b/third_party/nixpkgs/nixos/modules/hardware/sata.nix
index 5330ba9268..81592997d6 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/sata.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/sata.nix
@@ -36,12 +36,12 @@ in
meta.maintainers = with lib.maintainers; [ peterhoeg ];
options.hardware.sata.timeout = {
- enable = mkEnableOption (lib.mdDoc "SATA drive timeouts");
+ enable = mkEnableOption "SATA drive timeouts";
deciSeconds = mkOption {
example = 70;
type = types.int;
- description = lib.mdDoc ''
+ description = ''
Set SCT Error Recovery Control timeout in deciseconds for use in RAID configurations.
Values are as follows:
@@ -53,17 +53,17 @@ in
};
drives = mkOption {
- description = lib.mdDoc "List of drives for which to configure the timeout.";
+ description = "List of drives for which to configure the timeout.";
type = types.listOf
(types.submodule {
options = {
name = mkOption {
- description = lib.mdDoc "Drive name without the full path.";
+ description = "Drive name without the full path.";
type = types.str;
};
idBy = mkOption {
- description = lib.mdDoc "The method to identify the drive.";
+ description = "The method to identify the drive.";
type = types.enum [ "path" "wwn" ];
default = "path";
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/sensor/hddtemp.nix b/third_party/nixpkgs/nixos/modules/hardware/sensor/hddtemp.nix
index 1a3d211b85..8ee60dc4d6 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/sensor/hddtemp.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/sensor/hddtemp.nix
@@ -30,7 +30,7 @@ in
options = {
hardware.sensor.hddtemp = {
enable = mkOption {
- description = lib.mdDoc ''
+ description = ''
Enable this option to support HDD/SSD temperature sensors.
'';
type = types.bool;
@@ -38,24 +38,24 @@ in
};
drives = mkOption {
- description = lib.mdDoc "List of drives to monitor. If you pass /dev/disk/by-path/* entries the symlinks will be resolved as hddtemp doesn't like names with colons.";
+ description = "List of drives to monitor. If you pass /dev/disk/by-path/* entries the symlinks will be resolved as hddtemp doesn't like names with colons.";
type = types.listOf types.str;
};
unit = mkOption {
- description = lib.mdDoc "Celsius or Fahrenheit";
+ description = "Celsius or Fahrenheit";
type = types.enum [ "C" "F" ];
default = "C";
};
dbEntries = mkOption {
- description = lib.mdDoc "Additional DB entries";
+ description = "Additional DB entries";
type = types.listOf types.str;
default = [ ];
};
extraArgs = mkOption {
- description = lib.mdDoc "Additional arguments passed to the daemon.";
+ description = "Additional arguments passed to the daemon.";
type = types.listOf types.str;
default = [ ];
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/sensor/iio.nix b/third_party/nixpkgs/nixos/modules/hardware/sensor/iio.nix
index 6f7b1dc1f7..8b3ba87a7d 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/sensor/iio.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/sensor/iio.nix
@@ -8,7 +8,7 @@ with lib;
options = {
hardware.sensor.iio = {
enable = mkOption {
- description = lib.mdDoc ''
+ description = ''
Enable this option to support IIO sensors with iio-sensor-proxy.
IIO sensors are used for orientation and ambient light
diff --git a/third_party/nixpkgs/nixos/modules/hardware/steam-hardware.nix b/third_party/nixpkgs/nixos/modules/hardware/steam-hardware.nix
index 07edf68703..6218c9ffbb 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/steam-hardware.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/steam-hardware.nix
@@ -13,7 +13,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable udev rules for Steam hardware such as the Steam Controller, other supported controllers and the HTC Vive";
+ description = "Enable udev rules for Steam hardware such as the Steam Controller, other supported controllers and the HTC Vive";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/system-76.nix b/third_party/nixpkgs/nixos/modules/hardware/system-76.nix
index 3fb2c10a6e..ca40ee0ebb 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/system-76.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/system-76.nix
@@ -57,13 +57,13 @@ let
in {
options = {
hardware.system76 = {
- enableAll = mkEnableOption (lib.mdDoc "all recommended configuration for system76 systems");
+ enableAll = mkEnableOption "all recommended configuration for system76 systems";
firmware-daemon.enable = mkOption {
default = cfg.enableAll;
defaultText = literalExpression "config.${opt.enableAll}";
example = true;
- description = lib.mdDoc "Whether to enable the system76 firmware daemon";
+ description = "Whether to enable the system76 firmware daemon";
type = types.bool;
};
@@ -71,7 +71,7 @@ in {
default = cfg.enableAll;
defaultText = literalExpression "config.${opt.enableAll}";
example = true;
- description = lib.mdDoc "Whether to make the system76 out-of-tree kernel modules available";
+ description = "Whether to make the system76 out-of-tree kernel modules available";
type = types.bool;
};
@@ -79,7 +79,7 @@ in {
default = cfg.enableAll;
defaultText = literalExpression "config.${opt.enableAll}";
example = true;
- description = lib.mdDoc "Whether to enable the system76 power daemon";
+ description = "Whether to enable the system76 power daemon";
type = types.bool;
};
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/tuxedo-keyboard.nix b/third_party/nixpkgs/nixos/modules/hardware/tuxedo-keyboard.nix
index fd8b48a5e9..f90dfc6e31 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/tuxedo-keyboard.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/tuxedo-keyboard.nix
@@ -8,7 +8,7 @@ let
in
{
options.hardware.tuxedo-keyboard = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
the tuxedo-keyboard driver.
To configure the driver, pass the options to the {option}`boot.kernelParams` configuration.
@@ -24,7 +24,7 @@ in
"tuxedo_keyboard.color_left=0xff0a0a"
];
```
- '');
+ '';
};
config = mkIf cfg.enable
diff --git a/third_party/nixpkgs/nixos/modules/hardware/ubertooth.nix b/third_party/nixpkgs/nixos/modules/hardware/ubertooth.nix
index e2db2068d9..f65c2da255 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/ubertooth.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/ubertooth.nix
@@ -10,13 +10,13 @@ let
};
in {
options.hardware.ubertooth = {
- enable = mkEnableOption (lib.mdDoc "Ubertooth software and its udev rules");
+ enable = mkEnableOption "Ubertooth software and its udev rules";
group = mkOption {
type = types.str;
default = "ubertooth";
example = "wheel";
- description = lib.mdDoc "Group for Ubertooth's udev rules.";
+ description = "Group for Ubertooth's udev rules.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/uinput.nix b/third_party/nixpkgs/nixos/modules/hardware/uinput.nix
index 15fa66b8d8..55e86bfa6b 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/uinput.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/uinput.nix
@@ -4,7 +4,7 @@ let
cfg = config.hardware.uinput;
in {
options.hardware.uinput = {
- enable = lib.mkEnableOption (lib.mdDoc "uinput support");
+ enable = lib.mkEnableOption "uinput support";
};
config = lib.mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/hardware/uni-sync.nix b/third_party/nixpkgs/nixos/modules/hardware/uni-sync.nix
new file mode 100644
index 0000000000..dd230ae419
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/hardware/uni-sync.nix
@@ -0,0 +1,117 @@
+{ config
+, lib
+, pkgs
+, ...
+}:
+with lib; let
+ cfg = config.hardware.uni-sync;
+in
+{
+ meta.maintainers = with maintainers; [ yunfachi ];
+
+ options.hardware.uni-sync = {
+ enable = mkEnableOption "udev rules and software for Lian Li Uni Controllers";
+ package = mkPackageOption pkgs "uni-sync" { };
+
+ devices = mkOption {
+ default = [ ];
+ example = literalExpression ''
+ [
+ {
+ device_id = "VID:1111/PID:11111/SN:1111111111";
+ sync_rgb = true;
+ channels = [
+ {
+ mode = "PWM";
+ }
+ {
+ mode = "Manual";
+ speed = 100;
+ }
+ {
+ mode = "Manual";
+ speed = 54;
+ }
+ {
+ mode = "Manual";
+ speed = 0;
+ }
+ ];
+ }
+ {
+ device_id = "VID:1010/PID:10101/SN:1010101010";
+ sync_rgb = false;
+ channels = [
+ {
+ mode = "Manual";
+ speed = 0;
+ }
+ ];
+ }
+ ]
+ '';
+ description = "List of controllers with their configurations.";
+ type = types.listOf (types.submodule {
+ options = {
+ device_id = mkOption {
+ type = types.str;
+ example = "VID:1111/PID:11111/SN:1111111111";
+ description = "Unique device ID displayed at each startup.";
+ };
+ sync_rgb = mkOption {
+ type = types.bool;
+ default = false;
+ example = true;
+ description = "Enable ARGB header sync.";
+ };
+ channels = mkOption {
+ default = [ ];
+ example = literalExpression ''
+ [
+ {
+ mode = "PWM";
+ }
+ {
+ mode = "Manual";
+ speed = 100;
+ }
+ {
+ mode = "Manual";
+ speed = 54;
+ }
+ {
+ mode = "Manual";
+ speed = 0;
+ }
+ ]
+ '';
+ description = "List of channels connected to the controller.";
+ type = types.listOf (types.submodule {
+ options = {
+ mode = mkOption {
+ type = types.enum [ "Manual" "PWM" ];
+ default = "Manual";
+ example = "PWM";
+ description = "\"PWM\" to enable PWM sync. \"Manual\" to set speed.";
+ };
+ speed = mkOption {
+ type = types.int;
+ default = "50";
+ example = "100";
+ description = "Fan speed as percentage (clamped between 0 and 100).";
+ };
+ };
+ });
+ };
+ };
+ });
+ };
+ };
+
+ config = mkIf cfg.enable {
+ environment.etc."uni-sync/uni-sync.json".text = mkIf (cfg.devices != [ ]) (builtins.toJSON { configs = cfg.devices; });
+
+ environment.systemPackages = [ cfg.package ];
+ services.udev.packages = [ cfg.package ];
+ };
+}
diff --git a/third_party/nixpkgs/nixos/modules/hardware/usb-modeswitch.nix b/third_party/nixpkgs/nixos/modules/hardware/usb-modeswitch.nix
index 773891b003..f36d293a86 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/usb-modeswitch.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/usb-modeswitch.nix
@@ -11,7 +11,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable this option to support certain USB WLAN and WWAN adapters.
These network adapters initial present themselves as Flash Drives containing their drivers.
diff --git a/third_party/nixpkgs/nixos/modules/hardware/usb-storage.nix b/third_party/nixpkgs/nixos/modules/hardware/usb-storage.nix
index 3cb2c60d7c..6e20b93d22 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/usb-storage.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/usb-storage.nix
@@ -5,7 +5,7 @@ with lib;
options.hardware.usbStorage.manageStartStop = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Enable this option to gracefully spin-down external storage during shutdown.
If you suspect improper head parking after poweroff, install `smartmontools` and check
for the `Power-Off_Retract_Count` field for an increment.
diff --git a/third_party/nixpkgs/nixos/modules/hardware/video/bumblebee.nix b/third_party/nixpkgs/nixos/modules/hardware/video/bumblebee.nix
index 75f71d499e..b6af4f8044 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/video/bumblebee.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/video/bumblebee.nix
@@ -29,7 +29,7 @@ in
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enable the bumblebee daemon to manage Optimus hybrid video cards.
This should power off secondary GPU until its use is requested
by running an application with optirun.
@@ -40,13 +40,13 @@ in
default = "wheel";
example = "video";
type = types.str;
- description = lib.mdDoc "Group for bumblebee socket";
+ description = "Group for bumblebee socket";
};
connectDisplay = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Set to true if you intend to connect your discrete card to a
monitor. This option will set up your Nvidia card for EDID
discovery and to turn on the monitor signal.
@@ -58,7 +58,7 @@ in
driver = mkOption {
default = "nvidia";
type = types.enum [ "nvidia" "nouveau" ];
- description = lib.mdDoc ''
+ description = ''
Set driver used by bumblebeed. Supported are nouveau and nvidia.
'';
};
@@ -66,7 +66,7 @@ in
pmMethod = mkOption {
default = "auto";
type = types.enum [ "auto" "bbswitch" "switcheroo" "none" ];
- description = lib.mdDoc ''
+ description = ''
Set preferred power management method for unused card.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/hardware/video/capture/mwprocapture.nix b/third_party/nixpkgs/nixos/modules/hardware/video/capture/mwprocapture.nix
index ddd3f3ec7f..c63535f0fa 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/video/capture/mwprocapture.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/video/capture/mwprocapture.nix
@@ -12,7 +12,7 @@ in
{
- options.hardware.mwProCapture.enable = mkEnableOption (lib.mdDoc "Magewell Pro Capture family kernel module");
+ options.hardware.mwProCapture.enable = mkEnableOption "the Magewell Pro Capture family kernel module";
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/hardware/video/nvidia.nix b/third_party/nixpkgs/nixos/modules/hardware/video/nvidia.nix
index 3b983f768f..37d8e53a2e 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/video/nvidia.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/video/nvidia.nix
@@ -23,9 +23,9 @@
in {
options = {
hardware.nvidia = {
- datacenter.enable = lib.mkEnableOption (lib.mdDoc ''
+ datacenter.enable = lib.mkEnableOption ''
Data Center drivers for NVIDIA cards on a NVLink topology
- '');
+ '';
datacenter.settings = lib.mkOption {
type = settingsFormat.type;
default = {
@@ -74,41 +74,41 @@ in {
DATABASE_PATH="''${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch";
}
'';
- description = lib.mdDoc ''
+ description = ''
Additional configuration options for fabricmanager.
'';
};
- powerManagement.enable = lib.mkEnableOption (lib.mdDoc ''
+ powerManagement.enable = lib.mkEnableOption ''
experimental power management through systemd. For more information, see
the NVIDIA docs, on Chapter 21. Configuring Power Management Support
- '');
+ '';
- powerManagement.finegrained = lib.mkEnableOption (lib.mdDoc ''
+ powerManagement.finegrained = lib.mkEnableOption ''
experimental power management of PRIME offload. For more information, see
the NVIDIA docs, on Chapter 22. PCI-Express Runtime D3 (RTD3) Power Management
- '');
+ '';
- dynamicBoost.enable = lib.mkEnableOption (lib.mdDoc ''
+ dynamicBoost.enable = lib.mkEnableOption ''
dynamic Boost balances power between the CPU and the GPU for improved
performance on supported laptops using the nvidia-powerd daemon. For more
information, see the NVIDIA docs, on Chapter 23. Dynamic Boost on Linux
- '');
+ '';
- modesetting.enable = lib.mkEnableOption (lib.mdDoc ''
+ modesetting.enable = lib.mkEnableOption ''
kernel modesetting when using the NVIDIA proprietary driver.
Enabling this fixes screen tearing when using Optimus via PRIME (see
{option}`hardware.nvidia.prime.sync.enable`. This is not enabled
by default because it is not officially supported by NVIDIA and would not
work with SLI
- '');
+ '';
prime.nvidiaBusId = lib.mkOption {
type = busIDType;
default = "";
example = "PCI:1:0:0";
- description = lib.mdDoc ''
+ description = ''
Bus ID of the NVIDIA GPU. You can find it using lspci; for example if lspci
shows the NVIDIA GPU at "01:00.0", set this option to "PCI:1:0:0".
'';
@@ -118,7 +118,7 @@ in {
type = busIDType;
default = "";
example = "PCI:0:2:0";
- description = lib.mdDoc ''
+ description = ''
Bus ID of the Intel GPU. You can find it using lspci; for example if lspci
shows the Intel GPU at "00:02.0", set this option to "PCI:0:2:0".
'';
@@ -128,13 +128,13 @@ in {
type = busIDType;
default = "";
example = "PCI:4:0:0";
- description = lib.mdDoc ''
+ description = ''
Bus ID of the AMD APU. You can find it using lspci; for example if lspci
shows the AMD APU at "04:00.0", set this option to "PCI:4:0:0".
'';
};
- prime.sync.enable = lib.mkEnableOption (lib.mdDoc ''
+ prime.sync.enable = lib.mkEnableOption ''
NVIDIA Optimus support using the NVIDIA proprietary driver via PRIME.
If enabled, the NVIDIA GPU will be always on and used for all rendering,
while enabling output to displays attached only to the integrated Intel/AMD
@@ -156,30 +156,30 @@ in {
Note that this configuration will only be successful when a display manager
for which the {option}`services.xserver.displayManager.setupCommands`
option is supported is used
- '');
+ '';
- prime.allowExternalGpu = lib.mkEnableOption (lib.mdDoc ''
+ prime.allowExternalGpu = lib.mkEnableOption ''
configuring X to allow external NVIDIA GPUs when using Prime [Reverse] sync optimus
- '');
+ '';
- prime.offload.enable = lib.mkEnableOption (lib.mdDoc ''
+ prime.offload.enable = lib.mkEnableOption ''
render offload support using the NVIDIA proprietary driver via PRIME.
If this is enabled, then the bus IDs of the NVIDIA and Intel/AMD GPUs have to
be specified ({option}`hardware.nvidia.prime.nvidiaBusId` and
{option}`hardware.nvidia.prime.intelBusId` or
{option}`hardware.nvidia.prime.amdgpuBusId`)
- '');
+ '';
- prime.offload.enableOffloadCmd = lib.mkEnableOption (lib.mdDoc ''
+ prime.offload.enableOffloadCmd = lib.mkEnableOption ''
adding a `nvidia-offload` convenience script to {option}`environment.systemPackages`
for offloading programs to an nvidia device. To work, should have also enabled
{option}`hardware.nvidia.prime.offload.enable` or {option}`hardware.nvidia.prime.reverseSync.enable`.
Example usage `nvidia-offload sauerbraten_client`
- '');
+ '';
- prime.reverseSync.enable = lib.mkEnableOption (lib.mdDoc ''
+ prime.reverseSync.enable = lib.mkEnableOption ''
NVIDIA Optimus support using the NVIDIA proprietary driver via reverse
PRIME. If enabled, the Intel/AMD GPU will be used for all rendering, while
enabling output to displays attached only to the NVIDIA GPU without a
@@ -205,40 +205,40 @@ in {
Note that this configuration will only be successful when a display manager
for which the {option}`services.xserver.displayManager.setupCommands`
option is supported is used
- '');
+ '';
nvidiaSettings =
- (lib.mkEnableOption (lib.mdDoc ''
+ (lib.mkEnableOption ''
nvidia-settings, NVIDIA's GUI configuration tool
- ''))
+ '')
// {default = true;};
- nvidiaPersistenced = lib.mkEnableOption (lib.mdDoc ''
+ nvidiaPersistenced = lib.mkEnableOption ''
nvidia-persistenced a update for NVIDIA GPU headless mode, i.e.
It ensures all GPUs stay awake even during headless mode
- '');
+ '';
- forceFullCompositionPipeline = lib.mkEnableOption (lib.mdDoc ''
+ forceFullCompositionPipeline = lib.mkEnableOption ''
forcefully the full composition pipeline.
This sometimes fixes screen tearing issues.
This has been reported to reduce the performance of some OpenGL applications and may produce issues in WebGL.
It also drastically increases the time the driver needs to clock down after load
- '');
+ '';
package = lib.mkOption {
default = config.boot.kernelPackages.nvidiaPackages."${if cfg.datacenter.enable then "dc" else "stable"}";
defaultText = lib.literalExpression ''
config.boot.kernelPackages.nvidiaPackages."\$\{if cfg.datacenter.enable then "dc" else "stable"}"
'';
- example = lib.mdDoc "config.boot.kernelPackages.nvidiaPackages.legacy_470";
- description = lib.mdDoc ''
+ example = "config.boot.kernelPackages.nvidiaPackages.legacy_470";
+ description = ''
The NVIDIA driver package to use.
'';
};
- open = lib.mkEnableOption (lib.mdDoc ''
+ open = lib.mkEnableOption ''
the open source NVIDIA kernel module
- '');
+ '';
};
};
@@ -396,6 +396,9 @@ in {
modules = [nvidia_x11.bin];
display = !offloadCfg.enable;
deviceSection =
+ ''
+ Option "SidebandSocketPath" "/run/nvidia-xdriver/"
+ '' +
lib.optionalString primeEnabled
''
BusID "${pCfg.nvidiaBusId}"
@@ -533,8 +536,14 @@ in {
hardware.firmware = lib.optional cfg.open nvidia_x11.firmware;
- systemd.tmpfiles.rules =
- lib.optional (nvidia_x11.persistenced != null && config.virtualisation.docker.enableNvidia)
+ systemd.tmpfiles.rules = [
+ # Remove the following log message:
+ # (WW) NVIDIA: Failed to bind sideband socket to
+ # (WW) NVIDIA: '/var/run/nvidia-xdriver-b4f69129' Permission denied
+ #
+ # https://bbs.archlinux.org/viewtopic.php?pid=1909115#p1909115
+ "d /run/nvidia-xdriver 0770 root users"
+ ] ++ lib.optional (nvidia_x11.persistenced != null && config.virtualisation.docker.enableNvidia)
"L+ /run/nvidia-docker/extras/bin/nvidia-persistenced - - - - ${nvidia_x11.persistenced}/origBin/nvidia-persistenced";
boot = {
diff --git a/third_party/nixpkgs/nixos/modules/hardware/video/uvcvideo/default.nix b/third_party/nixpkgs/nixos/modules/hardware/video/uvcvideo/default.nix
index 6cfb8cc6ad..901ff938d9 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/video/uvcvideo/default.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/video/uvcvideo/default.nix
@@ -22,7 +22,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable {command}`uvcvideo` dynamic controls.
Note that enabling this brings the {command}`uvcdynctrl` tool
@@ -34,7 +34,7 @@ in
packages = mkOption {
type = types.listOf types.path;
example = literalExpression "[ pkgs.tiscamera ]";
- description = lib.mdDoc ''
+ description = ''
List of packages containing {command}`uvcvideo` dynamic controls
rules. All files found in
{file}`«pkg»/share/uvcdynctrl/data`
diff --git a/third_party/nixpkgs/nixos/modules/hardware/video/webcam/facetimehd.nix b/third_party/nixpkgs/nixos/modules/hardware/video/webcam/facetimehd.nix
index a0ec9c98a5..1e6e6442c3 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/video/webcam/facetimehd.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/video/webcam/facetimehd.nix
@@ -12,13 +12,13 @@ in
{
- options.hardware.facetimehd.enable = mkEnableOption (lib.mdDoc "the facetimehd kernel module");
+ options.hardware.facetimehd.enable = mkEnableOption "the facetimehd kernel module";
options.hardware.facetimehd.withCalibration = mkOption {
default = false;
example = true;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to include sensor calibration files for facetimehd.
This makes colors look much better but is experimental, see
diff --git a/third_party/nixpkgs/nixos/modules/hardware/video/webcam/ipu6.nix b/third_party/nixpkgs/nixos/modules/hardware/video/webcam/ipu6.nix
index c2dbdc217b..de47fe3f6b 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/video/webcam/ipu6.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/video/webcam/ipu6.nix
@@ -10,11 +10,11 @@ in
options.hardware.ipu6 = {
- enable = mkEnableOption (lib.mdDoc "support for Intel IPU6/MIPI cameras");
+ enable = mkEnableOption "support for Intel IPU6/MIPI cameras";
platform = mkOption {
type = types.enum [ "ipu6" "ipu6ep" "ipu6epmtl" ];
- description = lib.mdDoc ''
+ description = ''
Choose the version for your hardware platform.
Use `ipu6` for Tiger Lake, `ipu6ep` for Alder Lake or Raptor Lake,
@@ -30,7 +30,10 @@ in
ipu6-drivers
];
- hardware.firmware = [ pkgs.ipu6-camera-bins ];
+ hardware.firmware = with pkgs; [
+ ipu6-camera-bins
+ ivsc-firmware
+ ];
services.udev.extraRules = ''
SUBSYSTEM=="intel-ipu6-psys", MODE="0660", GROUP="video"
diff --git a/third_party/nixpkgs/nixos/modules/hardware/wooting.nix b/third_party/nixpkgs/nixos/modules/hardware/wooting.nix
index 78bbcb61ac..56ef77d31e 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/wooting.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/wooting.nix
@@ -2,8 +2,8 @@
with lib;
{
- options.hardware.wooting.enable = mkEnableOption (lib.mdDoc ''support for Wooting keyboards.
- Note that users must be in the "input" group for udev rules to apply'');
+ options.hardware.wooting.enable = mkEnableOption ''support for Wooting keyboards.
+ Note that users must be in the "input" group for udev rules to apply'';
config = mkIf config.hardware.wooting.enable {
environment.systemPackages = [ pkgs.wootility ];
diff --git a/third_party/nixpkgs/nixos/modules/hardware/xone.nix b/third_party/nixpkgs/nixos/modules/hardware/xone.nix
index 211d3fce86..89690d8c6f 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/xone.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/xone.nix
@@ -6,7 +6,7 @@ let
in
{
options.hardware.xone = {
- enable = mkEnableOption (lib.mdDoc "the xone driver for Xbox One and Xbobx Series X|S accessories");
+ enable = mkEnableOption "the xone driver for Xbox One and Xbobx Series X|S accessories";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/hardware/xpadneo.nix b/third_party/nixpkgs/nixos/modules/hardware/xpadneo.nix
index a66e81d8b1..474f0f7fcf 100644
--- a/third_party/nixpkgs/nixos/modules/hardware/xpadneo.nix
+++ b/third_party/nixpkgs/nixos/modules/hardware/xpadneo.nix
@@ -6,7 +6,7 @@ let
in
{
options.hardware.xpadneo = {
- enable = mkEnableOption (lib.mdDoc "the xpadneo driver for Xbox One wireless controllers");
+ enable = mkEnableOption "the xpadneo driver for Xbox One wireless controllers";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/i18n/input-method/default.md b/third_party/nixpkgs/nixos/modules/i18n/input-method/default.md
index 42cb8a8d7b..6d12462b78 100644
--- a/third_party/nixpkgs/nixos/modules/i18n/input-method/default.md
+++ b/third_party/nixpkgs/nixos/modules/i18n/input-method/default.md
@@ -22,11 +22,13 @@ friendly input method user interface.
The following snippet can be used to configure IBus:
-```
-i18n.inputMethod = {
- enabled = "ibus";
- ibus.engines = with pkgs.ibus-engines; [ anthy hangul mozc ];
-};
+```nix
+{
+ i18n.inputMethod = {
+ enabled = "ibus";
+ ibus.engines = with pkgs.ibus-engines; [ anthy hangul mozc ];
+ };
+}
```
`i18n.inputMethod.ibus.engines` is optional and can be used
@@ -48,8 +50,10 @@ Available extra IBus engines are:
methods, it must appear in the list of engines along with
`table`. For example:
- ```
- ibus.engines = with pkgs.ibus-engines; [ table table-others ];
+ ```nix
+ {
+ ibus.engines = with pkgs.ibus-engines; [ table table-others ];
+ }
```
To use any input method, the package must be added in the configuration, as
@@ -74,11 +78,13 @@ built-in Input Method Engine, Pinyin, QuWei and Table-based input methods.
The following snippet can be used to configure Fcitx:
-```
-i18n.inputMethod = {
- enabled = "fcitx5";
- fcitx5.addons = with pkgs; [ fcitx5-mozc fcitx5-hangul fcitx5-m17n ];
-};
+```nix
+{
+ i18n.inputMethod = {
+ enabled = "fcitx5";
+ fcitx5.addons = with pkgs; [ fcitx5-mozc fcitx5-hangul fcitx5-m17n ];
+ };
+}
```
`i18n.inputMethod.fcitx5.addons` is optional and can be
@@ -110,10 +116,12 @@ phonetic Korean characters (hangul) and pictographic Korean characters
The following snippet can be used to configure Nabi:
-```
-i18n.inputMethod = {
- enabled = "nabi";
-};
+```nix
+{
+ i18n.inputMethod = {
+ enabled = "nabi";
+ };
+}
```
## Uim {#module-services-input-methods-uim}
@@ -123,10 +131,12 @@ framework. Applications can use it through so-called bridges.
The following snippet can be used to configure uim:
-```
-i18n.inputMethod = {
- enabled = "uim";
-};
+```nix
+{
+ i18n.inputMethod = {
+ enabled = "uim";
+ };
+}
```
Note: The [](#opt-i18n.inputMethod.uim.toolbar) option can be
@@ -141,10 +151,12 @@ etc...
The following snippet can be used to configure Hime:
-```
-i18n.inputMethod = {
- enabled = "hime";
-};
+```nix
+{
+ i18n.inputMethod = {
+ enabled = "hime";
+ };
+}
```
## Kime {#module-services-input-methods-kime}
@@ -153,8 +165,10 @@ Kime is Korean IME. it's built with Rust language and let you get simple, safe,
The following snippet can be used to configure Kime:
-```
-i18n.inputMethod = {
- enabled = "kime";
-};
+```nix
+{
+ i18n.inputMethod = {
+ enabled = "kime";
+ };
+}
```
diff --git a/third_party/nixpkgs/nixos/modules/i18n/input-method/default.nix b/third_party/nixpkgs/nixos/modules/i18n/input-method/default.nix
index d967d4335c..3b439c4231 100644
--- a/third_party/nixpkgs/nixos/modules/i18n/input-method/default.nix
+++ b/third_party/nixpkgs/nixos/modules/i18n/input-method/default.nix
@@ -32,7 +32,7 @@ in
type = types.nullOr (types.enum [ "ibus" "fcitx5" "nabi" "uim" "hime" "kime" ]);
default = null;
example = "fcitx5";
- description = lib.mdDoc ''
+ description = ''
Select the enabled input method. Input methods is a software to input symbols that are not available on standard input devices.
Input methods are specially used to input Chinese, Japanese and Korean characters.
@@ -52,7 +52,7 @@ in
internal = true;
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
The input method method package.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/i18n/input-method/fcitx5.nix b/third_party/nixpkgs/nixos/modules/i18n/input-method/fcitx5.nix
index 530727f3f2..bb6661e248 100644
--- a/third_party/nixpkgs/nixos/modules/i18n/input-method/fcitx5.nix
+++ b/third_party/nixpkgs/nixos/modules/i18n/input-method/fcitx5.nix
@@ -5,7 +5,10 @@ with lib;
let
im = config.i18n.inputMethod;
cfg = im.fcitx5;
- fcitx5Package = pkgs.fcitx5-with-addons.override { inherit (cfg) addons; };
+ fcitx5Package =
+ if cfg.plasma6Support
+ then pkgs.qt6Packages.fcitx5-with-addons.override { inherit (cfg) addons; }
+ else pkgs.libsForQt5.fcitx5-with-addons.override { inherit (cfg) addons; };
settingsFormat = pkgs.formats.ini { };
in
{
@@ -15,18 +18,27 @@ in
type = with types; listOf package;
default = [ ];
example = literalExpression "with pkgs; [ fcitx5-rime ]";
- description = lib.mdDoc ''
+ description = ''
Enabled Fcitx5 addons.
'';
};
waylandFrontend = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Use the Wayland input method frontend.
See [Using Fcitx 5 on Wayland](https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland).
'';
};
+ plasma6Support = mkOption {
+ type = types.bool;
+ default = config.services.desktopManager.plasma6.enable;
+ defaultText = literalExpression "config.services.desktopManager.plasma6.enable";
+ description = ''
+ Use qt6 versions of fcitx5 packages.
+ Required for configuring fcitx5 in KDE System Settings.
+ '';
+ };
quickPhrase = mkOption {
type = with types; attrsOf str;
default = { };
@@ -36,7 +48,7 @@ in
angry = "( ̄ー ̄)";
}
'';
- description = lib.mdDoc "Quick phrases.";
+ description = "Quick phrases.";
};
quickPhraseFiles = mkOption {
type = with types; attrsOf path;
@@ -47,7 +59,7 @@ in
numbers = ./numbers.mb;
}
'';
- description = lib.mdDoc "Quick phrase files.";
+ description = "Quick phrase files.";
};
settings = {
globalOptions = lib.mkOption {
@@ -55,7 +67,7 @@ in
freeformType = settingsFormat.type;
};
default = { };
- description = lib.mdDoc ''
+ description = ''
The global options in `config` file in ini format.
'';
};
@@ -64,14 +76,14 @@ in
freeformType = settingsFormat.type;
};
default = { };
- description = lib.mdDoc ''
+ description = ''
The input method configure in `profile` file in ini format.
'';
};
addons = lib.mkOption {
type = with lib.types; (attrsOf anything);
default = { };
- description = lib.mdDoc ''
+ description = ''
The addon configures in `conf` folder in ini format with global sections.
Each item is written to the corresponding file.
'';
@@ -81,7 +93,7 @@ in
ignoreUserConfig = lib.mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Ignore the user configures. **Warning**: When this is enabled, the
user config files are totally ignored and the user dict can't be saved
and loaded.
diff --git a/third_party/nixpkgs/nixos/modules/i18n/input-method/ibus.nix b/third_party/nixpkgs/nixos/modules/i18n/input-method/ibus.nix
index a81ce828b1..c82f009925 100644
--- a/third_party/nixpkgs/nixos/modules/i18n/input-method/ibus.nix
+++ b/third_party/nixpkgs/nixos/modules/i18n/input-method/ibus.nix
@@ -41,14 +41,13 @@ in
enginesDrv = filterAttrs (const isDerivation) pkgs.ibus-engines;
engines = concatStringsSep ", "
(map (name: "`${name}`") (attrNames enginesDrv));
- in
- lib.mdDoc "Enabled IBus engines. Available engines are: ${engines}.";
+ in "Enabled IBus engines. Available engines are: ${engines}.";
};
panel = mkOption {
type = with types; nullOr path;
default = null;
example = literalExpression ''"''${pkgs.plasma5Packages.plasma-desktop}/libexec/kimpanel-ibus-panel"'';
- description = lib.mdDoc "Replace the IBus panel with another panel.";
+ description = "Replace the IBus panel with another panel.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/i18n/input-method/kime.nix b/third_party/nixpkgs/nixos/modules/i18n/input-method/kime.nix
index e82996926b..1fea3aeccf 100644
--- a/third_party/nixpkgs/nixos/modules/i18n/input-method/kime.nix
+++ b/third_party/nixpkgs/nixos/modules/i18n/input-method/kime.nix
@@ -10,7 +10,7 @@ in {
type = lib.types.listOf (lib.types.enum [ "Xim" "Wayland" "Indicator" ]);
default = [ "Xim" "Wayland" "Indicator" ];
example = [ "Xim" "Indicator" ];
- description = lib.mdDoc ''
+ description = ''
List of enabled daemon modules
'';
};
@@ -18,14 +18,14 @@ in {
type = lib.types.enum [ "Black" "White" ];
default = "Black";
example = "White";
- description = lib.mdDoc ''
+ description = ''
Color of the indicator icon
'';
};
extraConfig = lib.mkOption {
type = lib.types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
extra kime configuration. Refer to for details on supported values.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/i18n/input-method/uim.nix b/third_party/nixpkgs/nixos/modules/i18n/input-method/uim.nix
index 7225783b2a..6a636a771c 100644
--- a/third_party/nixpkgs/nixos/modules/i18n/input-method/uim.nix
+++ b/third_party/nixpkgs/nixos/modules/i18n/input-method/uim.nix
@@ -13,7 +13,7 @@ in
type = types.enum [ "gtk" "gtk3" "gtk-systray" "gtk3-systray" "qt5" ];
default = "gtk";
example = "gtk-systray";
- description = lib.mdDoc ''
+ description = ''
selected UIM toolbar.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/image/repart-image.nix b/third_party/nixpkgs/nixos/modules/image/repart-image.nix
index 7ac47ee32f..59d5fc26ef 100644
--- a/third_party/nixpkgs/nixos/modules/image/repart-image.nix
+++ b/third_party/nixpkgs/nixos/modules/image/repart-image.nix
@@ -2,6 +2,7 @@
# NixOS module that can be imported.
{ lib
+, stdenvNoCC
, runCommand
, python3
, black
@@ -25,17 +26,40 @@
, xz
# arguments
+, name
+, version
, imageFileBasename
, compression
, fileSystems
-, partitions
+, partitionsJSON
, split
, seed
, definitionsDirectory
, sectorSize
+, mkfsEnv ? {}
+, createEmpty ? true
}:
let
+ systemdArch = let
+ inherit (stdenvNoCC) hostPlatform;
+ in
+ if hostPlatform.isAarch32 then "arm"
+ else if hostPlatform.isAarch64 then "arm64"
+ else if hostPlatform.isx86_32 then "x86"
+ else if hostPlatform.isx86_64 then "x86-64"
+ else if hostPlatform.isMips32 then "mips-le"
+ else if hostPlatform.isMips64 then "mips64-le"
+ else if hostPlatform.isPower then "ppc"
+ else if hostPlatform.isPower64 then "ppc64"
+ else if hostPlatform.isRiscV32 then "riscv32"
+ else if hostPlatform.isRiscV64 then "riscv64"
+ else if hostPlatform.isS390 then "s390"
+ else if hostPlatform.isS390x then "s390x"
+ else if hostPlatform.isLoongArch64 then "loongarch64"
+ else if hostPlatform.isAlpha then "alpha"
+ else hostPlatform.parsed.cpu.name;
+
amendRepartDefinitions = runCommand "amend-repart-definitions.py"
{
# TODO: ruff does not splice properly in nativeBuildInputs
@@ -71,42 +95,89 @@ let
"xz" = "xz --keep --verbose --threads=0 -${toString compression.level}";
}."${compression.algorithm}";
in
+ stdenvNoCC.mkDerivation (finalAttrs:
+ (if (version != null)
+ then { pname = name; inherit version; }
+ else { inherit name; }
+ ) // {
+ __structuredAttrs = true;
-runCommand imageFileBasename
-{
nativeBuildInputs = [
systemd
fakeroot
util-linux
+ ] ++ lib.optionals (compression.enable) [
compressionPkg
] ++ fileSystemTools;
-} ''
- amendedRepartDefinitions=$(${amendRepartDefinitions} ${partitions} ${definitionsDirectory})
- mkdir -p $out
- cd $out
+ env = mkfsEnv;
- echo "Building image with systemd-repart..."
- unshare --map-root-user fakeroot systemd-repart \
- --dry-run=no \
- --empty=create \
- --size=auto \
- --seed="${seed}" \
- --definitions="$amendedRepartDefinitions" \
- --split="${lib.boolToString split}" \
- --json=pretty \
- ${lib.optionalString (sectorSize != null) "--sector-size=${toString sectorSize}"} \
- ${imageFileBasename}.raw \
- | tee repart-output.json
+ inherit partitionsJSON definitionsDirectory;
+ # relative path to the repart definitions that are read by systemd-repart
+ finalRepartDefinitions = "repart.d";
+
+ systemdRepartFlags = [
+ "--architecture=${systemdArch}"
+ "--dry-run=no"
+ "--size=auto"
+ "--seed=${seed}"
+ "--definitions=${finalAttrs.finalRepartDefinitions}"
+ "--split=${lib.boolToString split}"
+ "--json=pretty"
+ ] ++ lib.optionals createEmpty [
+ "--empty=create"
+ ] ++ lib.optionals (sectorSize != null) [
+ "--sector-size=${toString sectorSize}"
+ ];
+
+ dontUnpack = true;
+ dontConfigure = true;
+ doCheck = false;
+
+ patchPhase = ''
+ runHook prePatch
+
+ amendedRepartDefinitionsDir=$(${amendRepartDefinitions} $partitionsJSON $definitionsDirectory)
+ ln -vs $amendedRepartDefinitionsDir $finalRepartDefinitions
+
+ runHook postPatch
+ '';
+
+ buildPhase = ''
+ runHook preBuild
+
+ echo "Building image with systemd-repart..."
+ unshare --map-root-user fakeroot systemd-repart \
+ ''${systemdRepartFlags[@]} \
+ ${imageFileBasename}.raw \
+ | tee repart-output.json
+
+ runHook postBuild
+ '';
+
+ installPhase = ''
+ runHook preInstall
+
+ mkdir -p $out
+ ''
# Compression is implemented in the same derivation as opposed to in a
# separate derivation to allow users to save disk space. Disk images are
# already very space intensive so we want to allow users to mitigate this.
- if ${lib.boolToString compression.enable}; then
+ + lib.optionalString compression.enable
+ ''
for f in ${imageFileBasename}*; do
echo "Compressing $f with ${compression.algorithm}..."
# Keep the original file when compressing and only delete it afterwards
${compressionCommand} $f && rm $f
done
- fi
-''
+ '' + ''
+ mv -v repart-output.json ${imageFileBasename}* $out
+
+ runHook postInstall
+ '';
+
+ passthru = {
+ inherit amendRepartDefinitions;
+ };
+})
diff --git a/third_party/nixpkgs/nixos/modules/image/repart.nix b/third_party/nixpkgs/nixos/modules/image/repart.nix
index 6a933f0d83..e471f9485c 100644
--- a/third_party/nixpkgs/nixos/modules/image/repart.nix
+++ b/third_party/nixpkgs/nixos/modules/image/repart.nix
@@ -6,18 +6,20 @@
let
cfg = config.image.repart;
+ inherit (utils.systemdUtils.lib) GPTMaxLabelLength;
+
partitionOptions = {
options = {
storePaths = lib.mkOption {
type = with lib.types; listOf path;
default = [ ];
- description = lib.mdDoc "The store paths to include in the partition.";
+ description = "The store paths to include in the partition.";
};
stripNixStorePrefix = lib.mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to strip `/nix/store/` from the store paths. This is useful
when you want to build a partition that only contains store paths and
is mounted under `/nix/store`.
@@ -29,7 +31,7 @@ let
options = {
source = lib.mkOption {
type = types.path;
- description = lib.mdDoc "Path of the source file.";
+ description = "Path of the source file.";
};
};
});
@@ -42,7 +44,7 @@ let
"/loader/entries/nixos.conf".source = systemdBootEntry;
}
'';
- description = lib.mdDoc "The contents to end up in the filesystem image.";
+ description = "The contents to end up in the filesystem image.";
};
repartConfig = lib.mkOption {
@@ -52,7 +54,7 @@ let
SizeMinBytes = "512M";
SizeMaxBytes = "2G";
};
- description = lib.mdDoc ''
+ description = ''
Specify the repart options for a partiton as a structural setting.
See
for all available options.
@@ -60,13 +62,18 @@ let
};
};
};
+
+ mkfsOptionsToEnv = opts: lib.mapAttrs' (fsType: options: {
+ name = "SYSTEMD_REPART_MKFS_OPTIONS_${lib.toUpper fsType}";
+ value = builtins.concatStringsSep " " options;
+ }) opts;
in
{
options.image.repart = {
name = lib.mkOption {
type = lib.types.str;
- description = lib.mdDoc ''
+ description = ''
Name of the image.
If this option is unset but config.system.image.id is set,
@@ -78,13 +85,13 @@ in
type = lib.types.nullOr lib.types.str;
default = config.system.image.version;
defaultText = lib.literalExpression "config.system.image.version";
- description = lib.mdDoc "Version of the image";
+ description = "Version of the image";
};
imageFileBasename = lib.mkOption {
type = lib.types.str;
readOnly = true;
- description = lib.mdDoc ''
+ description = ''
Basename of the image filename without any extension (e.g. `image_1`).
'';
};
@@ -92,24 +99,24 @@ in
imageFile = lib.mkOption {
type = lib.types.str;
readOnly = true;
- description = lib.mdDoc ''
+ description = ''
Filename of the image including all extensions (e.g `image_1.raw` or
`image_1.raw.zst`).
'';
};
compression = {
- enable = lib.mkEnableOption (lib.mdDoc "Image compression");
+ enable = lib.mkEnableOption "Image compression";
algorithm = lib.mkOption {
type = lib.types.enum [ "zstd" "xz" ];
default = "zstd";
- description = lib.mdDoc "Compression algorithm";
+ description = "Compression algorithm";
};
level = lib.mkOption {
type = lib.types.int;
- description = lib.mdDoc ''
+ description = ''
Compression level. The available range depends on the used algorithm.
'';
};
@@ -119,7 +126,7 @@ in
type = with lib.types; nullOr str;
# Generated with `uuidgen`. Random but fixed to improve reproducibility.
default = "0867da16-f251-457d-a9e8-c31f9a3c220b";
- description = lib.mdDoc ''
+ description = ''
A UUID to use as a seed. You can set this to `null` to explicitly
randomize the partition UUIDs.
'';
@@ -128,7 +135,7 @@ in
split = lib.mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enables generation of split artifacts from partitions. If enabled, for
each partition with SplitName= set, a separate output file containing
just the contents of that partition is generated.
@@ -139,7 +146,7 @@ in
type = with lib.types; nullOr int;
default = 512;
example = lib.literalExpression "4096";
- description = lib.mdDoc ''
+ description = ''
The sector size of the disk image produced by systemd-repart. This
value must be a power of 2 between 512 and 4096.
'';
@@ -177,16 +184,84 @@ in
};
};
'';
- description = lib.mdDoc ''
+ description = ''
Specify partitions as a set of the names of the partitions with their
configuration as the key.
'';
};
+ mkfsOptions = lib.mkOption {
+ type = with lib.types; attrsOf (listOf str);
+ default = {};
+ example = lib.literalExpression ''
+ {
+ vfat = [ "-S 512" "-c" ];
+ }
+ '';
+ description = ''
+ Specify extra options for created file systems. The specified options
+ are converted to individual environment variables of the format
+ `SYSTEMD_REPART_MKFS_OPTIONS_`.
+
+ See [upstream systemd documentation](https://github.com/systemd/systemd/blob/v255/docs/ENVIRONMENT.md?plain=1#L575-L577)
+ for information about the usage of these environment variables.
+
+ The example would produce the following environment variable:
+ ```
+ SYSTEMD_REPART_MKFS_OPTIONS_VFAT="-S 512 -c"
+ ```
+ '';
+ };
+
+ finalPartitions = lib.mkOption {
+ type = lib.types.attrs;
+ internal = true;
+ readOnly = true;
+ description = ''
+ Convenience option to access partitions with added closures.
+ '';
+ };
+
};
config = {
+ assertions = lib.mapAttrsToList (fileName: partitionConfig:
+ let
+ inherit (partitionConfig) repartConfig;
+ labelLength = builtins.stringLength repartConfig.Label;
+ in
+ {
+ assertion = repartConfig ? Label -> GPTMaxLabelLength >= labelLength;
+ message = ''
+ The partition label '${repartConfig.Label}'
+ defined for '${fileName}' is ${toString labelLength} characters long,
+ but the maximum label length supported by UEFI is ${toString
+ GPTMaxLabelLength}.
+ '';
+ }
+ ) cfg.partitions;
+
+ warnings = lib.filter (v: v != null) (lib.mapAttrsToList (fileName: partitionConfig:
+ let
+ inherit (partitionConfig) repartConfig;
+ suggestedMaxLabelLength = GPTMaxLabelLength - 2;
+ labelLength = builtins.stringLength repartConfig.Label;
+ in
+ if (repartConfig ? Label && labelLength >= suggestedMaxLabelLength) then ''
+ The partition label '${repartConfig.Label}'
+ defined for '${fileName}' is ${toString labelLength} characters long.
+ The suggested maximum label length is ${toString
+ suggestedMaxLabelLength}.
+
+ If you use sytemd-sysupdate style A/B updates, this might
+ not leave enough space to increment the version number included in
+ the label in a future release. For example, if your label is
+ ${toString GPTMaxLabelLength} characters long (the maximum enforced by UEFI) and
+ you're at version 9, you cannot increment this to 10.
+ '' else null
+ ) cfg.partitions);
+
image.repart =
let
version = config.image.repart.version;
@@ -196,6 +271,16 @@ in
"zstd" = ".zst";
"xz" = ".xz";
}."${cfg.compression.algorithm}";
+
+ makeClosure = paths: pkgs.closureInfo { rootPaths = paths; };
+
+ # Add the closure of the provided Nix store paths to cfg.partitions so
+ # that amend-repart-definitions.py can read it.
+ addClosure = _name: partitionConfig: partitionConfig // (
+ lib.optionalAttrs
+ (partitionConfig.storePaths or [ ] != [ ])
+ { closure = "${makeClosure partitionConfig.storePaths}/store-paths"; }
+ );
in
{
name = lib.mkIf (config.system.image.id != null) (lib.mkOptionDefault config.system.image.id);
@@ -211,6 +296,8 @@ in
"xz" = 3;
}."${cfg.compression.algorithm}";
};
+
+ finalPartitions = lib.mapAttrs addClosure cfg.partitions;
};
system.build.image =
@@ -219,34 +306,25 @@ in
(f: f != null)
(lib.mapAttrsToList (_n: v: v.repartConfig.Format or null) cfg.partitions);
- makeClosure = paths: pkgs.closureInfo { rootPaths = paths; };
-
- # Add the closure of the provided Nix store paths to cfg.partitions so
- # that amend-repart-definitions.py can read it.
- addClosure = _name: partitionConfig: partitionConfig // (
- lib.optionalAttrs
- (partitionConfig.storePaths or [ ] != [ ])
- { closure = "${makeClosure partitionConfig.storePaths}/store-paths"; }
- );
-
- finalPartitions = lib.mapAttrs addClosure cfg.partitions;
format = pkgs.formats.ini { };
definitionsDirectory = utils.systemdUtils.lib.definitions
"repart.d"
format
- (lib.mapAttrs (_n: v: { Partition = v.repartConfig; }) finalPartitions);
+ (lib.mapAttrs (_n: v: { Partition = v.repartConfig; }) cfg.finalPartitions);
- partitions = pkgs.writeText "partitions.json" (builtins.toJSON finalPartitions);
+ partitionsJSON = pkgs.writeText "partitions.json" (builtins.toJSON cfg.finalPartitions);
+
+ mkfsEnv = mkfsOptionsToEnv cfg.mkfsOptions;
in
pkgs.callPackage ./repart-image.nix {
systemd = cfg.package;
- inherit (cfg) imageFileBasename compression split seed sectorSize;
- inherit fileSystems definitionsDirectory partitions;
+ inherit (cfg) name version imageFileBasename compression split seed sectorSize;
+ inherit fileSystems definitionsDirectory partitionsJSON mkfsEnv;
};
- meta.maintainers = with lib.maintainers; [ nikstur ];
+ meta.maintainers = with lib.maintainers; [ nikstur willibutz ];
};
}
diff --git a/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix b/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix
index d1a4c27432..1de5ba1138 100644
--- a/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix
+++ b/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix
@@ -35,20 +35,19 @@
QT_QPA_PLATFORM = "$([[ $XDG_SESSION_TYPE = \"wayland\" ]] && echo \"wayland\")";
};
- services.xserver.displayManager = {
- gdm = {
- enable = true;
- # autoSuspend makes the machine automatically suspend after inactivity.
- # It's possible someone could/try to ssh'd into the machine and obviously
- # have issues because it's inactive.
- # See:
- # * https://github.com/NixOS/nixpkgs/pull/63790
- # * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22
- autoSuspend = false;
- };
- autoLogin = {
- enable = true;
- user = "nixos";
- };
+ services.xserver.displayManager.gdm = {
+ enable = true;
+ # autoSuspend makes the machine automatically suspend after inactivity.
+ # It's possible someone could/try to ssh'd into the machine and obviously
+ # have issues because it's inactive.
+ # See:
+ # * https://github.com/NixOS/nixpkgs/pull/63790
+ # * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22
+ autoSuspend = false;
+ };
+
+ services.displayManager.autoLogin = {
+ enable = true;
+ user = "nixos";
};
}
diff --git a/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix b/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix
index a4c46d58c8..61e94ffed8 100644
--- a/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix
+++ b/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix
@@ -8,18 +8,16 @@
isoImage.edition = "plasma5";
- services.xserver = {
- desktopManager.plasma5 = {
- enable = true;
- };
+ services.xserver.desktopManager.plasma5 = {
+ enable = true;
+ };
- # Automatically login as nixos.
- displayManager = {
- sddm.enable = true;
- autoLogin = {
- enable = true;
- user = "nixos";
- };
+ # Automatically login as nixos.
+ services.displayManager = {
+ sddm.enable = true;
+ autoLogin = {
+ enable = true;
+ user = "nixos";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix b/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix
index 11118db3aa..bdcf751bf6 100644
--- a/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix
+++ b/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix
@@ -7,16 +7,14 @@
isoImage.edition = "plasma6";
- services.xserver = {
- desktopManager.plasma6.enable = true;
+ services.desktopManager.plasma6.enable = true;
- # Automatically login as nixos.
- displayManager = {
- sddm.enable = true;
- autoLogin = {
- enable = true;
- user = "nixos";
- };
+ # Automatically login as nixos.
+ services.displayManager = {
+ sddm.enable = true;
+ autoLogin = {
+ enable = true;
+ user = "nixos";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix b/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix
index 573b31b439..b3c605e3f9 100644
--- a/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix
+++ b/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix
@@ -16,21 +16,19 @@
enable = true;
};
- services.xserver.displayManager = {
- gdm = {
- enable = true;
- # autoSuspend makes the machine automatically suspend after inactivity.
- # It's possible someone could/try to ssh'd into the machine and obviously
- # have issues because it's inactive.
- # See:
- # * https://github.com/NixOS/nixpkgs/pull/63790
- # * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22
- autoSuspend = false;
- };
- autoLogin = {
- enable = true;
- user = "nixos";
- };
+ services.xserver.displayManager.gdm = {
+ enable = true;
+ # autoSuspend makes the machine automatically suspend after inactivity.
+ # It's possible someone could/try to ssh'd into the machine and obviously
+ # have issues because it's inactive.
+ # See:
+ # * https://github.com/NixOS/nixpkgs/pull/63790
+ # * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22
+ autoSuspend = false;
};
+ services.displayManager.autoLogin = {
+ enable = true;
+ user = "nixos";
+ };
}
diff --git a/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix b/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix
index 5c7617c9f8..ce111bcebd 100644
--- a/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix
+++ b/third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix
@@ -8,18 +8,16 @@
isoImage.edition = "plasma5";
- services.xserver = {
- desktopManager.plasma5 = {
- enable = true;
- };
+ services.xserver.desktopManager.plasma5 = {
+ enable = true;
+ };
- # Automatically login as nixos.
- displayManager = {
- sddm.enable = true;
- autoLogin = {
- enable = true;
- user = "nixos";
- };
+ # Automatically login as nixos.
+ services.displayManager = {
+ sddm.enable = true;
+ autoLogin = {
+ enable = true;
+ user = "nixos";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/installer/cd-dvd/iso-image.nix b/third_party/nixpkgs/nixos/modules/installer/cd-dvd/iso-image.nix
index 6adb94e09a..06949bda1c 100644
--- a/third_party/nixpkgs/nixos/modules/installer/cd-dvd/iso-image.nix
+++ b/third_party/nixpkgs/nixos/modules/installer/cd-dvd/iso-image.nix
@@ -483,7 +483,7 @@ in
isoImage.isoName = mkOption {
default = "${config.isoImage.isoBaseName}.iso";
type = lib.types.str;
- description = lib.mdDoc ''
+ description = ''
Name of the generated ISO image file.
'';
};
@@ -491,7 +491,7 @@ in
isoImage.isoBaseName = mkOption {
default = config.system.nixos.distroId;
type = lib.types.str;
- description = lib.mdDoc ''
+ description = ''
Prefix of the name of the generated ISO image file.
'';
};
@@ -499,7 +499,7 @@ in
isoImage.compressImage = mkOption {
default = false;
type = lib.types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether the ISO image should be compressed using
{command}`zstd`.
'';
@@ -513,7 +513,7 @@ in
+ lib.optionalString (isPower && is32bit && isBigEndian) "-Xbcj powerpc"
+ lib.optionalString (isSparc) "-Xbcj sparc";
type = lib.types.nullOr lib.types.str;
- description = lib.mdDoc ''
+ description = ''
Compression settings to use for the squashfs nix store.
`null` disables compression.
'';
@@ -523,7 +523,7 @@ in
isoImage.edition = mkOption {
default = "";
type = lib.types.str;
- description = lib.mdDoc ''
+ description = ''
Specifies which edition string to use in the volume ID of the generated
ISO image.
'';
@@ -533,7 +533,7 @@ in
# nixos-$EDITION-$RELEASE-$ARCH
default = "nixos${optionalString (config.isoImage.edition != "") "-${config.isoImage.edition}"}-${config.system.nixos.release}-${pkgs.stdenv.hostPlatform.uname.processor}";
type = lib.types.str;
- description = lib.mdDoc ''
+ description = ''
Specifies the label or volume ID of the generated ISO image.
Note that the label is used by stage 1 of the boot process to
mount the CD, so it should be reasonably distinctive.
@@ -547,7 +547,7 @@ in
}
]
'';
- description = lib.mdDoc ''
+ description = ''
This option lists files to be copied to fixed locations in the
generated ISO image.
'';
@@ -555,7 +555,7 @@ in
isoImage.storeContents = mkOption {
example = literalExpression "[ pkgs.stdenv ]";
- description = lib.mdDoc ''
+ description = ''
This option lists additional derivations to be included in the
Nix store in the generated ISO image.
'';
@@ -564,7 +564,7 @@ in
isoImage.includeSystemBuildDependencies = mkOption {
default = false;
type = lib.types.bool;
- description = lib.mdDoc ''
+ description = ''
Set this option to include all the needed sources etc in the
image. It significantly increases image size. Use that when
you want to be able to keep all the sources needed to build your
@@ -586,7 +586,7 @@ in
e.g. i686 and x86_64.
'';
type = lib.types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether the ISO image should be a BIOS-bootable disk.
'';
};
@@ -594,7 +594,7 @@ in
isoImage.makeEfiBootable = mkOption {
default = false;
type = lib.types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether the ISO image should be an EFI-bootable volume.
'';
};
@@ -602,7 +602,7 @@ in
isoImage.makeUsbBootable = mkOption {
default = false;
type = lib.types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether the ISO image should be bootable from CD as well as USB.
'';
};
@@ -612,7 +612,7 @@ in
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/a9e05d7deb38a8e005a2b52575a3f59a63a4dba0/bootloader/efi-background.png";
sha256 = "18lfwmp8yq923322nlb9gxrh5qikj1wsk6g5qvdh31c4h5b1538x";
};
- description = lib.mdDoc ''
+ description = ''
The splash image to use in the EFI bootloader.
'';
};
@@ -622,7 +622,7 @@ in
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/a9e05d7deb38a8e005a2b52575a3f59a63a4dba0/bootloader/isolinux/bios-boot.png";
sha256 = "1wp822zrhbg4fgfbwkr7cbkr4labx477209agzc0hr6k62fr6rxd";
};
- description = lib.mdDoc ''
+ description = ''
The splash image to use in the legacy-boot bootloader.
'';
};
@@ -630,7 +630,7 @@ in
isoImage.grubTheme = mkOption {
default = pkgs.nixos-grub2-theme;
type = types.nullOr (types.either types.path types.package);
- description = lib.mdDoc ''
+ description = ''
The grub2 theme used for UEFI boot.
'';
};
@@ -661,7 +661,7 @@ in
MENU COLOR SEL 7;37;40 #FFFFFFFF #FF5277C3 std
'';
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The syslinux theme used for BIOS boot.
'';
};
@@ -670,7 +670,7 @@ in
default = "";
type = types.str;
example = "Install ";
- description = lib.mdDoc ''
+ description = ''
The string to prepend before the menu label for the NixOS system.
This will be directly prepended (without whitespace) to the NixOS version
string, like for example if it is set to `XXX`:
@@ -683,7 +683,7 @@ in
default = " Installer";
type = types.str;
example = " Live System";
- description = lib.mdDoc ''
+ description = ''
The string to append after the menu label for the NixOS system.
This will be directly appended (without whitespace) to the NixOS version
string, like for example if it is set to `XXX`:
@@ -696,7 +696,7 @@ in
default = false;
type = types.bool;
example = true;
- description = lib.mdDoc ''
+ description = ''
Whether to use text mode instead of graphical grub.
A value of `true` means graphical mode is not tried to be used.
@@ -811,12 +811,6 @@ in
optional config.isoImage.includeSystemBuildDependencies
config.system.build.toplevel.drvPath;
- # Create the squashfs image that contains the Nix store.
- system.build.squashfsStore = pkgs.callPackage ../../../lib/make-squashfs.nix {
- storeContents = config.isoImage.storeContents;
- comp = config.isoImage.squashfsCompression;
- };
-
# Individual files to be included on the CD, outside of the Nix
# store on the CD.
isoImage.contents =
@@ -827,9 +821,6 @@ in
{ source = config.system.build.initialRamdisk + "/" + config.system.boot.loader.initrdFile;
target = "/boot/" + config.system.boot.loader.initrdFile;
}
- { source = config.system.build.squashfsStore;
- target = "/nix-store.squashfs";
- }
{ source = pkgs.writeText "version" config.system.nixos.label;
target = "/version.txt";
}
@@ -878,6 +869,8 @@ in
bootable = config.isoImage.makeBiosBootable;
bootImage = "/isolinux/isolinux.bin";
syslinux = if config.isoImage.makeBiosBootable then pkgs.syslinux else null;
+ squashfsContents = config.isoImage.storeContents;
+ squashfsCompression = config.isoImage.squashfsCompression;
} // optionalAttrs (config.isoImage.makeUsbBootable && config.isoImage.makeBiosBootable) {
usbBootable = true;
isohybridMbrImage = "${pkgs.syslinux}/share/syslinux/isohdpfx.bin";
diff --git a/third_party/nixpkgs/nixos/modules/installer/netboot/netboot.nix b/third_party/nixpkgs/nixos/modules/installer/netboot/netboot.nix
index 028a2d7404..c88a53393d 100644
--- a/third_party/nixpkgs/nixos/modules/installer/netboot/netboot.nix
+++ b/third_party/nixpkgs/nixos/modules/installer/netboot/netboot.nix
@@ -15,7 +15,7 @@ with lib;
+ lib.optionalString isAarch "-Xbcj arm"
+ lib.optionalString (isPower && is32bit && isBigEndian) "-Xbcj powerpc"
+ lib.optionalString (isSparc) "-Xbcj sparc";
- description = lib.mdDoc ''
+ description = ''
Compression settings to use for the squashfs nix store.
'';
example = "zstd -Xcompression-level 6";
@@ -24,7 +24,7 @@ with lib;
netboot.storeContents = mkOption {
example = literalExpression "[ pkgs.stdenv ]";
- description = lib.mdDoc ''
+ description = ''
This option lists additional derivations to be included in the
Nix store in the generated netboot image.
'';
diff --git a/third_party/nixpkgs/nixos/modules/installer/sd-card/sd-image.nix b/third_party/nixpkgs/nixos/modules/installer/sd-card/sd-image.nix
index ad9b803b1d..1c79bf4ac3 100644
--- a/third_party/nixpkgs/nixos/modules/installer/sd-card/sd-image.nix
+++ b/third_party/nixpkgs/nixos/modules/installer/sd-card/sd-image.nix
@@ -35,14 +35,14 @@ in
options.sdImage = {
imageName = mkOption {
default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.img";
- description = lib.mdDoc ''
+ description = ''
Name of the generated image file.
'';
};
imageBaseName = mkOption {
default = "nixos-sd-image";
- description = lib.mdDoc ''
+ description = ''
Prefix of the name of the generated image file.
'';
};
@@ -50,7 +50,7 @@ in
storePaths = mkOption {
type = with types; listOf package;
example = literalExpression "[ pkgs.stdenv ]";
- description = lib.mdDoc ''
+ description = ''
Derivations to be included in the Nix store in the generated SD image.
'';
};
@@ -58,7 +58,7 @@ in
firmwarePartitionOffset = mkOption {
type = types.int;
default = 8;
- description = lib.mdDoc ''
+ description = ''
Gap in front of the /boot/firmware partition, in mebibytes (1024×1024
bytes).
Can be increased to make more space for boards requiring to dd u-boot
@@ -74,7 +74,7 @@ in
firmwarePartitionID = mkOption {
type = types.str;
default = "0x2178694e";
- description = lib.mdDoc ''
+ description = ''
Volume ID for the /boot/firmware partition on the SD card. This value
must be a 32-bit hexadecimal number.
'';
@@ -83,7 +83,7 @@ in
firmwarePartitionName = mkOption {
type = types.str;
default = "FIRMWARE";
- description = lib.mdDoc ''
+ description = ''
Name of the filesystem which holds the boot firmware.
'';
};
@@ -92,7 +92,7 @@ in
type = types.nullOr types.str;
default = null;
example = "14e19a7b-0ae0-484d-9d54-43bd6fdc20c7";
- description = lib.mdDoc ''
+ description = ''
UUID for the filesystem on the main NixOS partition on the SD card.
'';
};
@@ -101,14 +101,14 @@ in
type = types.int;
# As of 2019-08-18 the Raspberry pi firmware + u-boot takes ~18MiB
default = 30;
- description = lib.mdDoc ''
+ description = ''
Size of the /boot/firmware partition, in megabytes.
'';
};
populateFirmwareCommands = mkOption {
example = literalExpression "'' cp \${pkgs.myBootLoader}/u-boot.bin firmware/ ''";
- description = lib.mdDoc ''
+ description = ''
Shell commands to populate the ./firmware directory.
All files in that directory are copied to the
/boot/firmware partition on the SD image.
@@ -117,7 +117,7 @@ in
populateRootCommands = mkOption {
example = literalExpression "''\${config.boot.loader.generic-extlinux-compatible.populateCmd} -c \${config.system.build.toplevel} -d ./files/boot''";
- description = lib.mdDoc ''
+ description = ''
Shell commands to populate the ./files directory.
All files in that directory are copied to the
root (/) partition on the SD image. Use this to
@@ -128,7 +128,7 @@ in
postBuildCommands = mkOption {
example = literalExpression "'' dd if=\${pkgs.myBootLoader}/SPL of=$img bs=1024 seek=1 conv=notrunc ''";
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell commands to run after the image is built.
Can be used for boards requiring to dd u-boot SPL before actual partitions.
'';
@@ -137,7 +137,7 @@ in
compressImage = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether the SD image should be compressed using
{command}`zstd`.
'';
@@ -146,7 +146,7 @@ in
expandOnBoot = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to configure the sd image to expand it's partition on boot.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/installer/tools/nixos-generate-config.pl b/third_party/nixpkgs/nixos/modules/installer/tools/nixos-generate-config.pl
index 2f9edba4f0..cf4173638b 100644
--- a/third_party/nixpkgs/nixos/modules/installer/tools/nixos-generate-config.pl
+++ b/third_party/nixpkgs/nixos/modules/installer/tools/nixos-generate-config.pl
@@ -257,7 +257,7 @@ foreach my $path (glob "/sys/class/{block,mmc_host}/*") {
# Add bcache module, if needed.
my @bcacheDevices = glob("/dev/bcache*");
-@bcacheDevices = grep(!qr#dev/bcachefs.*#, @bcacheDevices);
+@bcacheDevices = grep(!m#dev/bcachefs.*#, @bcacheDevices);
if (scalar @bcacheDevices > 0) {
push @initrdAvailableKernelModules, "bcache";
}
@@ -453,6 +453,17 @@ EOF
}
}
+ # Preserve umask (fmask, dmask) settings for vfat filesystems.
+ # (The default is to mount these world-readable, but that's a security risk
+ # for the EFI System Partition.)
+ if ($fsType eq "vfat") {
+ for (@superOptions) {
+ if ($_ =~ /fmask|dmask/) {
+ push @extraOptions, $_;
+ }
+ }
+ }
+
# is this a stratis fs?
my $stableDevPath = findStableDevPath $device;
my $stratisPool;
diff --git a/third_party/nixpkgs/nixos/modules/installer/tools/tools.nix b/third_party/nixpkgs/nixos/modules/installer/tools/tools.nix
index a7d11370d4..e7f9990e96 100644
--- a/third_party/nixpkgs/nixos/modules/installer/tools/tools.nix
+++ b/third_party/nixpkgs/nixos/modules/installer/tools/tools.nix
@@ -87,7 +87,7 @@ in
configuration = mkOption {
internal = true;
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The NixOS module that `nixos-generate-config`
saves to `/etc/nixos/configuration.nix`.
@@ -104,7 +104,7 @@ in
internal = true;
type = types.listOf types.lines;
default = [];
- description = lib.mdDoc ''
+ description = ''
Text to preseed the desktop configuration that `nixos-generate-config`
saves to `/etc/nixos/configuration.nix`.
@@ -122,7 +122,7 @@ in
internal = true;
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Disable nixos-rebuild, nixos-generate-config, nixos-installer
and other NixOS tools. This is useful to shrink embedded,
read-only systems which are not expected to be rebuild or
@@ -177,8 +177,12 @@ in
# services.printing.enable = true;
# Enable sound.
- # sound.enable = true;
# hardware.pulseaudio.enable = true;
+ # OR
+ # services.pipewire = {
+ # enable = true;
+ # pulse.enable = true;
+ # };
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
diff --git a/third_party/nixpkgs/nixos/modules/installer/virtualbox-demo.nix b/third_party/nixpkgs/nixos/modules/installer/virtualbox-demo.nix
index 01931b2acf..289a8cf9e5 100644
--- a/third_party/nixpkgs/nixos/modules/installer/virtualbox-demo.nix
+++ b/third_party/nixpkgs/nixos/modules/installer/virtualbox-demo.nix
@@ -40,7 +40,7 @@ with lib;
# If you prefer another desktop manager or display manager, you may want
# to disable the default.
# services.xserver.desktopManager.plasma5.enable = lib.mkForce false;
- # services.xserver.displayManager.sddm.enable = lib.mkForce false;
+ # services.displayManager.sddm.enable = lib.mkForce false;
# Enable GDM/GNOME by uncommenting above two lines and two lines below.
# services.xserver.displayManager.gdm.enable = true;
diff --git a/third_party/nixpkgs/nixos/modules/misc/assertions.nix b/third_party/nixpkgs/nixos/modules/misc/assertions.nix
index 364bb02be8..550b3ac97f 100644
--- a/third_party/nixpkgs/nixos/modules/misc/assertions.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/assertions.nix
@@ -11,7 +11,7 @@ with lib;
internal = true;
default = [];
example = [ { assertion = false; message = "you can't enable this for that reason"; } ];
- description = lib.mdDoc ''
+ description = ''
This option allows modules to express conditions that must
hold for the evaluation of the system configuration to
succeed, along with associated error messages for the user.
@@ -23,7 +23,7 @@ with lib;
default = [];
type = types.listOf types.str;
example = [ "The `foo' service is deprecated and will go away soon!" ];
- description = lib.mdDoc ''
+ description = ''
This option allows modules to show warnings to users during
the evaluation of the system configuration.
'';
diff --git a/third_party/nixpkgs/nixos/modules/misc/crashdump.nix b/third_party/nixpkgs/nixos/modules/misc/crashdump.nix
index 4ae18984ee..b0f75d9caa 100644
--- a/third_party/nixpkgs/nixos/modules/misc/crashdump.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/crashdump.nix
@@ -16,7 +16,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If enabled, NixOS will set up a kernel that will
boot on crash, and leave the user in systemd rescue
to be able to save the crashed kernel dump at
@@ -27,7 +27,7 @@ in
reservedMemory = mkOption {
default = "128M";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The amount of memory reserved for the crashdump kernel.
If you choose a too high value, dmesg will mention
"crashkernel reservation failed".
@@ -36,7 +36,7 @@ in
kernelParams = mkOption {
type = types.listOf types.str;
default = [ "1" "boot.shell_on_fail" ];
- description = lib.mdDoc ''
+ description = ''
Parameters that will be passed to the kernel kexec-ed on crash.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/misc/documentation.nix b/third_party/nixpkgs/nixos/modules/misc/documentation.nix
index f3e698468e..2a25f8e564 100644
--- a/third_party/nixpkgs/nixos/modules/misc/documentation.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/documentation.nix
@@ -1,8 +1,32 @@
{ config, options, lib, pkgs, utils, modules, baseModules, extraModules, modulesPath, specialArgs, ... }:
-with lib;
-
let
+ inherit (lib)
+ cleanSourceFilter
+ concatMapStringsSep
+ evalModules
+ filter
+ functionArgs
+ hasSuffix
+ isAttrs
+ isDerivation
+ isFunction
+ isPath
+ literalExpression
+ mapAttrs
+ mkIf
+ mkMerge
+ mkOption
+ mkRemovedOptionModule
+ mkRenamedOptionModule
+ optional
+ optionalAttrs
+ optionals
+ partition
+ removePrefix
+ types
+ warn
+ ;
cfg = config.documentation;
allOpts = options;
@@ -13,7 +37,7 @@ let
instance = f (mapAttrs (n: _: abort "evaluating ${n} for `meta` failed") (functionArgs f));
in
cfg.nixos.options.splitBuild
- && builtins.isPath m
+ && isPath m
&& isFunction f
&& instance ? options
&& instance.meta.buildDocsInSandbox or true;
@@ -51,12 +75,12 @@ let
(name: value:
let
wholeName = "${namePrefix}.${name}";
- guard = lib.warn "Attempt to evaluate package ${wholeName} in option documentation; this is not supported and will eventually be an error. Use `mkPackageOption{,MD}` or `literalExpression` instead.";
+ guard = warn "Attempt to evaluate package ${wholeName} in option documentation; this is not supported and will eventually be an error. Use `mkPackageOption{,MD}` or `literalExpression` instead.";
in if isAttrs value then
scrubDerivations wholeName value
// optionalAttrs (isDerivation value) {
outPath = guard "\${${wholeName}}";
- drvPath = guard drvPath;
+ drvPath = guard value.drvPath;
}
else value
)
@@ -176,7 +200,7 @@ in
enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to install documentation of packages from
{option}`environment.systemPackages` into the generated system path.
@@ -188,7 +212,7 @@ in
man.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to install manual pages.
This also includes `man` outputs.
'';
@@ -197,7 +221,7 @@ in
man.generateCaches = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Whether to generate the manual page index caches.
This allows searching for a page or
keyword using utilities like {manpage}`apropos(1)`
@@ -209,7 +233,7 @@ in
info.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to install info pages and the {command}`info` command.
This also includes "info" outputs.
'';
@@ -218,7 +242,7 @@ in
doc.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to install documentation distributed in packages' `/share/doc`.
Usually plain text and/or HTML.
This also includes "doc" outputs.
@@ -228,7 +252,7 @@ in
dev.enable = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Whether to install documentation targeted at developers.
* This includes man pages targeted at developers if {option}`documentation.man.enable` is
set (this also includes "devman" outputs).
@@ -242,7 +266,7 @@ in
nixos.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to install NixOS's own documentation.
- This includes man pages like
@@ -256,7 +280,7 @@ in
nixos.extraModules = mkOption {
type = types.listOf types.raw;
default = [];
- description = lib.mdDoc ''
+ description = ''
Modules for which to show options even when not imported.
'';
};
@@ -264,7 +288,7 @@ in
nixos.options.splitBuild = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to split the option docs build into a cacheable and an uncacheable part.
Splitting the build can substantially decrease the amount of time needed to build
the manual, but some user modules may be incompatible with this splitting.
@@ -274,7 +298,7 @@ in
nixos.options.warningsAreErrors = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Treat warning emitted during the option documentation build (eg for missing option
descriptions) as errors.
'';
@@ -283,7 +307,7 @@ in
nixos.includeAllModules = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether the generated NixOS's documentation should include documentation for all
the options from all the NixOS modules included in the current
`configuration.nix`. Disabling this will make the manual
@@ -294,7 +318,7 @@ in
nixos.extraModuleSources = mkOption {
type = types.listOf (types.either types.path types.str);
default = [ ];
- description = lib.mdDoc ''
+ description = ''
Which extra NixOS module paths the generated NixOS's documentation should strip
from options.
'';
diff --git a/third_party/nixpkgs/nixos/modules/misc/documentation/test.nix b/third_party/nixpkgs/nixos/modules/misc/documentation/test.nix
index dd1588abdb..1eaa63b1fb 100644
--- a/third_party/nixpkgs/nixos/modules/misc/documentation/test.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/documentation/test.nix
@@ -30,7 +30,7 @@ let
specialArgs.someArg.myModule = { lib, ... }: {
options.foobar = lib.mkOption {
type = lib.types.str;
- description = lib.mdDoc "The foobar option was added via specialArgs";
+ description = "The foobar option was added via specialArgs";
default = "qux";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/misc/ids.nix b/third_party/nixpkgs/nixos/modules/misc/ids.nix
index cfa98c838a..f26917c0ba 100644
--- a/third_party/nixpkgs/nixos/modules/misc/ids.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/ids.nix
@@ -19,7 +19,7 @@ in
ids.uids = lib.mkOption {
internal = true;
- description = lib.mdDoc ''
+ description = ''
The user IDs used in NixOS.
'';
type = types.attrsOf types.int;
@@ -27,7 +27,7 @@ in
ids.gids = lib.mkOption {
internal = true;
- description = lib.mdDoc ''
+ description = ''
The group IDs used in NixOS.
'';
type = types.attrsOf types.int;
diff --git a/third_party/nixpkgs/nixos/modules/misc/label.nix b/third_party/nixpkgs/nixos/modules/misc/label.nix
index 44ee812249..c7177f65a0 100644
--- a/third_party/nixpkgs/nixos/modules/misc/label.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/label.nix
@@ -12,7 +12,7 @@ in
nixos.label = mkOption {
type = types.strMatching "[a-zA-Z0-9:_\\.-]*";
- description = lib.mdDoc ''
+ description = ''
NixOS version name to be used in the names of generated
outputs and boot labels.
@@ -47,7 +47,7 @@ in
type = types.listOf types.str;
default = [];
example = [ "with-xen" ];
- description = lib.mdDoc ''
+ description = ''
Strings to prefix to the default
{option}`system.nixos.label`.
diff --git a/third_party/nixpkgs/nixos/modules/misc/lib.nix b/third_party/nixpkgs/nixos/modules/misc/lib.nix
index f97e9209e2..121f396701 100644
--- a/third_party/nixpkgs/nixos/modules/misc/lib.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/lib.nix
@@ -7,7 +7,7 @@
type = lib.types.attrsOf lib.types.attrs;
- description = lib.mdDoc ''
+ description = ''
This option allows modules to define helper functions, constants, etc.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/misc/locate.nix b/third_party/nixpkgs/nixos/modules/misc/locate.nix
index 0dd4bf3f16..84c711c2b4 100644
--- a/third_party/nixpkgs/nixos/modules/misc/locate.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/locate.nix
@@ -20,7 +20,7 @@ in
enable = mkOption {
type = bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If enabled, NixOS will periodically update the database of
files used by the {command}`locate` command.
'';
@@ -34,7 +34,7 @@ in
type = str;
default = "02:15";
example = "hourly";
- description = lib.mdDoc ''
+ description = ''
Update the locate database at this interval. Updates by
default at 2:15 AM every day.
@@ -49,7 +49,7 @@ in
extraFlags = mkOption {
type = listOf str;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
Extra flags to pass to {command}`updatedb`.
'';
};
@@ -57,7 +57,7 @@ in
output = mkOption {
type = path;
default = "/var/cache/locatedb";
- description = lib.mdDoc ''
+ description = ''
The database file to build.
'';
};
@@ -65,7 +65,7 @@ in
localuser = mkOption {
type = nullOr str;
default = "nobody";
- description = lib.mdDoc ''
+ description = ''
The user to search non-network directories as, using
{command}`su`.
'';
@@ -153,7 +153,7 @@ in
"vboxsf"
"vperfctrfs"
];
- description = lib.mdDoc ''
+ description = ''
Which filesystem types to exclude from indexing
'';
};
@@ -170,7 +170,7 @@ in
"/nix/store"
"/nix/var/log/nix"
];
- description = lib.mdDoc ''
+ description = ''
Which paths to exclude from indexing
'';
};
@@ -182,7 +182,7 @@ in
`[ ".bzr" ".cache" ".git" ".hg" ".svn" ]`, if
supported by the locate implementation (i.e. mlocate or plocate).
'';
- description = lib.mdDoc ''
+ description = ''
Directory components which should exclude paths containing them from indexing
'';
};
@@ -190,7 +190,7 @@ in
pruneBindMounts = mkOption {
type = bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether not to index bind mounts
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/misc/man-db.nix b/third_party/nixpkgs/nixos/modules/misc/man-db.nix
index 2b98056121..d557b5e20b 100644
--- a/third_party/nixpkgs/nixos/modules/misc/man-db.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/man-db.nix
@@ -7,7 +7,7 @@ in
{
options = {
documentation.man.man-db = {
- enable = lib.mkEnableOption (lib.mdDoc "man-db as the default man page viewer") // {
+ enable = lib.mkEnableOption "man-db as the default man page viewer" // {
default = config.documentation.man.enable;
defaultText = lib.literalExpression "config.documentation.man.enable";
example = false;
@@ -17,7 +17,7 @@ in
type = lib.types.listOf lib.types.package;
default = [];
internal = true;
- description = lib.mdDoc ''
+ description = ''
Packages to *not* include in the man-db.
This can be useful to avoid unnecessary rebuilds due to packages that change frequently, like nixos-version.
'';
@@ -34,7 +34,7 @@ in
ignoreCollisions = true;
};
defaultText = lib.literalMD "all man pages in {option}`config.environment.systemPackages`";
- description = lib.mdDoc ''
+ description = ''
The manual pages to generate caches for if {option}`documentation.man.generateCaches`
is enabled. Must be a path to a directory with man pages under
`/share/man`; see the source for an example.
@@ -46,7 +46,7 @@ in
type = lib.types.package;
default = pkgs.man-db;
defaultText = lib.literalExpression "pkgs.man-db";
- description = lib.mdDoc ''
+ description = ''
The `man-db` derivation to use. Useful to override
configuration options used for the package.
'';
diff --git a/third_party/nixpkgs/nixos/modules/misc/mandoc.nix b/third_party/nixpkgs/nixos/modules/misc/mandoc.nix
index 73646a60aa..706e2ac2c2 100644
--- a/third_party/nixpkgs/nixos/modules/misc/mandoc.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/mandoc.nix
@@ -17,6 +17,8 @@ let
)
output
);
+
+ makeLeadingSlashes = map (path: if builtins.substring 0 1 path != "/" then "/${path}" else path);
in
{
meta.maintainers = [ lib.maintainers.sternenseemann ];
@@ -29,6 +31,7 @@ in
type = with lib.types; listOf str;
default = [ "share/man" ];
example = lib.literalExpression "[ \"share/man\" \"share/man/fr\" ]";
+ apply = makeLeadingSlashes;
description = ''
Change the paths included in the MANPATH environment variable,
i. e. the directories where {manpage}`man(1)`
@@ -41,6 +44,28 @@ in
'';
};
+ cachePath = lib.mkOption {
+ type = with lib.types; listOf str;
+ default = cfg.manPath;
+ defaultText = lib.literalExpression "config.documentation.man.mandoc.manPath";
+ example = lib.literalExpression "[ \"share/man\" \"share/man/fr\" ]";
+ apply = makeLeadingSlashes;
+ description = ''
+ Change the paths where mandoc {manpage}`makewhatis(8)`generates the
+ manual page index caches. {option}`documentation.man.generateCaches`
+ should be enabled to allow cache generation. This list should only
+ include the paths to manpages installed in the system configuration,
+ i. e. /run/current-system/sw/share/man. {manpage}`makewhatis(8)`
+ creates a database in each directory using the files
+ `mansection/[arch/]title.section` and `catsection/[arch/]title.0`
+ in it. If a directory contains no manual pages, no database is
+ created in that directory.
+ This option only needs to be set manually if extra paths should be
+ indexed or {option}`documentation.man.manPath` contains paths that
+ can't be indexed.
+ '';
+ };
+
package = lib.mkOption {
type = lib.types.package;
default = pkgs.mandoc;
@@ -178,19 +203,14 @@ in
# TODO(@sternenseemman): fix symlinked directories not getting indexed,
# see: https://inbox.vuxu.org/mandoc-tech/20210906171231.GF83680@athene.usta.de/T/#e85f773c1781e3fef85562b2794f9cad7b2909a3c
extraSetup = lib.mkIf config.documentation.man.generateCaches ''
- for man_path in ${
- lib.concatMapStringsSep " " (path:
- "$out/" + lib.escapeShellArg path
- ) cfg.manPath} ${lib.concatMapStringsSep " " (path:
- lib.escapeShellArg path) cfg.settings.manpath
- }
+ for man_path in ${lib.concatMapStringsSep " " (path: "$out" + lib.escapeShellArg path) cfg.cachePath}
do
[[ -d "$man_path" ]] && ${makewhatis} -T utf8 $man_path
done
'';
# tell mandoc the paths containing man pages
- profileRelativeSessionVariables."MANPATH" = map (path: if builtins.substring 0 1 path != "/" then "/${path}" else path) cfg.manPath;
+ profileRelativeSessionVariables."MANPATH" = lib.mkIf (cfg.manPath != [ ]) cfg.manPath;
};
};
}
diff --git a/third_party/nixpkgs/nixos/modules/misc/meta.nix b/third_party/nixpkgs/nixos/modules/misc/meta.nix
index 95f2765aff..e5ab3a9515 100644
--- a/third_party/nixpkgs/nixos/modules/misc/meta.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/meta.nix
@@ -38,7 +38,7 @@ in
internal = true;
default = [];
example = literalExpression ''[ lib.maintainers.all ]'';
- description = lib.mdDoc ''
+ description = ''
List of maintainers of each module. This option should be defined at
most once per module.
'';
@@ -48,7 +48,7 @@ in
type = docFile;
internal = true;
example = "./meta.chapter.md";
- description = lib.mdDoc ''
+ description = ''
Documentation prologue for the set of options of each module. This
option should be defined at most once per module.
'';
@@ -60,7 +60,7 @@ in
};
internal = true;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to include this module in the split options doc build.
Disable if the module references `config`, `pkgs` or other module
arguments that cannot be evaluated as constants.
diff --git a/third_party/nixpkgs/nixos/modules/misc/nixops-autoluks.nix b/third_party/nixpkgs/nixos/modules/misc/nixops-autoluks.nix
index e681763311..9b5a376027 100644
--- a/third_party/nixpkgs/nixos/modules/misc/nixops-autoluks.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/nixops-autoluks.nix
@@ -5,7 +5,7 @@ let
inherit (config.nixops) enableDeprecatedAutoLuks;
in {
- options.nixops.enableDeprecatedAutoLuks = lib.mkEnableOption (lib.mdDoc "the deprecated NixOps AutoLuks module");
+ options.nixops.enableDeprecatedAutoLuks = lib.mkEnableOption "the deprecated NixOps AutoLuks module";
config = {
assertions = [
diff --git a/third_party/nixpkgs/nixos/modules/misc/nixpkgs-flake.nix b/third_party/nixpkgs/nixos/modules/misc/nixpkgs-flake.nix
index 8bfe05ca19..f58c3fbbe2 100644
--- a/third_party/nixpkgs/nixos/modules/misc/nixpkgs-flake.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/nixpkgs-flake.nix
@@ -20,7 +20,7 @@ in
example = ''builtins.fetchTarball { name = "source"; sha256 = "${lib.fakeHash}"; url = "https://github.com/nixos/nixpkgs/archive/somecommit.tar.gz"; }'';
- description = mdDoc ''
+ description = ''
The path to the nixpkgs sources used to build the system. This is automatically set up to be
the store path of the nixpkgs flake used to build the system if using
`nixpkgs.lib.nixosSystem`, and is otherwise null by default.
@@ -40,7 +40,7 @@ in
default = cfg.source != null;
defaultText = "config.nixpkgs.flake.source != null";
- description = mdDoc ''
+ description = ''
Whether to set {env}`NIX_PATH` to include `nixpkgs=flake:nixpkgs` such that ``
lookups receive the version of nixpkgs that the system was built with, in concert with
{option}`nixpkgs.flake.setFlakeRegistry`.
@@ -60,7 +60,7 @@ in
default = cfg.source != null;
defaultText = "config.nixpkgs.flake.source != null";
- description = mdDoc ''
+ description = ''
Whether to pin nixpkgs in the system-wide flake registry (`/etc/nix/registry.json`) to the
store path of the sources of nixpkgs used to build the NixOS system.
diff --git a/third_party/nixpkgs/nixos/modules/misc/nixpkgs.nix b/third_party/nixpkgs/nixos/modules/misc/nixpkgs.nix
index da321a9234..60a6fb57c7 100644
--- a/third_party/nixpkgs/nixos/modules/misc/nixpkgs.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/nixpkgs.nix
@@ -112,7 +112,7 @@ in
'';
type = pkgsType;
example = literalExpression "import {}";
- description = lib.mdDoc ''
+ description = ''
If set, the pkgs argument to all NixOS modules is the value of
this option, extended with `nixpkgs.overlays`, if
that is also set. Either `nixpkgs.crossSystem` or
@@ -152,12 +152,11 @@ in
{ allowBroken = true; allowUnfree = true; }
'';
type = configType;
- description = lib.mdDoc ''
- The configuration of the Nix Packages collection. (For
- details, see the Nixpkgs documentation.) It allows you to set
- package configuration options.
+ description = ''
+ Global configuration for Nixpkgs.
+ The complete list of [Nixpkgs configuration options](https://nixos.org/manual/nixpkgs/unstable/#sec-config-options-reference) is in the [Nixpkgs manual section on global configuration](https://nixos.org/manual/nixpkgs/unstable/#chap-packageconfig).
- Ignored when `nixpkgs.pkgs` is set.
+ Ignored when {option}`nixpkgs.pkgs` is set.
'';
};
@@ -175,7 +174,7 @@ in
]
'';
type = types.listOf overlayType;
- description = lib.mdDoc ''
+ description = ''
List of overlays to apply to Nixpkgs.
This option allows modifying the Nixpkgs package set accessed through the `pkgs` module argument.
@@ -193,7 +192,7 @@ in
apply = lib.systems.elaborate;
defaultText = literalExpression
''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform'';
- description = lib.mdDoc ''
+ description = ''
Specifies the platform where the NixOS configuration will run.
To cross-compile, set also `nixpkgs.buildPlatform`.
@@ -208,10 +207,14 @@ in
example = { system = "x86_64-linux"; };
# Make sure that the final value has all fields for sake of other modules
# referring to this.
- apply = lib.systems.elaborate;
+ apply = inputBuildPlatform:
+ let elaborated = lib.systems.elaborate inputBuildPlatform;
+ in if lib.systems.equals elaborated cfg.hostPlatform
+ then cfg.hostPlatform # make identical, so that `==` equality works; see https://github.com/NixOS/nixpkgs/issues/278001
+ else elaborated;
defaultText = literalExpression
''config.nixpkgs.hostPlatform'';
- description = lib.mdDoc ''
+ description = ''
Specifies the platform on which NixOS should be built.
By default, NixOS is built on the system where it runs, but you can
change where it's built. Setting this option will cause NixOS to be
@@ -234,7 +237,7 @@ in
apply = lib.systems.elaborate;
defaultText = literalExpression
''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform'';
- description = lib.mdDoc ''
+ description = ''
Systems with a recently generated `hardware-configuration.nix`
do not need to specify this option, unless cross-compiling, in which case
you should set *only* {option}`nixpkgs.buildPlatform`.
@@ -263,7 +266,7 @@ in
type = types.nullOr types.attrs; # TODO utilize lib.systems.parsedPlatform
default = null;
example = { system = "aarch64-linux"; };
- description = lib.mdDoc ''
+ description = ''
Systems with a recently generated `hardware-configuration.nix`
may instead specify *only* {option}`nixpkgs.buildPlatform`,
or fall back to removing the {option}`nixpkgs.hostPlatform` line from the generated config.
@@ -302,7 +305,7 @@ in
defaultText = lib.literalMD ''
Traditionally `builtins.currentSystem`, but unset when invoking NixOS through `lib.nixosSystem`.
'';
- description = lib.mdDoc ''
+ description = ''
This option does not need to be specified for NixOS configurations
with a recently generated `hardware-configuration.nix`.
diff --git a/third_party/nixpkgs/nixos/modules/misc/nixpkgs/read-only.nix b/third_party/nixpkgs/nixos/modules/misc/nixpkgs/read-only.nix
index 2a783216a9..e3c4525e7d 100644
--- a/third_party/nixpkgs/nixos/modules/misc/nixpkgs/read-only.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/nixpkgs/read-only.nix
@@ -24,33 +24,33 @@ in
nixpkgs = {
pkgs = mkOption {
type = lib.types.pkgs;
- description = lib.mdDoc ''The pkgs module argument.'';
+ description = ''The pkgs module argument.'';
};
config = mkOption {
internal = true;
type = types.unique { message = "nixpkgs.config is set to read-only"; } types.anything;
- description = lib.mdDoc ''
+ description = ''
The Nixpkgs `config` that `pkgs` was initialized with.
'';
};
overlays = mkOption {
internal = true;
type = types.unique { message = "nixpkgs.overlays is set to read-only"; } types.anything;
- description = lib.mdDoc ''
+ description = ''
The Nixpkgs overlays that `pkgs` was initialized with.
'';
};
hostPlatform = mkOption {
internal = true;
readOnly = true;
- description = lib.mdDoc ''
+ description = ''
The platform of the machine that is running the NixOS configuration.
'';
};
buildPlatform = mkOption {
internal = true;
readOnly = true;
- description = lib.mdDoc ''
+ description = ''
The platform of the machine that built the NixOS configuration.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/misc/nixpkgs/test.nix b/third_party/nixpkgs/nixos/modules/misc/nixpkgs/test.nix
index 0536cfc962..be9a88a077 100644
--- a/third_party/nixpkgs/nixos/modules/misc/nixpkgs/test.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/nixpkgs/test.nix
@@ -12,6 +12,10 @@ let
nixpkgs.hostPlatform = "aarch64-linux";
nixpkgs.buildPlatform = "aarch64-darwin";
};
+ withSameHostAndBuild = eval {
+ nixpkgs.hostPlatform = "aarch64-linux";
+ nixpkgs.buildPlatform = "aarch64-linux";
+ };
ambiguous = {
_file = "ambiguous.nix";
nixpkgs.hostPlatform = "aarch64-linux";
@@ -81,6 +85,8 @@ lib.recurseIntoAttrs {
assert withHost._module.args.pkgs.stdenv.buildPlatform.system == "aarch64-linux";
assert withHostAndBuild._module.args.pkgs.stdenv.hostPlatform.system == "aarch64-linux";
assert withHostAndBuild._module.args.pkgs.stdenv.buildPlatform.system == "aarch64-darwin";
+ assert withSameHostAndBuild.config.nixpkgs.buildPlatform == withSameHostAndBuild.config.nixpkgs.hostPlatform;
+ assert withSameHostAndBuild._module.args.pkgs.stdenv.buildPlatform == withSameHostAndBuild._module.args.pkgs.stdenv.hostPlatform;
assert builtins.trace (lib.head (getErrors ambiguous))
getErrors ambiguous ==
[''
diff --git a/third_party/nixpkgs/nixos/modules/misc/passthru.nix b/third_party/nixpkgs/nixos/modules/misc/passthru.nix
index beb9d78290..4e99631fdd 100644
--- a/third_party/nixpkgs/nixos/modules/misc/passthru.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/passthru.nix
@@ -7,7 +7,7 @@
options = {
passthru = lib.mkOption {
visible = false;
- description = lib.mdDoc ''
+ description = ''
This attribute set will be exported as a system attribute.
You can put whatever you want here.
'';
diff --git a/third_party/nixpkgs/nixos/modules/misc/version.nix b/third_party/nixpkgs/nixos/modules/misc/version.nix
index 79b95ac654..d582e0c162 100644
--- a/third_party/nixpkgs/nixos/modules/misc/version.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/version.nix
@@ -65,55 +65,55 @@ in
version = mkOption {
internal = true;
type = types.str;
- description = lib.mdDoc "The full NixOS version (e.g. `16.03.1160.f2d4ee1`).";
+ description = "The full NixOS version (e.g. `16.03.1160.f2d4ee1`).";
};
release = mkOption {
readOnly = true;
type = types.str;
default = trivial.release;
- description = lib.mdDoc "The NixOS release (e.g. `16.03`).";
+ description = "The NixOS release (e.g. `16.03`).";
};
versionSuffix = mkOption {
internal = true;
type = types.str;
default = trivial.versionSuffix;
- description = lib.mdDoc "The NixOS version suffix (e.g. `1160.f2d4ee1`).";
+ description = "The NixOS version suffix (e.g. `1160.f2d4ee1`).";
};
revision = mkOption {
internal = true;
type = types.nullOr types.str;
default = trivial.revisionWithDefault null;
- description = lib.mdDoc "The Git revision from which this NixOS configuration was built.";
+ description = "The Git revision from which this NixOS configuration was built.";
};
codeName = mkOption {
readOnly = true;
type = types.str;
default = trivial.codeName;
- description = lib.mdDoc "The NixOS release code name (e.g. `Emu`).";
+ description = "The NixOS release code name (e.g. `Emu`).";
};
distroId = mkOption {
internal = true;
type = types.str;
default = "nixos";
- description = lib.mdDoc "The id of the operating system";
+ description = "The id of the operating system";
};
distroName = mkOption {
internal = true;
type = types.str;
default = "NixOS";
- description = lib.mdDoc "The name of the operating system";
+ description = "The name of the operating system";
};
variant_id = mkOption {
type = types.nullOr (types.strMatching "^[a-z0-9._-]+$");
default = null;
- description = lib.mdDoc "A lower-case string identifying a specific variant or edition of the operating system";
+ description = "A lower-case string identifying a specific variant or edition of the operating system";
example = "installer";
};
};
@@ -123,7 +123,7 @@ in
id = lib.mkOption {
type = types.nullOr (types.strMatching "^[a-z0-9._-]+$");
default = null;
- description = lib.mdDoc ''
+ description = ''
Image identifier.
This corresponds to the IMAGE_ID field in os-release. See the
@@ -137,7 +137,7 @@ in
version = lib.mkOption {
type = types.nullOr (types.strMatching "^[a-z0-9._-]+$");
default = null;
- description = lib.mdDoc ''
+ description = ''
Image version.
This corresponds to the IMAGE_VERSION field in os-release. See the
@@ -160,7 +160,7 @@ in
v;
default = cfg.release;
defaultText = literalExpression "config.${opt.release}";
- description = lib.mdDoc ''
+ description = ''
This option defines the first version of NixOS you have installed on this particular machine,
and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
@@ -193,7 +193,7 @@ in
configurationRevision = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "The Git revision of the top-level flake from which this configuration was built.";
+ description = "The Git revision of the top-level flake from which this configuration was built.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/misc/wordlist.nix b/third_party/nixpkgs/nixos/modules/misc/wordlist.nix
index f01fcb6f5a..988b522d74 100644
--- a/third_party/nixpkgs/nixos/modules/misc/wordlist.nix
+++ b/third_party/nixpkgs/nixos/modules/misc/wordlist.nix
@@ -8,7 +8,7 @@ in
{
options = {
environment.wordlist = {
- enable = mkEnableOption (lib.mdDoc "environment variables for lists of words");
+ enable = mkEnableOption "environment variables for lists of words";
lists = mkOption {
type = types.attrsOf (types.nonEmptyListOf types.path);
@@ -23,7 +23,7 @@ in
}
'';
- description = lib.mdDoc ''
+ description = ''
A set with the key names being the environment variable you'd like to
set and the values being a list of paths to text documents containing
lists of words. The various files will be merged, sorted, duplicates
diff --git a/third_party/nixpkgs/nixos/modules/module-list.nix b/third_party/nixpkgs/nixos/modules/module-list.nix
index 378921c996..29c373788c 100644
--- a/third_party/nixpkgs/nixos/modules/module-list.nix
+++ b/third_party/nixpkgs/nixos/modules/module-list.nix
@@ -54,6 +54,7 @@
./hardware/corectrl.nix
./hardware/cpu/amd-microcode.nix
./hardware/cpu/amd-sev.nix
+ ./hardware/cpu/amd-ryzen-smu.nix
./hardware/cpu/intel-microcode.nix
./hardware/cpu/intel-sgx.nix
./hardware/cpu/x86-msr.nix
@@ -98,6 +99,7 @@
./hardware/tuxedo-keyboard.nix
./hardware/ubertooth.nix
./hardware/uinput.nix
+ ./hardware/uni-sync.nix
./hardware/usb-modeswitch.nix
./hardware/usb-storage.nix
./hardware/video/amdgpu-pro.nix
@@ -142,6 +144,7 @@
./programs/adb.nix
./programs/alvr.nix
./programs/appgate-sdp.nix
+ ./programs/appimage.nix
./programs/atop.nix
./programs/ausweisapp.nix
./programs/autojump.nix
@@ -163,6 +166,7 @@
./programs/clash-verge.nix
./programs/cnping.nix
./programs/command-not-found/command-not-found.nix
+ ./programs/coolercontrol.nix
./programs/criu.nix
./programs/darling.nix
./programs/dconf.nix
@@ -175,6 +179,7 @@
./programs/environment.nix
./programs/evince.nix
./programs/extra-container.nix
+ ./programs/fcast-receiver.nix
./programs/feedbackd.nix
./programs/file-roller.nix
./programs/firefox.nix
@@ -192,6 +197,7 @@
./programs/gnome-disks.nix
./programs/gnome-terminal.nix
./programs/gnupg.nix
+ ./programs/goldwarden.nix
./programs/gpaste.nix
./programs/gphoto2.nix
./programs/haguichi.nix
@@ -202,11 +208,14 @@
./programs/i3lock.nix
./programs/iotop.nix
./programs/java.nix
+ ./programs/joycond-cemuhook.nix
./programs/k3b.nix
./programs/k40-whisperer.nix
./programs/kbdlight.nix
./programs/kclock.nix
./programs/kdeconnect.nix
+ ./programs/lazygit.nix
+ ./programs/kubeswitch.nix
./programs/less.nix
./programs/liboping.nix
./programs/light.nix
@@ -225,6 +234,7 @@
./programs/neovim.nix
./programs/nethoscope.nix
./programs/nexttrace.nix
+ ./programs/nh.nix
./programs/nix-index.nix
./programs/nix-ld.nix
./programs/nm-applet.nix
@@ -246,6 +256,7 @@
./programs/regreet.nix
./programs/rog-control-center.nix
./programs/rust-motd.nix
+ ./programs/ryzen-monitor-ng.nix
./programs/screen.nix
./programs/seahorse.nix
./programs/sedutil.nix
@@ -255,6 +266,7 @@
./programs/skim.nix
./programs/slock.nix
./programs/sniffnet.nix
+ ./programs/soundmodem.nix
./programs/spacefm.nix
./programs/ssh.nix
./programs/starship.nix
@@ -276,8 +288,8 @@
./programs/virt-manager.nix
./programs/wavemon.nix
./programs/wayland/cardboard.nix
- ./programs/wayland/labwc.nix
./programs/wayland/hyprland.nix
+ ./programs/wayland/labwc.nix
./programs/wayland/river.nix
./programs/wayland/sway.nix
./programs/wayland/waybar.nix
@@ -328,6 +340,7 @@
./security/systemd-confinement.nix
./security/tpm2.nix
./security/wrappers/default.nix
+ ./services/admin/docuum.nix
./services/admin/meshcentral.nix
./services/admin/oxidized.nix
./services/admin/pgadmin.nix
@@ -337,7 +350,6 @@
./services/amqp/rabbitmq.nix
./services/audio/alsa.nix
./services/audio/botamusique.nix
- ./services/audio/castopod.nix
./services/audio/gmediarender.nix
./services/audio/gonic.nix
./services/audio/goxlr-utility.nix
@@ -359,9 +371,6 @@
./services/audio/spotifyd.nix
./services/audio/squeezelite.nix
./services/audio/tts.nix
- ./services/audio/wyoming/faster-whisper.nix
- ./services/audio/wyoming/openwakeword.nix
- ./services/audio/wyoming/piper.nix
./services/audio/ympd.nix
./services/backup/automysqlbackup.nix
./services/backup/bacula.nix
@@ -506,12 +515,15 @@
./services/development/nixseparatedebuginfod.nix
./services/development/rstudio-server/default.nix
./services/development/zammad.nix
+ ./services/display-managers/default.nix
./services/display-managers/greetd.nix
+ ./services/display-managers/sddm.nix
./services/editors/emacs.nix
./services/editors/haste.nix
./services/editors/infinoted.nix
./services/finance/odoo.nix
./services/games/archisteamfarm.nix
+ ./services/games/armagetronad.nix
./services/games/crossfire-server.nix
./services/games/deliantra-server.nix
./services/games/factorio.nix
@@ -583,7 +595,11 @@
./services/home-automation/evcc.nix
./services/home-automation/govee2mqtt.nix
./services/home-automation/home-assistant.nix
- ./services/home-automation/homeassistant-satellite.nix
+ ./services/home-automation/matter-server.nix
+ ./services/home-automation/wyoming/faster-whisper.nix
+ ./services/home-automation/wyoming/openwakeword.nix
+ ./services/home-automation/wyoming/piper.nix
+ ./services/home-automation/wyoming/satellite.nix
./services/home-automation/zigbee2mqtt.nix
./services/home-automation/zwave-js.nix
./services/logging/SystemdJournal2Gelf.nix
@@ -645,6 +661,7 @@
./services/matrix/hebbot.nix
./services/matrix/maubot.nix
./services/matrix/mautrix-facebook.nix
+ ./services/matrix/mautrix-meta.nix
./services/matrix/mautrix-telegram.nix
./services/matrix/mautrix-whatsapp.nix
./services/matrix/mjolnir.nix
@@ -675,6 +692,7 @@
./services/misc/clipmenu.nix
./services/misc/confd.nix
./services/misc/cpuminer-cryptonight.nix
+ ./services/misc/db-rest.nix
./services/misc/devmon.nix
./services/misc/dictd.nix
./services/misc/disnix.nix
@@ -700,6 +718,7 @@
./services/misc/gogs.nix
./services/misc/gollum.nix
./services/misc/gpsd.nix
+ ./services/misc/graphical-desktop.nix
./services/misc/greenclip.nix
./services/misc/guix
./services/misc/headphones.nix
@@ -707,6 +726,7 @@
./services/misc/homepage-dashboard.nix
./services/misc/ihaskell.nix
./services/misc/input-remapper.nix
+ ./services/misc/invidious-router.nix
./services/misc/irkerd.nix
./services/misc/jackett.nix
./services/misc/jellyfin.nix
@@ -717,11 +737,13 @@
./services/misc/libreddit.nix
./services/misc/lidarr.nix
./services/misc/lifecycled.nix
+ ./services/misc/llama-cpp.nix
./services/misc/logkeys.nix
./services/misc/mame.nix
./services/misc/mbpfan.nix
./services/misc/mediatomb.nix
./services/misc/metabase.nix
+ ./services/misc/mollysocket.nix
./services/misc/moonraker.nix
./services/misc/mqtt2influxdb.nix
./services/misc/n8n.nix
@@ -779,15 +801,19 @@
./services/misc/svnserve.nix
./services/misc/synergy.nix
./services/misc/sysprof.nix
+ ./services/misc/tabby.nix
./services/misc/tandoor-recipes.nix
./services/misc/taskserver
./services/misc/tautulli.nix
./services/misc/tiddlywiki.nix
./services/misc/tp-auto-kbbl.nix
./services/misc/tuxclocker.nix
+ ./services/misc/transfer-sh.nix
./services/misc/tzupdate.nix
./services/misc/uhub.nix
+ ./services/misc/wastebin.nix
./services/misc/weechat.nix
+ ./services/misc/workout-tracker.nix
./services/misc/xmr-stak.nix
./services/misc/xmrig.nix
./services/misc/zoneminder.nix
@@ -827,6 +853,7 @@
./services/monitoring/munin.nix
./services/monitoring/nagios.nix
./services/monitoring/netdata.nix
+ ./services/monitoring/nezha-agent.nix
./services/monitoring/ocsinventory-agent.nix
./services/monitoring/opentelemetry-collector.nix
./services/monitoring/osquery.nix
@@ -937,6 +964,7 @@
./services/networking/dnscrypt-wrapper.nix
./services/networking/dnsdist.nix
./services/networking/dnsmasq.nix
+ ./services/networking/dnsproxy.nix
./services/networking/doh-proxy-rust.nix
./services/networking/ejabberd.nix
./services/networking/envoy.nix
@@ -1012,6 +1040,8 @@
./services/networking/lxd-image-server.nix
./services/networking/magic-wormhole-mailbox-server.nix
./services/networking/matterbridge.nix
+ ./services/networking/microsocks.nix
+ ./services/networking/mihomo.nix
./services/networking/minidlna.nix
./services/networking/miniupnpd.nix
./services/networking/miredo.nix
@@ -1028,6 +1058,7 @@
./services/networking/multipath.nix
./services/networking/murmur.nix
./services/networking/mxisd.nix
+ ./services/networking/mycelium.nix
./services/networking/namecoind.nix
./services/networking/nar-serve.nix
./services/networking/nat.nix
@@ -1039,6 +1070,7 @@
./services/networking/ndppd.nix
./services/networking/nebula.nix
./services/networking/netbird.nix
+ ./services/networking/netbird/server.nix
./services/networking/netclient.nix
./services/networking/networkd-dispatcher.nix
./services/networking/networkmanager.nix
@@ -1096,6 +1128,11 @@
./services/networking/rpcbind.nix
./services/networking/rxe.nix
./services/networking/sabnzbd.nix
+ ./services/networking/scion/scion.nix
+ ./services/networking/scion/scion-control.nix
+ ./services/networking/scion/scion-daemon.nix
+ ./services/networking/scion/scion-dispatcher.nix
+ ./services/networking/scion/scion-router.nix
./services/networking/seafile.nix
./services/networking/searx.nix
./services/networking/shadowsocks.nix
@@ -1124,15 +1161,18 @@
./services/networking/strongswan.nix
./services/networking/stubby.nix
./services/networking/stunnel.nix
+ ./services/networking/sunshine.nix
./services/networking/supplicant.nix
./services/networking/supybot.nix
./services/networking/syncplay.nix
./services/networking/syncthing-relay.nix
./services/networking/syncthing.nix
./services/networking/tailscale.nix
+ ./services/networking/tailscale-auth.nix
./services/networking/tayga.nix
./services/networking/tcpcrypt.nix
./services/networking/teamspeak3.nix
+ ./services/networking/technitium-dns-server.nix
./services/networking/teleport.nix
./services/networking/tetrd.nix
./services/networking/tftpd.nix
@@ -1185,6 +1225,7 @@
./services/search/elasticsearch-curator.nix
./services/search/elasticsearch.nix
./services/search/hound.nix
+ ./services/search/manticore.nix
./services/search/meilisearch.nix
./services/search/opensearch.nix
./services/search/qdrant.nix
@@ -1264,6 +1305,7 @@
./services/video/go2rtc/default.nix
./services/video/frigate.nix
./services/video/mirakurun.nix
+ ./services/video/photonvision.nix
./services/video/replay-sorcery.nix
./services/video/mediamtx.nix
./services/video/unifi-video.nix
@@ -1279,12 +1321,15 @@
./services/web-apps/bookstack.nix
./services/web-apps/c2fmzq-server.nix
./services/web-apps/calibre-web.nix
+ ./services/web-apps/castopod.nix
./services/web-apps/coder.nix
./services/web-apps/changedetection-io.nix
./services/web-apps/chatgpt-retrieval-plugin.nix
./services/web-apps/cloudlog.nix
./services/web-apps/code-server.nix
./services/web-apps/convos.nix
+ ./services/web-apps/crabfit.nix
+ ./services/web-apps/davis.nix
./services/web-apps/dex.nix
./services/web-apps/discourse.nix
./services/web-apps/documize.nix
@@ -1292,6 +1337,7 @@
./services/web-apps/dolibarr.nix
./services/web-apps/engelsystem.nix
./services/web-apps/ethercalc.nix
+ ./services/web-apps/firefly-iii.nix
./services/web-apps/fluidd.nix
./services/web-apps/freshrss.nix
./services/web-apps/galene.nix
@@ -1331,12 +1377,14 @@
./services/web-apps/miniflux.nix
./services/web-apps/monica.nix
./services/web-apps/moodle.nix
+ ./services/web-apps/movim.nix
./services/web-apps/netbox.nix
./services/web-apps/nextcloud.nix
./services/web-apps/nextcloud-notify_push.nix
./services/web-apps/nexus.nix
./services/web-apps/nifi.nix
./services/web-apps/node-red.nix
+ ./services/web-apps/ocis.nix
./services/web-apps/onlyoffice.nix
./services/web-apps/openvscode-server.nix
./services/web-apps/mobilizon.nix
@@ -1352,6 +1400,7 @@
./services/web-apps/plausible.nix
./services/web-apps/powerdns-admin.nix
./services/web-apps/pretalx.nix
+ ./services/web-apps/pretix.nix
./services/web-apps/prosody-filer.nix
./services/web-apps/rimgo.nix
./services/web-apps/sftpgo.nix
@@ -1359,6 +1408,7 @@
./services/web-apps/rss-bridge.nix
./services/web-apps/selfoss.nix
./services/web-apps/shiori.nix
+ ./services/web-apps/silverbullet.nix
./services/web-apps/slskd.nix
./services/web-apps/snipe-it.nix
./services/web-apps/sogo.nix
@@ -1412,7 +1462,6 @@
./services/x11/display-managers/default.nix
./services/x11/display-managers/gdm.nix
./services/x11/display-managers/lightdm.nix
- ./services/x11/display-managers/sddm.nix
./services/x11/display-managers/slim.nix
./services/x11/display-managers/startx.nix
./services/x11/display-managers/sx.nix
diff --git a/third_party/nixpkgs/nixos/modules/profiles/all-hardware.nix b/third_party/nixpkgs/nixos/modules/profiles/all-hardware.nix
index 4857ea4dbe..249b767593 100644
--- a/third_party/nixpkgs/nixos/modules/profiles/all-hardware.nix
+++ b/third_party/nixpkgs/nixos/modules/profiles/all-hardware.nix
@@ -58,15 +58,7 @@ in
# Hyper-V support.
"hv_storvsc"
] ++ lib.optionals pkgs.stdenv.hostPlatform.isAarch [
- # Most of the following falls into two categories:
- # - early KMS / early display
- # - early storage (e.g. USB) support
-
- # Allows using framebuffer configured by the initial boot firmware
- "simplefb"
-
# Allwinner support
-
# Required for early KMS
"sun4i-drm"
"sun8i-mixer" # Audio, but required for kms
@@ -75,7 +67,6 @@ in
"pwm-sun4i"
# Broadcom
-
"vc4"
] ++ lib.optionals pkgs.stdenv.isAarch64 [
# Most of the following falls into two categories:
diff --git a/third_party/nixpkgs/nixos/modules/profiles/clone-config.nix b/third_party/nixpkgs/nixos/modules/profiles/clone-config.nix
index ba65a250d2..3f669ba7d2 100644
--- a/third_party/nixpkgs/nixos/modules/profiles/clone-config.nix
+++ b/third_party/nixpkgs/nixos/modules/profiles/clone-config.nix
@@ -61,7 +61,7 @@ in
installer.cloneConfig = mkOption {
default = true;
- description = lib.mdDoc ''
+ description = ''
Try to clone the installation-device configuration by re-using it's
profile from the list of imported modules.
'';
@@ -70,14 +70,14 @@ in
installer.cloneConfigIncludes = mkOption {
default = [];
example = [ "./nixos/modules/hardware/network/rt73.nix" ];
- description = lib.mdDoc ''
+ description = ''
List of modules used to re-build this installation device profile.
'';
};
installer.cloneConfigExtra = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra text to include in the cloned configuration.nix included in this
installer.
'';
diff --git a/third_party/nixpkgs/nixos/modules/profiles/demo.nix b/third_party/nixpkgs/nixos/modules/profiles/demo.nix
index 4e8c74deed..52ba40902e 100644
--- a/third_party/nixpkgs/nixos/modules/profiles/demo.nix
+++ b/third_party/nixpkgs/nixos/modules/profiles/demo.nix
@@ -11,7 +11,7 @@
uid = 1000;
};
- services.xserver.displayManager = {
+ services.displayManager = {
autoLogin = {
enable = true;
user = "demo";
diff --git a/third_party/nixpkgs/nixos/modules/profiles/graphical.nix b/third_party/nixpkgs/nixos/modules/profiles/graphical.nix
index d80456cede..8cc31652f8 100644
--- a/third_party/nixpkgs/nixos/modules/profiles/graphical.nix
+++ b/third_party/nixpkgs/nixos/modules/profiles/graphical.nix
@@ -6,13 +6,12 @@
{
services.xserver = {
enable = true;
- displayManager.sddm.enable = true;
- desktopManager.plasma5 = {
- enable = true;
- };
+ desktopManager.plasma5.enable = true;
libinput.enable = true; # for touchpad support on many laptops
};
+ services.displayManager.sddm.enable = true;
+
# Enable sound in virtualbox appliances.
hardware.pulseaudio.enable = true;
diff --git a/third_party/nixpkgs/nixos/modules/profiles/macos-builder.nix b/third_party/nixpkgs/nixos/modules/profiles/macos-builder.nix
index 6c2602881d..786e26cf98 100644
--- a/third_party/nixpkgs/nixos/modules/profiles/macos-builder.nix
+++ b/third_party/nixpkgs/nixos/modules/profiles/macos-builder.nix
@@ -145,6 +145,8 @@ in
# This installCredentials script is written so that it's as easy as
# possible for a user to audit before confirming the `sudo`
installCredentials = hostPkgs.writeShellScript "install-credentials" ''
+ set -euo pipefail
+
KEYS="''${1}"
INSTALL=${hostPkgs.coreutils}/bin/install
"''${INSTALL}" -g nixbld -m 600 "''${KEYS}/${user}_${keyType}" ${privateKey}
@@ -154,6 +156,9 @@ in
hostPkgs = config.virtualisation.host.pkgs;
script = hostPkgs.writeShellScriptBin "create-builder" (
+ ''
+ set -euo pipefail
+ '' +
# When running as non-interactively as part of a DarwinConfiguration the working directory
# must be set to a writeable directory.
(if cfg.workingDirectory != "." then ''
diff --git a/third_party/nixpkgs/nixos/modules/programs/_1password-gui.nix b/third_party/nixpkgs/nixos/modules/programs/_1password-gui.nix
index 83ef6037fb..b21e8783f6 100644
--- a/third_party/nixpkgs/nixos/modules/programs/_1password-gui.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/_1password-gui.nix
@@ -16,13 +16,13 @@ in
options = {
programs._1password-gui = {
- enable = mkEnableOption (lib.mdDoc "the 1Password GUI application");
+ enable = mkEnableOption "the 1Password GUI application";
polkitPolicyOwners = mkOption {
type = types.listOf types.str;
default = [ ];
example = literalExpression ''["user1" "user2" "user3"]'';
- description = lib.mdDoc ''
+ description = ''
A list of users who should be able to integrate 1Password with polkit-based authentication mechanisms.
'';
};
@@ -51,14 +51,6 @@ in
setuid = false;
setgid = true;
};
-
- "1Password-KeyringHelper" = {
- source = "${package}/share/1password/1Password-KeyringHelper";
- owner = "root";
- group = "onepassword";
- setuid = true;
- setgid = true;
- };
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/_1password.nix b/third_party/nixpkgs/nixos/modules/programs/_1password.nix
index 9124615075..b87e9b776e 100644
--- a/third_party/nixpkgs/nixos/modules/programs/_1password.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/_1password.nix
@@ -16,7 +16,7 @@ in
options = {
programs._1password = {
- enable = mkEnableOption (lib.mdDoc "the 1Password CLI tool");
+ enable = mkEnableOption "the 1Password CLI tool";
package = mkPackageOption pkgs "1Password CLI" {
default = [ "_1password" ];
diff --git a/third_party/nixpkgs/nixos/modules/programs/adb.nix b/third_party/nixpkgs/nixos/modules/programs/adb.nix
index e5b0abd9fc..d8c700bc36 100644
--- a/third_party/nixpkgs/nixos/modules/programs/adb.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/adb.nix
@@ -11,7 +11,7 @@ with lib;
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to configure system to use Android Debug Bridge (adb).
To grant access to a user, it must be part of adbusers group:
`users.users.alice.extraGroups = ["adbusers"];`
diff --git a/third_party/nixpkgs/nixos/modules/programs/alvr.nix b/third_party/nixpkgs/nixos/modules/programs/alvr.nix
index c01b74ad3a..e5de06f115 100644
--- a/third_party/nixpkgs/nixos/modules/programs/alvr.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/alvr.nix
@@ -8,14 +8,14 @@ in
{
options = {
programs.alvr = {
- enable = mkEnableOption (lib.mdDoc "ALVR, the VR desktop streamer");
+ enable = mkEnableOption "ALVR, the VR desktop streamer";
package = mkPackageOption pkgs "alvr" { };
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to open the default ports in the firewall for the ALVR server.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/appgate-sdp.nix b/third_party/nixpkgs/nixos/modules/programs/appgate-sdp.nix
index bdd538dc2f..6d61c87eeb 100644
--- a/third_party/nixpkgs/nixos/modules/programs/appgate-sdp.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/appgate-sdp.nix
@@ -5,7 +5,7 @@ with lib;
{
options = {
programs.appgate-sdp = {
- enable = mkEnableOption (lib.mdDoc "AppGate SDP VPN client");
+ enable = mkEnableOption "the AppGate SDP VPN client";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/appimage.nix b/third_party/nixpkgs/nixos/modules/programs/appimage.nix
new file mode 100644
index 0000000000..0011c2ff57
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/programs/appimage.nix
@@ -0,0 +1,33 @@
+{ lib, config, pkgs, ... }:
+
+let
+ cfg = config.programs.appimage;
+in
+
+{
+ options.programs.appimage = {
+ enable = lib.mkEnableOption "appimage-run wrapper script for executing appimages on NixOS";
+ binfmt = lib.mkEnableOption "binfmt registration to run appimages via appimage-run seamlessly";
+ package = lib.mkPackageOption pkgs "appimage-run" {
+ example = ''
+ pkgs.appimage-run.override {
+ extraPkgs = pkgs: [ pkgs.ffmpeg pkgs.imagemagick ];
+ }
+ '';
+ };
+ };
+
+ config = lib.mkIf cfg.enable {
+ boot.binfmt.registrations.appimage = lib.mkIf cfg.binfmt {
+ wrapInterpreterInShell = false;
+ interpreter = lib.getExe cfg.package;
+ recognitionType = "magic";
+ offset = 0;
+ mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
+ magicOrExtension = ''\x7fELF....AI\x02'';
+ };
+ environment.systemPackages = [ cfg.package ];
+ };
+
+ meta.maintainers = with lib.maintainers; [ jopejoe1 atemu ];
+}
diff --git a/third_party/nixpkgs/nixos/modules/programs/atop.nix b/third_party/nixpkgs/nixos/modules/programs/atop.nix
index 003cfdbfc8..618b641143 100644
--- a/third_party/nixpkgs/nixos/modules/programs/atop.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/atop.nix
@@ -14,7 +14,7 @@ in
programs.atop = rec {
- enable = mkEnableOption (lib.mdDoc "Atop");
+ enable = mkEnableOption "Atop, a tool for monitoring system resources";
package = mkPackageOption pkgs "atop" { };
@@ -22,7 +22,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to install and enable the netatop kernel module.
Note: this sets the kernel taint flag "O" for loading out-of-tree modules.
'';
@@ -31,7 +31,7 @@ in
type = types.package;
default = config.boot.kernelPackages.netatop;
defaultText = literalExpression "config.boot.kernelPackages.netatop";
- description = lib.mdDoc ''
+ description = ''
Which package to use for netatop.
'';
};
@@ -40,7 +40,7 @@ in
atopgpu.enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to install and enable the atopgpud daemon to get information about
NVIDIA gpus.
'';
@@ -49,7 +49,7 @@ in
setuidWrapper.enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to install a setuid wrapper for Atop. This is required to use some of
the features as non-root user (e.g.: ipc information, netatop, atopgpu).
Atop tries to drop the root privileges shortly after starting.
@@ -59,7 +59,7 @@ in
atopService.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the atop service responsible for storing statistics for
long-term analysis.
'';
@@ -67,7 +67,7 @@ in
atopRotateTimer.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the atop-rotate timer, which restarts the atop service
daily to make sure the data files are rotate.
'';
@@ -75,7 +75,7 @@ in
atopacctService.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the atopacct service which manages process accounting.
This allows Atop to gather data about processes that disappeared in between
two refresh intervals.
@@ -88,7 +88,7 @@ in
flags = "a1f";
interval = 5;
};
- description = lib.mdDoc ''
+ description = ''
Parameters to be written to {file}`/etc/atoprc`.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/ausweisapp.nix b/third_party/nixpkgs/nixos/modules/programs/ausweisapp.nix
index 91870df202..0359e58c55 100644
--- a/third_party/nixpkgs/nixos/modules/programs/ausweisapp.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/ausweisapp.nix
@@ -7,10 +7,10 @@ let
in
{
options.programs.ausweisapp = {
- enable = mkEnableOption (lib.mdDoc "AusweisApp");
+ enable = mkEnableOption "AusweisApp";
openFirewall = mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether to open the required firewall ports for the Smartphone as Card Reader (SaC) functionality of AusweisApp.
'';
default = false;
diff --git a/third_party/nixpkgs/nixos/modules/programs/autojump.nix b/third_party/nixpkgs/nixos/modules/programs/autojump.nix
index dde6870d98..ecfc2f6580 100644
--- a/third_party/nixpkgs/nixos/modules/programs/autojump.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/autojump.nix
@@ -13,7 +13,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable autojump.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/bandwhich.nix b/third_party/nixpkgs/nixos/modules/programs/bandwhich.nix
index aa6a0dfb6f..2c78584f2d 100644
--- a/third_party/nixpkgs/nixos/modules/programs/bandwhich.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/bandwhich.nix
@@ -11,7 +11,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to add bandwhich to the global environment and configure a
setcap wrapper for it.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/bash-my-aws.nix b/third_party/nixpkgs/nixos/modules/programs/bash-my-aws.nix
index 10f16cae65..15e429a754 100644
--- a/third_party/nixpkgs/nixos/modules/programs/bash-my-aws.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/bash-my-aws.nix
@@ -13,7 +13,7 @@ in
{
options = {
programs.bash-my-aws = {
- enable = mkEnableOption (lib.mdDoc "bash-my-aws");
+ enable = mkEnableOption "bash-my-aws";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/bash/bash-completion.nix b/third_party/nixpkgs/nixos/modules/programs/bash/bash-completion.nix
index 96fbe0126d..b8e5b1bfa3 100644
--- a/third_party/nixpkgs/nixos/modules/programs/bash/bash-completion.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/bash/bash-completion.nix
@@ -7,7 +7,7 @@ let
in
{
options = {
- programs.bash.enableCompletion = mkEnableOption (lib.mdDoc "Bash completion for all interactive bash shells") // {
+ programs.bash.enableCompletion = mkEnableOption "Bash completion for all interactive bash shells" // {
default = true;
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/bash/bash.nix b/third_party/nixpkgs/nixos/modules/programs/bash/bash.nix
index 7d3322ea5e..21ef8338d8 100644
--- a/third_party/nixpkgs/nixos/modules/programs/bash/bash.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/bash/bash.nix
@@ -30,7 +30,7 @@ in
/*
enable = mkOption {
default = true;
- description = lib.mdDoc ''
+ description = ''
Whenever to configure Bash as an interactive shell.
Note that this tries to make Bash the default
{option}`users.defaultUserShell`,
@@ -44,7 +44,7 @@ in
shellAliases = mkOption {
default = {};
- description = lib.mdDoc ''
+ description = ''
Set of aliases for bash shell, which overrides {option}`environment.shellAliases`.
See {option}`environment.shellAliases` for an option format description.
'';
@@ -53,7 +53,7 @@ in
shellInit = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell script code called during bash shell initialisation.
'';
type = types.lines;
@@ -61,7 +61,7 @@ in
loginShellInit = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell script code called during login bash shell initialisation.
'';
type = types.lines;
@@ -69,7 +69,7 @@ in
interactiveShellInit = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell script code called during interactive bash shell initialisation.
'';
type = types.lines;
@@ -92,7 +92,7 @@ in
fi
fi
'';
- description = lib.mdDoc ''
+ description = ''
Shell script code used to initialise the bash prompt.
'';
type = types.lines;
@@ -100,7 +100,7 @@ in
promptPluginInit = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell script code used to initialise bash prompt plugins.
'';
type = types.lines;
diff --git a/third_party/nixpkgs/nixos/modules/programs/bash/blesh.nix b/third_party/nixpkgs/nixos/modules/programs/bash/blesh.nix
index 8fa51bef77..ea342b0ce3 100644
--- a/third_party/nixpkgs/nixos/modules/programs/bash/blesh.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/bash/blesh.nix
@@ -4,7 +4,7 @@ let
cfg = config.programs.bash.blesh;
in {
options = {
- programs.bash.blesh.enable = mkEnableOption (mdDoc "blesh");
+ programs.bash.blesh.enable = mkEnableOption "blesh, a full-featured line editor written in pure Bash";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/programs/bash/ls-colors.nix b/third_party/nixpkgs/nixos/modules/programs/bash/ls-colors.nix
index 6a5253a3cc..254ee14c47 100644
--- a/third_party/nixpkgs/nixos/modules/programs/bash/ls-colors.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/bash/ls-colors.nix
@@ -7,7 +7,7 @@ let
in
{
options = {
- programs.bash.enableLsColors = mkEnableOption (lib.mdDoc "extra colors in directory listings") // {
+ programs.bash.enableLsColors = mkEnableOption "extra colors in directory listings" // {
default = true;
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/bash/undistract-me.nix b/third_party/nixpkgs/nixos/modules/programs/bash/undistract-me.nix
index 587b649377..0e6465e048 100644
--- a/third_party/nixpkgs/nixos/modules/programs/bash/undistract-me.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/bash/undistract-me.nix
@@ -8,13 +8,13 @@ in
{
options = {
programs.bash.undistractMe = {
- enable = mkEnableOption (lib.mdDoc "notifications when long-running terminal commands complete");
+ enable = mkEnableOption "notifications when long-running terminal commands complete";
- playSound = mkEnableOption (lib.mdDoc "notification sounds when long-running terminal commands complete");
+ playSound = mkEnableOption "notification sounds when long-running terminal commands complete";
timeout = mkOption {
default = 10;
- description = lib.mdDoc ''
+ description = ''
Number of seconds it would take for a command to be considered long-running.
'';
type = types.int;
diff --git a/third_party/nixpkgs/nixos/modules/programs/bcc.nix b/third_party/nixpkgs/nixos/modules/programs/bcc.nix
index ff29d56bed..f799524b9c 100644
--- a/third_party/nixpkgs/nixos/modules/programs/bcc.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/bcc.nix
@@ -1,6 +1,6 @@
{ config, pkgs, lib, ... }:
{
- options.programs.bcc.enable = lib.mkEnableOption (lib.mdDoc "bcc");
+ options.programs.bcc.enable = lib.mkEnableOption "bcc, tools for BPF-based Linux IO analysis, networking, monitoring, and more";
config = lib.mkIf config.programs.bcc.enable {
environment.systemPackages = [ pkgs.bcc ];
diff --git a/third_party/nixpkgs/nixos/modules/programs/browserpass.nix b/third_party/nixpkgs/nixos/modules/programs/browserpass.nix
index a9670a37e6..2894e237e3 100644
--- a/third_party/nixpkgs/nixos/modules/programs/browserpass.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/browserpass.nix
@@ -4,7 +4,7 @@ with lib;
{
- options.programs.browserpass.enable = mkEnableOption (lib.mdDoc "Browserpass native messaging host");
+ options.programs.browserpass.enable = mkEnableOption "Browserpass native messaging host";
config = mkIf config.programs.browserpass.enable {
environment.etc = let
diff --git a/third_party/nixpkgs/nixos/modules/programs/calls.nix b/third_party/nixpkgs/nixos/modules/programs/calls.nix
index 3d757bc1fc..0cf05f8a2e 100644
--- a/third_party/nixpkgs/nixos/modules/programs/calls.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/calls.nix
@@ -7,9 +7,9 @@ let
in {
options = {
programs.calls = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
GNOME calls: a phone dialer and call handler
- '');
+ '';
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/captive-browser.nix b/third_party/nixpkgs/nixos/modules/programs/captive-browser.nix
index 1c3ee7638e..8f0aa2fe1e 100644
--- a/third_party/nixpkgs/nixos/modules/programs/captive-browser.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/captive-browser.nix
@@ -49,13 +49,13 @@ in
options = {
programs.captive-browser = {
- enable = mkEnableOption (lib.mdDoc "captive browser");
+ enable = mkEnableOption "captive browser, a dedicated Chrome instance to log into captive portals without messing with DNS settings";
package = mkPackageOption pkgs "captive-browser" { };
interface = mkOption {
type = types.str;
- description = lib.mdDoc "your public network interface (wlp3s0, wlan0, eth0, ...)";
+ description = "your public network interface (wlp3s0, wlan0, eth0, ...)";
};
# the options below are the same as in "captive-browser.toml"
@@ -63,7 +63,7 @@ in
type = types.str;
default = browserDefault pkgs.chromium;
defaultText = literalExpression (browserDefault "\${pkgs.chromium}");
- description = lib.mdDoc ''
+ description = ''
The shell (/bin/sh) command executed once the proxy starts.
When browser exits, the proxy exits. An extra env var PROXY is available.
@@ -79,7 +79,7 @@ in
dhcp-dns = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The shell (/bin/sh) command executed to obtain the DHCP
DNS server address. The first match of an IPv4 regex is used.
IPv4 only, because let's be real, it's a captive portal.
@@ -89,13 +89,13 @@ in
socks5-addr = mkOption {
type = types.str;
default = "localhost:1666";
- description = lib.mdDoc "the listen address for the SOCKS5 proxy server";
+ description = "the listen address for the SOCKS5 proxy server";
};
bindInterface = mkOption {
default = true;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Binds `captive-browser` to the network interface declared in
`cfg.interface`. This can be used to avoid collisions
with private subnets.
diff --git a/third_party/nixpkgs/nixos/modules/programs/ccache.nix b/third_party/nixpkgs/nixos/modules/programs/ccache.nix
index 7972b2ac4a..bfcbe39b3f 100644
--- a/third_party/nixpkgs/nixos/modules/programs/ccache.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/ccache.nix
@@ -5,28 +5,28 @@ let
in {
options.programs.ccache = {
# host configuration
- enable = lib.mkEnableOption (lib.mdDoc "CCache");
+ enable = lib.mkEnableOption "CCache, a compiler cache for fast recompilation of C/C++ code";
cacheDir = lib.mkOption {
type = lib.types.path;
- description = lib.mdDoc "CCache directory";
+ description = "CCache directory";
default = "/var/cache/ccache";
};
# target configuration
packageNames = lib.mkOption {
type = lib.types.listOf lib.types.str;
- description = lib.mdDoc "Nix top-level packages to be compiled using CCache";
+ description = "Nix top-level packages to be compiled using CCache";
default = [];
example = [ "wxGTK32" "ffmpeg" "libav_all" ];
};
owner = lib.mkOption {
type = lib.types.str;
default = "root";
- description = lib.mdDoc "Owner of CCache directory";
+ description = "Owner of CCache directory";
};
group = lib.mkOption {
type = lib.types.str;
default = "nixbld";
- description = lib.mdDoc "Group owner of CCache directory";
+ description = "Group owner of CCache directory";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/cdemu.nix b/third_party/nixpkgs/nixos/modules/programs/cdemu.nix
index 7eba4d29d8..3ee8b2d8fc 100644
--- a/third_party/nixpkgs/nixos/modules/programs/cdemu.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/cdemu.nix
@@ -10,7 +10,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
{command}`cdemu` for members of
{option}`programs.cdemu.group`.
'';
@@ -18,21 +18,21 @@ in {
group = mkOption {
type = types.str;
default = "cdrom";
- description = lib.mdDoc ''
+ description = ''
Group that users must be in to use {command}`cdemu`.
'';
};
gui = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to install the {command}`cdemu` GUI (gCDEmu).
'';
};
image-analyzer = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to install the image analyzer.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/cfs-zen-tweaks.nix b/third_party/nixpkgs/nixos/modules/programs/cfs-zen-tweaks.nix
index fc05bcd11e..28d1ef5992 100644
--- a/third_party/nixpkgs/nixos/modules/programs/cfs-zen-tweaks.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/cfs-zen-tweaks.nix
@@ -17,7 +17,7 @@ in
};
options = {
- programs.cfs-zen-tweaks.enable = mkEnableOption (lib.mdDoc "CFS Zen Tweaks");
+ programs.cfs-zen-tweaks.enable = mkEnableOption "CFS Zen Tweaks";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/programs/chromium.nix b/third_party/nixpkgs/nixos/modules/programs/chromium.nix
index 45a9e9e2a6..fa5abe957a 100644
--- a/third_party/nixpkgs/nixos/modules/programs/chromium.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/chromium.nix
@@ -19,15 +19,15 @@ in
options = {
programs.chromium = {
- enable = mkEnableOption (lib.mdDoc "{command}`chromium` policies");
+ enable = mkEnableOption "{command}`chromium` policies";
- enablePlasmaBrowserIntegration = mkEnableOption (lib.mdDoc "Native Messaging Host for Plasma Browser Integration");
+ enablePlasmaBrowserIntegration = mkEnableOption "Native Messaging Host for Plasma Browser Integration";
plasmaBrowserIntegrationPackage = mkPackageOption pkgs [ "plasma5Packages" "plasma-browser-integration" ] { };
extensions = mkOption {
type = with types; nullOr (listOf str);
- description = lib.mdDoc ''
+ description = ''
List of chromium extensions to install.
For list of plugins ids see id in url of extensions on
[chrome web store](https://chrome.google.com/webstore/category/extensions)
@@ -50,35 +50,35 @@ in
homepageLocation = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Chromium default homepage";
+ description = "Chromium default homepage";
default = null;
example = "https://nixos.org";
};
defaultSearchProviderEnabled = mkOption {
type = types.nullOr types.bool;
- description = lib.mdDoc "Enable the default search provider.";
+ description = "Enable the default search provider.";
default = null;
example = true;
};
defaultSearchProviderSearchURL = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Chromium default search provider url.";
+ description = "Chromium default search provider url.";
default = null;
example = "https://encrypted.google.com/search?q={searchTerms}&{google:RLZ}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:searchClient}{google:sourceId}{google:instantExtendedEnabledParameter}ie={inputEncoding}";
};
defaultSearchProviderSuggestURL = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Chromium default search provider url for suggestions.";
+ description = "Chromium default search provider url for suggestions.";
default = null;
example = "https://encrypted.google.com/complete/search?output=chrome&q={searchTerms}";
};
extraOpts = mkOption {
type = types.attrs;
- description = lib.mdDoc ''
+ description = ''
Extra chromium policy options. A list of available policies
can be found in the Chrome Enterprise documentation:
@@ -98,6 +98,24 @@ in
}
'';
};
+
+ initialPrefs = mkOption {
+ type = types.attrs;
+ description = ''
+ Initial preferences are used to configure the browser for the first run.
+ Unlike {option}`programs.chromium.extraOpts`, initialPrefs can be changed by users in the browser settings.
+ More information can be found in the Chromium documentation:
+
+ '';
+ default = {};
+ example = literalExpression ''
+ {
+ "first_run_tabs" = [
+ "https://nixos.org/"
+ ];
+ }
+ '';
+ };
};
};
@@ -110,6 +128,7 @@ in
{ source = "${cfg.plasmaBrowserIntegrationPackage}/etc/chromium/native-messaging-hosts/org.kde.plasma.browser_integration.json"; };
"chromium/policies/managed/default.json" = lib.mkIf (defaultProfile != {}) { text = builtins.toJSON defaultProfile; };
"chromium/policies/managed/extra.json" = lib.mkIf (cfg.extraOpts != {}) { text = builtins.toJSON cfg.extraOpts; };
+ "chromium/initial_preferences" = lib.mkIf (cfg.initialPrefs != {}) { text = builtins.toJSON cfg.initialPrefs; };
# for google-chrome https://www.chromium.org/administrators/linux-quick-start
"opt/chrome/native-messaging-hosts/org.kde.plasma.browser_integration.json" = lib.mkIf cfg.enablePlasmaBrowserIntegration
{ source = "${cfg.plasmaBrowserIntegrationPackage}/etc/opt/chrome/native-messaging-hosts/org.kde.plasma.browser_integration.json"; };
diff --git a/third_party/nixpkgs/nixos/modules/programs/clash-verge.nix b/third_party/nixpkgs/nixos/modules/programs/clash-verge.nix
index 57a1c0377e..4425fe1a9f 100644
--- a/third_party/nixpkgs/nixos/modules/programs/clash-verge.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/clash-verge.nix
@@ -2,9 +2,10 @@
{
options.programs.clash-verge = {
- enable = lib.mkEnableOption (lib.mdDoc "Clash Verge");
- autoStart = lib.mkEnableOption (lib.mdDoc "Clash Verge auto launch");
- tunMode = lib.mkEnableOption (lib.mdDoc "Clash Verge TUN mode");
+ enable = lib.mkEnableOption "Clash Verge";
+ package = lib.mkPackageOption pkgs "clash-verge" {};
+ autoStart = lib.mkEnableOption "Clash Verge auto launch";
+ tunMode = lib.mkEnableOption "Clash Verge TUN mode";
};
config =
@@ -14,10 +15,10 @@
lib.mkIf cfg.enable {
environment.systemPackages = [
- pkgs.clash-verge
+ cfg.package
(lib.mkIf cfg.autoStart (pkgs.makeAutostartItem {
name = "clash-verge";
- package = pkgs.clash-verge;
+ package = cfg.package;
}))
];
@@ -25,7 +26,7 @@
owner = "root";
group = "root";
capabilities = "cap_net_bind_service,cap_net_admin=+ep";
- source = "${lib.getExe pkgs.clash-verge}";
+ source = "${lib.getExe cfg.package}";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/cnping.nix b/third_party/nixpkgs/nixos/modules/programs/cnping.nix
index 143267fc9a..77cbf4d820 100644
--- a/third_party/nixpkgs/nixos/modules/programs/cnping.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/cnping.nix
@@ -8,7 +8,7 @@ in
{
options = {
programs.cnping = {
- enable = mkEnableOption (lib.mdDoc "a setcap wrapper for cnping");
+ enable = mkEnableOption "a setcap wrapper for cnping";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/command-not-found/command-not-found.nix b/third_party/nixpkgs/nixos/modules/programs/command-not-found/command-not-found.nix
index b5c7626bd2..4d2a89b515 100644
--- a/third_party/nixpkgs/nixos/modules/programs/command-not-found/command-not-found.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/command-not-found/command-not-found.nix
@@ -26,7 +26,7 @@ in
enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether interactive shells should show which Nix package (if
any) provides a missing command.
'';
@@ -34,7 +34,7 @@ in
dbPath = mkOption {
default = "/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite" ;
- description = lib.mdDoc ''
+ description = ''
Absolute path to programs.sqlite.
By default this file will be provided by your channel
diff --git a/third_party/nixpkgs/nixos/modules/programs/coolercontrol.nix b/third_party/nixpkgs/nixos/modules/programs/coolercontrol.nix
new file mode 100644
index 0000000000..8c9a39d2eb
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/programs/coolercontrol.nix
@@ -0,0 +1,59 @@
+{ config
+, lib
+, pkgs
+, ...
+}:
+
+let
+ cfg = config.programs.coolercontrol;
+in
+{
+ ##### interface
+ options = {
+ programs.coolercontrol = {
+ enable = lib.mkEnableOption "CoolerControl GUI & its background services";
+
+ nvidiaSupport = lib.mkOption {
+ type = lib.types.bool;
+ default = lib.elem "nvidia" config.services.xserver.videoDrivers;
+ defaultText = lib.literalExpression "lib.elem \"nvidia\" config.services.xserver.videoDrivers";
+ description = ''
+ Enable support for Nvidia GPUs.
+ '';
+ };
+ };
+ };
+
+ ##### implementation
+ config = lib.mkIf cfg.enable (lib.mkMerge [
+ # Common
+ ({
+ environment.systemPackages = with pkgs.coolercontrol; [
+ coolercontrol-gui
+ ];
+
+ systemd = {
+ packages = with pkgs.coolercontrol; [
+ coolercontrol-liqctld
+ coolercontrold
+ ];
+
+ # https://github.com/NixOS/nixpkgs/issues/81138
+ services = {
+ coolercontrol-liqctld.wantedBy = [ "multi-user.target" ];
+ coolercontrold.wantedBy = [ "multi-user.target" ];
+ };
+ };
+ })
+
+ # Nvidia support
+ (lib.mkIf cfg.nvidiaSupport {
+ systemd.services.coolercontrold.path = with config.boot.kernelPackages; [
+ nvidia_x11 # nvidia-smi
+ nvidia_x11.settings # nvidia-settings
+ ];
+ })
+ ]);
+
+ meta.maintainers = with lib.maintainers; [ OPNA2608 codifryed ];
+}
diff --git a/third_party/nixpkgs/nixos/modules/programs/criu.nix b/third_party/nixpkgs/nixos/modules/programs/criu.nix
index 9f03b0c643..9414d0b27f 100644
--- a/third_party/nixpkgs/nixos/modules/programs/criu.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/criu.nix
@@ -10,7 +10,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Install {command}`criu` along with necessary kernel options.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/darling.nix b/third_party/nixpkgs/nixos/modules/programs/darling.nix
index 589a9dd5d6..194b1648b7 100644
--- a/third_party/nixpkgs/nixos/modules/programs/darling.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/darling.nix
@@ -5,7 +5,7 @@ let
in {
options = {
programs.darling = {
- enable = lib.mkEnableOption (lib.mdDoc "Darling, a Darwin/macOS compatibility layer for Linux");
+ enable = lib.mkEnableOption "Darling, a Darwin/macOS compatibility layer for Linux";
package = lib.mkPackageOption pkgs "darling" {};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/dconf.nix b/third_party/nixpkgs/nixos/modules/programs/dconf.nix
index cf53658c4f..e6738617c8 100644
--- a/third_party/nixpkgs/nixos/modules/programs/dconf.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/dconf.nix
@@ -93,12 +93,12 @@ let
keyfiles = lib.mkOption {
type = listOf (oneOf [ path package ]);
default = [ ];
- description = lib.mdDoc "A list of dconf keyfile directories.";
+ description = "A list of dconf keyfile directories.";
};
settings = lib.mkOption {
type = attrs;
default = { };
- description = lib.mdDoc "An attrset used to generate dconf keyfile.";
+ description = "An attrset used to generate dconf keyfile.";
example = literalExpression ''
with lib.gvariant;
{
@@ -112,7 +112,7 @@ let
locks = lib.mkOption {
type = with lib.types; listOf str;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
A list of dconf keys to be lockdown. This doesn't take effect if `lockAll`
is set.
'';
@@ -123,7 +123,7 @@ let
lockAll = lib.mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc "Lockdown all dconf keys in `settings`.";
+ description = "Lockdown all dconf keys in `settings`.";
};
};
};
@@ -133,7 +133,7 @@ let
enableUserDb = lib.mkOption {
type = bool;
default = true;
- description = lib.mdDoc "Add `user-db:user` at the beginning of the profile.";
+ description = "Add `user-db:user` at the beginning of the profile.";
};
databases = lib.mkOption {
@@ -143,7 +143,7 @@ let
dconfDatabase
]);
default = [ ];
- description = lib.mdDoc ''
+ description = ''
List of data sources for the profile. An element can be an attrset,
or the path of an already compiled database. Each element is converted
to a file-db.
@@ -161,7 +161,7 @@ in
{
options = {
programs.dconf = {
- enable = lib.mkEnableOption (lib.mdDoc "dconf");
+ enable = lib.mkEnableOption "dconf";
profiles = lib.mkOption {
type = with lib.types; attrsOf (oneOf [
@@ -170,7 +170,7 @@ in
dconfProfile
]);
default = { };
- description = lib.mdDoc ''
+ description = ''
Attrset of dconf profiles. By default the `user` profile is used which
ends up in `/etc/dconf/profile/user`.
'';
@@ -193,7 +193,7 @@ in
packages = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [ ];
- description = lib.mdDoc "A list of packages which provide dconf profiles and databases in {file}`/etc/dconf`.";
+ description = "A list of packages which provide dconf profiles and databases in {file}`/etc/dconf`.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/digitalbitbox/default.md b/third_party/nixpkgs/nixos/modules/programs/digitalbitbox/default.md
index 9bca14e97f..5147bb971e 100644
--- a/third_party/nixpkgs/nixos/modules/programs/digitalbitbox/default.md
+++ b/third_party/nixpkgs/nixos/modules/programs/digitalbitbox/default.md
@@ -4,8 +4,10 @@ Digital Bitbox is a hardware wallet and second-factor authenticator.
The `digitalbitbox` programs module may be installed by setting
`programs.digitalbitbox` to `true` in a manner similar to
-```
-programs.digitalbitbox.enable = true;
+```nix
+{
+ programs.digitalbitbox.enable = true;
+}
```
and bundles the `digitalbitbox` package (see [](#sec-digitalbitbox-package)),
which contains the `dbb-app` and `dbb-cli` binaries, along with the hardware
@@ -21,27 +23,33 @@ For more information, see .
The binaries, `dbb-app` (a GUI tool) and `dbb-cli` (a CLI tool), are available
through the `digitalbitbox` package which could be installed as follows:
-```
-environment.systemPackages = [
- pkgs.digitalbitbox
-];
+```nix
+{
+ environment.systemPackages = [
+ pkgs.digitalbitbox
+ ];
+}
```
## Hardware {#sec-digitalbitbox-hardware-module}
The digitalbitbox hardware package enables the udev rules for Digital Bitbox
devices and may be installed as follows:
-```
-hardware.digitalbitbox.enable = true;
+```nix
+{
+ hardware.digitalbitbox.enable = true;
+}
```
In order to alter the udev rules, one may provide different values for the
`udevRule51` and `udevRule52` attributes by means of overriding as follows:
-```
-programs.digitalbitbox = {
- enable = true;
- package = pkgs.digitalbitbox.override {
- udevRule51 = "something else";
+```nix
+{
+ programs.digitalbitbox = {
+ enable = true;
+ package = pkgs.digitalbitbox.override {
+ udevRule51 = "something else";
+ };
};
-};
+}
```
diff --git a/third_party/nixpkgs/nixos/modules/programs/digitalbitbox/default.nix b/third_party/nixpkgs/nixos/modules/programs/digitalbitbox/default.nix
index bdacbc010c..10b5a88171 100644
--- a/third_party/nixpkgs/nixos/modules/programs/digitalbitbox/default.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/digitalbitbox/default.nix
@@ -11,7 +11,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Installs the Digital Bitbox application and enables the complementary hardware module.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/direnv.nix b/third_party/nixpkgs/nixos/modules/programs/direnv.nix
index fdc646eb4b..6061de58eb 100644
--- a/third_party/nixpkgs/nixos/modules/programs/direnv.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/direnv.nix
@@ -8,11 +8,11 @@
in {
options.programs.direnv = {
- enable = lib.mkEnableOption (lib.mdDoc ''
+ enable = lib.mkEnableOption ''
direnv integration. Takes care of both installation and
setting up the sourcing of the shell. Additionally enables nix-direnv
integration. Note that you need to logout and login for this change to apply
- '');
+ '';
package = lib.mkPackageOption pkgs "direnv" {};
@@ -23,28 +23,28 @@ in {
export FOO="foo"
echo "loaded direnv!"
'';
- description = lib.mdDoc ''
+ description = ''
Extra lines to append to the sourced direnvrc
'';
};
- silent = lib.mkEnableOption (lib.mdDoc ''
+ silent = lib.mkEnableOption ''
the hiding of direnv logging
- '');
+ '';
loadInNixShell =
- lib.mkEnableOption (lib.mdDoc ''
+ lib.mkEnableOption ''
loading direnv in `nix-shell` `nix shell` or `nix develop`
- '')
+ ''
// {
default = true;
};
nix-direnv = {
enable =
- (lib.mkEnableOption (lib.mdDoc ''
+ (lib.mkEnableOption ''
a faster, persistent implementation of use_nix and use_flake, to replace the built-in one
- ''))
+ '')
// {
default = true;
};
@@ -53,7 +53,7 @@ in {
default = pkgs.nix-direnv.override { nix = config.nix.package; };
defaultText = "pkgs.nix-direnv";
type = lib.types.package;
- description = lib.mdDoc ''
+ description = ''
The nix-direnv package to use
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/dmrconfig.nix b/third_party/nixpkgs/nixos/modules/programs/dmrconfig.nix
index 29268cdfeb..15338681e6 100644
--- a/third_party/nixpkgs/nixos/modules/programs/dmrconfig.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/dmrconfig.nix
@@ -14,7 +14,7 @@ in {
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to configure system to enable use of dmrconfig. This
enables the required udev rules and installs the program.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/droidcam.nix b/third_party/nixpkgs/nixos/modules/programs/droidcam.nix
index c9b4457d1d..9843a1f5be 100644
--- a/third_party/nixpkgs/nixos/modules/programs/droidcam.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/droidcam.nix
@@ -4,7 +4,7 @@ with lib;
{
options.programs.droidcam = {
- enable = mkEnableOption (lib.mdDoc "DroidCam client");
+ enable = mkEnableOption "DroidCam client";
};
config = lib.mkIf config.programs.droidcam.enable {
diff --git a/third_party/nixpkgs/nixos/modules/programs/dublin-traceroute.nix b/third_party/nixpkgs/nixos/modules/programs/dublin-traceroute.nix
index cfcd6e8308..6ff8a5bdef 100644
--- a/third_party/nixpkgs/nixos/modules/programs/dublin-traceroute.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/dublin-traceroute.nix
@@ -10,9 +10,9 @@ in {
options = {
programs.dublin-traceroute = {
- enable = mkEnableOption (mdDoc ''
+ enable = mkEnableOption ''
dublin-traceroute, add it to the global environment and configure a setcap wrapper for it.
- '');
+ '';
package = mkPackageOption pkgs "dublin-traceroute" { };
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/ecryptfs.nix b/third_party/nixpkgs/nixos/modules/programs/ecryptfs.nix
index 63c1a3ad44..ced5eb26fb 100644
--- a/third_party/nixpkgs/nixos/modules/programs/ecryptfs.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/ecryptfs.nix
@@ -7,7 +7,7 @@ let
in {
options.programs.ecryptfs = {
- enable = mkEnableOption (lib.mdDoc "ecryptfs setuid mount wrappers");
+ enable = mkEnableOption "ecryptfs setuid mount wrappers";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/programs/evince.nix b/third_party/nixpkgs/nixos/modules/programs/evince.nix
index ed543d35cc..cffc5127f1 100644
--- a/third_party/nixpkgs/nixos/modules/programs/evince.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/evince.nix
@@ -21,8 +21,7 @@ in {
programs.evince = {
- enable = mkEnableOption
- (lib.mdDoc "Evince, the GNOME document viewer");
+ enable = mkEnableOption "Evince, the GNOME document viewer";
package = mkPackageOption pkgs "evince" { };
diff --git a/third_party/nixpkgs/nixos/modules/programs/extra-container.nix b/third_party/nixpkgs/nixos/modules/programs/extra-container.nix
index 5e717c4d82..c10ccd7691 100644
--- a/third_party/nixpkgs/nixos/modules/programs/extra-container.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/extra-container.nix
@@ -5,10 +5,10 @@ let
cfg = config.programs.extra-container;
in {
options = {
- programs.extra-container.enable = mkEnableOption (lib.mdDoc ''
+ programs.extra-container.enable = mkEnableOption ''
extra-container, a tool for running declarative NixOS containers
without host system rebuilds
- '');
+ '';
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.extra-container ];
diff --git a/third_party/nixpkgs/nixos/modules/programs/fcast-receiver.nix b/third_party/nixpkgs/nixos/modules/programs/fcast-receiver.nix
new file mode 100644
index 0000000000..2e4e6bf8b2
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/programs/fcast-receiver.nix
@@ -0,0 +1,31 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.programs.fcast-receiver;
+in
+{
+ meta = {
+ maintainers = pkgs.fcast-receiver.meta.maintainers;
+ };
+
+ options.programs.fcast-receiver = {
+ enable = mkEnableOption "FCast Receiver";
+ openFirewall = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Open ports needed for the functionality of the program.
+ '';
+ };
+ package = mkPackageOption pkgs "fcast-receiver" { };
+ };
+
+ config = mkIf cfg.enable {
+ environment.systemPackages = [ cfg.package ];
+ networking.firewall = mkIf cfg.openFirewall {
+ allowedTCPPorts = [ 46899 ];
+ };
+ };
+}
diff --git a/third_party/nixpkgs/nixos/modules/programs/feedbackd.nix b/third_party/nixpkgs/nixos/modules/programs/feedbackd.nix
index 010287e5cd..9de604c34a 100644
--- a/third_party/nixpkgs/nixos/modules/programs/feedbackd.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/feedbackd.nix
@@ -7,11 +7,11 @@ let
in {
options = {
programs.feedbackd = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
the feedbackd D-BUS service and udev rules.
Your user needs to be in the `feedbackd` group to trigger effects
- '');
+ '';
package = mkPackageOption pkgs "feedbackd" { };
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/file-roller.nix b/third_party/nixpkgs/nixos/modules/programs/file-roller.nix
index a343d4a261..4799f42d63 100644
--- a/third_party/nixpkgs/nixos/modules/programs/file-roller.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/file-roller.nix
@@ -21,7 +21,7 @@ in {
programs.file-roller = {
- enable = mkEnableOption (lib.mdDoc "File Roller, an archive manager for GNOME");
+ enable = mkEnableOption "File Roller, an archive manager for GNOME";
package = mkPackageOption pkgs [ "gnome" "file-roller" ] { };
diff --git a/third_party/nixpkgs/nixos/modules/programs/firefox.nix b/third_party/nixpkgs/nixos/modules/programs/firefox.nix
index 29c567783e..39b30be48d 100644
--- a/third_party/nixpkgs/nixos/modules/programs/firefox.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/firefox.nix
@@ -62,12 +62,12 @@ let
in
{
options.programs.firefox = {
- enable = mkEnableOption (mdDoc "the Firefox web browser");
+ enable = mkEnableOption "the Firefox web browser";
package = mkOption {
type = types.package;
default = pkgs.firefox;
- description = mdDoc "Firefox package to use.";
+ description = "Firefox package to use.";
defaultText = literalExpression "pkgs.firefox";
relatedPackages = [
"firefox"
@@ -81,13 +81,13 @@ in
wrapperConfig = mkOption {
type = types.attrs;
default = {};
- description = mdDoc "Arguments to pass to Firefox wrapper";
+ description = "Arguments to pass to Firefox wrapper";
};
policies = mkOption {
type = policyFormat.type;
default = { };
- description = mdDoc ''
+ description = ''
Group policies to install.
See [Mozilla's documentation](https://mozilla.github.io/policy-templates/)
@@ -103,7 +103,7 @@ in
preferences = mkOption {
type = with types; attrsOf (oneOf [ bool int str ]);
default = { };
- description = mdDoc ''
+ description = ''
Preferences to set from `about:config`.
Some of these might be able to be configured more ergonomically
@@ -116,7 +116,7 @@ in
preferencesStatus = mkOption {
type = types.enum [ "default" "locked" "user" "clear" ];
default = "locked";
- description = mdDoc ''
+ description = ''
The status of `firefox.preferences`.
`status` can assume the following values:
@@ -230,7 +230,7 @@ in
"zh-TW"
]));
default = [ ];
- description = mdDoc ''
+ description = ''
The language packs to install.
'';
};
@@ -238,7 +238,7 @@ in
autoConfig = mkOption {
type = types.lines;
default = "";
- description = mdDoc ''
+ description = ''
AutoConfig files can be used to set and lock preferences that are not covered
by the policies.json for Mac and Linux. This method can be used to automatically
change user preferences or prevent the end user from modifiying specific
@@ -250,11 +250,11 @@ in
packages = mkOption {
type = types.listOf types.package;
default = [];
- description = mdDoc ''
+ description = ''
Additional packages containing native messaging hosts that should be made available to Firefox extensions.
'';
};
- }) // (mapAttrs (k: v: mkEnableOption (mdDoc "${v.name} support")) nmhOptions);
+ }) // (mapAttrs (k: v: mkEnableOption "${v.name} support") nmhOptions);
};
config = let
diff --git a/third_party/nixpkgs/nixos/modules/programs/firejail.nix b/third_party/nixpkgs/nixos/modules/programs/firejail.nix
index 046c31ce64..0510cf8c61 100644
--- a/third_party/nixpkgs/nixos/modules/programs/firejail.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/firejail.nix
@@ -40,32 +40,32 @@ let
in {
options.programs.firejail = {
- enable = mkEnableOption (lib.mdDoc "firejail");
+ enable = mkEnableOption "firejail, a sandboxing tool for Linux";
wrappedBinaries = mkOption {
type = types.attrsOf (types.either types.path (types.submodule {
options = {
executable = mkOption {
type = types.path;
- description = lib.mdDoc "Executable to run sandboxed";
+ description = "Executable to run sandboxed";
example = literalExpression ''"''${lib.getBin pkgs.firefox}/bin/firefox"'';
};
desktop = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ".desktop file to modify. Only necessary if it uses the absolute path to the executable.";
+ description = ".desktop file to modify. Only necessary if it uses the absolute path to the executable.";
example = literalExpression ''"''${pkgs.firefox}/share/applications/firefox.desktop"'';
};
profile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc "Profile to use";
+ description = "Profile to use";
example = literalExpression ''"''${pkgs.firejail}/etc/firejail/firefox.profile"'';
};
extraArgs = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "Extra arguments to pass to firejail";
+ description = "Extra arguments to pass to firejail";
example = [ "--private=~/.firejail_home" ];
};
};
@@ -83,7 +83,7 @@ in {
};
}
'';
- description = lib.mdDoc ''
+ description = ''
Wrap the binaries in firejail and place them in the global path.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/fish.nix b/third_party/nixpkgs/nixos/modules/programs/fish.nix
index a4c20560bc..2102a07cd0 100644
--- a/third_party/nixpkgs/nixos/modules/programs/fish.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/fish.nix
@@ -49,7 +49,7 @@ in
enable = mkOption {
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to configure fish as an interactive shell.
'';
type = types.bool;
@@ -58,7 +58,7 @@ in
useBabelfish = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If enabled, the configured environment will be translated to native fish using [babelfish](https://github.com/bouk/babelfish).
Otherwise, [foreign-env](https://github.com/oh-my-fish/plugin-foreign-env) will be used.
'';
@@ -67,7 +67,7 @@ in
vendor.config.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether fish should source configuration snippets provided by other packages.
'';
};
@@ -75,7 +75,7 @@ in
vendor.completions.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether fish should use completion files provided by other packages.
'';
};
@@ -83,7 +83,7 @@ in
vendor.functions.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether fish should autoload fish functions provided by other packages.
'';
};
@@ -94,7 +94,7 @@ in
gco = "git checkout";
npu = "nix-prefetch-url";
};
- description = lib.mdDoc ''
+ description = ''
Set of fish abbreviations.
'';
type = with types; attrsOf str;
@@ -102,7 +102,7 @@ in
shellAliases = mkOption {
default = {};
- description = lib.mdDoc ''
+ description = ''
Set of aliases for fish shell, which overrides {option}`environment.shellAliases`.
See {option}`environment.shellAliases` for an option format description.
'';
@@ -111,7 +111,7 @@ in
shellInit = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell script code called during fish shell initialisation.
'';
type = types.lines;
@@ -119,7 +119,7 @@ in
loginShellInit = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell script code called during fish login shell initialisation.
'';
type = types.lines;
@@ -127,7 +127,7 @@ in
interactiveShellInit = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell script code called during interactive fish shell initialisation.
'';
type = types.lines;
@@ -135,7 +135,7 @@ in
promptInit = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell script code used to initialise fish prompt.
'';
type = types.lines;
diff --git a/third_party/nixpkgs/nixos/modules/programs/flashrom.nix b/third_party/nixpkgs/nixos/modules/programs/flashrom.nix
index f954bc2197..1b9b4493ef 100644
--- a/third_party/nixpkgs/nixos/modules/programs/flashrom.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/flashrom.nix
@@ -10,7 +10,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Installs flashrom and configures udev rules for programmers
used by flashrom. Grants access to users in the "flashrom"
group.
diff --git a/third_party/nixpkgs/nixos/modules/programs/flexoptix-app.nix b/third_party/nixpkgs/nixos/modules/programs/flexoptix-app.nix
index 6f37fe5466..47a76da125 100644
--- a/third_party/nixpkgs/nixos/modules/programs/flexoptix-app.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/flexoptix-app.nix
@@ -7,7 +7,7 @@ let
in {
options = {
programs.flexoptix-app = {
- enable = mkEnableOption (lib.mdDoc "FLEXOPTIX app + udev rules");
+ enable = mkEnableOption "FLEXOPTIX app + udev rules";
package = mkPackageOption pkgs "flexoptix-app" { };
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/freetds.nix b/third_party/nixpkgs/nixos/modules/programs/freetds.nix
index 98274fa9b5..8b52fc37c5 100644
--- a/third_party/nixpkgs/nixos/modules/programs/freetds.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/freetds.nix
@@ -25,8 +25,7 @@ in
''';
}
'';
- description =
- lib.mdDoc ''
+ description = ''
Configure freetds database entries. Each attribute denotes
a section within freetds.conf, and the value (a string) is the config
content for that section. When at least one entry is configured
diff --git a/third_party/nixpkgs/nixos/modules/programs/fuse.nix b/third_party/nixpkgs/nixos/modules/programs/fuse.nix
index b82d37a051..c15896efbb 100644
--- a/third_party/nixpkgs/nixos/modules/programs/fuse.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/fuse.nix
@@ -13,7 +13,7 @@ in {
# negative numbers obviously make no sense:
type = types.ints.between 0 32767; # 2^15 - 1
default = 1000;
- description = lib.mdDoc ''
+ description = ''
Set the maximum number of FUSE mounts allowed to non-root users.
'';
};
@@ -21,7 +21,7 @@ in {
userAllowOther = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Allow non-root users to specify the allow_other or allow_root mount
options, see mount.fuse3(8).
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/fzf.nix b/third_party/nixpkgs/nixos/modules/programs/fzf.nix
index 7c4f338e29..0e7e519f04 100644
--- a/third_party/nixpkgs/nixos/modules/programs/fzf.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/fzf.nix
@@ -1,32 +1,38 @@
{ pkgs, config, lib, ... }:
-with lib;
+
let
cfg = config.programs.fzf;
in
{
options = {
programs.fzf = {
- fuzzyCompletion = mkEnableOption (mdDoc "fuzzy completion with fzf");
- keybindings = mkEnableOption (mdDoc "fzf keybindings");
+ fuzzyCompletion = lib.mkEnableOption "fuzzy completion with fzf";
+ keybindings = lib.mkEnableOption "fzf keybindings";
};
};
- config = {
- environment.systemPackages = optional (cfg.keybindings || cfg.fuzzyCompletion) pkgs.fzf;
- programs.bash.interactiveShellInit = optionalString cfg.fuzzyCompletion ''
- source ${pkgs.fzf}/share/fzf/completion.bash
- '' + optionalString cfg.keybindings ''
- source ${pkgs.fzf}/share/fzf/key-bindings.bash
- '';
+ config = lib.mkIf (cfg.keybindings || cfg.fuzzyCompletion) {
+ environment.systemPackages = lib.mkIf (cfg.keybindings || cfg.fuzzyCompletion) [ pkgs.fzf ];
- programs.zsh.interactiveShellInit = optionalString (!config.programs.zsh.ohMyZsh.enable)
- (optionalString cfg.fuzzyCompletion ''
- source ${pkgs.fzf}/share/fzf/completion.zsh
- '' + optionalString cfg.keybindings ''
- source ${pkgs.fzf}/share/fzf/key-bindings.zsh
- '');
+ programs = {
+ bash.interactiveShellInit = lib.optionalString cfg.fuzzyCompletion ''
+ source ${pkgs.fzf}/share/fzf/completion.bash
+ '' + lib.optionalString cfg.keybindings ''
+ source ${pkgs.fzf}/share/fzf/key-bindings.bash
+ '';
- programs.zsh.ohMyZsh.plugins = lib.mkIf (cfg.keybindings || cfg.fuzzyCompletion) [ "fzf" ];
+ zsh = {
+ interactiveShellInit = lib.optionalString (!config.programs.zsh.ohMyZsh.enable)
+ (lib.optionalString cfg.fuzzyCompletion ''
+ source ${pkgs.fzf}/share/fzf/completion.zsh
+ '' + lib.optionalString cfg.keybindings ''
+ source ${pkgs.fzf}/share/fzf/key-bindings.zsh
+ '');
+
+ ohMyZsh.plugins = lib.mkIf config.programs.zsh.ohMyZsh.enable [ "fzf" ];
+ };
+ };
};
- meta.maintainers = with maintainers; [ laalsaas ];
+
+ meta.maintainers = with lib.maintainers; [ laalsaas ];
}
diff --git a/third_party/nixpkgs/nixos/modules/programs/gamemode.nix b/third_party/nixpkgs/nixos/modules/programs/gamemode.nix
index 2bb92ed8e0..878f785074 100644
--- a/third_party/nixpkgs/nixos/modules/programs/gamemode.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/gamemode.nix
@@ -10,16 +10,16 @@ in
{
options = {
programs.gamemode = {
- enable = mkEnableOption (lib.mdDoc "GameMode to optimise system performance on demand");
+ enable = mkEnableOption "GameMode to optimise system performance on demand";
- enableRenice = mkEnableOption (lib.mdDoc "CAP_SYS_NICE on gamemoded to support lowering process niceness") // {
+ enableRenice = mkEnableOption "CAP_SYS_NICE on gamemoded to support lowering process niceness" // {
default = true;
};
settings = mkOption {
type = settingsFormat.type;
default = { };
- description = lib.mdDoc ''
+ description = ''
System-wide configuration for GameMode (/etc/gamemode.ini).
See gamemoded(8) man page for available settings.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/gamescope.nix b/third_party/nixpkgs/nixos/modules/programs/gamescope.nix
index 594e5be5fd..af9ced4715 100644
--- a/third_party/nixpkgs/nixos/modules/programs/gamescope.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/gamescope.nix
@@ -21,14 +21,14 @@ with lib; let
in
{
options.programs.gamescope = {
- enable = mkEnableOption (mdDoc "gamescope");
+ enable = mkEnableOption "gamescope, the SteamOS session compositing window manager";
package = mkPackageOption pkgs "gamescope" { };
capSysNice = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Add cap_sys_nice capability to the GameScope
binary so that it may renice itself.
'';
@@ -38,7 +38,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "--rt" "--prefer-vk-device 8086:9bc4" ];
- description = mdDoc ''
+ description = ''
Arguments passed to GameScope on startup.
'';
};
@@ -55,7 +55,7 @@ in
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
}
'';
- description = mdDoc ''
+ description = ''
Default environment variables available to the GameScope process, overridable at runtime.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/geary.nix b/third_party/nixpkgs/nixos/modules/programs/geary.nix
index d9454a2247..6103ee7df8 100644
--- a/third_party/nixpkgs/nixos/modules/programs/geary.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/geary.nix
@@ -11,7 +11,7 @@ in {
};
options = {
- programs.geary.enable = mkEnableOption (lib.mdDoc "Geary, a Mail client for GNOME 3");
+ programs.geary.enable = mkEnableOption "Geary, a Mail client for GNOME";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/programs/git.nix b/third_party/nixpkgs/nixos/modules/programs/git.nix
index 8fb69cbae2..2a5d52f2d1 100644
--- a/third_party/nixpkgs/nixos/modules/programs/git.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/git.nix
@@ -9,7 +9,7 @@ in
{
options = {
programs.git = {
- enable = mkEnableOption (lib.mdDoc "git");
+ enable = mkEnableOption "git, a distributed version control system";
package = mkPackageOption pkgs "git" {
example = "gitFull";
@@ -43,7 +43,7 @@ in
init.defaultBranch = "main";
url."https://github.com/".insteadOf = [ "gh:" "github:" ];
};
- description = lib.mdDoc ''
+ description = ''
Configuration to write to /etc/gitconfig. A list can also be
specified to keep the configuration in order. For example, setting
`config` to `[ { foo.x = 42; } { bar.y = 42; }]` will put the `foo`
@@ -59,7 +59,7 @@ in
};
lfs = {
- enable = mkEnableOption (lib.mdDoc "git-lfs");
+ enable = mkEnableOption "git-lfs (Large File Storage)";
package = mkPackageOption pkgs "git-lfs" { };
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/gnome-disks.nix b/third_party/nixpkgs/nixos/modules/programs/gnome-disks.nix
index dcb20bd603..4b128b4712 100644
--- a/third_party/nixpkgs/nixos/modules/programs/gnome-disks.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/gnome-disks.nix
@@ -26,7 +26,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable GNOME Disks daemon, a program designed to
be a UDisks2 graphical front-end.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/gnome-terminal.nix b/third_party/nixpkgs/nixos/modules/programs/gnome-terminal.nix
index a8d82e0b01..71a6b21788 100644
--- a/third_party/nixpkgs/nixos/modules/programs/gnome-terminal.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/gnome-terminal.nix
@@ -24,7 +24,7 @@ in
];
options = {
- programs.gnome-terminal.enable = mkEnableOption (lib.mdDoc "GNOME Terminal");
+ programs.gnome-terminal.enable = mkEnableOption "GNOME Terminal";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/programs/gnupg.nix b/third_party/nixpkgs/nixos/modules/programs/gnupg.nix
index 179d2de87c..c755d11017 100644
--- a/third_party/nixpkgs/nixos/modules/programs/gnupg.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/gnupg.nix
@@ -1,8 +1,7 @@
{ config, lib, pkgs, ... }:
-with lib;
-
let
+ inherit (lib) mkRemovedOptionModule mkOption mkPackageOption types mkIf optionalString;
cfg = config.programs.gnupg;
@@ -26,8 +25,10 @@ let
"curses";
in
-
{
+ imports = [
+ (mkRemovedOptionModule [ "programs" "gnupg" "agent" "pinentryFlavor" ] "Use programs.gnupg.agent.pinentryPackage instead")
+ ];
options.programs.gnupg = {
package = mkPackageOption pkgs "gnupg" { };
@@ -35,7 +36,7 @@ in
agent.enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enables GnuPG agent with socket-activation for every user session.
'';
};
@@ -43,7 +44,7 @@ in
agent.enableSSHSupport = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable SSH agent support in GnuPG agent. Also sets SSH_AUTH_SOCK
environment variable correctly. This will disable socket-activation
and thus always start a GnuPG agent per user session.
@@ -53,7 +54,7 @@ in
agent.enableExtraSocket = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable extra socket for GnuPG agent.
'';
};
@@ -61,22 +62,22 @@ in
agent.enableBrowserSocket = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable browser socket for GnuPG agent.
'';
};
- agent.pinentryFlavor = mkOption {
- type = types.nullOr (types.enum pkgs.pinentry.flavors);
- example = "gnome3";
- default = defaultPinentryFlavor;
- defaultText = literalMD ''matching the configured desktop environment'';
- description = lib.mdDoc ''
- Which pinentry interface to use. If not null, the path to the
- pinentry binary will be set in /etc/gnupg/gpg-agent.conf.
- If not set at all, it'll pick an appropriate flavor depending on the
- system configuration (qt flavor for lxqt and plasma5, gtk2 for xfce
- 4.12, gnome3 on all other systems with X enabled, ncurses otherwise).
+ agent.pinentryPackage = mkOption {
+ type = types.nullOr types.package;
+ example = lib.literalMD "pkgs.pinentry-gnome3";
+ default = pkgs.pinentry-curses;
+ defaultText = lib.literalMD "matching the configured desktop environment or `pkgs.pinentry-curses`";
+ description = ''
+ Which pinentry package to use. The path to the mainProgram as defined in
+ the package's meta attriutes will be set in /etc/gnupg/gpg-agent.conf.
+ If not set by the user, it'll pick an appropriate flavor depending on the
+ system configuration (qt flavor for lxqt and plasma5, gtk2 for xfce,
+ gnome3 on all other systems with X enabled, curses otherwise).
'';
};
@@ -86,7 +87,7 @@ in
example = {
default-cache-ttl = 600;
};
- description = lib.mdDoc ''
+ description = ''
Configuration for /etc/gnupg/gpg-agent.conf.
See {manpage}`gpg-agent(1)` for supported options.
'';
@@ -95,16 +96,15 @@ in
dirmngr.enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enables GnuPG network certificate management daemon with socket-activation for every user session.
'';
};
};
config = mkIf cfg.agent.enable {
- programs.gnupg.agent.settings = {
- pinentry-program = lib.mkIf (cfg.agent.pinentryFlavor != null)
- "${pkgs.pinentry.${cfg.agent.pinentryFlavor}}/bin/pinentry";
+ programs.gnupg.agent.settings = mkIf (cfg.agent.pinentryPackage != null) {
+ pinentry-program = lib.getExe cfg.agent.pinentryPackage;
};
environment.etc."gnupg/gpg-agent.conf".source =
@@ -207,9 +207,9 @@ in
wantedBy = [ "sockets.target" ];
};
- services.dbus.packages = mkIf (cfg.agent.pinentryFlavor == "gnome3") [ pkgs.gcr ];
+ services.dbus.packages = mkIf (lib.elem "gnome3" (cfg.agent.pinentryPackage.flavors or [])) [ pkgs.gcr ];
- environment.systemPackages = with pkgs; [ cfg.package ];
+ environment.systemPackages = [ cfg.package ];
environment.interactiveShellInit = ''
# Bind gpg-agent to this TTY if gpg commands are used.
@@ -230,12 +230,10 @@ in
'';
assertions = [
- { assertion = cfg.agent.enableSSHSupport -> !config.programs.ssh.startAgent;
+ {
+ assertion = cfg.agent.enableSSHSupport -> !config.programs.ssh.startAgent;
message = "You can't use ssh-agent and GnuPG agent with SSH support enabled at the same time!";
}
];
};
-
- # uses attributes of the linked package
- meta.buildDocsInSandbox = false;
}
diff --git a/third_party/nixpkgs/nixos/modules/programs/goldwarden.nix b/third_party/nixpkgs/nixos/modules/programs/goldwarden.nix
new file mode 100644
index 0000000000..26f9a87c19
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/programs/goldwarden.nix
@@ -0,0 +1,50 @@
+{ lib, config, pkgs, ... }:
+let
+ cfg = config.programs.goldwarden;
+in
+{
+ options.programs.goldwarden = {
+ enable = lib.mkEnableOption "Goldwarden";
+ package = lib.mkPackageOption pkgs "goldwarden" {};
+ useSshAgent = lib.mkEnableOption "Goldwarden's SSH Agent" // { default = true; };
+ };
+
+ config = lib.mkIf cfg.enable {
+ assertions = [{
+ assertion = cfg.useSshAgent -> !config.programs.ssh.startAgent;
+ message = "Only one ssh-agent can be used at a time.";
+ }];
+
+ environment = {
+ etc = lib.mkIf config.programs.chromium.enable {
+ "chromium/native-messaging-hosts/com.8bit.bitwarden.json".source = "${cfg.package}/etc/chromium/native-messaging-hosts/com.8bit.bitwarden.json";
+ "opt/chrome/native-messaging-hosts/com.8bit.bitwarden.json".source = "${cfg.package}/etc/chrome/native-messaging-hosts/com.8bit.bitwarden.json";
+ };
+
+ extraInit = lib.mkIf cfg.useSshAgent ''
+ if [ -z "$SSH_AUTH_SOCK" -a -n "$HOME" ]; then
+ export SSH_AUTH_SOCK="$HOME/.goldwarden-ssh-agent.sock"
+ fi
+ '';
+
+ systemPackages = [
+ # for cli and polkit action
+ cfg.package
+ # binary exec's into pinentry which should match the DE
+ config.programs.gnupg.agent.pinentryPackage
+ ];
+ };
+
+ programs.firefox.nativeMessagingHosts.packages = [ cfg.package ];
+
+ # see https://github.com/quexten/goldwarden/blob/main/cmd/goldwarden.service
+ systemd.user.services.goldwarden = {
+ description = "Goldwarden daemon";
+ wantedBy = [ "graphical-session.target" ];
+ after = [ "graphical-session.target" ];
+ serviceConfig.ExecStart = "${lib.getExe cfg.package} daemonize";
+ path = [ config.programs.gnupg.agent.pinentryPackage ];
+ unitConfig.ConditionUser = "!@system";
+ };
+ };
+}
diff --git a/third_party/nixpkgs/nixos/modules/programs/gpaste.nix b/third_party/nixpkgs/nixos/modules/programs/gpaste.nix
index 37172c9583..1c34c86eb8 100644
--- a/third_party/nixpkgs/nixos/modules/programs/gpaste.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/gpaste.nix
@@ -18,7 +18,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable GPaste, a clipboard manager.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/gphoto2.nix b/third_party/nixpkgs/nixos/modules/programs/gphoto2.nix
index f31b186396..d99259b545 100644
--- a/third_party/nixpkgs/nixos/modules/programs/gphoto2.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/gphoto2.nix
@@ -11,7 +11,7 @@ with lib;
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to configure system to use gphoto2.
To grant digital camera access to a user, the user must
be part of the camera group:
diff --git a/third_party/nixpkgs/nixos/modules/programs/haguichi.nix b/third_party/nixpkgs/nixos/modules/programs/haguichi.nix
index 699327c28c..4f48551cf1 100644
--- a/third_party/nixpkgs/nixos/modules/programs/haguichi.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/haguichi.nix
@@ -4,7 +4,7 @@ with lib;
{
options.programs.haguichi = {
- enable = mkEnableOption (lib.mdDoc "Haguichi, a Linux GUI frontend to the proprietary LogMeIn Hamachi");
+ enable = mkEnableOption "Haguichi, a Linux GUI frontend to the proprietary LogMeIn Hamachi";
};
config = mkIf config.programs.haguichi.enable {
diff --git a/third_party/nixpkgs/nixos/modules/programs/hamster.nix b/third_party/nixpkgs/nixos/modules/programs/hamster.nix
index f50438cc17..0bb56ad7ff 100644
--- a/third_party/nixpkgs/nixos/modules/programs/hamster.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/hamster.nix
@@ -6,7 +6,7 @@ with lib;
meta.maintainers = pkgs.hamster.meta.maintainers;
options.programs.hamster.enable =
- mkEnableOption (lib.mdDoc "hamster, a time tracking program");
+ mkEnableOption "hamster, a time tracking program";
config = lib.mkIf config.programs.hamster.enable {
environment.systemPackages = [ pkgs.hamster ];
diff --git a/third_party/nixpkgs/nixos/modules/programs/htop.nix b/third_party/nixpkgs/nixos/modules/programs/htop.nix
index 9dbab954b2..bf3d851081 100644
--- a/third_party/nixpkgs/nixos/modules/programs/htop.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/htop.nix
@@ -20,7 +20,7 @@ in
options.programs.htop = {
package = mkPackageOption pkgs "htop" { };
- enable = mkEnableOption (lib.mdDoc "htop process monitor");
+ enable = mkEnableOption "htop process monitor";
settings = mkOption {
type = with types; attrsOf (oneOf [ str int bool (listOf (oneOf [ str int bool ])) ]);
@@ -29,7 +29,7 @@ in
hide_kernel_threads = true;
hide_userland_threads = true;
};
- description = lib.mdDoc ''
+ description = ''
Extra global default configuration for htop
which is read on first startup only.
Htop subsequently uses ~/.config/htop/htoprc
diff --git a/third_party/nixpkgs/nixos/modules/programs/i3lock.nix b/third_party/nixpkgs/nixos/modules/programs/i3lock.nix
index 44e2e04c27..8068ecaf08 100644
--- a/third_party/nixpkgs/nixos/modules/programs/i3lock.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/i3lock.nix
@@ -12,7 +12,7 @@ in {
options = {
programs.i3lock = {
- enable = mkEnableOption (mdDoc "i3lock");
+ enable = mkEnableOption "i3lock";
package = mkPackageOption pkgs "i3lock" {
example = "i3lock-color";
extraDescription = ''
@@ -25,7 +25,7 @@ in {
type = types.bool;
default = false;
example = true;
- description = mdDoc ''
+ description = ''
Whether to enable U2F support in the i3lock program.
U2F enables authentication using a hardware device, such as a security key.
When U2F support is enabled, the i3lock program will set the setuid bit on the i3lock binary and enable the pam u2fAuth service,
diff --git a/third_party/nixpkgs/nixos/modules/programs/iay.nix b/third_party/nixpkgs/nixos/modules/programs/iay.nix
index 1fa00e4379..bbd4011443 100644
--- a/third_party/nixpkgs/nixos/modules/programs/iay.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/iay.nix
@@ -5,13 +5,13 @@ let
inherit (lib) mkEnableOption mkIf mkOption mkPackageOption optionalString types;
in {
options.programs.iay = {
- enable = mkEnableOption (lib.mdDoc "iay");
+ enable = mkEnableOption "iay, a minimalistic shell prompt";
package = mkPackageOption pkgs "iay" {};
minimalPrompt = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Use minimal one-liner prompt.";
+ description = "Use minimal one-liner prompt.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/iftop.nix b/third_party/nixpkgs/nixos/modules/programs/iftop.nix
index 1db018858b..c74714a9a6 100644
--- a/third_party/nixpkgs/nixos/modules/programs/iftop.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/iftop.nix
@@ -6,7 +6,7 @@ let
cfg = config.programs.iftop;
in {
options = {
- programs.iftop.enable = mkEnableOption (lib.mdDoc "iftop + setcap wrapper");
+ programs.iftop.enable = mkEnableOption "iftop + setcap wrapper";
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.iftop ];
diff --git a/third_party/nixpkgs/nixos/modules/programs/iotop.nix b/third_party/nixpkgs/nixos/modules/programs/iotop.nix
index 0eb60b989e..b7c1c69f9d 100644
--- a/third_party/nixpkgs/nixos/modules/programs/iotop.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/iotop.nix
@@ -6,7 +6,7 @@ let
cfg = config.programs.iotop;
in {
options = {
- programs.iotop.enable = mkEnableOption (lib.mdDoc "iotop + setcap wrapper");
+ programs.iotop.enable = mkEnableOption "iotop + setcap wrapper";
};
config = mkIf cfg.enable {
security.wrappers.iotop = {
diff --git a/third_party/nixpkgs/nixos/modules/programs/java.nix b/third_party/nixpkgs/nixos/modules/programs/java.nix
index 251192183e..f201f67b42 100644
--- a/third_party/nixpkgs/nixos/modules/programs/java.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/java.nix
@@ -14,8 +14,8 @@ in
programs.java = {
- enable = mkEnableOption (lib.mdDoc "java") // {
- description = lib.mdDoc ''
+ enable = mkEnableOption "java" // {
+ description = ''
Install and setup the Java development kit.
::: {.note}
@@ -34,7 +34,7 @@ in
example = "jre";
};
- binfmt = mkEnableOption (lib.mdDoc "binfmt to execute java jar's and classes");
+ binfmt = mkEnableOption "binfmt to execute java jar's and classes";
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/joycond-cemuhook.nix b/third_party/nixpkgs/nixos/modules/programs/joycond-cemuhook.nix
index 7b129868db..ebb0198ee6 100644
--- a/third_party/nixpkgs/nixos/modules/programs/joycond-cemuhook.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/joycond-cemuhook.nix
@@ -2,7 +2,7 @@
with lib;
{
options.programs.joycond-cemuhook = {
- enable = mkEnableOption (lib.mdDoc "joycond-cemuhook, a program to enable support for cemuhook's UDP protocol for joycond devices.");
+ enable = mkEnableOption "joycond-cemuhook, a program to enable support for cemuhook's UDP protocol for joycond devices.";
};
config = lib.mkIf config.programs.joycond-cemuhook.enable {
diff --git a/third_party/nixpkgs/nixos/modules/programs/k3b.nix b/third_party/nixpkgs/nixos/modules/programs/k3b.nix
index 5d19e4f1cc..4d6385dab4 100644
--- a/third_party/nixpkgs/nixos/modules/programs/k3b.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/k3b.nix
@@ -8,7 +8,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable k3b, the KDE disk burning application.
Additionally to installing `k3b` enabling this will
diff --git a/third_party/nixpkgs/nixos/modules/programs/k40-whisperer.nix b/third_party/nixpkgs/nixos/modules/programs/k40-whisperer.nix
index 96cf159f2c..156ded6c39 100644
--- a/third_party/nixpkgs/nixos/modules/programs/k40-whisperer.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/k40-whisperer.nix
@@ -10,11 +10,11 @@ let
in
{
options.programs.k40-whisperer = {
- enable = mkEnableOption (lib.mdDoc "K40-Whisperer");
+ enable = mkEnableOption "K40-Whisperer";
group = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Group assigned to the device when connected.
'';
default = "k40";
diff --git a/third_party/nixpkgs/nixos/modules/programs/kbdlight.nix b/third_party/nixpkgs/nixos/modules/programs/kbdlight.nix
index 6c3c79ddb4..8a2a0057cf 100644
--- a/third_party/nixpkgs/nixos/modules/programs/kbdlight.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/kbdlight.nix
@@ -7,7 +7,7 @@ let
in
{
- options.programs.kbdlight.enable = mkEnableOption (lib.mdDoc "kbdlight");
+ options.programs.kbdlight.enable = mkEnableOption "kbdlight";
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.kbdlight ];
diff --git a/third_party/nixpkgs/nixos/modules/programs/kclock.nix b/third_party/nixpkgs/nixos/modules/programs/kclock.nix
index 63d6fb1e2d..c2299a3f1b 100644
--- a/third_party/nixpkgs/nixos/modules/programs/kclock.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/kclock.nix
@@ -4,7 +4,7 @@ let
cfg = config.programs.kclock;
kclockPkg = pkgs.libsForQt5.kclock;
in {
- options.programs.kclock = { enable = mkEnableOption (lib.mdDoc "KClock"); };
+ options.programs.kclock = { enable = mkEnableOption "KClock"; };
config = mkIf cfg.enable {
services.dbus.packages = [ kclockPkg ];
diff --git a/third_party/nixpkgs/nixos/modules/programs/kdeconnect.nix b/third_party/nixpkgs/nixos/modules/programs/kdeconnect.nix
index a16fad03ee..1431281405 100644
--- a/third_party/nixpkgs/nixos/modules/programs/kdeconnect.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/kdeconnect.nix
@@ -2,7 +2,7 @@
with lib;
{
options.programs.kdeconnect = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
kdeconnect.
Note that it will open the TCP and UDP port from
@@ -10,7 +10,7 @@ with lib;
You can use the {option}`package` to use
`gnomeExtensions.gsconnect` as an alternative
implementation if you use Gnome
- '');
+ '';
package = mkPackageOption pkgs [ "plasma5Packages" "kdeconnect-kde" ] {
example = "gnomeExtensions.gsconnect";
};
@@ -20,7 +20,10 @@ with lib;
cfg = config.programs.kdeconnect;
in
mkIf cfg.enable {
- environment.systemPackages = [ cfg.package ];
+ environment.systemPackages = [
+ cfg.package
+ pkgs.sshfs
+ ];
networking.firewall = rec {
allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
allowedUDPPortRanges = allowedTCPPortRanges;
diff --git a/third_party/nixpkgs/nixos/modules/programs/kubeswitch.nix b/third_party/nixpkgs/nixos/modules/programs/kubeswitch.nix
new file mode 100644
index 0000000000..304df48e3c
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/programs/kubeswitch.nix
@@ -0,0 +1,56 @@
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}:
+let
+ cfg = config.programs.kubeswitch;
+in
+{
+ options = {
+ programs.kubeswitch = {
+ enable = lib.mkEnableOption "kubeswitch";
+
+ commandName = lib.mkOption {
+ type = lib.types.str;
+ default = "kswitch";
+ description = "The name of the command to use";
+ };
+
+ package = lib.mkOption {
+ type = lib.types.package;
+ default = pkgs.kubeswitch;
+ defaultText = lib.literalExpression "pkgs.kubeswitch";
+ description = "The package to install for kubeswitch";
+ };
+ };
+ };
+
+ config =
+ let
+ shell_files = pkgs.stdenv.mkDerivation rec {
+ name = "kubeswitch-shell-files";
+ phases = [ "installPhase" ];
+ installPhase = ''
+ mkdir -p $out/share
+ for shell in bash zsh; do
+ ${cfg.package}/bin/switcher init $shell | sed 's/switch(/${cfg.commandName}(/' > $out/share/${cfg.commandName}_init.$shell
+ ${cfg.package}/bin/switcher --cmd ${cfg.commandName} completion $shell > $out/share/${cfg.commandName}_completion.$shell
+ done
+ '';
+ };
+ in
+ lib.mkIf cfg.enable {
+ environment.systemPackages = [ cfg.package ];
+
+ programs.bash.interactiveShellInit = ''
+ source ${shell_files}/share/${cfg.commandName}_init.bash
+ source ${shell_files}/share/${cfg.commandName}_completion.bash
+ '';
+ programs.zsh.interactiveShellInit = ''
+ source ${shell_files}/share/${cfg.commandName}_init.zsh
+ source ${shell_files}/share/${cfg.commandName}_completion.zsh
+ '';
+ };
+}
diff --git a/third_party/nixpkgs/nixos/modules/programs/lazygit.nix b/third_party/nixpkgs/nixos/modules/programs/lazygit.nix
new file mode 100644
index 0000000000..3e36a0e0c4
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/programs/lazygit.nix
@@ -0,0 +1,37 @@
+{ config, lib, pkgs, ... }:
+
+let
+ cfg = config.programs.lazygit;
+
+ settingsFormat = pkgs.formats.yaml { };
+in
+{
+ options.programs.lazygit = {
+ enable = lib.mkEnableOption "lazygit, a simple terminal UI for git commands";
+
+ package = lib.mkPackageOption pkgs "lazygit" { };
+
+ settings = lib.mkOption {
+ inherit (settingsFormat) type;
+ default = { };
+ description = ''
+ Lazygit configuration.
+
+ See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md for documentation.
+ '';
+ };
+ };
+
+ config = lib.mkIf cfg.enable {
+ environment = {
+ systemPackages = [ cfg.package ];
+ etc = lib.mkIf (cfg.settings != { }) {
+ "xdg/lazygit/config.yml".source = settingsFormat.generate "lazygit-config.yml" cfg.settings;
+ };
+ };
+ };
+
+ meta = {
+ maintainers = with lib.maintainers; [ linsui ];
+ };
+}
diff --git a/third_party/nixpkgs/nixos/modules/programs/less.nix b/third_party/nixpkgs/nixos/modules/programs/less.nix
index 81c68307ae..2cb7620075 100644
--- a/third_party/nixpkgs/nixos/modules/programs/less.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/less.nix
@@ -35,13 +35,13 @@ in
# note that environment.nix sets PAGER=less, and
# therefore also enables this module
- enable = mkEnableOption (lib.mdDoc "less");
+ enable = mkEnableOption "less, a file pager";
configFile = mkOption {
type = types.nullOr types.path;
default = null;
example = literalExpression ''"''${pkgs.my-configs}/lesskey"'';
- description = lib.mdDoc ''
+ description = ''
Path to lesskey configuration file.
{option}`configFile` takes precedence over {option}`commands`,
@@ -57,13 +57,13 @@ in
h = "noaction 5\\e(";
l = "noaction 5\\e)";
};
- description = lib.mdDoc "Defines new command keys.";
+ description = "Defines new command keys.";
};
clearDefaultCommands = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Clear all default commands.
You should remember to set the quit key.
Otherwise you will not be able to leave less without killing it.
@@ -76,7 +76,7 @@ in
example = {
e = "abort";
};
- description = lib.mdDoc "Defines new line-editing keys.";
+ description = "Defines new line-editing keys.";
};
envVariables = mkOption {
@@ -87,14 +87,14 @@ in
example = {
LESS = "--quit-if-one-screen";
};
- description = lib.mdDoc "Defines environment variables.";
+ description = "Defines environment variables.";
};
lessopen = mkOption {
type = types.nullOr types.str;
default = "|${pkgs.lesspipe}/bin/lesspipe.sh %s";
defaultText = literalExpression ''"|''${pkgs.lesspipe}/bin/lesspipe.sh %s"'';
- description = lib.mdDoc ''
+ description = ''
Before less opens a file, it first gives your input preprocessor a chance to modify the way the contents of the file are displayed.
'';
};
@@ -102,7 +102,7 @@ in
lessclose = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
When less closes a file opened in such a way, it will call another program, called the input postprocessor,
which may perform any desired clean-up action (such as deleting the replacement file created by LESSOPEN).
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/liboping.nix b/third_party/nixpkgs/nixos/modules/programs/liboping.nix
index 39e75ba90c..4433f9767d 100644
--- a/third_party/nixpkgs/nixos/modules/programs/liboping.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/liboping.nix
@@ -6,7 +6,7 @@ let
cfg = config.programs.liboping;
in {
options.programs.liboping = {
- enable = mkEnableOption (lib.mdDoc "liboping");
+ enable = mkEnableOption "liboping";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ liboping ];
diff --git a/third_party/nixpkgs/nixos/modules/programs/light.nix b/third_party/nixpkgs/nixos/modules/programs/light.nix
index 1cdf22a769..b1584a1b3d 100644
--- a/third_party/nixpkgs/nixos/modules/programs/light.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/light.nix
@@ -13,7 +13,7 @@ in
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to install Light backlight control command
and udev rules granting access to members of the "video" group.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/mdevctl.nix b/third_party/nixpkgs/nixos/modules/programs/mdevctl.nix
index 2b72852333..be33835639 100644
--- a/third_party/nixpkgs/nixos/modules/programs/mdevctl.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/mdevctl.nix
@@ -5,7 +5,7 @@ let
cfg = config.programs.mdevctl;
in {
options.programs.mdevctl = {
- enable = mkEnableOption (lib.mdDoc "Mediated Device Management");
+ enable = mkEnableOption "Mediated Device Management";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/programs/mepo.nix b/third_party/nixpkgs/nixos/modules/programs/mepo.nix
index 4b1706a2a0..22596892ff 100644
--- a/third_party/nixpkgs/nixos/modules/programs/mepo.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/mepo.nix
@@ -5,13 +5,13 @@ let
in
{
options.programs.mepo = {
- enable = mkEnableOption (mdDoc "Mepo");
+ enable = mkEnableOption "Mepo, a fast, simple and hackable OSM map viewer";
locationBackends = {
gpsd = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Whether to enable location detection via gpsd.
This may require additional configuration of gpsd, see [here](#opt-services.gpsd.enable)
'';
@@ -20,7 +20,7 @@ in
geoclue = mkOption {
type = types.bool;
default = true;
- description = mdDoc "Whether to enable location detection via geoclue";
+ description = "Whether to enable location detection via geoclue";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/mininet.nix b/third_party/nixpkgs/nixos/modules/programs/mininet.nix
index 3568736854..a9190ed989 100644
--- a/third_party/nixpkgs/nixos/modules/programs/mininet.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/mininet.nix
@@ -8,7 +8,7 @@ let
cfg = config.programs.mininet;
in
{
- options.programs.mininet.enable = mkEnableOption (lib.mdDoc "Mininet");
+ options.programs.mininet.enable = mkEnableOption "Mininet, an emulator for rapid prototyping of Software Defined Networks";
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/programs/minipro.nix b/third_party/nixpkgs/nixos/modules/programs/minipro.nix
index 8cb64866a8..e5846d13fa 100644
--- a/third_party/nixpkgs/nixos/modules/programs/minipro.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/minipro.nix
@@ -6,9 +6,9 @@ in
{
options = {
programs.minipro = {
- enable = lib.mkEnableOption (lib.mdDoc "minipro") // {
- description = lib.mdDoc ''
- Installs minipro and its udev rules.
+ enable = lib.mkEnableOption "minipro" // {
+ description = ''
+ Whether to enable minipro and its udev rules.
Users of the `plugdev` group can interact with connected MiniPRO chip programmers.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/miriway.nix b/third_party/nixpkgs/nixos/modules/programs/miriway.nix
index e8a10770b6..00c1356ab0 100644
--- a/third_party/nixpkgs/nixos/modules/programs/miriway.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/miriway.nix
@@ -4,12 +4,12 @@ let
cfg = config.programs.miriway;
in {
options.programs.miriway = {
- enable = lib.mkEnableOption (lib.mdDoc ''
+ enable = lib.mkEnableOption ''
Miriway, a Mir based Wayland compositor. You can manually launch Miriway by
executing "exec miriway" on a TTY, or launch it from a display manager. Copy
/etc/xdg/xdg-miriway/miriway-shell.config to ~/.config/miriway-shell.config
to modify the system-wide configuration on a per-user basis. See ,
- and "miriway --help" for more information'');
+ and "miriway --help" for more information'';
config = lib.mkOption {
type = lib.types.lines;
@@ -50,7 +50,7 @@ in {
meta=Page_Down:@workspace-down
ctrl-alt=BackSpace:@exit
'';
- description = lib.mdDoc ''
+ description = ''
Miriway's config. This will be installed system-wide.
The default will install the miriway package's barebones example config.
'';
@@ -71,7 +71,7 @@ in {
programs.xwayland.enable = lib.mkDefault true;
# To make the Miriway session available if a display manager like SDDM is enabled:
- services.xserver.displayManager.sessionPackages = [ pkgs.miriway ];
+ services.displayManager.sessionPackages = [ pkgs.miriway ];
};
meta.maintainers = with lib.maintainers; [ OPNA2608 ];
diff --git a/third_party/nixpkgs/nixos/modules/programs/mosh.nix b/third_party/nixpkgs/nixos/modules/programs/mosh.nix
index 593246ab6d..897bcf941a 100644
--- a/third_party/nixpkgs/nixos/modules/programs/mosh.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/mosh.nix
@@ -13,7 +13,7 @@ in
default = true;
};
withUtempter = lib.mkEnableOption "" // {
- description = lib.mdDoc ''
+ description = ''
Whether to enable libutempter for mosh.
This is required so that mosh can write to /var/run/utmp (which can be queried with `who` to display currently connected user sessions).
diff --git a/third_party/nixpkgs/nixos/modules/programs/msmtp.nix b/third_party/nixpkgs/nixos/modules/programs/msmtp.nix
index a9aed027bd..9c067bdc96 100644
--- a/third_party/nixpkgs/nixos/modules/programs/msmtp.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/msmtp.nix
@@ -10,12 +10,12 @@ in {
options = {
programs.msmtp = {
- enable = mkEnableOption (lib.mdDoc "msmtp - an SMTP client");
+ enable = mkEnableOption "msmtp - an SMTP client";
setSendmail = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to set the system sendmail to msmtp's.
'';
};
@@ -28,7 +28,7 @@ in {
port = 587;
tls = true;
};
- description = lib.mdDoc ''
+ description = ''
Default values applied to all accounts.
See msmtp(1) for the available options.
'';
@@ -45,7 +45,7 @@ in {
passwordeval = "cat /secrets/password.txt";
};
};
- description = lib.mdDoc ''
+ description = ''
Named accounts and their respective configurations.
The special name "default" allows a default account to be defined.
See msmtp(1) for the available options.
@@ -62,7 +62,7 @@ in {
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra lines to add to the msmtp configuration verbatim.
See msmtp(1) for the syntax and available options.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/mtr.nix b/third_party/nixpkgs/nixos/modules/programs/mtr.nix
index e247d645b8..6a767df15f 100644
--- a/third_party/nixpkgs/nixos/modules/programs/mtr.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/mtr.nix
@@ -11,7 +11,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to add mtr to the global environment and configure a
setcap wrapper for it.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/nano.nix b/third_party/nixpkgs/nixos/modules/programs/nano.nix
index 461681b598..10fa2a0dfb 100644
--- a/third_party/nixpkgs/nixos/modules/programs/nano.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/nano.nix
@@ -7,7 +7,7 @@ in
{
options = {
programs.nano = {
- enable = lib.mkEnableOption (lib.mdDoc "nano") // {
+ enable = lib.mkEnableOption "nano, a small user-friendly console text editor" // {
default = true;
};
@@ -16,7 +16,7 @@ in
nanorc = lib.mkOption {
type = lib.types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
The system-wide nano configuration.
See {manpage}`nanorc(5)`.
'';
@@ -30,7 +30,7 @@ in
syntaxHighlight = lib.mkOption {
type = lib.types.bool;
default = true;
- description = lib.mdDoc "Whether to enable syntax highlight for various languages.";
+ description = "Whether to enable syntax highlight for various languages.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/nautilus-open-any-terminal.nix b/third_party/nixpkgs/nixos/modules/programs/nautilus-open-any-terminal.nix
index d205fb3ec9..8a38c4cb5e 100644
--- a/third_party/nixpkgs/nixos/modules/programs/nautilus-open-any-terminal.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/nautilus-open-any-terminal.nix
@@ -5,12 +5,12 @@ let
in
{
options.programs.nautilus-open-any-terminal = {
- enable = lib.mkEnableOption (lib.mdDoc "nautilus-open-any-terminal");
+ enable = lib.mkEnableOption "nautilus-open-any-terminal";
terminal = lib.mkOption {
type = with lib.types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The terminal emulator to add to context-entry of nautilus. Supported terminal
emulators are listed in https://github.com/Stunkymonkey/nautilus-open-any-terminal#supported-terminal-emulators.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/nbd.nix b/third_party/nixpkgs/nixos/modules/programs/nbd.nix
index a44403021e..fea9bc1ff7 100644
--- a/third_party/nixpkgs/nixos/modules/programs/nbd.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/nbd.nix
@@ -8,7 +8,7 @@ in
{
options = {
programs.nbd = {
- enable = mkEnableOption (lib.mdDoc "Network Block Device (nbd) support");
+ enable = mkEnableOption "Network Block Device (nbd) support";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/neovim.nix b/third_party/nixpkgs/nixos/modules/programs/neovim.nix
index 77abec7ef7..6f6829444a 100644
--- a/third_party/nixpkgs/nixos/modules/programs/neovim.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/neovim.nix
@@ -11,7 +11,7 @@ in
type = types.bool;
default = false;
example = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Neovim.
When enabled through this option, Neovim is wrapped to use a
@@ -24,7 +24,7 @@ in
defaultEditor = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
When enabled, installs neovim and configures neovim to be the default editor
using the EDITOR environment variable.
'';
@@ -33,7 +33,7 @@ in
viAlias = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Symlink {command}`vi` to {command}`nvim` binary.
'';
};
@@ -41,7 +41,7 @@ in
vimAlias = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Symlink {command}`vim` to {command}`nvim` binary.
'';
};
@@ -49,19 +49,19 @@ in
withRuby = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Enable Ruby provider.";
+ description = "Enable Ruby provider.";
};
withPython3 = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Enable Python 3 provider.";
+ description = "Enable Python 3 provider.";
};
withNodeJs = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable Node provider.";
+ description = "Enable Node provider.";
};
configure = mkOption {
@@ -80,7 +80,7 @@ in
};
}
'';
- description = lib.mdDoc ''
+ description = ''
Generate your init file from your list of plugins and custom commands.
Neovim will then be wrapped to load {command}`nvim -u /nix/store/«hash»-vimrc`
'';
@@ -92,7 +92,7 @@ in
type = types.package;
visible = false;
readOnly = true;
- description = lib.mdDoc "Resulting customized neovim package.";
+ description = "Resulting customized neovim package.";
};
runtime = mkOption {
@@ -100,7 +100,7 @@ in
example = literalExpression ''
{ "ftplugin/c.vim".text = "setlocal omnifunc=v:lua.vim.lsp.omnifunc"; }
'';
- description = lib.mdDoc ''
+ description = ''
Set of files that have to be linked in {file}`runtime`.
'';
@@ -112,7 +112,7 @@ in
enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether this runtime directory should be generated. This
option allows specific runtime files to be disabled.
'';
@@ -120,7 +120,7 @@ in
target = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Name of symlink. Defaults to the attribute
name.
'';
@@ -129,13 +129,13 @@ in
text = mkOption {
default = null;
type = types.nullOr types.lines;
- description = lib.mdDoc "Text of the file.";
+ description = "Text of the file.";
};
source = mkOption {
default = null;
type = types.nullOr types.path;
- description = lib.mdDoc "Path of the source file.";
+ description = "Path of the source file.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/nethoscope.nix b/third_party/nixpkgs/nixos/modules/programs/nethoscope.nix
index d8ece61c90..495548e9c6 100644
--- a/third_party/nixpkgs/nixos/modules/programs/nethoscope.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/nethoscope.nix
@@ -12,7 +12,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to add nethoscope to the global environment and configure a
setcap wrapper for it.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/nexttrace.nix b/third_party/nixpkgs/nixos/modules/programs/nexttrace.nix
index 09143c5f86..9380a98808 100644
--- a/third_party/nixpkgs/nixos/modules/programs/nexttrace.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/nexttrace.nix
@@ -7,7 +7,7 @@ in
{
options = {
programs.nexttrace = {
- enable = lib.mkEnableOption (lib.mdDoc "Nexttrace to the global environment and configure a setcap wrapper for it");
+ enable = lib.mkEnableOption "Nexttrace to the global environment and configure a setcap wrapper for it";
package = lib.mkPackageOption pkgs "nexttrace" { };
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/nh.nix b/third_party/nixpkgs/nixos/modules/programs/nh.nix
new file mode 100644
index 0000000000..c42fb2fc72
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/programs/nh.nix
@@ -0,0 +1,96 @@
+{ config
+, lib
+, pkgs
+, ...
+}:
+let
+ cfg = config.programs.nh;
+in
+{
+ meta.maintainers = [ lib.maintainers.viperML ];
+
+ options.programs.nh = {
+ enable = lib.mkEnableOption "nh, yet another Nix CLI helper";
+
+ package = lib.mkPackageOption pkgs "nh" { };
+
+ flake = lib.mkOption {
+ type = lib.types.nullOr lib.types.path;
+ default = null;
+ description = ''
+ The path that will be used for the `FLAKE` environment variable.
+
+ `FLAKE` is used by nh as the default flake for performing actions, like `nh os switch`.
+ '';
+ };
+
+ clean = {
+ enable = lib.mkEnableOption "periodic garbage collection with nh clean all";
+
+ dates = lib.mkOption {
+ type = lib.types.singleLineStr;
+ default = "weekly";
+ description = ''
+ How often cleanup is performed. Passed to systemd.time
+
+ The format is described in
+ {manpage}`systemd.time(7)`.
+ '';
+ };
+
+ extraArgs = lib.mkOption {
+ type = lib.types.singleLineStr;
+ default = "";
+ example = "--keep 5 --keep-since 3d";
+ description = ''
+ Options given to nh clean when the service is run automatically.
+
+ See `nh clean all --help` for more information.
+ '';
+ };
+ };
+ };
+
+ config = {
+ warnings =
+ if (!(cfg.clean.enable -> !config.nix.gc.automatic)) then [
+ "programs.nh.clean.enable and nix.gc.automatic are both enabled. Please use one or the other to avoid conflict."
+ ] else [ ];
+
+ assertions = [
+ # Not strictly required but probably a good assertion to have
+ {
+ assertion = cfg.clean.enable -> cfg.enable;
+ message = "programs.nh.clean.enable requires programs.nh.enable";
+ }
+
+ {
+ assertion = (cfg.flake != null) -> !(lib.hasSuffix ".nix" cfg.flake);
+ message = "nh.flake must be a directory, not a nix file";
+ }
+ ];
+
+ environment = lib.mkIf cfg.enable {
+ systemPackages = [ cfg.package ];
+ variables = lib.mkIf (cfg.flake != null) {
+ FLAKE = cfg.flake;
+ };
+ };
+
+ systemd = lib.mkIf cfg.clean.enable {
+ services.nh-clean = {
+ description = "Nh clean";
+ script = "exec ${lib.getExe cfg.package} clean all ${cfg.clean.extraArgs}";
+ startAt = cfg.clean.dates;
+ path = [ config.nix.package ];
+ serviceConfig.Type = "oneshot";
+ };
+
+ timers.nh-clean = {
+ timerConfig = {
+ Persistent = true;
+ };
+ };
+ };
+ };
+}
diff --git a/third_party/nixpkgs/nixos/modules/programs/nix-index.nix b/third_party/nixpkgs/nixos/modules/programs/nix-index.nix
index f3e7d22737..76d7c3d8c5 100644
--- a/third_party/nixpkgs/nixos/modules/programs/nix-index.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/nix-index.nix
@@ -3,19 +3,19 @@ let
cfg = config.programs.nix-index;
in {
options.programs.nix-index = with lib; {
- enable = mkEnableOption (lib.mdDoc "nix-index, a file database for nixpkgs");
+ enable = mkEnableOption "nix-index, a file database for nixpkgs";
package = mkPackageOption pkgs "nix-index" { };
- enableBashIntegration = mkEnableOption (lib.mdDoc "Bash integration") // {
+ enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
- enableZshIntegration = mkEnableOption (lib.mdDoc "Zsh integration") // {
+ enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
- enableFishIntegration = mkEnableOption (lib.mdDoc "Fish integration") // {
+ enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/nix-ld.nix b/third_party/nixpkgs/nixos/modules/programs/nix-ld.nix
index 6f36ce3364..770cccd13b 100644
--- a/third_party/nixpkgs/nixos/modules/programs/nix-ld.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/nix-ld.nix
@@ -3,7 +3,7 @@ let
cfg = config.programs.nix-ld;
nix-ld-libraries = pkgs.buildEnv {
- name = "lb-library-path";
+ name = "ld-library-path";
pathsToLink = [ "/lib" ];
paths = map lib.getLib cfg.libraries;
# TODO make glibc here configurable?
@@ -13,35 +13,16 @@ let
extraPrefix = "/share/nix-ld";
ignoreCollisions = true;
};
-
- # We currently take all libraries from systemd and nix as the default.
- # Is there a better list?
- baseLibraries = with pkgs; [
- zlib
- zstd
- stdenv.cc.cc
- curl
- openssl
- attr
- libssh
- bzip2
- libxml2
- acl
- libsodium
- util-linux
- xz
- systemd
- ];
in
{
meta.maintainers = [ lib.maintainers.mic92 ];
options.programs.nix-ld = {
- enable = lib.mkEnableOption (lib.mdDoc ''nix-ld, Documentation: '');
+ enable = lib.mkEnableOption ''nix-ld, Documentation: '';
package = lib.mkPackageOption pkgs "nix-ld" { };
libraries = lib.mkOption {
type = lib.types.listOf lib.types.package;
- description = lib.mdDoc "Libraries that automatically become available to all programs. The default set includes common libraries.";
- default = baseLibraries;
+ description = "Libraries that automatically become available to all programs. The default set includes common libraries.";
+ default = [ ];
defaultText = lib.literalExpression "baseLibraries derived from systemd and nix dependencies.";
};
};
@@ -57,5 +38,24 @@ in
NIX_LD = "/run/current-system/sw/share/nix-ld/lib/ld.so";
NIX_LD_LIBRARY_PATH = "/run/current-system/sw/share/nix-ld/lib";
};
+
+ # We currently take all libraries from systemd and nix as the default.
+ # Is there a better list?
+ programs.nix-ld.libraries = with pkgs; [
+ zlib
+ zstd
+ stdenv.cc.cc
+ curl
+ openssl
+ attr
+ libssh
+ bzip2
+ libxml2
+ acl
+ libsodium
+ util-linux
+ xz
+ systemd
+ ];
};
}
diff --git a/third_party/nixpkgs/nixos/modules/programs/nm-applet.nix b/third_party/nixpkgs/nixos/modules/programs/nm-applet.nix
index 4b09b1884d..ed048192e2 100644
--- a/third_party/nixpkgs/nixos/modules/programs/nm-applet.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/nm-applet.nix
@@ -6,12 +6,12 @@
};
options.programs.nm-applet = {
- enable = lib.mkEnableOption (lib.mdDoc "nm-applet");
+ enable = lib.mkEnableOption "nm-applet, a NetworkManager control applet for GNOME";
indicator = lib.mkOption {
type = lib.types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to use indicator instead of status icon.
It is needed for Appindicator environments, like Enlightenment.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/nncp.nix b/third_party/nixpkgs/nixos/modules/programs/nncp.nix
index e078b71841..aa2e7c7a6e 100644
--- a/third_party/nixpkgs/nixos/modules/programs/nncp.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/nncp.nix
@@ -11,12 +11,12 @@ in {
options.programs.nncp = {
enable =
- mkEnableOption (lib.mdDoc "NNCP (Node to Node copy) utilities and configuration");
+ mkEnableOption "NNCP (Node to Node copy) utilities and configuration";
group = mkOption {
type = types.str;
default = "uucp";
- description = lib.mdDoc ''
+ description = ''
The group under which NNCP files shall be owned.
Any member of this group may access the secret keys
of this NNCP node.
@@ -28,7 +28,7 @@ in {
secrets = mkOption {
type = with types; listOf str;
example = [ "/run/keys/nncp.hjson" ];
- description = lib.mdDoc ''
+ description = ''
A list of paths to NNCP configuration files that should not be
in the Nix store. These files are layered on top of the values at
[](#opt-programs.nncp.settings).
@@ -37,7 +37,7 @@ in {
settings = mkOption {
type = settingsFormat.type;
- description = lib.mdDoc ''
+ description = ''
NNCP configuration, see
.
At runtime these settings will be overlayed by the contents of
diff --git a/third_party/nixpkgs/nixos/modules/programs/noisetorch.nix b/third_party/nixpkgs/nixos/modules/programs/noisetorch.nix
index d8135877d0..70a0441bd7 100644
--- a/third_party/nixpkgs/nixos/modules/programs/noisetorch.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/noisetorch.nix
@@ -6,7 +6,7 @@ let cfg = config.programs.noisetorch;
in
{
options.programs.noisetorch = {
- enable = mkEnableOption (lib.mdDoc "noisetorch + setcap wrapper");
+ enable = mkEnableOption "noisetorch (+ setcap wrapper), a virtual microphone device with noise suppression";
package = mkPackageOption pkgs "noisetorch" { };
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/npm.nix b/third_party/nixpkgs/nixos/modules/programs/npm.nix
index 8113ea1ba4..b379f0165b 100644
--- a/third_party/nixpkgs/nixos/modules/programs/npm.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/npm.nix
@@ -11,7 +11,7 @@ in
options = {
programs.npm = {
- enable = mkEnableOption (lib.mdDoc "{command}`npm` global config");
+ enable = mkEnableOption "{command}`npm` global config";
package = mkPackageOption pkgs [ "nodePackages" "npm" ] {
example = "nodePackages_13_x.npm";
@@ -19,7 +19,7 @@ in
npmrc = mkOption {
type = lib.types.lines;
- description = lib.mdDoc ''
+ description = ''
The system-wide npm configuration.
See .
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/ns-usbloader.nix b/third_party/nixpkgs/nixos/modules/programs/ns-usbloader.nix
index 8d0b698d6b..1f4b931e1c 100644
--- a/third_party/nixpkgs/nixos/modules/programs/ns-usbloader.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/ns-usbloader.nix
@@ -5,7 +5,7 @@ in
{
options = {
programs.ns-usbloader = {
- enable = lib.mkEnableOption (lib.mdDoc "ns-usbloader application with udev rules applied");
+ enable = lib.mkEnableOption "ns-usbloader application with udev rules applied";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/oddjobd.nix b/third_party/nixpkgs/nixos/modules/programs/oddjobd.nix
index 08bb8b2684..019ca58a60 100644
--- a/third_party/nixpkgs/nixos/modules/programs/oddjobd.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/oddjobd.nix
@@ -4,26 +4,28 @@ let
cfg = config.programs.oddjobd;
in
{
- options.programs.oddjobd = {
- enable = lib.mkEnableOption "oddjob";
- package = lib.mkPackageOption pkgs "oddjob" {};
+ options = {
+ programs.oddjobd = {
+ enable = lib.mkEnableOption "oddjob, a D-Bus service which runs odd jobs on behalf of client applications";
+ package = lib.mkPackageOption pkgs "oddjob" {};
+ };
};
config = lib.mkIf cfg.enable {
- systemd.packages = [ cfg.package ];
-
systemd.services.oddjobd = {
- wantedBy = [ "multi-user.target"];
- after = [ "network.target"];
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network.target" "dbus.service" ];
description = "DBUS Odd-job Daemon";
enable = true;
documentation = [ "man:oddjobd(8)" "man:oddjobd.conf(5)" ];
serviceConfig = {
- Type = "dbus";
- BusName = "org.freedesktop.oddjob";
- ExecStart = "${lib.getBin cfg.package}/bin/oddjobd";
+ Type = "simple";
+ PIDFile = "/run/oddjobd.pid";
+ ExecStart = "${lib.getBin cfg.package}/bin/oddjobd -n -p /run/oddjobd.pid -t 300";
};
};
+
+ services.dbus.packages = [ cfg.package ];
};
meta.maintainers = with lib.maintainers; [ SohamG ];
diff --git a/third_party/nixpkgs/nixos/modules/programs/openvpn3.nix b/third_party/nixpkgs/nixos/modules/programs/openvpn3.nix
index 37a1bfeb0c..6415cccecb 100644
--- a/third_party/nixpkgs/nixos/modules/programs/openvpn3.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/openvpn3.nix
@@ -7,7 +7,7 @@ let
in
{
options.programs.openvpn3 = {
- enable = mkEnableOption (lib.mdDoc "the openvpn3 client");
+ enable = mkEnableOption "the openvpn3 client";
package = mkOption {
type = types.package;
default = pkgs.openvpn3.override {
@@ -16,7 +16,7 @@ in
defaultText = literalExpression ''pkgs.openvpn3.override {
enableSystemdResolved = config.services.resolved.enable;
}'';
- description = lib.mdDoc ''
+ description = ''
Which package to use for `openvpn3`.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/pantheon-tweaks.nix b/third_party/nixpkgs/nixos/modules/programs/pantheon-tweaks.nix
index 82f93619db..0b8a19ea22 100644
--- a/third_party/nixpkgs/nixos/modules/programs/pantheon-tweaks.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/pantheon-tweaks.nix
@@ -9,7 +9,7 @@ with lib;
###### interface
options = {
- programs.pantheon-tweaks.enable = mkEnableOption (lib.mdDoc "Pantheon Tweaks, an unofficial system settings panel for Pantheon");
+ programs.pantheon-tweaks.enable = mkEnableOption "Pantheon Tweaks, an unofficial system settings panel for Pantheon";
};
###### implementation
diff --git a/third_party/nixpkgs/nixos/modules/programs/partition-manager.nix b/third_party/nixpkgs/nixos/modules/programs/partition-manager.nix
index cf0491ff02..1a66a3f04c 100644
--- a/third_party/nixpkgs/nixos/modules/programs/partition-manager.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/partition-manager.nix
@@ -1,19 +1,21 @@
{ config, lib, pkgs, ... }:
-with lib;
+let
+ cfg = config.programs.partition-manager;
+in {
+ meta.maintainers = [ lib.maintainers.oxalica ];
-{
- meta.maintainers = [ maintainers.oxalica ];
-
- ###### interface
options = {
- programs.partition-manager.enable = mkEnableOption (lib.mdDoc "KDE Partition Manager");
+ programs.partition-manager = {
+ enable = lib.mkEnableOption "KDE Partition Manager";
+
+ package = lib.mkPackageOption pkgs [ "libsForQt5" "partitionmanager" ] { };
+ };
};
- ###### implementation
- config = mkIf config.programs.partition-manager.enable {
- services.dbus.packages = [ pkgs.libsForQt5.kpmcore ];
+ config = lib.mkIf config.programs.partition-manager.enable {
+ services.dbus.packages = [ cfg.package.kpmcore ];
# `kpmcore` need to be installed to pull in polkit actions.
- environment.systemPackages = [ pkgs.libsForQt5.kpmcore pkgs.libsForQt5.partitionmanager ];
+ environment.systemPackages = [ cfg.package.kpmcore cfg.package ];
};
}
diff --git a/third_party/nixpkgs/nixos/modules/programs/plotinus.md b/third_party/nixpkgs/nixos/modules/programs/plotinus.md
index fac3bbad1e..0a2c688c72 100644
--- a/third_party/nixpkgs/nixos/modules/programs/plotinus.md
+++ b/third_party/nixpkgs/nixos/modules/programs/plotinus.md
@@ -12,6 +12,8 @@ palette provides a searchable list of of all menu items in the application.
To enable Plotinus, add the following to your
{file}`configuration.nix`:
-```
-programs.plotinus.enable = true;
+```nix
+{
+ programs.plotinus.enable = true;
+}
```
diff --git a/third_party/nixpkgs/nixos/modules/programs/plotinus.nix b/third_party/nixpkgs/nixos/modules/programs/plotinus.nix
index c2b6884d64..41c75b69a2 100644
--- a/third_party/nixpkgs/nixos/modules/programs/plotinus.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/plotinus.nix
@@ -17,7 +17,7 @@ in
programs.plotinus = {
enable = mkOption {
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the Plotinus GTK 3 plugin. Plotinus provides a
popup (triggered by Ctrl-Shift-P) to search the menus of a
compatible application.
diff --git a/third_party/nixpkgs/nixos/modules/programs/projecteur.nix b/third_party/nixpkgs/nixos/modules/programs/projecteur.nix
index 140de0209e..af186e3d25 100644
--- a/third_party/nixpkgs/nixos/modules/programs/projecteur.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/projecteur.nix
@@ -5,7 +5,7 @@ let
in
{
options.programs.projecteur = {
- enable = lib.mkEnableOption (lib.mdDoc "projecteur");
+ enable = lib.mkEnableOption "projecteur, an application for the Logitech Spotlight device (and similar)";
package = lib.mkPackageOption pkgs "projecteur" { };
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/proxychains.nix b/third_party/nixpkgs/nixos/modules/programs/proxychains.nix
index acd41f3552..b15475dac0 100644
--- a/third_party/nixpkgs/nixos/modules/programs/proxychains.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/proxychains.nix
@@ -22,21 +22,21 @@ let
proxyOptions = {
options = {
- enable = mkEnableOption (lib.mdDoc "this proxy");
+ enable = mkEnableOption "this proxy";
type = mkOption {
type = types.enum [ "http" "socks4" "socks5" ];
- description = lib.mdDoc "Proxy type.";
+ description = "Proxy type.";
};
host = mkOption {
type = types.str;
- description = lib.mdDoc "Proxy host or IP address.";
+ description = "Proxy host or IP address.";
};
port = mkOption {
type = types.port;
- description = lib.mdDoc "Proxy port";
+ description = "Proxy port";
};
};
};
@@ -49,7 +49,7 @@ in {
programs.proxychains = {
- enable = mkEnableOption (lib.mdDoc "installing proxychains configuration");
+ enable = mkEnableOption "proxychains configuration";
package = mkPackageOption pkgs "proxychains" {
example = "proxychains-ng";
@@ -59,7 +59,7 @@ in {
type = mkOption {
type = types.enum [ "dynamic" "strict" "random" ];
default = "strict";
- description = lib.mdDoc ''
+ description = ''
`dynamic` - Each connection will be done via chained proxies
all proxies chained in the order as they appear in the list
at least one proxy must be online to play in chain
@@ -78,7 +78,7 @@ in {
length = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
Chain length for random chain.
'';
};
@@ -87,15 +87,15 @@ in {
proxyDNS = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Proxy DNS requests - no leak for DNS data.";
+ description = "Proxy DNS requests - no leak for DNS data.";
};
- quietMode = mkEnableOption (lib.mdDoc "Quiet mode (no output from the library)");
+ quietMode = mkEnableOption "Quiet mode (no output from the library)";
remoteDNSSubnet = mkOption {
type = types.enum [ 10 127 224 ];
default = 224;
- description = lib.mdDoc ''
+ description = ''
Set the class A subnet number to use for the internal remote DNS mapping, uses the reserved 224.x.x.x range by default.
'';
};
@@ -103,24 +103,24 @@ in {
tcpReadTimeOut = mkOption {
type = types.int;
default = 15000;
- description = lib.mdDoc "Connection read time-out in milliseconds.";
+ description = "Connection read time-out in milliseconds.";
};
tcpConnectTimeOut = mkOption {
type = types.int;
default = 8000;
- description = lib.mdDoc "Connection time-out in milliseconds.";
+ description = "Connection time-out in milliseconds.";
};
localnet = mkOption {
type = types.str;
default = "127.0.0.0/255.0.0.0";
- description = lib.mdDoc "By default enable localnet for loopback address ranges.";
+ description = "By default enable localnet for loopback address ranges.";
};
proxies = mkOption {
type = types.attrsOf (types.submodule proxyOptions);
- description = lib.mdDoc ''
+ description = ''
Proxies to be used by proxychains.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/qdmr.nix b/third_party/nixpkgs/nixos/modules/programs/qdmr.nix
index 03ad4d0088..efd0e1fc98 100644
--- a/third_party/nixpkgs/nixos/modules/programs/qdmr.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/qdmr.nix
@@ -12,7 +12,7 @@ in {
options = {
programs.qdmr = {
- enable = lib.mkEnableOption (lib.mdDoc "QDMR - a GUI application and command line tool for programming DMR radios");
+ enable = lib.mkEnableOption "QDMR - a GUI application and command line tool for programming DMR radios";
package = lib.mkPackageOption pkgs "qdmr" { };
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/regreet.nix b/third_party/nixpkgs/nixos/modules/programs/regreet.nix
index 55d0c11781..0db1f59e59 100644
--- a/third_party/nixpkgs/nixos/modules/programs/regreet.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/regreet.nix
@@ -10,7 +10,7 @@ in
{
options.programs.regreet = {
enable = lib.mkEnableOption null // {
- description = lib.mdDoc ''
+ description = ''
Enable ReGreet, a clean and customizable greeter for greetd.
To use ReGreet, {option}`services.greetd` has to be enabled and
@@ -29,7 +29,7 @@ in
settings = lib.mkOption {
type = lib.types.either lib.types.path settingsFormat.type;
default = { };
- description = lib.mdDoc ''
+ description = ''
ReGreet configuration file. Refer
for options.
@@ -43,7 +43,7 @@ in
''
[ "-s" "-m" "last" ]
'';
- description = lib.mdDoc ''
+ description = ''
Additional arguments to be passed to
[cage](https://github.com/cage-kiosk/cage).
'';
@@ -52,7 +52,7 @@ in
extraCss = lib.mkOption {
type = lib.types.either lib.types.path lib.types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra CSS rules to apply on top of the GTK theme. Refer to
[GTK CSS Properties](https://docs.gtk.org/gtk4/css-properties.html) for
modifiable properties.
diff --git a/third_party/nixpkgs/nixos/modules/programs/rog-control-center.nix b/third_party/nixpkgs/nixos/modules/programs/rog-control-center.nix
index 4aef5143ac..7413ca3daf 100644
--- a/third_party/nixpkgs/nixos/modules/programs/rog-control-center.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/rog-control-center.nix
@@ -6,12 +6,12 @@ in
{
options = {
programs.rog-control-center = {
- enable = lib.mkEnableOption (lib.mdDoc "the rog-control-center application");
+ enable = lib.mkEnableOption "the rog-control-center application";
autoStart = lib.mkOption {
default = false;
type = lib.types.bool;
- description = lib.mdDoc "Whether rog-control-center should be started automatically.";
+ description = "Whether rog-control-center should be started automatically.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/rust-motd.nix b/third_party/nixpkgs/nixos/modules/programs/rust-motd.nix
index 4c9b101859..93240fcdd8 100644
--- a/third_party/nixpkgs/nixos/modules/programs/rust-motd.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/rust-motd.nix
@@ -24,11 +24,11 @@ let
'';
in {
options.programs.rust-motd = {
- enable = mkEnableOption (lib.mdDoc "rust-motd");
+ enable = mkEnableOption "rust-motd, a Message Of The Day (MOTD) generator";
enableMotdInSSHD = mkOption {
default = true;
type = types.bool;
- description = mdDoc ''
+ description = ''
Whether to let `openssh` print the
result when entering a new `ssh`-session.
By default either nothing or a static file defined via
@@ -39,7 +39,7 @@ in {
refreshInterval = mkOption {
default = "*:0/5";
type = types.str;
- description = mdDoc ''
+ description = ''
Interval in which the {manpage}`motd(5)` file is refreshed.
For possible formats, please refer to {manpage}`systemd.time(7)`.
'';
@@ -48,7 +48,7 @@ in {
type = types.listOf types.str;
default = attrNames cfg.settings;
defaultText = literalExpression "attrNames cfg.settings";
- description = mdDoc ''
+ description = ''
The order of the sections in [](#opt-programs.rust-motd.settings).
By default they are ordered alphabetically.
@@ -81,7 +81,7 @@ in {
};
settings = mkOption {
type = types.attrsOf format.type;
- description = mdDoc ''
+ description = ''
Settings on what to generate. Please read the
[upstream documentation](https://github.com/rust-motd/rust-motd/blob/main/README.md#configuration)
for further information.
diff --git a/third_party/nixpkgs/nixos/modules/programs/ryzen-monitor-ng.nix b/third_party/nixpkgs/nixos/modules/programs/ryzen-monitor-ng.nix
new file mode 100644
index 0000000000..cb0c391ce6
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/programs/ryzen-monitor-ng.nix
@@ -0,0 +1,35 @@
+{ pkgs
+, config
+, lib
+, ...
+}:
+let
+ inherit (lib) mkEnableOption mkPackageOption mkIf;
+ cfg = config.programs.ryzen-monitor-ng;
+in
+{
+ options = {
+ programs.ryzen-monitor-ng = {
+ enable = mkEnableOption ''
+ ryzen_monitor_ng, a userspace application for setting and getting Ryzen SMU (System Management Unit) parameters via the ryzen_smu kernel driver.
+
+ Monitor power information of Ryzen processors via the PM table of the SMU.
+
+ SMU Set and Get for many parameters and CO counts.
+
+ https://github.com/mann1x/ryzen_monitor_ng
+
+ WARNING: Damage cause by use of your AMD processor outside of official AMD specifications or outside of factory settings are not covered under any AMD product warranty and may not be covered by your board or system manufacturer's warranty
+ '';
+
+ package = mkPackageOption pkgs "ryzen-monitor-ng" {};
+ };
+ };
+
+ config = mkIf cfg.enable {
+ environment.systemPackages = [ cfg.package ];
+ hardware.cpu.amd.ryzen-smu.enable = true;
+ };
+
+ meta.maintainers = with lib.maintainers; [ Cryolitia phdyellow ];
+}
diff --git a/third_party/nixpkgs/nixos/modules/programs/screen.nix b/third_party/nixpkgs/nixos/modules/programs/screen.nix
index 41bfb5d780..01af5b4c95 100644
--- a/third_party/nixpkgs/nixos/modules/programs/screen.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/screen.nix
@@ -7,7 +7,7 @@ in
{
options = {
programs.screen = {
- enable = lib.mkEnableOption (lib.mdDoc "screen, a basic terminal multiplexer");
+ enable = lib.mkEnableOption "screen, a basic terminal multiplexer";
package = lib.mkPackageOptionMD pkgs "screen" { };
@@ -17,7 +17,7 @@ in
defscrollback 10000
startup_message off
'';
- description = lib.mdDoc "The contents of {file}`/etc/screenrc` file";
+ description = "The contents of {file}`/etc/screenrc` file";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/seahorse.nix b/third_party/nixpkgs/nixos/modules/programs/seahorse.nix
index 5e179c1446..c0a356bff5 100644
--- a/third_party/nixpkgs/nixos/modules/programs/seahorse.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/seahorse.nix
@@ -20,7 +20,7 @@ with lib;
programs.seahorse = {
- enable = mkEnableOption (lib.mdDoc "Seahorse, a GNOME application for managing encryption keys and passwords in the GNOME Keyring");
+ enable = mkEnableOption "Seahorse, a GNOME application for managing encryption keys and passwords in the GNOME Keyring";
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/sedutil.nix b/third_party/nixpkgs/nixos/modules/programs/sedutil.nix
index d5e20a8815..c62ca24eaa 100644
--- a/third_party/nixpkgs/nixos/modules/programs/sedutil.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/sedutil.nix
@@ -6,7 +6,7 @@ let
cfg = config.programs.sedutil;
in {
- options.programs.sedutil.enable = mkEnableOption (lib.mdDoc "sedutil");
+ options.programs.sedutil.enable = mkEnableOption "sedutil, to manage self encrypting drives that conform to the Trusted Computing Group OPAL 2.0 SSC specification";
config = mkIf cfg.enable {
boot.kernelParams = [
diff --git a/third_party/nixpkgs/nixos/modules/programs/shadow.nix b/third_party/nixpkgs/nixos/modules/programs/shadow.nix
index b232767385..2d20644ec5 100644
--- a/third_party/nixpkgs/nixos/modules/programs/shadow.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/shadow.nix
@@ -10,7 +10,7 @@ in
package = mkPackageOption pkgs "shadow" { };
chfnRestrict = mkOption {
- description = mdDoc ''
+ description = ''
Use chfn SUID to allow non-root users to change their account GECOS information.
'';
type = nullOr str;
@@ -18,7 +18,7 @@ in
};
settings = mkOption {
- description = mdDoc ''
+ description = ''
Config options for the /etc/login.defs file, that defines
the site-specific configuration for the shadow password suite.
See login.defs(5) man page for available options.
@@ -36,68 +36,68 @@ in
*/
options = {
DEFAULT_HOME = mkOption {
- description = mdDoc "Indicate if login is allowed if we can't cd to the home directory.";
+ description = "Indicate if login is allowed if we can't cd to the home directory.";
default = "yes";
type = enum [ "yes" "no" ];
};
ENCRYPT_METHOD = mkOption {
- description = mdDoc "This defines the system default encryption algorithm for encrypting passwords.";
+ description = "This defines the system default encryption algorithm for encrypting passwords.";
# The default crypt() method, keep in sync with the PAM default
default = "YESCRYPT";
type = enum [ "YESCRYPT" "SHA512" "SHA256" "MD5" "DES"];
};
SYS_UID_MIN = mkOption {
- description = mdDoc "Range of user IDs used for the creation of system users by useradd or newusers.";
+ description = "Range of user IDs used for the creation of system users by useradd or newusers.";
default = 400;
type = int;
};
SYS_UID_MAX = mkOption {
- description = mdDoc "Range of user IDs used for the creation of system users by useradd or newusers.";
+ description = "Range of user IDs used for the creation of system users by useradd or newusers.";
default = 999;
type = int;
};
UID_MIN = mkOption {
- description = mdDoc "Range of user IDs used for the creation of regular users by useradd or newusers.";
+ description = "Range of user IDs used for the creation of regular users by useradd or newusers.";
default = 1000;
type = int;
};
UID_MAX = mkOption {
- description = mdDoc "Range of user IDs used for the creation of regular users by useradd or newusers.";
+ description = "Range of user IDs used for the creation of regular users by useradd or newusers.";
default = 29999;
type = int;
};
SYS_GID_MIN = mkOption {
- description = mdDoc "Range of group IDs used for the creation of system groups by useradd, groupadd, or newusers";
+ description = "Range of group IDs used for the creation of system groups by useradd, groupadd, or newusers";
default = 400;
type = int;
};
SYS_GID_MAX = mkOption {
- description = mdDoc "Range of group IDs used for the creation of system groups by useradd, groupadd, or newusers";
+ description = "Range of group IDs used for the creation of system groups by useradd, groupadd, or newusers";
default = 999;
type = int;
};
GID_MIN = mkOption {
- description = mdDoc "Range of group IDs used for the creation of regular groups by useradd, groupadd, or newusers.";
+ description = "Range of group IDs used for the creation of regular groups by useradd, groupadd, or newusers.";
default = 1000;
type = int;
};
GID_MAX = mkOption {
- description = mdDoc "Range of group IDs used for the creation of regular groups by useradd, groupadd, or newusers.";
+ description = "Range of group IDs used for the creation of regular groups by useradd, groupadd, or newusers.";
default = 29999;
type = int;
};
TTYGROUP = mkOption {
- description = mdDoc ''
+ description = ''
The terminal permissions: the login tty will be owned by the TTYGROUP group,
and the permissions will be set to TTYPERM'';
default = "tty";
@@ -105,7 +105,7 @@ in
};
TTYPERM = mkOption {
- description = mdDoc ''
+ description = ''
The terminal permissions: the login tty will be owned by the TTYGROUP group,
and the permissions will be set to TTYPERM'';
default = "0620";
@@ -114,7 +114,7 @@ in
# Ensure privacy for newly created home directories.
UMASK = mkOption {
- description = mdDoc "The file mode creation mask is initialized to this value.";
+ description = "The file mode creation mask is initialized to this value.";
default = "077";
type = str;
};
@@ -125,7 +125,7 @@ in
};
users.defaultUserShell = mkOption {
- description = mdDoc ''
+ description = ''
This option defines the default shell assigned to user
accounts. This can be either a full system path or a shell package.
diff --git a/third_party/nixpkgs/nixos/modules/programs/sharing.nix b/third_party/nixpkgs/nixos/modules/programs/sharing.nix
index 9ab51859dc..211dc98151 100644
--- a/third_party/nixpkgs/nixos/modules/programs/sharing.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/sharing.nix
@@ -2,11 +2,11 @@
with lib;
{
options.programs.sharing = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
sharing, a CLI tool for sharing files.
Note that it will opens the 7478 port for TCP in the firewall, which is needed for it to function properly
- '');
+ '';
};
config =
let
diff --git a/third_party/nixpkgs/nixos/modules/programs/singularity.nix b/third_party/nixpkgs/nixos/modules/programs/singularity.nix
index 7f285ab055..981417389e 100644
--- a/third_party/nixpkgs/nixos/modules/programs/singularity.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/singularity.nix
@@ -7,8 +7,8 @@ in
{
options.programs.singularity = {
- enable = mkEnableOption (mdDoc "singularity") // {
- description = mdDoc ''
+ enable = mkEnableOption "singularity" // {
+ description = ''
Whether to install Singularity/Apptainer with system-level overriding such as SUID support.
'';
};
@@ -18,7 +18,7 @@ in
packageOverriden = mkOption {
type = types.nullOr types.package;
default = null;
- description = mdDoc ''
+ description = ''
This option provides access to the overridden result of `programs.singularity.package`.
For example, the following configuration makes all the Nixpkgs packages use the overridden `singularity`:
@@ -43,7 +43,7 @@ in
type = types.bool;
default = true;
example = false;
- description = mdDoc ''
+ description = ''
Whether to use top-level directories as LOCALSTATEDIR
instead of the store path ones.
This affects the SESSIONDIR of Apptainer/Singularity.
@@ -55,7 +55,7 @@ in
type = types.bool;
default = true;
example = false;
- description = mdDoc ''
+ description = ''
Whether to enable the `--fakeroot` support of Singularity/Apptainer.
'';
};
@@ -68,7 +68,7 @@ in
default = cfg.package.projectName != "apptainer";
defaultText = literalExpression ''config.services.singularity.package.projectName != "apptainer"'';
example = false;
- description = mdDoc ''
+ description = ''
Whether to enable the SUID support of Singularity/Apptainer.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/skim.nix b/third_party/nixpkgs/nixos/modules/programs/skim.nix
index 57a5d68ec3..9c573b39bb 100644
--- a/third_party/nixpkgs/nixos/modules/programs/skim.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/skim.nix
@@ -1,13 +1,13 @@
{ pkgs, config, lib, ... }:
let
- inherit (lib) mdDoc mkEnableOption mkPackageOption optional optionalString;
+ inherit (lib) mkEnableOption mkPackageOption optional optionalString;
cfg = config.programs.skim;
in
{
options = {
programs.skim = {
- fuzzyCompletion = mkEnableOption (mdDoc "fuzzy completion with skim");
- keybindings = mkEnableOption (mdDoc "skim keybindings");
+ fuzzyCompletion = mkEnableOption "fuzzy completion with skim";
+ keybindings = mkEnableOption "skim keybindings";
package = mkPackageOption pkgs "skim" {};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/slock.nix b/third_party/nixpkgs/nixos/modules/programs/slock.nix
index 3db9866d9f..f39b4d5e92 100644
--- a/third_party/nixpkgs/nixos/modules/programs/slock.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/slock.nix
@@ -12,20 +12,21 @@ in
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to install slock screen locker with setuid wrapper.
'';
};
+ package = mkPackageOption pkgs "slock" {};
};
};
config = mkIf cfg.enable {
- environment.systemPackages = [ pkgs.slock ];
+ environment.systemPackages = [ cfg.package ];
security.wrappers.slock =
{ setuid = true;
owner = "root";
group = "root";
- source = "${pkgs.slock.out}/bin/slock";
+ source = lib.getExe cfg.package;
};
};
}
diff --git a/third_party/nixpkgs/nixos/modules/programs/sniffnet.nix b/third_party/nixpkgs/nixos/modules/programs/sniffnet.nix
index 98e9f628a9..631a155e35 100644
--- a/third_party/nixpkgs/nixos/modules/programs/sniffnet.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/sniffnet.nix
@@ -7,7 +7,7 @@ in
{
options = {
programs.sniffnet = {
- enable = lib.mkEnableOption (lib.mdDoc "sniffnet");
+ enable = lib.mkEnableOption "sniffnet, a network traffic monitor application";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/soundmodem.nix b/third_party/nixpkgs/nixos/modules/programs/soundmodem.nix
new file mode 100644
index 0000000000..ab992c63c6
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/programs/soundmodem.nix
@@ -0,0 +1,34 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.programs.soundmodem;
+in
+{
+ options = {
+ programs.soundmodem = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether to add Soundmodem to the global environment and configure a
+ wrapper for 'soundmodemconfig' for users in the 'soundmodem' group.
+ '';
+ };
+ package = mkPackageOption pkgs "soundmodem" { };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ environment.systemPackages = [ cfg.package ];
+ users.groups.soundmodem = { };
+
+ security.wrappers.soundmodemconfig = {
+ source = "${cfg.package}/bin/soundmodemconfig";
+ owner = "root";
+ group = "soundmodem";
+ permissions = "u+rx,g+x";
+ };
+ };
+}
diff --git a/third_party/nixpkgs/nixos/modules/programs/spacefm.nix b/third_party/nixpkgs/nixos/modules/programs/spacefm.nix
index b4ba9dcdea..fec14fca48 100644
--- a/third_party/nixpkgs/nixos/modules/programs/spacefm.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/spacefm.nix
@@ -17,7 +17,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to install SpaceFM and create {file}`/etc/spacefm/spacefm.conf`.
'';
};
@@ -34,7 +34,7 @@ in
terminal_su = "''${pkgs.sudo}/bin/sudo";
}
'';
- description = lib.mdDoc ''
+ description = ''
The system-wide spacefm configuration.
Parameters to be written to {file}`/etc/spacefm/spacefm.conf`.
Refer to the [relevant entry](https://ignorantguru.github.io/spacefm/spacefm-manual-en.html#programfiles-etc) in the SpaceFM manual.
diff --git a/third_party/nixpkgs/nixos/modules/programs/ssh.nix b/third_party/nixpkgs/nixos/modules/programs/ssh.nix
index 0c1461709c..2d25c7a936 100644
--- a/third_party/nixpkgs/nixos/modules/programs/ssh.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/ssh.nix
@@ -40,20 +40,20 @@ in
type = types.bool;
default = config.services.xserver.enable;
defaultText = literalExpression "config.services.xserver.enable";
- description = lib.mdDoc "Whether to configure SSH_ASKPASS in the environment.";
+ description = "Whether to configure SSH_ASKPASS in the environment.";
};
askPassword = mkOption {
type = types.str;
default = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
defaultText = literalExpression ''"''${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass"'';
- description = lib.mdDoc "Program used by SSH to ask for passwords.";
+ description = "Program used by SSH to ask for passwords.";
};
forwardX11 = mkOption {
type = with lib.types; nullOr bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to request X11 forwarding on outgoing connections by default.
If set to null, the option is not set at all.
This is useful for running graphical programs on the remote machine and have them display to your local X11 server.
@@ -67,7 +67,7 @@ in
setXAuthLocation = mkOption {
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to set the path to {command}`xauth` for X11-forwarded connections.
This causes a dependency on X11 packages.
'';
@@ -77,7 +77,7 @@ in
type = types.listOf types.str;
default = [];
example = [ "ssh-ed25519" "ssh-rsa" ];
- description = lib.mdDoc ''
+ description = ''
Specifies the key types that will be used for public key authentication.
'';
};
@@ -86,7 +86,7 @@ in
type = types.listOf types.str;
default = [];
example = [ "ssh-ed25519" "ssh-rsa" ];
- description = lib.mdDoc ''
+ description = ''
Specifies the host key algorithms that the client wants to use in order of preference.
'';
};
@@ -94,7 +94,7 @@ in
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra configuration text prepended to {file}`ssh_config`. Other generated
options will be added after a `Host *` pattern.
See {manpage}`ssh_config(5)`
@@ -105,7 +105,7 @@ in
startAgent = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to start the OpenSSH agent when you log in. The OpenSSH agent
remembers private keys for you so that you don't have to type in
passphrases every time you make an SSH connection. Use
@@ -117,7 +117,7 @@ in
type = types.nullOr types.str;
default = null;
example = "1h";
- description = lib.mdDoc ''
+ description = ''
How long to keep the private keys in memory. Use null to keep them forever.
'';
};
@@ -126,7 +126,7 @@ in
type = types.nullOr types.str;
default = null;
example = literalExpression ''"''${pkgs.opensc}/lib/opensc-pkcs11.so"'';
- description = lib.mdDoc ''
+ description = ''
A pattern-list of acceptable paths for PKCS#11 shared libraries
that may be used with the -s option to ssh-add.
'';
@@ -141,7 +141,7 @@ in
certAuthority = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
This public key is an SSH certificate authority, rather than an
individual host's key.
'';
@@ -150,7 +150,7 @@ in
type = types.listOf types.str;
default = [ name ] ++ config.extraHostNames;
defaultText = literalExpression "[ ${name} ] ++ config.${options.extraHostNames}";
- description = lib.mdDoc ''
+ description = ''
A list of host names and/or IP numbers used for accessing
the host's ssh service. This list includes the name of the
containing `knownHosts` attribute by default
@@ -163,7 +163,7 @@ in
extraHostNames = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
A list of additional host names and/or IP numbers used for
accessing the host's ssh service. This list is ignored if
`hostNames` is set explicitly.
@@ -173,7 +173,7 @@ in
default = null;
type = types.nullOr types.str;
example = "ecdsa-sha2-nistp521 AAAAE2VjZHN...UEPg==";
- description = lib.mdDoc ''
+ description = ''
The public key data for the host. You can fetch a public key
from a running SSH server with the {command}`ssh-keyscan`
command. The public key should not include any host names, only
@@ -183,7 +183,7 @@ in
publicKeyFile = mkOption {
default = null;
type = types.nullOr types.path;
- description = lib.mdDoc ''
+ description = ''
The path to the public key file for the host. The public
key file is read at build time and saved in the Nix store.
You can fetch a public key file from a running SSH server
@@ -196,7 +196,7 @@ in
};
};
}));
- description = lib.mdDoc ''
+ description = ''
The set of system-wide known SSH hosts. To make simple setups more
convenient the name of an attribute in this set is used as a host name
for the entry. This behaviour can be disabled by setting
@@ -222,7 +222,7 @@ in
knownHostsFiles = mkOption {
default = [];
type = with types; listOf path;
- description = lib.mdDoc ''
+ description = ''
Files containing SSH host keys to set as global known hosts.
`/etc/ssh/ssh_known_hosts` (which is
generated by {option}`programs.ssh.knownHosts`) is
@@ -244,7 +244,7 @@ in
type = types.nullOr (types.listOf types.str);
default = null;
example = [ "curve25519-sha256@libssh.org" "diffie-hellman-group-exchange-sha256" ];
- description = lib.mdDoc ''
+ description = ''
Specifies the available KEX (Key Exchange) algorithms.
'';
};
@@ -253,7 +253,7 @@ in
type = types.nullOr (types.listOf types.str);
default = null;
example = [ "chacha20-poly1305@openssh.com" "aes256-gcm@openssh.com" ];
- description = lib.mdDoc ''
+ description = ''
Specifies the ciphers allowed and their order of preference.
'';
};
@@ -262,7 +262,7 @@ in
type = types.nullOr (types.listOf types.str);
default = null;
example = [ "hmac-sha2-512-etm@openssh.com" "hmac-sha1" ];
- description = lib.mdDoc ''
+ description = ''
Specifies the MAC (message authentication code) algorithms in order of preference. The MAC algorithm is used
for data integrity protection.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/starship.nix b/third_party/nixpkgs/nixos/modules/programs/starship.nix
index 34f6f0882c..7f8d9eb336 100644
--- a/third_party/nixpkgs/nixos/modules/programs/starship.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/starship.nix
@@ -12,7 +12,7 @@ let
nativeBuildInputs = [ pkgs.yq ];
} ''
tomlq -s -t 'reduce .[] as $item ({}; . * $item)' \
- ${lib.concatStringsSep " " (map (f: "${pkgs.starship}/share/starship/presets/${f}.toml") cfg.presets)} \
+ ${lib.concatStringsSep " " (map (f: "${cfg.package}/share/starship/presets/${f}.toml") cfg.presets)} \
${userSettingsFile} \
> $out
'';
@@ -26,23 +26,20 @@ let
in
{
options.programs.starship = {
- enable = lib.mkEnableOption (lib.mdDoc "the Starship shell prompt");
+ enable = lib.mkEnableOption "the Starship shell prompt";
- interactiveOnly = lib.mkOption {
- default = true;
- example = false;
- type = lib.types.bool;
- description = lib.mdDoc ''
- Whether to enable starship only when the shell is interactive.
- Some plugins require this to be set to false to function correctly.
- '';
- };
+ package = lib.mkPackageOption pkgs "starship" { };
+
+ interactiveOnly = lib.mkEnableOption ''
+ starship only when the shell is interactive.
+ Some plugins require this to be set to false to function correctly
+ '' // { default = true; };
presets = lib.mkOption {
default = [ ];
example = [ "nerd-font-symbols" ];
type = with lib.types; listOf str;
- description = lib.mdDoc ''
+ description = ''
Presets files to be merged with settings in order.
'';
};
@@ -50,7 +47,7 @@ in
settings = lib.mkOption {
inherit (settingsFormat) type;
default = { };
- description = lib.mdDoc ''
+ description = ''
Configuration included in `starship.toml`.
See https://starship.rs/config/#prompt for documentation.
@@ -68,7 +65,7 @@ in
if [[ ! -f "$HOME/.config/starship.toml" ]]; then
export STARSHIP_CONFIG=${settingsFile}
fi
- eval "$(${pkgs.starship}/bin/starship init bash)"
+ eval "$(${cfg.package}/bin/starship init bash)"
fi
'';
@@ -81,7 +78,7 @@ in
if not test -f "$HOME/.config/starship.toml";
set -x STARSHIP_CONFIG ${settingsFile}
end
- eval (${pkgs.starship}/bin/starship init fish)
+ eval (${cfg.package}/bin/starship init fish)
end
'';
@@ -94,7 +91,7 @@ in
if [[ ! -f "$HOME/.config/starship.toml" ]]; then
export STARSHIP_CONFIG=${settingsFile}
fi
- eval "$(${pkgs.starship}/bin/starship init zsh)"
+ eval "$(${cfg.package}/bin/starship init zsh)"
fi
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/steam.nix b/third_party/nixpkgs/nixos/modules/programs/steam.nix
index c7f1e622f7..58aa0aa25b 100644
--- a/third_party/nixpkgs/nixos/modules/programs/steam.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/steam.nix
@@ -24,7 +24,7 @@ let
'').overrideAttrs (_: { passthru.providedSessions = [ "steam" ]; });
in {
options.programs.steam = {
- enable = mkEnableOption (lib.mdDoc "steam");
+ enable = mkEnableOption "steam";
package = mkOption {
type = types.package;
@@ -43,6 +43,11 @@ in {
}
'';
apply = steam: steam.override (prev: {
+ extraEnv = (lib.optionalAttrs (cfg.extraCompatPackages != [ ]) {
+ STEAM_EXTRA_COMPAT_TOOLS_PATHS = makeSearchPathOutput "steamcompattool" "" cfg.extraCompatPackages;
+ }) // (optionalAttrs cfg.extest.enable {
+ LD_PRELOAD = "${pkgs.pkgsi686Linux.extest}/lib/libextest.so";
+ }) // (prev.extraEnv or {});
extraLibraries = pkgs: let
prevLibs = if prev ? extraLibraries then prev.extraLibraries pkgs else [ ];
additionalLibs = with config.hardware.opengl;
@@ -57,7 +62,7 @@ in {
bubblewrap = "${config.security.wrapperDir}/..";
};
});
- description = lib.mdDoc ''
+ description = ''
The Steam package to use. Additional libraries are added from the system
configuration to ensure graphics work properly.
@@ -66,10 +71,27 @@ in {
'';
};
+ extraCompatPackages = mkOption {
+ type = types.listOf types.package;
+ default = [ ];
+ example = literalExpression ''
+ with pkgs; [
+ proton-ge-bin
+ ]
+ '';
+ description = ''
+ Extra packages to be used as compatibility tools for Steam on Linux. Packages will be included
+ in the `STEAM_EXTRA_COMPAT_TOOLS_PATHS` environmental variable. For more information see
+ https://github.com/ValveSoftware/steam-for-linux/issues/6310.
+
+ These packages must be Steam compatibility tools that have a `steamcompattool` output.
+ '';
+ };
+
remotePlay.openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open ports in the firewall for Steam Remote Play.
'';
};
@@ -77,7 +99,7 @@ in {
dedicatedServer.openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open ports in the firewall for Source Dedicated Server.
'';
};
@@ -85,21 +107,21 @@ in {
localNetworkGameTransfers.openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open ports in the firewall for Steam Local Network Game Transfers.
'';
};
gamescopeSession = mkOption {
- description = mdDoc "Run a GameScope driven Steam session from your display-manager";
+ description = "Run a GameScope driven Steam session from your display-manager";
default = {};
type = types.submodule {
options = {
- enable = mkEnableOption (mdDoc "GameScope Session");
+ enable = mkEnableOption "GameScope Session";
args = mkOption {
type = types.listOf types.str;
default = [ ];
- description = mdDoc ''
+ description = ''
Arguments to be passed to GameScope for the session.
'';
};
@@ -107,13 +129,18 @@ in {
env = mkOption {
type = types.attrsOf types.str;
default = { };
- description = mdDoc ''
+ description = ''
Environmental variables to be passed to GameScope for the session.
'';
};
};
};
};
+
+ extest.enable = mkEnableOption ''
+ Load the extest library into Steam, to translate X11 input events to
+ uinput events (e.g. for using Steam Input on Wayland)
+ '';
};
config = mkIf cfg.enable {
@@ -134,7 +161,7 @@ in {
};
programs.gamescope.enable = mkDefault cfg.gamescopeSession.enable;
- services.xserver.displayManager.sessionPackages = mkIf cfg.gamescopeSession.enable [ gamescopeSessionFile ];
+ services.displayManager.sessionPackages = mkIf cfg.gamescopeSession.enable [ gamescopeSessionFile ];
# optionally enable 32bit pulseaudio support if pulseaudio is enabled
hardware.pulseaudio.support32Bit = config.hardware.pulseaudio.enable;
@@ -167,5 +194,5 @@ in {
];
};
- meta.maintainers = with maintainers; [ mkg20001 ];
+ meta.maintainers = teams.steam;
}
diff --git a/third_party/nixpkgs/nixos/modules/programs/streamdeck-ui.nix b/third_party/nixpkgs/nixos/modules/programs/streamdeck-ui.nix
index 47b1681cd6..6bec2abdfb 100644
--- a/third_party/nixpkgs/nixos/modules/programs/streamdeck-ui.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/streamdeck-ui.nix
@@ -7,12 +7,12 @@ let
in
{
options.programs.streamdeck-ui = {
- enable = mkEnableOption (lib.mdDoc "streamdeck-ui");
+ enable = mkEnableOption "streamdeck-ui";
autoStart = mkOption {
default = true;
type = types.bool;
- description = lib.mdDoc "Whether streamdeck-ui should be started automatically.";
+ description = "Whether streamdeck-ui should be started automatically.";
};
package = mkPackageOption pkgs "streamdeck-ui" {
diff --git a/third_party/nixpkgs/nixos/modules/programs/sysdig.nix b/third_party/nixpkgs/nixos/modules/programs/sysdig.nix
index ccb1e1d4c5..cf2cbab5cf 100644
--- a/third_party/nixpkgs/nixos/modules/programs/sysdig.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/sysdig.nix
@@ -5,7 +5,7 @@ with lib;
let
cfg = config.programs.sysdig;
in {
- options.programs.sysdig.enable = mkEnableOption (lib.mdDoc "sysdig");
+ options.programs.sysdig.enable = mkEnableOption "sysdig, a tracing tool";
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.sysdig ];
diff --git a/third_party/nixpkgs/nixos/modules/programs/system-config-printer.nix b/third_party/nixpkgs/nixos/modules/programs/system-config-printer.nix
index 7c7eea5805..34592dd706 100644
--- a/third_party/nixpkgs/nixos/modules/programs/system-config-printer.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/system-config-printer.nix
@@ -10,7 +10,7 @@ with lib;
programs.system-config-printer = {
- enable = mkEnableOption (lib.mdDoc "system-config-printer, a Graphical user interface for CUPS administration");
+ enable = mkEnableOption "system-config-printer, a Graphical user interface for CUPS administration";
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/systemtap.nix b/third_party/nixpkgs/nixos/modules/programs/systemtap.nix
index cbb9ec164c..d23bd13fdd 100644
--- a/third_party/nixpkgs/nixos/modules/programs/systemtap.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/systemtap.nix
@@ -10,7 +10,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Install {command}`systemtap` along with necessary kernel options.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/thefuck.nix b/third_party/nixpkgs/nixos/modules/programs/thefuck.nix
index e057d1ca65..ba2e39c013 100644
--- a/third_party/nixpkgs/nixos/modules/programs/thefuck.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/thefuck.nix
@@ -16,13 +16,13 @@ in
{
options = {
programs.thefuck = {
- enable = mkEnableOption (lib.mdDoc "thefuck");
+ enable = mkEnableOption "thefuck, an app which corrects your previous console command";
alias = mkOption {
default = "fuck";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
`thefuck` needs an alias to be configured.
The default value is `fuck`, but you can use anything else as well.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/thunar.nix b/third_party/nixpkgs/nixos/modules/programs/thunar.nix
index cb85b3886c..5ea2982dd9 100644
--- a/third_party/nixpkgs/nixos/modules/programs/thunar.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/thunar.nix
@@ -11,12 +11,12 @@ in {
options = {
programs.thunar = {
- enable = mkEnableOption (lib.mdDoc "Thunar, the Xfce file manager");
+ enable = mkEnableOption "Thunar, the Xfce file manager";
plugins = mkOption {
default = [];
type = types.listOf types.package;
- description = lib.mdDoc "List of thunar plugins to install.";
+ description = "List of thunar plugins to install.";
example = literalExpression "with pkgs.xfce; [ thunar-archive-plugin thunar-volman ]";
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/tmux.nix b/third_party/nixpkgs/nixos/modules/programs/tmux.nix
index 0d1c7c9cdf..b4b476a801 100644
--- a/third_party/nixpkgs/nixos/modules/programs/tmux.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/tmux.nix
@@ -72,14 +72,14 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whenever to configure {command}`tmux` system-wide.";
+ description = "Whenever to configure {command}`tmux` system-wide.";
relatedPackages = [ "tmux" ];
};
aggressiveResize = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Resize the window to the size of the smallest session for which it is the current window.
'';
};
@@ -88,31 +88,31 @@ in {
default = 0;
example = 1;
type = types.int;
- description = lib.mdDoc "Base index for windows and panes.";
+ description = "Base index for windows and panes.";
};
clock24 = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Use 24 hour clock.";
+ description = "Use 24 hour clock.";
};
customPaneNavigationAndResize = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Override the hjkl and HJKL bindings for pane navigation and resizing in VI mode.";
+ description = "Override the hjkl and HJKL bindings for pane navigation and resizing in VI mode.";
};
escapeTime = mkOption {
default = 500;
example = 0;
type = types.int;
- description = lib.mdDoc "Time in milliseconds for which tmux waits after an escape is input.";
+ description = "Time in milliseconds for which tmux waits after an escape is input.";
};
extraConfigBeforePlugins = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Additional contents of /etc/tmux.conf, to be run before sourcing plugins.
'';
type = types.lines;
@@ -120,7 +120,7 @@ in {
extraConfig = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Additional contents of /etc/tmux.conf, to be run after sourcing plugins.
'';
type = types.lines;
@@ -130,47 +130,47 @@ in {
default = 2000;
example = 5000;
type = types.int;
- description = lib.mdDoc "Maximum number of lines held in window history.";
+ description = "Maximum number of lines held in window history.";
};
keyMode = mkOption {
default = defaultKeyMode;
example = "vi";
type = types.enum [ "emacs" "vi" ];
- description = lib.mdDoc "VI or Emacs style shortcuts.";
+ description = "VI or Emacs style shortcuts.";
};
newSession = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Automatically spawn a session if trying to attach and none are running.";
+ description = "Automatically spawn a session if trying to attach and none are running.";
};
reverseSplit = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Reverse the window split shortcuts.";
+ description = "Reverse the window split shortcuts.";
};
resizeAmount = mkOption {
default = defaultResize;
example = 10;
type = types.int;
- description = lib.mdDoc "Number of lines/columns when resizing.";
+ description = "Number of lines/columns when resizing.";
};
shortcut = mkOption {
default = defaultShortcut;
example = "a";
type = types.str;
- description = lib.mdDoc "Ctrl following by this key is used as the main shortcut.";
+ description = "Ctrl following by this key is used as the main shortcut.";
};
terminal = mkOption {
default = defaultTerminal;
example = "screen-256color";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Set the $TERM variable. Use tmux-direct if italics or 24bit true color
support is needed.
'';
@@ -179,7 +179,7 @@ in {
secureSocket = mkOption {
default = true;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Store tmux socket under /run, which is more secure than /tmp, but as a
downside it doesn't survive user logout.
'';
@@ -188,12 +188,12 @@ in {
plugins = mkOption {
default = [];
type = types.listOf types.package;
- description = lib.mdDoc "List of plugins to install.";
+ description = "List of plugins to install.";
example = lib.literalExpression "[ pkgs.tmuxPlugins.nord ]";
};
withUtempter = mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether to enable libutempter for tmux.
This is required so that tmux can write to /var/run/utmp (which can be queried with `who` to display currently connected user sessions).
Note, this will add a guid wrapper for the group utmp!
diff --git a/third_party/nixpkgs/nixos/modules/programs/traceroute.nix b/third_party/nixpkgs/nixos/modules/programs/traceroute.nix
index df5f10b87d..6e04057ac5 100644
--- a/third_party/nixpkgs/nixos/modules/programs/traceroute.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/traceroute.nix
@@ -10,7 +10,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to configure a setcap wrapper for traceroute.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/trippy.nix b/third_party/nixpkgs/nixos/modules/programs/trippy.nix
index 6e31aea43e..707370fb31 100644
--- a/third_party/nixpkgs/nixos/modules/programs/trippy.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/trippy.nix
@@ -7,7 +7,7 @@ in
{
options = {
programs.trippy = {
- enable = lib.mkEnableOption (lib.mdDoc "trippy");
+ enable = lib.mkEnableOption "trippy, a network diagnostic tool";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/tsm-client.nix b/third_party/nixpkgs/nixos/modules/programs/tsm-client.nix
index d31a1fb3f3..82fbc9b26e 100644
--- a/third_party/nixpkgs/nixos/modules/programs/tsm-client.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/tsm-client.nix
@@ -22,12 +22,12 @@ let
serverOptions = { name, config, ... }: {
freeformType = attrsOf (either scalarType (listOf scalarType));
# Client system-options file directives are explained here:
- # https://www.ibm.com/docs/en/storage-protect/8.1.21?topic=commands-processing-options
+ # https://www.ibm.com/docs/en/storage-protect/8.1.22?topic=commands-processing-options
options.servername = mkOption {
type = servernameType;
default = name;
example = "mainTsmServer";
- description = lib.mdDoc ''
+ description = ''
Local name of the IBM TSM server,
must not contain space or more than 64 chars.
'';
@@ -35,14 +35,14 @@ let
options.tcpserveraddress = mkOption {
type = nonEmptyStr;
example = "tsmserver.company.com";
- description = lib.mdDoc ''
+ description = ''
Host/domain name or IP address of the IBM TSM server.
'';
};
options.tcpport = mkOption {
type = addCheck port (p: p<=32767);
default = 1500; # official default
- description = lib.mdDoc ''
+ description = ''
TCP port of the IBM TSM server.
TSM does not support ports above 32767.
'';
@@ -50,11 +50,11 @@ let
options.nodename = mkOption {
type = nonEmptyStr;
example = "MY-TSM-NODE";
- description = lib.mdDoc ''
+ description = ''
Target node name on the IBM TSM server.
'';
};
- options.genPasswd = mkEnableOption (lib.mdDoc ''
+ options.genPasswd = mkEnableOption ''
automatic client password generation.
This option does *not* cause a line in
{file}`dsm.sys` by itself, but generates a
@@ -65,7 +65,7 @@ let
If this option is enabled and the server forces
to renew the password (e.g. on first connection),
a random password will be generated and stored
- '');
+ '';
options.passwordaccess = mkOption {
type = enum [ "generate" "prompt" ];
visible = false;
@@ -74,7 +74,7 @@ let
type = nullOr path;
default = null;
example = "/home/alice/tsm-password";
- description = lib.mdDoc ''
+ description = ''
Directory that holds the TSM
node's password information.
'';
@@ -88,7 +88,7 @@ let
exclude.dir /nix/store
include.encrypt /home/.../*
'';
- description = lib.mdDoc ''
+ description = ''
Text lines with `include.*` and `exclude.*` directives
to be used when sending files to the IBM TSM server,
or an absolute path pointing to a file with such lines.
@@ -112,11 +112,11 @@ let
};
options.programs.tsmClient = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
IBM Storage Protect (Tivoli Storage Manager, TSM)
client command line applications with a
client system-options file "dsm.sys"
- '');
+ '';
servers = mkOption {
type = attrsOf (submodule serverOptions);
default = {};
@@ -125,7 +125,7 @@ let
nodename = "MY-TSM-NODE";
compression = "yes";
};
- description = lib.mdDoc ''
+ description = ''
Server definitions ("stanzas")
for the client system-options file.
The name of each entry will be used for
@@ -145,7 +145,7 @@ let
type = nullOr servernameType;
default = null;
example = "mainTsmServer";
- description = lib.mdDoc ''
+ description = ''
If multiple server stanzas are declared with
{option}`programs.tsmClient.servers`,
this option may be used to name a default
@@ -158,7 +158,7 @@ let
dsmSysText = mkOption {
type = lines;
readOnly = true;
- description = lib.mdDoc ''
+ description = ''
This configuration key contains the effective text
of the client system-options file "dsm.sys".
It should not be changed, but may be
diff --git a/third_party/nixpkgs/nixos/modules/programs/turbovnc.nix b/third_party/nixpkgs/nixos/modules/programs/turbovnc.nix
index 511b6badc0..fbb3a7bf22 100644
--- a/third_party/nixpkgs/nixos/modules/programs/turbovnc.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/turbovnc.nix
@@ -15,7 +15,7 @@ in
ensureHeadlessSoftwareOpenGL = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to set up NixOS such that TurboVNC's built-in software OpenGL
implementation works.
diff --git a/third_party/nixpkgs/nixos/modules/programs/udevil.nix b/third_party/nixpkgs/nixos/modules/programs/udevil.nix
index b0f00b4b54..44b9dd9234 100644
--- a/third_party/nixpkgs/nixos/modules/programs/udevil.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/udevil.nix
@@ -6,7 +6,7 @@ let
cfg = config.programs.udevil;
in {
- options.programs.udevil.enable = mkEnableOption (lib.mdDoc "udevil");
+ options.programs.udevil.enable = mkEnableOption "udevil, to mount filesystems without password";
config = mkIf cfg.enable {
security.wrappers.udevil =
diff --git a/third_party/nixpkgs/nixos/modules/programs/usbtop.nix b/third_party/nixpkgs/nixos/modules/programs/usbtop.nix
index e262ae3745..4f13ce5f62 100644
--- a/third_party/nixpkgs/nixos/modules/programs/usbtop.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/usbtop.nix
@@ -6,7 +6,7 @@ let
cfg = config.programs.usbtop;
in {
options = {
- programs.usbtop.enable = mkEnableOption (lib.mdDoc "usbtop and required kernel module");
+ programs.usbtop.enable = mkEnableOption "usbtop and required kernel module, to show estimated USB bandwidth";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/programs/vim.nix b/third_party/nixpkgs/nixos/modules/programs/vim.nix
index da2813f4bb..eb3499fd24 100644
--- a/third_party/nixpkgs/nixos/modules/programs/vim.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/vim.nix
@@ -9,7 +9,7 @@ in {
defaultEditor = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
When enabled, installs vim and configures vim to be the default editor
using the EDITOR environment variable.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/wavemon.nix b/third_party/nixpkgs/nixos/modules/programs/wavemon.nix
index 4dbf274891..e5ccacba75 100644
--- a/third_party/nixpkgs/nixos/modules/programs/wavemon.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/wavemon.nix
@@ -10,7 +10,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to add wavemon to the global environment and configure a
setcap wrapper for it.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/wayland/cardboard.nix b/third_party/nixpkgs/nixos/modules/programs/wayland/cardboard.nix
index 77a094a717..96089bdf94 100644
--- a/third_party/nixpkgs/nixos/modules/programs/wayland/cardboard.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/wayland/cardboard.nix
@@ -7,7 +7,7 @@ in
meta.maintainers = with lib.maintainers; [ AndersonTorres ];
options.programs.cardboard = {
- enable = lib.mkEnableOption (lib.mdDoc "cardboard");
+ enable = lib.mkEnableOption "cardboard";
package = lib.mkPackageOption pkgs "cardboard" { };
};
@@ -17,7 +17,7 @@ in
environment.systemPackages = [ cfg.package ];
# To make a cardboard session available for certain DMs like SDDM
- services.xserver.displayManager.sessionPackages = [ cfg.package ];
+ services.displayManager.sessionPackages = [ cfg.package ];
}
(import ./wayland-session.nix { inherit lib pkgs; })
]);
diff --git a/third_party/nixpkgs/nixos/modules/programs/wayland/hyprland.nix b/third_party/nixpkgs/nixos/modules/programs/wayland/hyprland.nix
index 9061ce5da8..5891ff25e4 100644
--- a/third_party/nixpkgs/nixos/modules/programs/wayland/hyprland.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/wayland/hyprland.nix
@@ -13,8 +13,8 @@ in
{
options.programs.hyprland = {
enable = mkEnableOption null // {
- description = mdDoc ''
- Hyprland, the dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
+ description = ''
+ Whether to enable Hyprland, the dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
You can manually launch Hyprland by executing {command}`Hyprland` on a TTY.
@@ -33,14 +33,24 @@ in
};
defaultText = literalExpression
"`programs.hyprland.package` with applied configuration";
- description = mdDoc ''
+ description = ''
The Hyprland package after applying configuration.
'';
};
portalPackage = mkPackageOption pkgs "xdg-desktop-portal-hyprland" { };
- xwayland.enable = mkEnableOption (mdDoc "XWayland") // { default = true; };
+ xwayland.enable = mkEnableOption ("XWayland") // { default = true; };
+
+ systemd.setPath.enable = mkEnableOption null // {
+ default = true;
+ example = false;
+ description = ''
+ Set environment path of systemd to include the current system's bin directory.
+ This is needed in Hyprland setups, where opening links in applications do not work.
+ Enabled by default.
+ '';
+ };
};
config = mkIf cfg.enable {
@@ -56,13 +66,19 @@ in
security.polkit.enable = true;
- services.xserver.displayManager.sessionPackages = [ cfg.finalPackage ];
+ services.displayManager.sessionPackages = [ cfg.finalPackage ];
xdg.portal = {
enable = mkDefault true;
extraPortals = [ finalPortalPackage ];
configPackages = mkDefault [ cfg.finalPackage ];
};
+
+ systemd = mkIf cfg.systemd.setPath.enable {
+ user.extraConfig = ''
+ DefaultEnvironment="PATH=$PATH:/run/current-system/sw/bin:/etc/profiles/per-user/%u/bin:/run/wrappers/bin"
+ '';
+ };
};
imports = with lib; [
diff --git a/third_party/nixpkgs/nixos/modules/programs/wayland/labwc.nix b/third_party/nixpkgs/nixos/modules/programs/wayland/labwc.nix
index d0806c3aa5..c09ab8240d 100644
--- a/third_party/nixpkgs/nixos/modules/programs/wayland/labwc.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/wayland/labwc.nix
@@ -7,7 +7,7 @@ in
meta.maintainers = with lib.maintainers; [ AndersonTorres ];
options.programs.labwc = {
- enable = lib.mkEnableOption (lib.mdDoc "labwc");
+ enable = lib.mkEnableOption "labwc";
package = lib.mkPackageOption pkgs "labwc" { };
};
@@ -18,7 +18,7 @@ in
xdg.portal.config.wlroots.default = lib.mkDefault [ "wlr" "gtk" ];
# To make a labwc session available for certain DMs like SDDM
- services.xserver.displayManager.sessionPackages = [ cfg.package ];
+ services.displayManager.sessionPackages = [ cfg.package ];
}
(import ./wayland-session.nix { inherit lib pkgs; })
]);
diff --git a/third_party/nixpkgs/nixos/modules/programs/wayland/river.nix b/third_party/nixpkgs/nixos/modules/programs/wayland/river.nix
index 995129b971..d0e309646b 100644
--- a/third_party/nixpkgs/nixos/modules/programs/wayland/river.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/wayland/river.nix
@@ -8,7 +8,7 @@ with lib; let
cfg = config.programs.river;
in {
options.programs.river = {
- enable = mkEnableOption (lib.mdDoc "river, a dynamic tiling Wayland compositor");
+ enable = mkEnableOption "river, a dynamic tiling Wayland compositor";
package = mkPackageOption pkgs "river" {
nullable = true;
@@ -33,7 +33,7 @@ in {
termite rofi light
]
'';
- description = lib.mdDoc ''
+ description = ''
Extra packages to be installed system wide. See
[Common X11 apps used on i3 with Wayland alternatives](https://github.com/swaywm/sway/wiki/i3-Migration-Guide#common-x11-apps-used-on-i3-with-wayland-alternatives)
for a list of useful software.
@@ -47,7 +47,7 @@ in {
environment.systemPackages = optional (cfg.package != null) cfg.package ++ cfg.extraPackages;
# To make a river session available if a display manager like SDDM is enabled:
- services.xserver.displayManager.sessionPackages = optionals (cfg.package != null) [ cfg.package ];
+ services.displayManager.sessionPackages = optionals (cfg.package != null) [ cfg.package ];
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050913
xdg.portal.config.river.default = mkDefault [ "wlr" "gtk" ];
diff --git a/third_party/nixpkgs/nixos/modules/programs/wayland/sway.nix b/third_party/nixpkgs/nixos/modules/programs/wayland/sway.nix
index ca2503ae5d..348e1db7cd 100644
--- a/third_party/nixpkgs/nixos/modules/programs/wayland/sway.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/wayland/sway.nix
@@ -12,7 +12,7 @@ let
type = types.bool;
inherit default;
example = !default;
- description = lib.mdDoc "Whether to make use of the ${description}";
+ description = "Whether to make use of the ${description}";
};
in {
base = mkWrapperFeature true ''
@@ -50,19 +50,19 @@ let
};
in {
options.programs.sway = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
Sway, the i3-compatible tiling Wayland compositor. You can manually launch
Sway by executing "exec sway" on a TTY. Copy /etc/sway/config to
~/.config/sway/config to modify the default configuration. See
and
- "man 5 sway" for more information'');
+ "man 5 sway" for more information'';
package = mkOption {
type = with types; nullOr package;
default = pkgs.sway;
apply = p: if p == null then null else genFinalPackage p;
defaultText = literalExpression "pkgs.sway";
- description = lib.mdDoc ''
+ description = ''
Sway package to use. If the package does not contain the override arguments
`extraSessionCommands`, `extraOptions`, `withBaseWrapper`, `withGtkWrapper`,
`isNixOS`, then the module options {option}`wrapperFeatures`,
@@ -76,7 +76,7 @@ in {
type = wrapperOptions;
default = { };
example = { gtk = true; };
- description = lib.mdDoc ''
+ description = ''
Attribute set of features to enable in the wrapper.
'';
};
@@ -94,7 +94,7 @@ in {
# use this if they aren't displayed properly:
export _JAVA_AWT_WM_NONREPARENTING=1
'';
- description = lib.mdDoc ''
+ description = ''
Shell commands executed just before Sway is started. See
and
@@ -110,7 +110,7 @@ in {
"--debug"
"--unsupported-gpu"
];
- description = lib.mdDoc ''
+ description = ''
Command line arguments passed to launch Sway. Please DO NOT report
issues if you use an unsupported GPU (proprietary drivers).
'';
@@ -130,7 +130,7 @@ in {
termite rofi light
]
'';
- description = lib.mdDoc ''
+ description = ''
Extra packages to be installed system wide. See
and
@@ -152,6 +152,7 @@ in {
'';
}
];
+
environment = {
systemPackages = optional (cfg.package != null) cfg.package ++ cfg.extraPackages;
# Needed for the default wallpaper:
@@ -166,10 +167,14 @@ in {
"sway/config".source = mkOptionDefault "${cfg.package}/etc/sway/config";
};
};
+
+ programs.gnupg.agent.pinentryPackage = lib.mkDefault pkgs.pinentry-gnome3;
+
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050913
xdg.portal.config.sway.default = mkDefault [ "wlr" "gtk" ];
+
# To make a Sway session available if a display manager like SDDM is enabled:
- services.xserver.displayManager.sessionPackages = optionals (cfg.package != null) [ cfg.package ]; }
+ services.displayManager.sessionPackages = optionals (cfg.package != null) [ cfg.package ]; }
(import ./wayland-session.nix { inherit lib pkgs; })
]);
diff --git a/third_party/nixpkgs/nixos/modules/programs/wayland/waybar.nix b/third_party/nixpkgs/nixos/modules/programs/wayland/waybar.nix
index ec60b84f69..ffe889504c 100644
--- a/third_party/nixpkgs/nixos/modules/programs/wayland/waybar.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/wayland/waybar.nix
@@ -7,7 +7,7 @@ let
in
{
options.programs.waybar = {
- enable = mkEnableOption (lib.mdDoc "waybar");
+ enable = mkEnableOption "waybar, a highly customizable Wayland bar for Sway and Wlroots based compositors";
package = mkPackageOption pkgs "waybar" { };
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/wayland/wayfire.nix b/third_party/nixpkgs/nixos/modules/programs/wayland/wayfire.nix
index 0840246e5e..7acc5b2739 100644
--- a/third_party/nixpkgs/nixos/modules/programs/wayland/wayfire.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/wayland/wayfire.nix
@@ -6,7 +6,7 @@ in
meta.maintainers = with lib.maintainers; [ rewine ];
options.programs.wayfire = {
- enable = lib.mkEnableOption (lib.mdDoc "Wayfire, a wayland compositor based on wlroots");
+ enable = lib.mkEnableOption "Wayfire, a wayland compositor based on wlroots";
package = lib.mkPackageOption pkgs "wayfire" { };
@@ -21,7 +21,7 @@ in
wayfire-plugins-extra
];
'';
- description = lib.mdDoc ''
+ description = ''
Additional plugins to use with the wayfire window manager.
'';
};
@@ -38,7 +38,7 @@ in
finalPackage
];
- services.xserver.displayManager.sessionPackages = [ finalPackage ];
+ services.displayManager.sessionPackages = [ finalPackage ];
xdg.portal = {
enable = lib.mkDefault true;
diff --git a/third_party/nixpkgs/nixos/modules/programs/weylus.nix b/third_party/nixpkgs/nixos/modules/programs/weylus.nix
index f40dfd5c96..a47dccb95c 100644
--- a/third_party/nixpkgs/nixos/modules/programs/weylus.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/weylus.nix
@@ -7,12 +7,12 @@ let
in
{
options.programs.weylus = with types; {
- enable = mkEnableOption (lib.mdDoc "weylus");
+ enable = mkEnableOption "weylus, which turns your smart phone into a graphic tablet/touch screen for your computer";
openFirewall = mkOption {
type = bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open ports needed for the functionality of the program.
'';
};
@@ -20,7 +20,7 @@ in
users = mkOption {
type = listOf str;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
To enable stylus and multi-touch support, the user you're going to use must be added to this list.
These users can synthesize input events system-wide, even when another user is logged in - untrusted users should not be added.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/wireshark.nix b/third_party/nixpkgs/nixos/modules/programs/wireshark.nix
index c0dc349cca..2d947154e8 100644
--- a/third_party/nixpkgs/nixos/modules/programs/wireshark.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/wireshark.nix
@@ -11,7 +11,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to add Wireshark to the global environment and configure a
setcap wrapper for 'dumpcap' for users in the 'wireshark' group.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/wshowkeys.nix b/third_party/nixpkgs/nixos/modules/programs/wshowkeys.nix
index ebb5c55094..f7b71d2bb0 100644
--- a/third_party/nixpkgs/nixos/modules/programs/wshowkeys.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/wshowkeys.nix
@@ -9,10 +9,10 @@ in {
options = {
programs.wshowkeys = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
wshowkeys (displays keypresses on screen on supported Wayland
compositors). It requires root permissions to read input events, but
- these permissions are dropped after startup'');
+ these permissions are dropped after startup'';
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/xastir.nix b/third_party/nixpkgs/nixos/modules/programs/xastir.nix
index 6d5fc59aac..d9c687289e 100644
--- a/third_party/nixpkgs/nixos/modules/programs/xastir.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/xastir.nix
@@ -8,7 +8,7 @@ in {
meta.maintainers = with maintainers; [ melling ];
options.programs.xastir = {
- enable = mkEnableOption (mdDoc "Xastir Graphical APRS client");
+ enable = mkEnableOption "Xastir Graphical APRS client";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/programs/xfconf.nix b/third_party/nixpkgs/nixos/modules/programs/xfconf.nix
index b0f4533933..8e854b40e5 100644
--- a/third_party/nixpkgs/nixos/modules/programs/xfconf.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/xfconf.nix
@@ -11,7 +11,7 @@ in {
options = {
programs.xfconf = {
- enable = mkEnableOption (lib.mdDoc "Xfconf, the Xfce configuration storage system");
+ enable = mkEnableOption "Xfconf, the Xfce configuration storage system";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/xfs_quota.nix b/third_party/nixpkgs/nixos/modules/programs/xfs_quota.nix
index 0fc2958b3f..8f70cc2d94 100644
--- a/third_party/nixpkgs/nixos/modules/programs/xfs_quota.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/xfs_quota.nix
@@ -28,37 +28,37 @@ in
options = {
id = mkOption {
type = types.int;
- description = lib.mdDoc "Project ID.";
+ description = "Project ID.";
};
fileSystem = mkOption {
type = types.str;
- description = lib.mdDoc "XFS filesystem hosting the xfs_quota project.";
+ description = "XFS filesystem hosting the xfs_quota project.";
default = "/";
};
path = mkOption {
type = types.str;
- description = lib.mdDoc "Project directory.";
+ description = "Project directory.";
};
sizeSoftLimit = mkOption {
type = types.nullOr types.str;
default = null;
example = "30g";
- description = lib.mdDoc "Soft limit of the project size";
+ description = "Soft limit of the project size";
};
sizeHardLimit = mkOption {
type = types.nullOr types.str;
default = null;
example = "50g";
- description = lib.mdDoc "Hard limit of the project size.";
+ description = "Hard limit of the project size.";
};
};
});
- description = lib.mdDoc "Setup of xfs_quota projects. Make sure the filesystem is mounted with the pquota option.";
+ description = "Setup of xfs_quota projects. Make sure the filesystem is mounted with the pquota option.";
example = {
projname = {
diff --git a/third_party/nixpkgs/nixos/modules/programs/xonsh.nix b/third_party/nixpkgs/nixos/modules/programs/xonsh.nix
index 2ece772c92..fefe6b456c 100644
--- a/third_party/nixpkgs/nixos/modules/programs/xonsh.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/xonsh.nix
@@ -18,7 +18,7 @@ in
enable = mkOption {
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to configure xonsh as an interactive shell.
'';
type = types.bool;
@@ -30,7 +30,7 @@ in
config = mkOption {
default = "";
- description = lib.mdDoc "Control file to customize your shell behavior.";
+ description = "Control file to customize your shell behavior.";
type = types.lines;
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/xss-lock.nix b/third_party/nixpkgs/nixos/modules/programs/xss-lock.nix
index 87b3957ab8..1bb7390559 100644
--- a/third_party/nixpkgs/nixos/modules/programs/xss-lock.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/xss-lock.nix
@@ -7,21 +7,21 @@ let
in
{
options.programs.xss-lock = {
- enable = mkEnableOption (lib.mdDoc "xss-lock");
+ enable = mkEnableOption "xss-lock";
lockerCommand = mkOption {
default = "${pkgs.i3lock}/bin/i3lock";
defaultText = literalExpression ''"''${pkgs.i3lock}/bin/i3lock"'';
example = literalExpression ''"''${pkgs.i3lock-fancy}/bin/i3lock-fancy"'';
type = types.separatedString " ";
- description = lib.mdDoc "Locker to be used with xsslock";
+ description = "Locker to be used with xsslock";
};
extraOptions = mkOption {
default = [ ];
example = [ "--ignore-sleep" ];
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
Additional command-line arguments to pass to
{command}`xss-lock`.
'';
@@ -40,6 +40,7 @@ in
"--"
cfg.lockerCommand
]);
+ serviceConfig.Restart = "always";
};
};
}
diff --git a/third_party/nixpkgs/nixos/modules/programs/xwayland.nix b/third_party/nixpkgs/nixos/modules/programs/xwayland.nix
index 8d13e4c22b..3a8080fa4c 100644
--- a/third_party/nixpkgs/nixos/modules/programs/xwayland.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/xwayland.nix
@@ -10,7 +10,7 @@ in
{
options.programs.xwayland = {
- enable = mkEnableOption (lib.mdDoc "Xwayland (an X server for interfacing X11 apps with the Wayland protocol)");
+ enable = mkEnableOption "Xwayland (an X server for interfacing X11 apps with the Wayland protocol)";
defaultFontPath = mkOption {
type = types.str;
@@ -19,7 +19,7 @@ in
defaultText = literalExpression ''
optionalString config.fonts.fontDir.enable "/run/current-system/sw/share/X11/fonts"
'';
- description = lib.mdDoc ''
+ description = ''
Default font path. Setting this option causes Xwayland to be rebuilt.
'';
};
@@ -34,7 +34,7 @@ in
inherit (config.programs.xwayland) defaultFontPath;
})
'';
- description = lib.mdDoc "The Xwayland package to use.";
+ description = "The Xwayland package to use.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/yabar.nix b/third_party/nixpkgs/nixos/modules/programs/yabar.nix
index 58ffe55571..6e117506a2 100644
--- a/third_party/nixpkgs/nixos/modules/programs/yabar.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/yabar.nix
@@ -41,7 +41,7 @@ let
in
{
options.programs.yabar = {
- enable = mkEnableOption (lib.mdDoc "yabar");
+ enable = mkEnableOption "yabar, a status bar for X window managers";
package = mkOption {
default = pkgs.yabar-unstable;
@@ -62,7 +62,7 @@ in
to use `yabar-unstable'.
'';
- description = lib.mdDoc ''
+ description = ''
The package which contains the `yabar` binary.
Nixpkgs provides the `yabar` and `yabar-unstable`
@@ -79,7 +79,7 @@ in
example = "Droid Sans, FontAwesome Bold 9";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The font that will be used to draw the status bar.
'';
};
@@ -89,7 +89,7 @@ in
example = "bottom";
type = types.enum [ "top" "bottom" ];
- description = lib.mdDoc ''
+ description = ''
The position where the bar will be rendered.
'';
};
@@ -98,7 +98,7 @@ in
default = {};
type = types.attrsOf types.str;
- description = lib.mdDoc ''
+ description = ''
An attribute set which contains further attributes of a bar.
'';
};
@@ -109,7 +109,7 @@ in
options.exec = mkOption {
example = "YABAR_DATE";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The type of the indicator to be executed.
'';
};
@@ -119,7 +119,7 @@ in
example = "right";
type = types.enum [ "left" "center" "right" ];
- description = lib.mdDoc ''
+ description = ''
Whether to align the indicator at the left or right of the bar.
'';
};
@@ -128,20 +128,20 @@ in
default = {};
type = types.attrsOf (types.either types.str types.int);
- description = lib.mdDoc ''
+ description = ''
An attribute set which contains further attributes of a indicator.
'';
};
});
- description = lib.mdDoc ''
+ description = ''
Indicators that should be rendered by yabar.
'';
};
};
});
- description = lib.mdDoc ''
+ description = ''
List of bars that should be rendered by yabar.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/yazi.nix b/third_party/nixpkgs/nixos/modules/programs/yazi.nix
index 338eddb60d..5905f2afb9 100644
--- a/third_party/nixpkgs/nixos/modules/programs/yazi.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/yazi.nix
@@ -9,7 +9,7 @@ let
in
{
options.programs.yazi = {
- enable = lib.mkEnableOption (lib.mdDoc "yazi terminal file manager");
+ enable = lib.mkEnableOption "yazi terminal file manager";
package = lib.mkPackageOption pkgs "yazi" { };
@@ -19,7 +19,7 @@ in
(name: lib.nameValuePair name (lib.mkOption {
inherit (settingsFormat) type;
default = { };
- description = lib.mdDoc ''
+ description = ''
Configuration included in `${name}.toml`.
See https://yazi-rs.github.io/docs/configuration/${name}/ for documentation.
@@ -28,7 +28,7 @@ in
names);
};
default = { };
- description = lib.mdDoc ''
+ description = ''
Configuration included in `$YAZI_CONFIG_HOME`.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/zmap.nix b/third_party/nixpkgs/nixos/modules/programs/zmap.nix
index 056f788830..827d9bedca 100644
--- a/third_party/nixpkgs/nixos/modules/programs/zmap.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/zmap.nix
@@ -6,7 +6,7 @@ let
cfg = config.programs.zmap;
in {
options.programs.zmap = {
- enable = mkEnableOption (lib.mdDoc "ZMap");
+ enable = mkEnableOption "ZMap, a network scanner designed for Internet-wide network surveys";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/programs/zsh/oh-my-zsh.md b/third_party/nixpkgs/nixos/modules/programs/zsh/oh-my-zsh.md
index 6a310006ed..7e4a41641e 100644
--- a/third_party/nixpkgs/nixos/modules/programs/zsh/oh-my-zsh.md
+++ b/third_party/nixpkgs/nixos/modules/programs/zsh/oh-my-zsh.md
@@ -9,7 +9,7 @@ prompt themes.
The module uses the `oh-my-zsh` package with all available
features. The initial setup using Nix expressions is fairly similar to the
configuration format of `oh-my-zsh`.
-```
+```nix
{
programs.zsh.ohMyZsh = {
enable = true;
@@ -33,7 +33,7 @@ environment variable for this which points to a directory with additional
scripts.
The module can do this as well:
-```
+```nix
{
programs.zsh.ohMyZsh.custom = "~/path/to/custom/scripts";
}
@@ -48,7 +48,7 @@ which bundles completion scripts and a plugin for `oh-my-zsh`.
Rather than using a single mutable path for `ZSH_CUSTOM`,
it's also possible to generate this path from a list of Nix packages:
-```
+```nix
{ pkgs, ... }:
{
programs.zsh.ohMyZsh.customPkgs = [
@@ -89,7 +89,7 @@ If third-party customizations (e.g. new themes) are supposed to be added to
[upstream repo.](https://github.com/robbyrussell/oh-my-zsh/tree/91b771914bc7c43dd7c7a43b586c5de2c225ceb7/plugins)
A derivation for `oh-my-zsh` may look like this:
-```
+```nix
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
diff --git a/third_party/nixpkgs/nixos/modules/programs/zsh/oh-my-zsh.nix b/third_party/nixpkgs/nixos/modules/programs/zsh/oh-my-zsh.nix
index 09c3bb974a..f2a5a7560e 100644
--- a/third_party/nixpkgs/nixos/modules/programs/zsh/oh-my-zsh.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/zsh/oh-my-zsh.nix
@@ -41,7 +41,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable oh-my-zsh.
'';
};
@@ -51,7 +51,7 @@ in
plugins = mkOption {
default = [];
type = types.listOf(types.str);
- description = lib.mdDoc ''
+ description = ''
List of oh-my-zsh plugins
'';
};
@@ -59,7 +59,7 @@ in
custom = mkOption {
default = null;
type = with types; nullOr str;
- description = lib.mdDoc ''
+ description = ''
Path to a custom oh-my-zsh package to override config of oh-my-zsh.
(Can't be used along with `customPkgs`).
'';
@@ -68,7 +68,7 @@ in
customPkgs = mkOption {
default = [];
type = types.listOf types.package;
- description = lib.mdDoc ''
+ description = ''
List of custom packages that should be loaded into `oh-my-zsh`.
'';
};
@@ -76,7 +76,7 @@ in
theme = mkOption {
default = "";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Name of the theme to be used by oh-my-zsh.
'';
};
@@ -84,7 +84,7 @@ in
cacheDir = mkOption {
default = "$HOME/.cache/oh-my-zsh";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Cache directory to be used by `oh-my-zsh`.
Without this option it would default to the read-only nix store.
'';
diff --git a/third_party/nixpkgs/nixos/modules/programs/zsh/zsh-autoenv.nix b/third_party/nixpkgs/nixos/modules/programs/zsh/zsh-autoenv.nix
index 0894bfc3fd..f07fb5c24d 100644
--- a/third_party/nixpkgs/nixos/modules/programs/zsh/zsh-autoenv.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/zsh/zsh-autoenv.nix
@@ -7,7 +7,7 @@ let
in {
options = {
programs.zsh.zsh-autoenv = {
- enable = mkEnableOption (lib.mdDoc "zsh-autoenv");
+ enable = mkEnableOption "zsh-autoenv";
package = mkPackageOption pkgs "zsh-autoenv" { };
};
};
diff --git a/third_party/nixpkgs/nixos/modules/programs/zsh/zsh-autosuggestions.nix b/third_party/nixpkgs/nixos/modules/programs/zsh/zsh-autosuggestions.nix
index d3a9c372e8..2e53e907d5 100644
--- a/third_party/nixpkgs/nixos/modules/programs/zsh/zsh-autosuggestions.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/zsh/zsh-autosuggestions.nix
@@ -12,19 +12,19 @@ in
options.programs.zsh.autosuggestions = {
- enable = mkEnableOption (lib.mdDoc "zsh-autosuggestions");
+ enable = mkEnableOption "zsh-autosuggestions";
highlightStyle = mkOption {
type = types.str;
default = "fg=8"; # https://github.com/zsh-users/zsh-autosuggestions/tree/v0.4.3#suggestion-highlight-style
- description = lib.mdDoc "Highlight style for suggestions ({fore,back}ground color)";
+ description = "Highlight style for suggestions ({fore,back}ground color)";
example = "fg=cyan";
};
strategy = mkOption {
type = types.listOf (types.enum [ "history" "completion" "match_prev_cmd" ]);
default = [ "history" ];
- description = lib.mdDoc ''
+ description = ''
`ZSH_AUTOSUGGEST_STRATEGY` is an array that specifies how suggestions should be generated.
The strategies in the array are tried successively until a suggestion is found.
There are currently three built-in strategies to choose from:
@@ -40,14 +40,14 @@ in
async = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to fetch suggestions asynchronously";
+ description = "Whether to fetch suggestions asynchronously";
example = false;
};
extraConfig = mkOption {
type = with types; attrsOf str;
default = {};
- description = lib.mdDoc "Attribute set with additional configuration values";
+ description = "Attribute set with additional configuration values";
example = literalExpression ''
{
"ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE" = "20";
diff --git a/third_party/nixpkgs/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix b/third_party/nixpkgs/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix
index cec4be1cb0..46bc4fcb87 100644
--- a/third_party/nixpkgs/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix
@@ -15,7 +15,7 @@ in
options = {
programs.zsh.syntaxHighlighting = {
- enable = mkEnableOption (lib.mdDoc "zsh-syntax-highlighting");
+ enable = mkEnableOption "zsh-syntax-highlighting";
highlighters = mkOption {
default = [ "main" ];
@@ -31,7 +31,7 @@ in
"line"
]));
- description = lib.mdDoc ''
+ description = ''
Specifies the highlighters to be used by zsh-syntax-highlighting.
The following defined options can be found here:
@@ -49,7 +49,7 @@ in
}
'';
- description = lib.mdDoc ''
+ description = ''
Specifies custom patterns to be highlighted by zsh-syntax-highlighting.
Please refer to the docs for more information about the usage:
@@ -66,7 +66,7 @@ in
}
'';
- description = lib.mdDoc ''
+ description = ''
Specifies custom styles to be highlighted by zsh-syntax-highlighting.
Please refer to the docs for more information about the usage:
diff --git a/third_party/nixpkgs/nixos/modules/programs/zsh/zsh.nix b/third_party/nixpkgs/nixos/modules/programs/zsh/zsh.nix
index cad639f299..d7e300b501 100644
--- a/third_party/nixpkgs/nixos/modules/programs/zsh/zsh.nix
+++ b/third_party/nixpkgs/nixos/modules/programs/zsh/zsh.nix
@@ -44,7 +44,7 @@ in
enable = mkOption {
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to configure zsh as an interactive shell. To enable zsh for
a particular user, use the {option}`users.users..shell`
option for that user. To enable zsh system-wide use the
@@ -55,7 +55,7 @@ in
shellAliases = mkOption {
default = { };
- description = lib.mdDoc ''
+ description = ''
Set of aliases for zsh shell, which overrides {option}`environment.shellAliases`.
See {option}`environment.shellAliases` for an option format description.
'';
@@ -64,7 +64,7 @@ in
shellInit = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell script code called during zsh shell initialisation.
'';
type = types.lines;
@@ -72,7 +72,7 @@ in
loginShellInit = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell script code called during zsh login shell initialisation.
'';
type = types.lines;
@@ -80,7 +80,7 @@ in
interactiveShellInit = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell script code called during interactive zsh shell initialisation.
'';
type = types.lines;
@@ -94,7 +94,7 @@ in
# a lot of different prompt variables.
autoload -U promptinit && promptinit && prompt suse && setopt prompt_sp
'';
- description = lib.mdDoc ''
+ description = ''
Shell script code used to initialise the zsh prompt.
'';
type = types.lines;
@@ -102,7 +102,7 @@ in
histSize = mkOption {
default = 2000;
- description = lib.mdDoc ''
+ description = ''
Change history size.
'';
type = types.int;
@@ -110,7 +110,7 @@ in
histFile = mkOption {
default = "$HOME/.zsh_history";
- description = lib.mdDoc ''
+ description = ''
Change history file.
'';
type = types.str;
@@ -124,7 +124,7 @@ in
"HIST_FCNTL_LOCK"
];
example = [ "EXTENDED_HISTORY" "RM_STAR_WAIT" ];
- description = lib.mdDoc ''
+ description = ''
Configure zsh options. See
{manpage}`zshoptions(1)`.
'';
@@ -132,7 +132,7 @@ in
enableCompletion = mkOption {
default = true;
- description = lib.mdDoc ''
+ description = ''
Enable zsh completion for all interactive zsh shells.
'';
type = types.bool;
@@ -140,7 +140,7 @@ in
enableBashCompletion = mkOption {
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable compatibility with bash's programmable completion system.
'';
type = types.bool;
@@ -149,7 +149,7 @@ in
enableGlobalCompInit = mkOption {
default = cfg.enableCompletion;
defaultText = literalExpression "config.${opt.enableCompletion}";
- description = lib.mdDoc ''
+ description = ''
Enable execution of compinit call for all interactive zsh shells.
This option can be disabled if the user wants to extend its
@@ -161,7 +161,7 @@ in
enableLsColors = mkOption {
default = true;
- description = lib.mdDoc ''
+ description = ''
Enable extra colors in directory listings (used by `ls` and `tree`).
'';
type = types.bool;
diff --git a/third_party/nixpkgs/nixos/modules/rename.nix b/third_party/nixpkgs/nixos/modules/rename.nix
index 0a975fcd98..01985995a6 100644
--- a/third_party/nixpkgs/nixos/modules/rename.nix
+++ b/third_party/nixpkgs/nixos/modules/rename.nix
@@ -62,6 +62,7 @@ in
(mkRemovedOptionModule [ "services" "fourStoreEndpoint" ] "The fourStoreEndpoint module has been removed")
(mkRemovedOptionModule [ "services" "fprot" ] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [ "services" "frab" ] "The frab module has been removed")
+ (mkRemovedOptionModule [ "services" "homeassistant-satellite"] "The `services.homeassistant-satellite` module has been replaced by `services.wyoming-satellite`.")
(mkRemovedOptionModule [ "services" "ihatemoney" ] "The ihatemoney module has been removed for lack of downstream maintainer")
(mkRemovedOptionModule [ "services" "kippo" ] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [ "services" "mailpile" ] "The corresponding package was removed from nixpkgs.")
@@ -92,7 +93,7 @@ in
The services.xserver.displayManager.auto module has been removed
because it was only intended for use in internal NixOS tests, and gave the
false impression of it being a special display manager when it's actually
- LightDM. Please use the services.xserver.displayManager.autoLogin options
+ LightDM. Please use the services.displayManager.autoLogin options
instead, or any other display manager in NixOS as they all support auto-login.
'')
(mkRemovedOptionModule [ "services" "xserver" "multitouch" ] ''
diff --git a/third_party/nixpkgs/nixos/modules/security/acme/default.md b/third_party/nixpkgs/nixos/modules/security/acme/default.md
index 38fbfbf0ca..a6ef2a3fdf 100644
--- a/third_party/nixpkgs/nixos/modules/security/acme/default.md
+++ b/third_party/nixpkgs/nixos/modules/security/acme/default.md
@@ -46,33 +46,35 @@ certs are overwritten when the ACME certs arrive. For
`foo.example.com` the config would look like this:
```nix
-security.acme.acceptTerms = true;
-security.acme.defaults.email = "admin+acme@example.com";
-services.nginx = {
- enable = true;
- virtualHosts = {
- "foo.example.com" = {
- forceSSL = true;
- enableACME = true;
- # All serverAliases will be added as extra domain names on the certificate.
- serverAliases = [ "bar.example.com" ];
- locations."/" = {
- root = "/var/www";
+{
+ security.acme.acceptTerms = true;
+ security.acme.defaults.email = "admin+acme@example.com";
+ services.nginx = {
+ enable = true;
+ virtualHosts = {
+ "foo.example.com" = {
+ forceSSL = true;
+ enableACME = true;
+ # All serverAliases will be added as extra domain names on the certificate.
+ serverAliases = [ "bar.example.com" ];
+ locations."/" = {
+ root = "/var/www";
+ };
};
- };
- # We can also add a different vhost and reuse the same certificate
- # but we have to append extraDomainNames manually beforehand:
- # security.acme.certs."foo.example.com".extraDomainNames = [ "baz.example.com" ];
- "baz.example.com" = {
- forceSSL = true;
- useACMEHost = "foo.example.com";
- locations."/" = {
- root = "/var/www";
+ # We can also add a different vhost and reuse the same certificate
+ # but we have to append extraDomainNames manually beforehand:
+ # security.acme.certs."foo.example.com".extraDomainNames = [ "baz.example.com" ];
+ "baz.example.com" = {
+ forceSSL = true;
+ useACMEHost = "foo.example.com";
+ locations."/" = {
+ root = "/var/www";
+ };
};
};
};
-};
+}
```
## Using ACME certificates in Apache/httpd {#module-security-acme-httpd}
@@ -89,65 +91,69 @@ the intent that you will generate certs for all your vhosts and redirect
everyone to HTTPS.
```nix
-security.acme.acceptTerms = true;
-security.acme.defaults.email = "admin+acme@example.com";
+{
+ security.acme.acceptTerms = true;
+ security.acme.defaults.email = "admin+acme@example.com";
-# /var/lib/acme/.challenges must be writable by the ACME user
-# and readable by the Nginx user. The easiest way to achieve
-# this is to add the Nginx user to the ACME group.
-users.users.nginx.extraGroups = [ "acme" ];
+ # /var/lib/acme/.challenges must be writable by the ACME user
+ # and readable by the Nginx user. The easiest way to achieve
+ # this is to add the Nginx user to the ACME group.
+ users.users.nginx.extraGroups = [ "acme" ];
-services.nginx = {
- enable = true;
- virtualHosts = {
- "acmechallenge.example.com" = {
- # Catchall vhost, will redirect users to HTTPS for all vhosts
- serverAliases = [ "*.example.com" ];
- locations."/.well-known/acme-challenge" = {
- root = "/var/lib/acme/.challenges";
- };
- locations."/" = {
- return = "301 https://$host$request_uri";
+ services.nginx = {
+ enable = true;
+ virtualHosts = {
+ "acmechallenge.example.com" = {
+ # Catchall vhost, will redirect users to HTTPS for all vhosts
+ serverAliases = [ "*.example.com" ];
+ locations."/.well-known/acme-challenge" = {
+ root = "/var/lib/acme/.challenges";
+ };
+ locations."/" = {
+ return = "301 https://$host$request_uri";
+ };
};
};
};
-};
-# Alternative config for Apache
-users.users.wwwrun.extraGroups = [ "acme" ];
-services.httpd = {
- enable = true;
- virtualHosts = {
- "acmechallenge.example.com" = {
- # Catchall vhost, will redirect users to HTTPS for all vhosts
- serverAliases = [ "*.example.com" ];
- # /var/lib/acme/.challenges must be writable by the ACME user and readable by the Apache user.
- # By default, this is the case.
- documentRoot = "/var/lib/acme/.challenges";
- extraConfig = ''
- RewriteEngine On
- RewriteCond %{HTTPS} off
- RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge [NC]
- RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301]
- '';
+ # Alternative config for Apache
+ users.users.wwwrun.extraGroups = [ "acme" ];
+ services.httpd = {
+ enable = true;
+ virtualHosts = {
+ "acmechallenge.example.com" = {
+ # Catchall vhost, will redirect users to HTTPS for all vhosts
+ serverAliases = [ "*.example.com" ];
+ # /var/lib/acme/.challenges must be writable by the ACME user and readable by the Apache user.
+ # By default, this is the case.
+ documentRoot = "/var/lib/acme/.challenges";
+ extraConfig = ''
+ RewriteEngine On
+ RewriteCond %{HTTPS} off
+ RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge [NC]
+ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301]
+ '';
+ };
};
};
-};
+}
```
Now you need to configure ACME to generate a certificate.
```nix
-security.acme.certs."foo.example.com" = {
- webroot = "/var/lib/acme/.challenges";
- email = "foo@example.com";
- # Ensure that the web server you use can read the generated certs
- # Take a look at the group option for the web server you choose.
- group = "nginx";
- # Since we have a wildcard vhost to handle port 80,
- # we can generate certs for anything!
- # Just make sure your DNS resolves them.
- extraDomainNames = [ "mail.example.com" ];
-};
+{
+ security.acme.certs."foo.example.com" = {
+ webroot = "/var/lib/acme/.challenges";
+ email = "foo@example.com";
+ # Ensure that the web server you use can read the generated certs
+ # Take a look at the group option for the web server you choose.
+ group = "nginx";
+ # Since we have a wildcard vhost to handle port 80,
+ # we can generate certs for anything!
+ # Just make sure your DNS resolves them.
+ extraDomainNames = [ "mail.example.com" ];
+ };
+}
```
The private key {file}`key.pem` and certificate
@@ -168,31 +174,33 @@ for provider/server specific configuration values. For the sake of these
docs, we will provide a fully self-hosted example using bind.
```nix
-services.bind = {
- enable = true;
- extraConfig = ''
- include "/var/lib/secrets/dnskeys.conf";
- '';
- zones = [
- rec {
- name = "example.com";
- file = "/var/db/bind/${name}";
- master = true;
- extraConfig = "allow-update { key rfc2136key.example.com.; };";
- }
- ];
-};
+{
+ services.bind = {
+ enable = true;
+ extraConfig = ''
+ include "/var/lib/secrets/dnskeys.conf";
+ '';
+ zones = [
+ rec {
+ name = "example.com";
+ file = "/var/db/bind/${name}";
+ master = true;
+ extraConfig = "allow-update { key rfc2136key.example.com.; };";
+ }
+ ];
+ };
-# Now we can configure ACME
-security.acme.acceptTerms = true;
-security.acme.defaults.email = "admin+acme@example.com";
-security.acme.certs."example.com" = {
- domain = "*.example.com";
- dnsProvider = "rfc2136";
- environmentFile = "/var/lib/secrets/certs.secret";
- # We don't need to wait for propagation since this is a local DNS server
- dnsPropagationCheck = false;
-};
+ # Now we can configure ACME
+ security.acme.acceptTerms = true;
+ security.acme.defaults.email = "admin+acme@example.com";
+ security.acme.certs."example.com" = {
+ domain = "*.example.com";
+ dnsProvider = "rfc2136";
+ environmentFile = "/var/lib/secrets/certs.secret";
+ # We don't need to wait for propagation since this is a local DNS server
+ dnsPropagationCheck = false;
+ };
+}
```
The {file}`dnskeys.conf` and {file}`certs.secret`
@@ -200,36 +208,38 @@ must be kept secure and thus you should not keep their contents in your
Nix config. Instead, generate them one time with a systemd service:
```nix
-systemd.services.dns-rfc2136-conf = {
- requiredBy = ["acme-example.com.service" "bind.service"];
- before = ["acme-example.com.service" "bind.service"];
- unitConfig = {
- ConditionPathExists = "!/var/lib/secrets/dnskeys.conf";
- };
- serviceConfig = {
- Type = "oneshot";
- UMask = 0077;
- };
- path = [ pkgs.bind ];
- script = ''
- mkdir -p /var/lib/secrets
- chmod 755 /var/lib/secrets
- tsig-keygen rfc2136key.example.com > /var/lib/secrets/dnskeys.conf
- chown named:root /var/lib/secrets/dnskeys.conf
- chmod 400 /var/lib/secrets/dnskeys.conf
+{
+ systemd.services.dns-rfc2136-conf = {
+ requiredBy = ["acme-example.com.service" "bind.service"];
+ before = ["acme-example.com.service" "bind.service"];
+ unitConfig = {
+ ConditionPathExists = "!/var/lib/secrets/dnskeys.conf";
+ };
+ serviceConfig = {
+ Type = "oneshot";
+ UMask = 0077;
+ };
+ path = [ pkgs.bind ];
+ script = ''
+ mkdir -p /var/lib/secrets
+ chmod 755 /var/lib/secrets
+ tsig-keygen rfc2136key.example.com > /var/lib/secrets/dnskeys.conf
+ chown named:root /var/lib/secrets/dnskeys.conf
+ chmod 400 /var/lib/secrets/dnskeys.conf
- # extract secret value from the dnskeys.conf
- while read x y; do if [ "$x" = "secret" ]; then secret="''${y:1:''${#y}-3}"; fi; done < /var/lib/secrets/dnskeys.conf
+ # extract secret value from the dnskeys.conf
+ while read x y; do if [ "$x" = "secret" ]; then secret="''${y:1:''${#y}-3}"; fi; done < /var/lib/secrets/dnskeys.conf
- cat > /var/lib/secrets/certs.secret << EOF
- RFC2136_NAMESERVER='127.0.0.1:53'
- RFC2136_TSIG_ALGORITHM='hmac-sha256.'
- RFC2136_TSIG_KEY='rfc2136key.example.com'
- RFC2136_TSIG_SECRET='$secret'
- EOF
- chmod 400 /var/lib/secrets/certs.secret
- '';
-};
+ cat > /var/lib/secrets/certs.secret << EOF
+ RFC2136_NAMESERVER='127.0.0.1:53'
+ RFC2136_TSIG_ALGORITHM='hmac-sha256.'
+ RFC2136_TSIG_KEY='rfc2136key.example.com'
+ RFC2136_TSIG_SECRET='$secret'
+ EOF
+ chmod 400 /var/lib/secrets/certs.secret
+ '';
+ };
+}
```
Now you're all set to generate certs! You should monitor the first invocation
@@ -251,27 +261,29 @@ you will set them as defaults
(e.g. [](#opt-security.acme.defaults.dnsProvider)).
```nix
-# Configure ACME appropriately
-security.acme.acceptTerms = true;
-security.acme.defaults.email = "admin+acme@example.com";
-security.acme.defaults = {
- dnsProvider = "rfc2136";
- environmentFile = "/var/lib/secrets/certs.secret";
- # We don't need to wait for propagation since this is a local DNS server
- dnsPropagationCheck = false;
-};
+{
+ # Configure ACME appropriately
+ security.acme.acceptTerms = true;
+ security.acme.defaults.email = "admin+acme@example.com";
+ security.acme.defaults = {
+ dnsProvider = "rfc2136";
+ environmentFile = "/var/lib/secrets/certs.secret";
+ # We don't need to wait for propagation since this is a local DNS server
+ dnsPropagationCheck = false;
+ };
-# For each virtual host you would like to use DNS-01 validation with,
-# set acmeRoot = null
-services.nginx = {
- enable = true;
- virtualHosts = {
- "foo.example.com" = {
- enableACME = true;
- acmeRoot = null;
+ # For each virtual host you would like to use DNS-01 validation with,
+ # set acmeRoot = null
+ services.nginx = {
+ enable = true;
+ virtualHosts = {
+ "foo.example.com" = {
+ enableACME = true;
+ acmeRoot = null;
+ };
};
};
-};
+}
```
And that's it! Next time your configuration is rebuilt, or when
@@ -288,39 +300,41 @@ Below is an example configuration for OpenSMTPD, but this pattern
can be applied to any service.
```nix
-# Configure ACME however you like (DNS or HTTP validation), adding
-# the following configuration for the relevant certificate.
-# Note: You cannot use `systemctl reload` here as that would mean
-# the LoadCredential configuration below would be skipped and
-# the service would continue to use old certificates.
-security.acme.certs."mail.example.com".postRun = ''
- systemctl restart opensmtpd
-'';
-
-# Now you must augment OpenSMTPD's systemd service to load
-# the certificate files.
-systemd.services.opensmtpd.requires = ["acme-finished-mail.example.com.target"];
-systemd.services.opensmtpd.serviceConfig.LoadCredential = let
- certDir = config.security.acme.certs."mail.example.com".directory;
-in [
- "cert.pem:${certDir}/cert.pem"
- "key.pem:${certDir}/key.pem"
-];
-
-# Finally, configure OpenSMTPD to use these certs.
-services.opensmtpd = let
- credsDir = "/run/credentials/opensmtpd.service";
-in {
- enable = true;
- setSendmail = false;
- serverConfiguration = ''
- pki mail.example.com cert "${credsDir}/cert.pem"
- pki mail.example.com key "${credsDir}/key.pem"
- listen on localhost tls pki mail.example.com
- action act1 relay host smtp://127.0.0.1:10027
- match for local action act1
+{
+ # Configure ACME however you like (DNS or HTTP validation), adding
+ # the following configuration for the relevant certificate.
+ # Note: You cannot use `systemctl reload` here as that would mean
+ # the LoadCredential configuration below would be skipped and
+ # the service would continue to use old certificates.
+ security.acme.certs."mail.example.com".postRun = ''
+ systemctl restart opensmtpd
'';
-};
+
+ # Now you must augment OpenSMTPD's systemd service to load
+ # the certificate files.
+ systemd.services.opensmtpd.requires = ["acme-finished-mail.example.com.target"];
+ systemd.services.opensmtpd.serviceConfig.LoadCredential = let
+ certDir = config.security.acme.certs."mail.example.com".directory;
+ in [
+ "cert.pem:${certDir}/cert.pem"
+ "key.pem:${certDir}/key.pem"
+ ];
+
+ # Finally, configure OpenSMTPD to use these certs.
+ services.opensmtpd = let
+ credsDir = "/run/credentials/opensmtpd.service";
+ in {
+ enable = true;
+ setSendmail = false;
+ serverConfiguration = ''
+ pki mail.example.com cert "${credsDir}/cert.pem"
+ pki mail.example.com key "${credsDir}/key.pem"
+ listen on localhost tls pki mail.example.com
+ action act1 relay host smtp://127.0.0.1:10027
+ match for local action act1
+ '';
+ };
+}
```
## Regenerating certificates {#module-security-acme-regenerate}
diff --git a/third_party/nixpkgs/nixos/modules/security/acme/default.nix b/third_party/nixpkgs/nixos/modules/security/acme/default.nix
index 19297d2678..5ffafdc37f 100644
--- a/third_party/nixpkgs/nixos/modules/security/acme/default.nix
+++ b/third_party/nixpkgs/nixos/modules/security/acme/default.nix
@@ -515,19 +515,19 @@ let
validMinDays = mkOption {
type = types.int;
inherit (defaultAndText "validMinDays" 30) default defaultText;
- description = lib.mdDoc "Minimum remaining validity before renewal in days.";
+ description = "Minimum remaining validity before renewal in days.";
};
renewInterval = mkOption {
type = types.str;
inherit (defaultAndText "renewInterval" "daily") default defaultText;
- description = lib.mdDoc ''
+ description = ''
Systemd calendar expression when to check for renewal. See
{manpage}`systemd.time(7)`.
'';
};
- enableDebugLogs = mkEnableOption (lib.mdDoc "debug logging for this certificate") // {
+ enableDebugLogs = mkEnableOption "debug logging for this certificate" // {
inherit (defaultAndText "enableDebugLogs" true) default defaultText;
};
@@ -535,7 +535,7 @@ let
type = types.nullOr types.str;
inherit (defaultAndText "webroot" null) default defaultText;
example = "/var/lib/acme/acme-challenge";
- description = lib.mdDoc ''
+ description = ''
Where the webroot of the HTTP vhost is located.
{file}`.well-known/acme-challenge/` directory
will be created below the webroot if it doesn't exist.
@@ -548,7 +548,7 @@ let
type = types.str;
inherit (defaultAndText "server" "https://acme-v02.api.letsencrypt.org/directory") default defaultText;
example = "https://acme-staging-v02.api.letsencrypt.org/directory";
- description = lib.mdDoc ''
+ description = ''
ACME Directory Resource URI.
Defaults to Let's Encrypt's production endpoint.
For testing Let's Encrypt's [staging endpoint](https://letsencrypt.org/docs/staging-environment/)
@@ -559,7 +559,7 @@ let
email = mkOption {
type = types.nullOr types.str;
inherit (defaultAndText "email" null) default defaultText;
- description = lib.mdDoc ''
+ description = ''
Email address for account creation and correspondence from the CA.
It is recommended to use the same email for all certs to avoid account
creation limits.
@@ -569,13 +569,13 @@ let
group = mkOption {
type = types.str;
inherit (defaultAndText "group" "acme") default defaultText;
- description = lib.mdDoc "Group running the ACME client.";
+ description = "Group running the ACME client.";
};
reloadServices = mkOption {
type = types.listOf types.str;
inherit (defaultAndText "reloadServices" []) default defaultText;
- description = lib.mdDoc ''
+ description = ''
The list of systemd services to call `systemctl try-reload-or-restart`
on.
'';
@@ -585,7 +585,7 @@ let
type = types.lines;
inherit (defaultAndText "postRun" "") default defaultText;
example = "cp full.pem backup.pem";
- description = lib.mdDoc ''
+ description = ''
Commands to run after new certificates go live. Note that
these commands run as the root user.
@@ -596,7 +596,7 @@ let
keyType = mkOption {
type = types.str;
inherit (defaultAndText "keyType" "ec256") default defaultText;
- description = lib.mdDoc ''
+ description = ''
Key type to use for private keys.
For an up to date list of supported values check the --key-type option
at .
@@ -607,7 +607,7 @@ let
type = types.nullOr types.str;
inherit (defaultAndText "dnsProvider" null) default defaultText;
example = "route53";
- description = lib.mdDoc ''
+ description = ''
DNS Challenge provider. For a list of supported providers, see the "code"
field of the DNS providers listed at .
'';
@@ -617,7 +617,7 @@ let
type = types.nullOr types.str;
inherit (defaultAndText "dnsResolver" null) default defaultText;
example = "1.1.1.1:53";
- description = lib.mdDoc ''
+ description = ''
Set the resolver to use for performing recursive DNS queries. Supported:
host:port. The default is to use the system resolvers, or Google's DNS
resolvers if the system's cannot be determined.
@@ -627,7 +627,7 @@ let
environmentFile = mkOption {
type = types.nullOr types.path;
inherit (defaultAndText "environmentFile" null) default defaultText;
- description = lib.mdDoc ''
+ description = ''
Path to an EnvironmentFile for the cert's service containing any required and
optional environment variables for your selected dnsProvider.
To find out what values you need to set, consult the documentation at
@@ -639,7 +639,7 @@ let
credentialFiles = mkOption {
type = types.attrsOf (types.path);
inherit (defaultAndText "credentialFiles" {}) default defaultText;
- description = lib.mdDoc ''
+ description = ''
Environment variables suffixed by "_FILE" to set for the cert's service
for your selected dnsProvider.
To find out what values you need to set, consult the documentation at
@@ -657,7 +657,7 @@ let
dnsPropagationCheck = mkOption {
type = types.bool;
inherit (defaultAndText "dnsPropagationCheck" true) default defaultText;
- description = lib.mdDoc ''
+ description = ''
Toggles lego DNS propagation check, which is used alongside DNS-01
challenge to ensure the DNS entries required are available.
'';
@@ -666,7 +666,7 @@ let
ocspMustStaple = mkOption {
type = types.bool;
inherit (defaultAndText "ocspMustStaple" false) default defaultText;
- description = lib.mdDoc ''
+ description = ''
Turns on the OCSP Must-Staple TLS extension.
Make sure you know what you're doing! See:
@@ -678,7 +678,7 @@ let
extraLegoFlags = mkOption {
type = types.listOf types.str;
inherit (defaultAndText "extraLegoFlags" []) default defaultText;
- description = lib.mdDoc ''
+ description = ''
Additional global flags to pass to all lego commands.
'';
};
@@ -686,7 +686,7 @@ let
extraLegoRenewFlags = mkOption {
type = types.listOf types.str;
inherit (defaultAndText "extraLegoRenewFlags" []) default defaultText;
- description = lib.mdDoc ''
+ description = ''
Additional flags to pass to lego renew.
'';
};
@@ -694,7 +694,7 @@ let
extraLegoRunFlags = mkOption {
type = types.listOf types.str;
inherit (defaultAndText "extraLegoRunFlags" []) default defaultText;
- description = lib.mdDoc ''
+ description = ''
Additional flags to pass to lego run.
'';
};
@@ -725,13 +725,13 @@ let
type = types.str;
readOnly = true;
default = "/var/lib/acme/${name}";
- description = lib.mdDoc "Directory where certificate and other state is stored.";
+ description = "Directory where certificate and other state is stored.";
};
domain = mkOption {
type = types.str;
default = name;
- description = lib.mdDoc "Domain to fetch certificate for (defaults to the entry name).";
+ description = "Domain to fetch certificate for (defaults to the entry name).";
};
extraDomainNames = mkOption {
@@ -743,7 +743,7 @@ let
"mydomain.org"
]
'';
- description = lib.mdDoc ''
+ description = ''
A list of extra domain names, which are included in the one certificate to be issued.
'';
};
@@ -755,7 +755,7 @@ let
type = types.nullOr types.str;
default = null;
example = ":1360";
- description = lib.mdDoc ''
+ description = ''
Interface and port to listen on to solve HTTP challenges
in the form [INTERFACE]:PORT.
If you use a port other than 80, you must proxy port 80 to this port.
@@ -766,7 +766,7 @@ let
type = types.nullOr types.str;
default = null;
example = "acme";
- description = lib.mdDoc ''
+ description = ''
S3 bucket name to use for HTTP-01 based challenges. Challenges will be written to the S3 bucket.
'';
};
@@ -774,7 +774,7 @@ let
inheritDefaults = mkOption {
default = true;
example = true;
- description = lib.mdDoc "Whether to inherit values set in `security.acme.defaults` or not.";
+ description = "Whether to inherit values set in `security.acme.defaults` or not.";
type = lib.types.bool;
};
};
@@ -787,7 +787,7 @@ in {
preliminarySelfsigned = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether a preliminary self-signed certificate should be generated before
doing ACME requests. This can be useful when certificates are required in
a webserver, but ACME needs the webserver to make its requests.
@@ -800,7 +800,7 @@ in {
acceptTerms = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Accept the CA's terms of service. The default provider is Let's Encrypt,
you can find their ToS at .
'';
@@ -809,7 +809,7 @@ in {
useRoot = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to use the root user when generating certs. This is not recommended
for security + compatibility reasons. If a service requires root owned certificates
consider following the guide on "Using ACME with services demanding root
@@ -820,7 +820,7 @@ in {
defaults = mkOption {
type = types.submodule (inheritableModule true);
- description = lib.mdDoc ''
+ description = ''
Default values inheritable by all configured certs. You can
use this to define options shared by all your certs. These defaults
can also be ignored on a per-cert basis using the
@@ -831,7 +831,7 @@ in {
certs = mkOption {
default = { };
type = with types; attrsOf (submodule [ (inheritableModule false) certOpts ]);
- description = lib.mdDoc ''
+ description = ''
Attribute set of certificates to get signed and renewed. Creates
`acme-''${cert}.{service,timer}` systemd units for
each certificate defined here. Other services can add dependencies
@@ -855,7 +855,7 @@ in {
maxConcurrentRenewals = mkOption {
default = 5;
type = types.int;
- description = lib.mdDoc ''
+ description = ''
Maximum number of concurrent certificate generation or renewal jobs. All other
jobs will queue and wait running jobs to finish. Reduces the system load of
certificate generation.
diff --git a/third_party/nixpkgs/nixos/modules/security/apparmor.nix b/third_party/nixpkgs/nixos/modules/security/apparmor.nix
index ea1af6c6e2..a4b3807e4e 100644
--- a/third_party/nixpkgs/nixos/modules/security/apparmor.nix
+++ b/third_party/nixpkgs/nixos/modules/security/apparmor.nix
@@ -7,7 +7,7 @@ let
inherit (lib) types;
inherit (config.environment) etc;
cfg = config.security.apparmor;
- mkDisableOption = name: mkEnableOption (lib.mdDoc name) // {
+ mkDisableOption = name: mkEnableOption name // {
default = true;
example = false;
};
@@ -24,7 +24,7 @@ in
options = {
security.apparmor = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
the AppArmor Mandatory Access Control system.
If you're enabling this module on a running system,
@@ -40,9 +40,9 @@ in
Enable [](#opt-security.apparmor.killUnconfinedConfinables)
if you want this service to do such killing
- by sending a `SIGTERM` to those running processes'');
+ by sending a `SIGTERM` to those running processes'';
policies = mkOption {
- description = lib.mdDoc ''
+ description = ''
AppArmor policies.
'';
type = types.attrsOf (types.submodule ({ name, config, ... }: {
@@ -50,7 +50,7 @@ in
enable = mkDisableOption "loading of the profile into the kernel";
enforce = mkDisableOption "enforcing of the policy or only complain in the logs";
profile = mkOption {
- description = lib.mdDoc "The policy of the profile.";
+ description = "The policy of the profile.";
type = types.lines;
apply = pkgs.writeText name;
};
@@ -61,7 +61,7 @@ in
includes = mkOption {
type = types.attrsOf types.lines;
default = {};
- description = lib.mdDoc ''
+ description = ''
List of paths to be added to AppArmor's searched paths
when resolving `include` directives.
'';
@@ -70,16 +70,16 @@ in
packages = mkOption {
type = types.listOf types.package;
default = [];
- description = lib.mdDoc "List of packages to be added to AppArmor's include path";
+ description = "List of packages to be added to AppArmor's include path";
};
- enableCache = mkEnableOption (lib.mdDoc ''
+ enableCache = mkEnableOption ''
caching of AppArmor policies
in `/var/cache/apparmor/`.
Beware that AppArmor policies almost always contain Nix store paths,
and thus produce at each change of these paths
- a new cached version accumulating in the cache'');
- killUnconfinedConfinables = mkEnableOption (lib.mdDoc ''
+ a new cached version accumulating in the cache'';
+ killUnconfinedConfinables = mkEnableOption ''
killing of processes which have an AppArmor profile enabled
(in [](#opt-security.apparmor.policies))
but are not confined (because AppArmor can only confine new processes).
@@ -88,7 +88,7 @@ in
not a `SIGKILL`.
Beware that due to a current limitation of AppArmor,
- only profiles with exact paths (and no name) can enable such kills'');
+ only profiles with exact paths (and no name) can enable such kills'';
};
};
diff --git a/third_party/nixpkgs/nixos/modules/security/audit.nix b/third_party/nixpkgs/nixos/modules/security/audit.nix
index afc7dd1303..403aeff020 100644
--- a/third_party/nixpkgs/nixos/modules/security/audit.nix
+++ b/third_party/nixpkgs/nixos/modules/security/audit.nix
@@ -56,7 +56,7 @@ in {
enable = mkOption {
type = types.enum [ false true "lock" ];
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the Linux audit system. The special `lock` value can be used to
enable auditing and prevent disabling it until a restart. Be careful about locking
this, as it will prevent you from changing your audit configuration until you
@@ -67,13 +67,13 @@ in {
failureMode = mkOption {
type = types.enum [ "silent" "printk" "panic" ];
default = "printk";
- description = lib.mdDoc "How to handle critical errors in the auditing system";
+ description = "How to handle critical errors in the auditing system";
};
backlogLimit = mkOption {
type = types.int;
default = 64; # Apparently the kernel default
- description = lib.mdDoc ''
+ description = ''
The maximum number of outstanding audit buffers allowed; exceeding this is
considered a failure and handled in a manner specified by failureMode.
'';
@@ -82,7 +82,7 @@ in {
rateLimit = mkOption {
type = types.int;
default = 0;
- description = lib.mdDoc ''
+ description = ''
The maximum messages per second permitted before triggering a failure as
specified by failureMode. Setting it to zero disables the limit.
'';
@@ -92,7 +92,7 @@ in {
type = types.listOf types.str; # (types.either types.str (types.submodule rule));
default = [];
example = [ "-a exit,always -F arch=b64 -S execve" ];
- description = lib.mdDoc ''
+ description = ''
The ordered audit rules, with each string appearing as one line of the audit.rules file.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/security/auditd.nix b/third_party/nixpkgs/nixos/modules/security/auditd.nix
index 253ee1d4dd..cd377c66f8 100644
--- a/third_party/nixpkgs/nixos/modules/security/auditd.nix
+++ b/third_party/nixpkgs/nixos/modules/security/auditd.nix
@@ -3,7 +3,7 @@
with lib;
{
- options.security.auditd.enable = mkEnableOption (lib.mdDoc "the Linux Audit daemon");
+ options.security.auditd.enable = mkEnableOption "the Linux Audit daemon";
config = mkIf config.security.auditd.enable {
boot.kernelParams = [ "audit=1" ];
diff --git a/third_party/nixpkgs/nixos/modules/security/ca.nix b/third_party/nixpkgs/nixos/modules/security/ca.nix
index ae188ea709..af5d91b35f 100644
--- a/third_party/nixpkgs/nixos/modules/security/ca.nix
+++ b/third_party/nixpkgs/nixos/modules/security/ca.nix
@@ -19,7 +19,7 @@ in
{
options = {
- security.pki.installCACerts = mkEnableOption "Add CA certificates to system" // {
+ security.pki.installCACerts = mkEnableOption "installing CA certificates to the system" // {
default = true;
internal = true;
};
@@ -39,7 +39,7 @@ in
type = types.listOf types.path;
default = [];
example = literalExpression ''[ "''${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" ]'';
- description = lib.mdDoc ''
+ description = ''
A list of files containing trusted root certificates in PEM
format. These are concatenated to form
{file}`/etc/ssl/certs/ca-certificates.crt`, which is
@@ -63,7 +63,7 @@ in
'''
]
'';
- description = lib.mdDoc ''
+ description = ''
A list of trusted root certificates in PEM format.
'';
};
@@ -76,7 +76,7 @@ in
"CA WoSign ECC Root"
"Certification Authority of WoSign G2"
];
- description = lib.mdDoc ''
+ description = ''
A list of blacklisted CA certificate names that won't be imported from
the Mozilla Trust Store into
{file}`/etc/ssl/certs/ca-certificates.crt`. Use the
diff --git a/third_party/nixpkgs/nixos/modules/security/chromium-suid-sandbox.nix b/third_party/nixpkgs/nixos/modules/security/chromium-suid-sandbox.nix
index cab4b9f8d3..bb99c053f7 100644
--- a/third_party/nixpkgs/nixos/modules/security/chromium-suid-sandbox.nix
+++ b/third_party/nixpkgs/nixos/modules/security/chromium-suid-sandbox.nix
@@ -14,7 +14,7 @@ in
options.security.chromiumSuidSandbox.enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to install the Chromium SUID sandbox which is an executable that
Chromium may use in order to achieve sandboxing.
diff --git a/third_party/nixpkgs/nixos/modules/security/dhparams.nix b/third_party/nixpkgs/nixos/modules/security/dhparams.nix
index 9fed7e012b..738062c95c 100644
--- a/third_party/nixpkgs/nixos/modules/security/dhparams.nix
+++ b/third_party/nixpkgs/nixos/modules/security/dhparams.nix
@@ -15,7 +15,7 @@ let
type = bitType;
default = cfg.defaultBitSize;
defaultText = literalExpression "config.${opt.defaultBitSize}";
- description = lib.mdDoc ''
+ description = ''
The bit size for the prime that is used during a Diffie-Hellman
key exchange.
'';
@@ -24,7 +24,7 @@ let
options.path = mkOption {
type = types.path;
readOnly = true;
- description = lib.mdDoc ''
+ description = ''
The resulting path of the generated Diffie-Hellman parameters
file for other services to reference. This could be either a
store path or a file inside the directory specified by
@@ -45,7 +45,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to generate new DH params and clean up old DH params.
'';
};
@@ -56,7 +56,7 @@ in {
in attrsOf (coercedTo int coerce (submodule paramsSubmodule));
default = {};
example = lib.literalExpression "{ nginx.bits = 3072; }";
- description = lib.mdDoc ''
+ description = ''
Diffie-Hellman parameters to generate.
The value is the size (in bits) of the DH params to generate. The
@@ -91,7 +91,7 @@ in {
stateful = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether generation of Diffie-Hellman parameters should be stateful or
not. If this is enabled, PEM-encoded files for Diffie-Hellman
parameters are placed in the directory specified by
@@ -109,7 +109,7 @@ in {
defaultBitSize = mkOption {
type = bitType;
default = 2048;
- description = lib.mdDoc ''
+ description = ''
This allows to override the default bit size for all of the
Diffie-Hellman parameters set in
{option}`security.dhparams.params`.
@@ -119,7 +119,7 @@ in {
path = mkOption {
type = types.str;
default = "/var/lib/dhparams";
- description = lib.mdDoc ''
+ description = ''
Path to the directory in which Diffie-Hellman parameters will be
stored. This only is relevant if
{option}`security.dhparams.stateful` is
diff --git a/third_party/nixpkgs/nixos/modules/security/doas.nix b/third_party/nixpkgs/nixos/modules/security/doas.nix
index 115ca33efb..457a48a987 100644
--- a/third_party/nixpkgs/nixos/modules/security/doas.nix
+++ b/third_party/nixpkgs/nixos/modules/security/doas.nix
@@ -53,7 +53,7 @@ in
enable = mkOption {
type = with types; bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the {command}`doas` command, which allows
non-root users to execute commands as root.
'';
@@ -62,7 +62,7 @@ in
wheelNeedsPassword = mkOption {
type = with types; bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether users of the `wheel` group must provide a password to
run commands as super user via {command}`doas`.
'';
@@ -70,7 +70,7 @@ in
extraRules = mkOption {
default = [];
- description = lib.mdDoc ''
+ description = ''
Define specific rules to be set in the
{file}`/etc/doas.conf` file. More specific rules should
come after more general ones in order to yield the expected behavior.
@@ -115,7 +115,7 @@ in
noPass = mkOption {
type = with types; bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If `true`, the user is not required to enter a
password.
'';
@@ -124,7 +124,7 @@ in
noLog = mkOption {
type = with types; bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If `true`, successful executions will not be logged
to
{manpage}`syslogd(8)`.
@@ -134,7 +134,7 @@ in
persist = mkOption {
type = with types; bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If `true`, do not ask for a password again for some
time after the user successfully authenticates.
'';
@@ -143,7 +143,7 @@ in
keepEnv = mkOption {
type = with types; bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If `true`, environment variables other than those
listed in
{manpage}`doas(1)`
@@ -154,7 +154,7 @@ in
setEnv = mkOption {
type = with types; listOf str;
default = [];
- description = lib.mdDoc ''
+ description = ''
Keep or set the specified variables. Variables may also be
removed with a leading '-' or set using
`variable=value`. If the first character of
@@ -173,19 +173,19 @@ in
users = mkOption {
type = with types; listOf (either str int);
default = [];
- description = lib.mdDoc "The usernames / UIDs this rule should apply for.";
+ description = "The usernames / UIDs this rule should apply for.";
};
groups = mkOption {
type = with types; listOf (either str int);
default = [];
- description = lib.mdDoc "The groups / GIDs this rule should apply for.";
+ description = "The groups / GIDs this rule should apply for.";
};
runAs = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Which user or group the specified command is allowed to run as.
When set to `null` (the default), all users are
allowed.
@@ -199,7 +199,7 @@ in
cmd = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The command the user is allowed to run. When set to
`null` (the default), all commands are allowed.
@@ -212,7 +212,7 @@ in
args = mkOption {
type = with types; nullOr (listOf str);
default = null;
- description = lib.mdDoc ''
+ description = ''
Arguments that must be provided to the command. When set to
`[]`, the command must be run without any arguments.
'';
@@ -225,7 +225,7 @@ in
extraConfig = mkOption {
type = with types; lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra configuration text appended to {file}`doas.conf`. Be aware that
this option cannot be used to override the behaviour allowing
passwordless operation for root.
diff --git a/third_party/nixpkgs/nixos/modules/security/duosec.nix b/third_party/nixpkgs/nixos/modules/security/duosec.nix
index ef76bfeb6d..e755b5f0ee 100644
--- a/third_party/nixpkgs/nixos/modules/security/duosec.nix
+++ b/third_party/nixpkgs/nixos/modules/security/duosec.nix
@@ -36,24 +36,24 @@ in
ssh.enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "If enabled, protect SSH logins with Duo Security.";
+ description = "If enabled, protect SSH logins with Duo Security.";
};
pam.enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "If enabled, protect logins with Duo Security using PAM support.";
+ description = "If enabled, protect logins with Duo Security using PAM support.";
};
integrationKey = mkOption {
type = types.str;
- description = lib.mdDoc "Integration key.";
+ description = "Integration key.";
};
secretKeyFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
A file containing your secret key. The security of your Duo application is tied to the security of your secret key.
'';
example = "/run/keys/duo-skey";
@@ -61,14 +61,14 @@ in
host = mkOption {
type = types.str;
- description = lib.mdDoc "Duo API hostname.";
+ description = "Duo API hostname.";
};
groups = mkOption {
type = types.str;
default = "";
example = "users,!wheel,!*admin guests";
- description = lib.mdDoc ''
+ description = ''
If specified, Duo authentication is required only for users
whose primary group or supplementary group list matches one
of the space-separated pattern lists. Refer to
@@ -79,7 +79,7 @@ in
failmode = mkOption {
type = types.enum [ "safe" "secure" ];
default = "safe";
- description = lib.mdDoc ''
+ description = ''
On service or configuration errors that prevent Duo
authentication, fail "safe" (allow access) or "secure" (deny
access). The default is "safe".
@@ -89,7 +89,7 @@ in
pushinfo = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Include information such as the command to be executed in
the Duo Push message.
'';
@@ -98,7 +98,7 @@ in
autopush = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If `true`, Duo Unix will automatically send
a push login request to the user’s phone, falling back on a
phone call if push is unavailable. If
@@ -112,7 +112,7 @@ in
motd = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Print the contents of `/etc/motd` to screen
after a successful login.
'';
@@ -121,7 +121,7 @@ in
prompts = mkOption {
type = types.enum [ 1 2 3 ];
default = 3;
- description = lib.mdDoc ''
+ description = ''
If a user fails to authenticate with a second factor, Duo
Unix will prompt the user to authenticate again. This option
sets the maximum number of prompts that Duo Unix will
@@ -142,7 +142,7 @@ in
acceptEnvFactor = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Look for factor selection or passcode in the
`$DUO_PASSCODE` environment variable before
prompting the user for input.
@@ -157,7 +157,7 @@ in
fallbackLocalIP = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Duo Unix reports the IP address of the authorizing user, for
the purposes of authorization and whitelisting. If Duo Unix
cannot detect the IP address of the client, setting
@@ -173,7 +173,7 @@ in
allowTcpForwarding = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
By default, when SSH forwarding, enabling Duo Security will
disable TCP forwarding. By enabling this, you potentially
undermine some of the SSH based login security. Note this is
@@ -200,7 +200,8 @@ in
unitConfig.DefaultDependencies = false;
script = ''
if test -f "${cfg.secretKeyFile}"; then
- mkdir -m 0755 -p /etc/duo
+ mkdir -p /etc/duo
+ chmod 0755 /etc/duo
umask 0077
conf="$(mktemp)"
@@ -222,7 +223,8 @@ in
unitConfig.DefaultDependencies = false;
script = ''
if test -f "${cfg.secretKeyFile}"; then
- mkdir -m 0755 -p /etc/duo
+ mkdir -p /etc/duo
+ chmod 0755 /etc/duo
umask 0077
conf="$(mktemp)"
diff --git a/third_party/nixpkgs/nixos/modules/security/google_oslogin.nix b/third_party/nixpkgs/nixos/modules/security/google_oslogin.nix
index 95975943ff..227e3b5bc4 100644
--- a/third_party/nixpkgs/nixos/modules/security/google_oslogin.nix
+++ b/third_party/nixpkgs/nixos/modules/security/google_oslogin.nix
@@ -16,7 +16,7 @@ in
security.googleOsLogin.enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Google OS Login.
The OS Login package enables the following components:
diff --git a/third_party/nixpkgs/nixos/modules/security/ipa.nix b/third_party/nixpkgs/nixos/modules/security/ipa.nix
index 3bf8b11f86..543b1abfa6 100644
--- a/third_party/nixpkgs/nixos/modules/security/ipa.nix
+++ b/third_party/nixpkgs/nixos/modules/security/ipa.nix
@@ -31,11 +31,11 @@ with lib; let
in {
options = {
security.ipa = {
- enable = mkEnableOption (lib.mdDoc "FreeIPA domain integration");
+ enable = mkEnableOption "FreeIPA domain integration";
certificate = mkOption {
type = types.package;
- description = lib.mdDoc ''
+ description = ''
IPA server CA certificate.
Use `nix-prefetch-url http://$server/ipa/config/ca.crt` to
@@ -52,64 +52,64 @@ in {
domain = mkOption {
type = types.str;
example = "example.com";
- description = lib.mdDoc "Domain of the IPA server.";
+ description = "Domain of the IPA server.";
};
realm = mkOption {
type = types.str;
example = "EXAMPLE.COM";
- description = lib.mdDoc "Kerberos realm.";
+ description = "Kerberos realm.";
};
server = mkOption {
type = types.str;
example = "ipa.example.com";
- description = lib.mdDoc "IPA Server hostname.";
+ description = "IPA Server hostname.";
};
basedn = mkOption {
type = types.str;
example = "dc=example,dc=com";
- description = lib.mdDoc "Base DN to use when performing LDAP operations.";
+ description = "Base DN to use when performing LDAP operations.";
};
offlinePasswords = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to store offline passwords when the server is down.";
+ description = "Whether to store offline passwords when the server is down.";
};
cacheCredentials = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to cache credentials.";
+ description = "Whether to cache credentials.";
};
ifpAllowedUids = mkOption {
type = types.listOf types.str;
default = ["root"];
- description = lib.mdDoc "A list of users allowed to access the ifp dbus interface.";
+ description = "A list of users allowed to access the ifp dbus interface.";
};
dyndns = {
enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to enable FreeIPA automatic hostname updates.";
+ description = "Whether to enable FreeIPA automatic hostname updates.";
};
interface = mkOption {
type = types.str;
example = "eth0";
default = "*";
- description = lib.mdDoc "Network interface to perform hostname updates through.";
+ description = "Network interface to perform hostname updates through.";
};
};
chromiumSupport = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to whitelist the FreeIPA domain in Chromium.";
+ description = "Whether to whitelist the FreeIPA domain in Chromium.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/security/krb5/default.nix b/third_party/nixpkgs/nixos/modules/security/krb5/default.nix
index 5921982f95..78426c07cb 100644
--- a/third_party/nixpkgs/nixos/modules/security/krb5/default.nix
+++ b/third_party/nixpkgs/nixos/modules/security/krb5/default.nix
@@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
let
- inherit (lib) mdDoc mkIf mkOption mkPackageOption mkRemovedOptionModule;
+ inherit (lib) mkIf mkOption mkPackageOption mkRemovedOptionModule;
inherit (lib.types) bool;
mkRemovedOptionModule' = name: reason: mkRemovedOptionModule ["krb5" name] reason;
@@ -30,7 +30,7 @@ in {
security.krb5 = {
enable = mkOption {
default = false;
- description = mdDoc "Enable and configure Kerberos utilities";
+ description = "Enable and configure Kerberos utilities";
type = bool;
};
@@ -41,7 +41,7 @@ in {
settings = mkOption {
default = { };
type = format.type;
- description = mdDoc ''
+ description = ''
Structured contents of the {file}`krb5.conf` file. See
{manpage}`krb5.conf(5)` for details about configuration.
'';
diff --git a/third_party/nixpkgs/nixos/modules/security/krb5/krb5-conf-format.nix b/third_party/nixpkgs/nixos/modules/security/krb5/krb5-conf-format.nix
index d01e47a40b..5a6bbed9fd 100644
--- a/third_party/nixpkgs/nixos/modules/security/krb5/krb5-conf-format.nix
+++ b/third_party/nixpkgs/nixos/modules/security/krb5/krb5-conf-format.nix
@@ -6,7 +6,7 @@
let
inherit (lib) boolToString concatMapStringsSep concatStringsSep filter
- isAttrs isBool isList mapAttrsToList mdDoc mkOption singleton splitString;
+ isAttrs isBool isList mapAttrsToList mkOption singleton splitString;
inherit (lib.types) attrsOf bool coercedTo either int listOf oneOf path
str submodule;
in
@@ -21,21 +21,21 @@ in
options = {
include = mkOption {
default = [ ];
- description = mdDoc ''
+ description = ''
Files to include in the Kerberos configuration.
'';
type = coercedTo path singleton (listOf path);
};
includedir = mkOption {
default = [ ];
- description = mdDoc ''
+ description = ''
Directories containing files to include in the Kerberos configuration.
'';
type = coercedTo path singleton (listOf path);
};
module = mkOption {
default = [ ];
- description = mdDoc ''
+ description = ''
Modules to obtain Kerberos configuration from.
'';
type = coercedTo path singleton (listOf path);
diff --git a/third_party/nixpkgs/nixos/modules/security/lock-kernel-modules.nix b/third_party/nixpkgs/nixos/modules/security/lock-kernel-modules.nix
index 461b9ffe7e..3a1ad4d8b3 100644
--- a/third_party/nixpkgs/nixos/modules/security/lock-kernel-modules.nix
+++ b/third_party/nixpkgs/nixos/modules/security/lock-kernel-modules.nix
@@ -11,7 +11,7 @@ with lib;
security.lockKernelModules = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Disable kernel module loading once the system is fully initialised.
Module loading is disabled until the next reboot. Problems caused
by delayed module loading can be fixed by adding the module(s) in
diff --git a/third_party/nixpkgs/nixos/modules/security/misc.nix b/third_party/nixpkgs/nixos/modules/security/misc.nix
index cd48eade77..5e13b4cadd 100644
--- a/third_party/nixpkgs/nixos/modules/security/misc.nix
+++ b/third_party/nixpkgs/nixos/modules/security/misc.nix
@@ -15,7 +15,7 @@ with lib;
security.allowUserNamespaces = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to allow creation of user namespaces.
The motivation for disabling user namespaces is the potential
@@ -34,7 +34,7 @@ with lib;
security.unprivilegedUsernsClone = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
When disabled, unprivileged users will not be able to create new namespaces.
By default unprivileged user namespaces are disabled.
This option only works in a hardened profile.
@@ -44,7 +44,7 @@ with lib;
security.protectKernelImage = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to prevent replacing the running kernel image.
'';
};
@@ -52,7 +52,7 @@ with lib;
security.allowSimultaneousMultithreading = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to allow SMT/hyperthreading. Disabling SMT means that only
physical CPU cores will be usable at runtime, potentially at
significant performance cost.
@@ -71,7 +71,7 @@ with lib;
security.forcePageTableIsolation = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to force-enable the Page Table Isolation (PTI) Linux kernel
feature even on CPU models that claim to be safe from Meltdown.
@@ -83,7 +83,7 @@ with lib;
security.virtualisation.flushL1DataCache = mkOption {
type = types.nullOr (types.enum [ "never" "cond" "always" ]);
default = null;
- description = lib.mdDoc ''
+ description = ''
Whether the hypervisor should flush the L1 data cache before
entering guests.
See also [](#opt-security.allowSimultaneousMultithreading).
diff --git a/third_party/nixpkgs/nixos/modules/security/oath.nix b/third_party/nixpkgs/nixos/modules/security/oath.nix
index 3342866538..93bdc85111 100644
--- a/third_party/nixpkgs/nixos/modules/security/oath.nix
+++ b/third_party/nixpkgs/nixos/modules/security/oath.nix
@@ -11,7 +11,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable the OATH (one-time password) PAM module.
'';
};
@@ -19,7 +19,7 @@ with lib;
digits = mkOption {
type = types.enum [ 6 7 8 ];
default = 6;
- description = lib.mdDoc ''
+ description = ''
Specify the length of the one-time password in number of
digits.
'';
@@ -28,7 +28,7 @@ with lib;
window = mkOption {
type = types.int;
default = 5;
- description = lib.mdDoc ''
+ description = ''
Specify the number of one-time passwords to check in order
to accommodate for situations where the system and the
client are slightly out of sync (iteration for HOTP or time
@@ -39,7 +39,7 @@ with lib;
usersFile = mkOption {
type = types.path;
default = "/etc/users.oath";
- description = lib.mdDoc ''
+ description = ''
Set the path to file where the user's credentials are
stored. This file must not be world readable!
'';
diff --git a/third_party/nixpkgs/nixos/modules/security/pam.nix b/third_party/nixpkgs/nixos/modules/security/pam.nix
index b87e22b239..a9bd28b154 100644
--- a/third_party/nixpkgs/nixos/modules/security/pam.nix
+++ b/third_party/nixpkgs/nixos/modules/security/pam.nix
@@ -9,7 +9,7 @@ let
mkRulesTypeOption = type: mkOption {
# These options are experimental and subject to breaking changes without notice.
- description = lib.mdDoc ''
+ description = ''
PAM `${type}` rules for this service.
Attribute keys are the name of each rule.
@@ -18,7 +18,7 @@ let
options = {
name = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Name of this rule.
'';
internal = true;
@@ -27,13 +27,13 @@ let
enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether this rule is added to the PAM service config file.
'';
};
order = mkOption {
type = types.int;
- description = lib.mdDoc ''
+ description = ''
Order of this rule in the service file. Rules are arranged in ascending order of this value.
::: {.warning}
@@ -50,19 +50,19 @@ let
};
control = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Indicates the behavior of the PAM-API should the module fail to succeed in its authentication task. See `control` in {manpage}`pam.conf(5)` for details.
'';
};
modulePath = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Either the full filename of the PAM to be used by the application (it begins with a '/'), or a relative pathname from the default module location. See `module-path` in {manpage}`pam.conf(5)` for details.
'';
};
args = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
Tokens that can be used to modify the specific behavior of the given PAM. Such arguments will be documented for each individual module. See `module-arguments` in {manpage}`pam.conf(5)` for details.
Escaping rules for spaces and square brackets are automatically applied.
@@ -73,7 +73,7 @@ let
settings = mkOption {
type = with types; attrsOf (nullOr (oneOf [ bool str int pathInStore ]));
default = {};
- description = lib.mdDoc ''
+ description = ''
Settings to add as `module-arguments`.
Boolean values render just the key if true, and nothing if false. Null values are ignored. All other values are rendered as key-value pairs.
@@ -105,14 +105,14 @@ let
name = mkOption {
example = "sshd";
type = types.str;
- description = lib.mdDoc "Name of the PAM service.";
+ description = "Name of the PAM service.";
};
rules = mkOption {
# This option is experimental and subject to breaking changes without notice.
visible = false;
- description = lib.mdDoc ''
+ description = ''
PAM rules for this service.
::: {.warning}
@@ -133,7 +133,7 @@ let
unixAuth = mkOption {
default = true;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether users can log in with passwords defined in
{file}`/etc/shadow`.
'';
@@ -142,7 +142,7 @@ let
rootOK = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set, root doesn't need to authenticate (e.g. for the
{command}`useradd` service).
'';
@@ -152,7 +152,7 @@ let
default = config.security.pam.p11.enable;
defaultText = literalExpression "config.security.pam.p11.enable";
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set, keys listed in
{file}`~/.ssh/authorized_keys` and
{file}`~/.eid/authorized_certificates`
@@ -164,7 +164,7 @@ let
default = config.security.pam.u2f.enable;
defaultText = literalExpression "config.security.pam.u2f.enable";
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set, users listed in
{file}`$XDG_CONFIG_HOME/Yubico/u2f_keys` (or
{file}`$HOME/.config/Yubico/u2f_keys` if XDG variable is
@@ -176,7 +176,7 @@ let
usshAuth = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set, users with an SSH certificate containing an authorized principal
in their SSH agent are able to log in. Specific options are controlled
using the {option}`security.pam.ussh` options.
@@ -190,7 +190,7 @@ let
default = config.security.pam.yubico.enable;
defaultText = literalExpression "config.security.pam.yubico.enable";
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set, users listed in
{file}`~/.yubico/authorized_yubikeys`
are able to log in with the associated Yubikey tokens.
@@ -201,7 +201,7 @@ let
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set, users with enabled Google Authenticator (created
{file}`~/.google_authenticator`) will be required
to provide Google Authenticator token to log in.
@@ -213,7 +213,7 @@ let
default = config.security.pam.enableOTPW;
defaultText = literalExpression "config.security.pam.enableOTPW";
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set, the OTPW system will be used (if
{file}`~/.otpw` exists).
'';
@@ -222,7 +222,7 @@ let
googleOsLoginAccountVerification = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set, will use the Google OS Login PAM modules
(`pam_oslogin_login`,
`pam_oslogin_admin`) to verify possible OS Login
@@ -235,7 +235,7 @@ let
googleOsLoginAuthentication = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set, will use the `pam_oslogin_login`'s user
authentication methods to authenticate users using 2FA.
This only makes sense to enable for the `sshd` PAM
@@ -247,7 +247,7 @@ let
default = config.users.mysql.enable;
defaultText = literalExpression "config.users.mysql.enable";
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set, the `pam_mysql` module will be used to
authenticate users against a MySQL/MariaDB database.
'';
@@ -257,7 +257,7 @@ let
default = config.services.fprintd.enable;
defaultText = literalExpression "config.services.fprintd.enable";
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set, fingerprint reader will be used (if exists and
your fingerprints are enrolled).
'';
@@ -267,7 +267,7 @@ let
default = config.security.pam.oath.enable;
defaultText = literalExpression "config.security.pam.oath.enable";
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set, the OATH Toolkit will be used.
'';
};
@@ -275,7 +275,7 @@ let
sshAgentAuth = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set, the calling user's SSH agent is used to authenticate
against the keys in the calling user's
{file}`~/.ssh/authorized_keys`. This is useful
@@ -287,7 +287,7 @@ let
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set, use the Duo Security pam module
`pam_duo` for authentication. Requires
configuration of {option}`security.duosec` options.
@@ -298,7 +298,7 @@ let
startSession = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If set, the service will register a new session with
systemd's login manager. For local sessions, this will give
the user access to audio devices, CD-ROM drives. In the
@@ -310,7 +310,7 @@ let
setEnvironment = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether the service should set the environment variables
listed in {option}`environment.sessionVariables`
using `pam_env.so`.
@@ -319,7 +319,7 @@ let
setLoginUid = mkOption {
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Set the login uid of the process
({file}`/proc/self/loginuid`) for auditing
purposes. The login uid is only set by ‘entry points’ like
@@ -332,7 +332,7 @@ let
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable or disable TTY auditing for specified users
'';
};
@@ -340,7 +340,7 @@ let
enablePattern = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
For each user matching one of comma-separated
glob patterns, enable TTY auditing
'';
@@ -349,7 +349,7 @@ let
disablePattern = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
For each user matching one of comma-separated
glob patterns, disable TTY auditing
'';
@@ -358,7 +358,7 @@ let
openOnly = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Set the TTY audit flag when opening the session,
but do not restore it when closing the session.
Using this option is necessary for some services
@@ -371,7 +371,7 @@ let
forwardXAuth = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether X authentication keys should be passed from the
calling user to the target user (e.g. for
{command}`su`)
@@ -382,7 +382,7 @@ let
default = config.security.pam.mount.enable;
defaultText = literalExpression "config.security.pam.mount.enable";
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enable PAM mount (pam_mount) system to mount filesystems on user login.
'';
};
@@ -390,7 +390,7 @@ let
allowNullPassword = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to allow logging into accounts that have no password
set (i.e., have an empty password field in
{file}`/etc/passwd` or
@@ -405,7 +405,7 @@ let
nodelay = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether the delay after typing a wrong password should be disabled.
'';
};
@@ -413,7 +413,7 @@ let
requireWheel = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to permit root access only to members of group wheel.
'';
};
@@ -421,7 +421,7 @@ let
limits = mkOption {
default = [];
type = limitsType;
- description = lib.mdDoc ''
+ description = ''
Attribute set describing resource limits. Defaults to the
value of {option}`security.pam.loginLimits`.
The meaning of the values is explained in {manpage}`limits.conf(5)`.
@@ -431,13 +431,13 @@ let
showMotd = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Whether to show the message of the day.";
+ description = "Whether to show the message of the day.";
};
makeHomeDir = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to try to create home directories for users
with `$HOME`s pointing to nonexistent
locations on session login.
@@ -447,19 +447,19 @@ let
updateWtmp = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Whether to update {file}`/var/log/wtmp`.";
+ description = "Whether to update {file}`/var/log/wtmp`.";
};
logFailures = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Whether to log authentication failures in {file}`/var/log/faillog`.";
+ description = "Whether to log authentication failures in {file}`/var/log/faillog`.";
};
enableAppArmor = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enable support for attaching AppArmor profiles at the
user/group level, e.g., as part of a role based access
control scheme.
@@ -470,7 +470,7 @@ let
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If enabled, pam_wallet will attempt to automatically unlock the
user's default KDE wallet upon login. If the user has no wallet named
"kdewallet", or the login password does not match their wallet
@@ -486,13 +486,13 @@ let
sssdStrictAccess = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "enforce sssd access control";
+ description = "enforce sssd access control";
};
enableGnomeKeyring = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If enabled, pam_gnome_keyring will attempt to automatically unlock the
user's default Gnome keyring upon login. If the user login password does
not match their keyring password, Gnome Keyring will prompt separately
@@ -504,7 +504,7 @@ let
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If enabled, this will replace the `FAIL_DELAY` setting from `login.defs`.
Change the delay on failure per-application.
'';
@@ -514,7 +514,7 @@ let
default = 3000000;
type = types.int;
example = 1000000;
- description = lib.mdDoc "The delay time (in microseconds) on failure.";
+ description = "The delay time (in microseconds) on failure.";
};
};
@@ -522,7 +522,7 @@ let
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If enabled, pam_gnupg will attempt to automatically unlock the
user's GPG keys with the login password via
{command}`gpg-agent`. The keygrips of all keys to be
@@ -537,7 +537,7 @@ let
noAutostart = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Don't start {command}`gpg-agent` if it is not running.
Useful in conjunction with starting {command}`gpg-agent` as
a systemd user service.
@@ -547,7 +547,7 @@ let
storeOnly = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Don't send the password immediately after login, but store for PAM
`session`.
'';
@@ -558,14 +558,14 @@ let
default = config.security.pam.zfs.enable;
defaultText = literalExpression "config.security.pam.zfs.enable";
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enable unlocking and mounting of encrypted ZFS home dataset at login.
'';
};
text = mkOption {
type = types.nullOr types.lines;
- description = lib.mdDoc "Contents of the PAM service file.";
+ description = "Contents of the PAM service file.";
};
};
@@ -683,7 +683,7 @@ let
(let dp9ik = config.security.pam.dp9ik; in { name = "p9"; enable = dp9ik.enable; control = dp9ik.control; modulePath = "${pkgs.pam_dp9ik}/lib/security/pam_p9.so"; args = [
dp9ik.authserver
]; })
- { name = "fprintd"; enable = cfg.fprintAuth; control = "sufficient"; modulePath = "${pkgs.fprintd}/lib/security/pam_fprintd.so"; }
+ { name = "fprintd"; enable = cfg.fprintAuth; control = "sufficient"; modulePath = "${config.services.fprintd.package}/lib/security/pam_fprintd.so"; }
] ++
# Modules in this block require having the password set in PAM_AUTHTOK.
# pam_unix is marked as 'sufficient' on NixOS which means nothing will run
@@ -887,19 +887,19 @@ let
limitsType = with lib.types; listOf (submodule ({ ... }: {
options = {
domain = mkOption {
- description = lib.mdDoc "Username, groupname, or wildcard this limit applies to";
+ description = "Username, groupname, or wildcard this limit applies to";
example = "@wheel";
type = str;
};
type = mkOption {
- description = lib.mdDoc "Type of this limit";
+ description = "Type of this limit";
type = enum [ "-" "hard" "soft" ];
default = "-";
};
item = mkOption {
- description = lib.mdDoc "Item this limit applies to";
+ description = "Item this limit applies to";
type = enum [
"core"
"data"
@@ -923,7 +923,7 @@ let
};
value = mkOption {
- description = lib.mdDoc "Value of this limit";
+ description = "Value of this limit";
type = oneOf [ str int ];
};
};
@@ -974,7 +974,7 @@ in
}
];
- description = lib.mdDoc ''
+ description = ''
Define resource limits that should apply to users or groups.
Each item in the list should be an attribute set with a
{var}`domain`, {var}`type`,
@@ -991,8 +991,7 @@ in
security.pam.services = mkOption {
default = {};
type = with types; attrsOf (submodule pamOpts);
- description =
- lib.mdDoc ''
+ description = ''
This option defines the PAM services. A service typically
corresponds to a program that uses PAM,
e.g. {command}`login` or {command}`passwd`.
@@ -1005,7 +1004,7 @@ in
type = types.str;
default = "/var/empty";
example = "/etc/skel";
- description = lib.mdDoc ''
+ description = ''
Path to skeleton directory whose contents are copied to home
directories newly created by `pam_mkhomedir`.
'';
@@ -1015,7 +1014,7 @@ in
type = types.str;
default = "0077";
example = "0022";
- description = lib.mdDoc ''
+ description = ''
The user file mode creation mask to use on home directories
newly created by `pam_mkhomedir`.
'';
@@ -1051,28 +1050,26 @@ in
};
};
- security.pam.enableOTPW = mkEnableOption (lib.mdDoc "the OTPW (one-time password) PAM module");
+ security.pam.enableOTPW = mkEnableOption "the OTPW (one-time password) PAM module";
security.pam.dp9ik = {
- enable = mkEnableOption (
- lib.mdDoc ''
+ enable = mkEnableOption ''
the dp9ik pam module provided by tlsclient.
If set, users can be authenticated against the 9front
authentication server given in {option}`security.pam.dp9ik.authserver`.
- ''
- );
+ '';
control = mkOption {
default = "sufficient";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
This option sets the pam "control" used for this module.
'';
};
authserver = mkOption {
default = null;
type = with types; nullOr str;
- description = lib.mdDoc ''
+ description = ''
This controls the hostname for the 9front authentication server
that users will be authenticated against.
'';
@@ -1084,7 +1081,7 @@ in
default = config.security.krb5.enable;
defaultText = literalExpression "config.security.krb5.enable";
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enables Kerberos PAM modules (`pam-krb5`,
`pam-ccreds`).
@@ -1103,7 +1100,7 @@ in
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enables P11 PAM (`pam_p11`) module.
If set, users can log in with SSH keys and PKCS#11 tokens.
@@ -1115,7 +1112,7 @@ in
control = mkOption {
default = "sufficient";
type = types.enum [ "required" "requisite" "sufficient" "optional" ];
- description = lib.mdDoc ''
+ description = ''
This option sets pam "control".
If you want to have multi factor authentication, use "required".
If you want to use the PKCS#11 device instead of the regular password,
@@ -1132,7 +1129,7 @@ in
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enables U2F PAM (`pam-u2f`) module.
If set, users listed in
@@ -1152,7 +1149,7 @@ in
authFile = mkOption {
default = null;
type = with types; nullOr path;
- description = lib.mdDoc ''
+ description = ''
By default `pam-u2f` module reads the keys from
{file}`$XDG_CONFIG_HOME/Yubico/u2f_keys` (or
{file}`$HOME/.config/Yubico/u2f_keys` if XDG variable is
@@ -1173,7 +1170,7 @@ in
appId = mkOption {
default = null;
type = with types; nullOr str;
- description = lib.mdDoc ''
+ description = ''
By default `pam-u2f` module sets the application
ID to `pam://$HOSTNAME`.
@@ -1187,7 +1184,7 @@ in
origin = mkOption {
default = null;
type = with types; nullOr str;
- description = lib.mdDoc ''
+ description = ''
By default `pam-u2f` module sets the origin
to `pam://$HOSTNAME`.
Setting origin to an host independent value will allow you to
@@ -1203,7 +1200,7 @@ in
control = mkOption {
default = "sufficient";
type = types.enum [ "required" "requisite" "sufficient" "optional" ];
- description = lib.mdDoc ''
+ description = ''
This option sets pam "control".
If you want to have multi factor authentication, use "required".
If you want to use U2F device instead of regular password, use "sufficient".
@@ -1217,7 +1214,7 @@ in
debug = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Debug output to stderr.
'';
};
@@ -1225,7 +1222,7 @@ in
interactive = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Set to prompt a message and wait before testing the presence of a U2F device.
Recommended if your device doesn’t have a tactile trigger.
'';
@@ -1234,7 +1231,7 @@ in
cue = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
By default `pam-u2f` module does not inform user
that he needs to use the u2f device, it just waits without a prompt.
@@ -1249,7 +1246,7 @@ in
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enables Uber's USSH PAM (`pam-ussh`) module.
This is similar to `pam-ssh-agent`, except that
@@ -1266,7 +1263,7 @@ in
caFile = mkOption {
default = null;
type = with types; nullOr path;
- description = lib.mdDoc ''
+ description = ''
By default `pam-ussh` reads the trusted user CA keys
from {file}`/etc/ssh/trusted_user_ca`.
@@ -1278,7 +1275,7 @@ in
authorizedPrincipals = mkOption {
default = null;
type = with types; nullOr commas;
- description = lib.mdDoc ''
+ description = ''
Comma-separated list of authorized principals to permit; if the user
presents a certificate with one of these principals, then they will be
authorized.
@@ -1294,7 +1291,7 @@ in
authorizedPrincipalsFile = mkOption {
default = null;
type = with types; nullOr path;
- description = lib.mdDoc ''
+ description = ''
Path to a list of principals; if the user presents a certificate with
one of these principals, then they will be authorized.
@@ -1309,7 +1306,7 @@ in
group = mkOption {
default = null;
type = with types; nullOr str;
- description = lib.mdDoc ''
+ description = ''
If set, then the authenticating user must be a member of this group
to use this module.
'';
@@ -1318,7 +1315,7 @@ in
control = mkOption {
default = "sufficient";
type = types.enum [ "required" "requisite" "sufficient" "optional" ];
- description = lib.mdDoc ''
+ description = ''
This option sets pam "control".
If you want to have multi factor authentication, use "required".
If you want to use the SSH certificate instead of the regular password,
@@ -1335,7 +1332,7 @@ in
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enables Yubico PAM (`yubico-pam`) module.
If set, users listed in
@@ -1350,7 +1347,7 @@ in
control = mkOption {
default = "sufficient";
type = types.enum [ "required" "requisite" "sufficient" "optional" ];
- description = lib.mdDoc ''
+ description = ''
This option sets pam "control".
If you want to have multi factor authentication, use "required".
If you want to use Yubikey instead of regular password, use "sufficient".
@@ -1363,20 +1360,20 @@ in
id = mkOption {
example = "42";
type = types.str;
- description = lib.mdDoc "client id";
+ description = "client id";
};
debug = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Debug output to stderr.
'';
};
mode = mkOption {
default = "client";
type = types.enum [ "client" "challenge-response" ];
- description = lib.mdDoc ''
+ description = ''
Mode of operation.
Use "client" for online validation with a YubiKey validation service such as
@@ -1392,7 +1389,7 @@ in
challengeResponsePath = mkOption {
default = null;
type = types.nullOr types.path;
- description = lib.mdDoc ''
+ description = ''
If not null, set the path used by yubico pam module where the challenge expected response is stored.
More information can be found [here](https://developers.yubico.com/yubico-pam/Authentication_Using_Challenge-Response.html).
@@ -1404,7 +1401,7 @@ in
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enable unlocking and mounting of encrypted ZFS home dataset at login.
'';
};
@@ -1413,7 +1410,7 @@ in
example = "rpool/home";
default = "rpool/home";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Prefix of home datasets. This value will be concatenated with
`"/" + ` in order to determine the home dataset to unlock.
'';
@@ -1422,34 +1419,34 @@ in
noUnmount = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Do not unmount home dataset on logout.
'';
};
};
- security.pam.enableEcryptfs = mkEnableOption (lib.mdDoc "eCryptfs PAM module (mounting ecryptfs home directory on login)");
- security.pam.enableFscrypt = mkEnableOption (lib.mdDoc ''
- fscrypt to automatically unlock directories with the user's login password.
+ security.pam.enableEcryptfs = mkEnableOption "eCryptfs PAM module (mounting ecryptfs home directory on login)";
+ security.pam.enableFscrypt = mkEnableOption ''
+ fscrypt, to automatically unlock directories with the user's login password.
This also enables a service at security.pam.services.fscrypt which is used by
fscrypt to verify the user's password when setting up a new protector. If you
use something other than pam_unix to verify user passwords, please remember to
- adjust this PAM service.
- '');
+ adjust this PAM service
+ '';
users.motd = mkOption {
default = null;
example = "Today is Sweetmorn, the 4th day of The Aftermath in the YOLD 3178.";
type = types.nullOr types.lines;
- description = lib.mdDoc "Message of the day shown to users when they log in.";
+ description = "Message of the day shown to users when they log in.";
};
users.motdFile = mkOption {
default = null;
example = "/etc/motd";
type = types.nullOr types.path;
- description = lib.mdDoc "A file containing the message of the day shown to users when they log in.";
+ description = "A file containing the message of the day shown to users when they log in.";
};
};
@@ -1465,9 +1462,9 @@ in
'';
}
{
- assertion = config.security.pam.zfs.enable -> (config.boot.zfs.enabled || config.boot.zfs.enableUnstable);
+ assertion = config.security.pam.zfs.enable -> config.boot.zfs.enabled;
message = ''
- `security.pam.zfs.enable` requires enabling ZFS (`boot.zfs.enabled` or `boot.zfs.enableUnstable`).
+ `security.pam.zfs.enable` requires enabling ZFS (`boot.zfs.enabled`).
'';
}
{
diff --git a/third_party/nixpkgs/nixos/modules/security/pam_mount.nix b/third_party/nixpkgs/nixos/modules/security/pam_mount.nix
index 26f906f2a7..bc0c5c5fbf 100644
--- a/third_party/nixpkgs/nixos/modules/security/pam_mount.nix
+++ b/third_party/nixpkgs/nixos/modules/security/pam_mount.nix
@@ -23,7 +23,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable PAM mount system to mount filesystems on user login.
'';
};
@@ -31,7 +31,7 @@ in
extraVolumes = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
List of volume definitions for pam_mount.
For more information, visit .
'';
@@ -41,7 +41,7 @@ in
type = types.listOf types.package;
default = [];
example = literalExpression "[ pkgs.bindfs ]";
- description = lib.mdDoc ''
+ description = ''
Additional programs to include in the search path of pam_mount.
Useful for example if you want to use some FUSE filesystems like bindfs.
'';
@@ -53,7 +53,7 @@ in
example = literalExpression ''
[ "allow_discard" ]
'';
- description = lib.mdDoc ''
+ description = ''
Global mount options that apply to every crypt volume.
You can define volume-specific options in the volume definitions.
'';
@@ -65,7 +65,7 @@ in
example = literalExpression ''
[ "nodev" "nosuid" "force-user=%(USER)" "gid=%(USERGID)" "perms=0700" "chmod-deny" "chown-deny" "chgrp-deny" ]
'';
- description = lib.mdDoc ''
+ description = ''
Global mount options that apply to every FUSE volume.
You can define volume-specific options in the volume definitions.
'';
@@ -75,7 +75,7 @@ in
type = types.int;
default = 0;
example = 1;
- description = lib.mdDoc ''
+ description = ''
Sets the Debug-Level. 0 disables debugging, 1 enables pam_mount tracing,
and 2 additionally enables tracing in mount.crypt. The default is 0.
For more information, visit .
@@ -85,7 +85,7 @@ in
logoutWait = mkOption {
type = types.int;
default = 0;
- description = lib.mdDoc ''
+ description = ''
Amount of microseconds to wait until killing remaining processes after
final logout.
For more information, visit .
@@ -95,7 +95,7 @@ in
logoutHup = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Kill remaining processes after logout by sending a SIGHUP.
'';
};
@@ -103,7 +103,7 @@ in
logoutTerm = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Kill remaining processes after logout by sending a SIGTERM.
'';
};
@@ -111,7 +111,7 @@ in
logoutKill = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Kill remaining processes after logout by sending a SIGKILL.
'';
};
@@ -119,7 +119,7 @@ in
createMountPoints = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Create mountpoints for volumes if they do not exist.
'';
};
@@ -127,7 +127,7 @@ in
removeCreatedMountPoints = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Remove mountpoints created by pam_mount after logout. This
only affects mountpoints that have been created by pam_mount
in the same session.
diff --git a/third_party/nixpkgs/nixos/modules/security/please.nix b/third_party/nixpkgs/nixos/modules/security/please.nix
index ff4bfc9f1b..39df5dfd50 100644
--- a/third_party/nixpkgs/nixos/modules/security/please.nix
+++ b/third_party/nixpkgs/nixos/modules/security/please.nix
@@ -8,17 +8,17 @@ let
in
{
options.security.please = {
- enable = mkEnableOption (mdDoc ''
+ enable = mkEnableOption ''
please, a Sudo clone which allows a users to execute a command or edit a
file as another user
- '');
+ '';
package = mkPackageOption pkgs "please" { };
wheelNeedsPassword = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether users of the `wheel` group must provide a password to run
commands or edit files with {command}`please` and
{command}`pleaseedit` respectively.
@@ -45,7 +45,7 @@ in
require_pass = true;
};
};
- description = mdDoc ''
+ description = ''
Please configuration. Refer to
for
details.
diff --git a/third_party/nixpkgs/nixos/modules/security/polkit.nix b/third_party/nixpkgs/nixos/modules/security/polkit.nix
index 327f49c0b6..f7ee4f0068 100644
--- a/third_party/nixpkgs/nixos/modules/security/polkit.nix
+++ b/third_party/nixpkgs/nixos/modules/security/polkit.nix
@@ -12,9 +12,9 @@ in
options = {
- security.polkit.enable = mkEnableOption (lib.mdDoc "polkit");
+ security.polkit.enable = mkEnableOption "polkit";
- security.polkit.debug = mkEnableOption (lib.mdDoc "debug logs from polkit. This is required in order to see log messages from rule definitions");
+ security.polkit.debug = mkEnableOption "debug logs from polkit. This is required in order to see log messages from rule definitions";
security.polkit.extraConfig = mkOption {
type = types.lines;
@@ -32,7 +32,7 @@ in
if (subject.local) return "yes";
});
'';
- description = lib.mdDoc
+ description =
''
Any polkit rules to be added to config (in JavaScript ;-). See:
@@ -43,7 +43,7 @@ in
type = types.listOf types.str;
default = [ "unix-group:wheel" ];
example = [ "unix-user:alice" "unix-group:admin" ];
- description = lib.mdDoc
+ description =
''
Specifies which users are considered “administrators”, for those
actions that require the user to authenticate as an
diff --git a/third_party/nixpkgs/nixos/modules/security/rtkit.nix b/third_party/nixpkgs/nixos/modules/security/rtkit.nix
index 0f58b4dce8..ad8746808e 100644
--- a/third_party/nixpkgs/nixos/modules/security/rtkit.nix
+++ b/third_party/nixpkgs/nixos/modules/security/rtkit.nix
@@ -12,7 +12,7 @@ with lib;
security.rtkit.enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the RealtimeKit system service, which hands
out realtime scheduling priority to user processes on
demand. For example, the PulseAudio server uses this to
diff --git a/third_party/nixpkgs/nixos/modules/security/sudo-rs.nix b/third_party/nixpkgs/nixos/modules/security/sudo-rs.nix
index b4376562c3..6ccf42ed7f 100644
--- a/third_party/nixpkgs/nixos/modules/security/sudo-rs.nix
+++ b/third_party/nixpkgs/nixos/modules/security/sudo-rs.nix
@@ -33,23 +33,23 @@ in
defaultOptions = mkOption {
type = with types; listOf str;
default = [];
- description = mdDoc ''
+ description = ''
Options used for the default rules, granting `root` and the
`wheel` group permission to run any command as any user.
'';
};
- enable = mkEnableOption (mdDoc ''
+ enable = mkEnableOption ''
a memory-safe implementation of the {command}`sudo` command,
which allows non-root users to execute commands as root.
- '');
+ '';
package = mkPackageOption pkgs "sudo-rs" { };
wheelNeedsPassword = mkOption {
type = types.bool;
default = true;
- description = mdDoc ''
+ description = ''
Whether users of the `wheel` group must
provide a password to run commands as super user via {command}`sudo`.
'';
@@ -58,7 +58,7 @@ in
execWheelOnly = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Only allow members of the `wheel` group to execute sudo by
setting the executable's permissions accordingly.
This prevents users that are not members of `wheel` from
@@ -70,14 +70,14 @@ in
type = types.lines;
# Note: if syntax errors are detected in this file, the NixOS
# configuration will fail to build.
- description = mdDoc ''
+ description = ''
This string contains the contents of the
{file}`sudoers` file.
'';
};
extraRules = mkOption {
- description = mdDoc ''
+ description = ''
Define specific rules to be in the {file}`sudoers` file.
More specific rules should come after more general ones in order to
yield the expected behavior. You can use mkBefore/mkAfter to ensure
@@ -107,7 +107,7 @@ in
options = {
users = mkOption {
type = with types; listOf (either str int);
- description = mdDoc ''
+ description = ''
The usernames / UIDs this rule should apply for.
'';
default = [];
@@ -115,7 +115,7 @@ in
groups = mkOption {
type = with types; listOf (either str int);
- description = mdDoc ''
+ description = ''
The groups / GIDs this rule should apply for.
'';
default = [];
@@ -124,7 +124,7 @@ in
host = mkOption {
type = types.str;
default = "ALL";
- description = mdDoc ''
+ description = ''
For what host this rule should apply.
'';
};
@@ -132,7 +132,7 @@ in
runAs = mkOption {
type = with types; str;
default = "ALL:ALL";
- description = mdDoc ''
+ description = ''
Under which user/group the specified command is allowed to run.
A user can be specified using just the username: `"foo"`.
@@ -142,7 +142,7 @@ in
};
commands = mkOption {
- description = mdDoc ''
+ description = ''
The commands for which the rule should apply.
'';
type = with types; listOf (either str (submodule {
@@ -150,7 +150,7 @@ in
options = {
command = mkOption {
type = with types; str;
- description = mdDoc ''
+ description = ''
A command being either just a path to a binary to allow any arguments,
the full command with arguments pre-set or with `""` used as the argument,
not allowing arguments to the command at all.
@@ -159,7 +159,7 @@ in
options = mkOption {
type = with types; listOf (enum [ "NOPASSWD" "PASSWD" "NOEXEC" "EXEC" "SETENV" "NOSETENV" "LOG_INPUT" "NOLOG_INPUT" "LOG_OUTPUT" "NOLOG_OUTPUT" ]);
- description = mdDoc ''
+ description = ''
Options for running the command. Refer to the [sudo manual](https://www.sudo.ws/man/1.7.10/sudoers.man.html).
'';
default = [];
@@ -175,7 +175,7 @@ in
extraConfig = mkOption {
type = types.lines;
default = "";
- description = mdDoc ''
+ description = ''
Extra configuration text appended to {file}`sudoers`.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/security/sudo.nix b/third_party/nixpkgs/nixos/modules/security/sudo.nix
index 6aa9445eab..2959efd050 100644
--- a/third_party/nixpkgs/nixos/modules/security/sudo.nix
+++ b/third_party/nixpkgs/nixos/modules/security/sudo.nix
@@ -33,7 +33,7 @@ in
defaultOptions = mkOption {
type = with types; listOf str;
default = [ "SETENV" ];
- description = mdDoc ''
+ description = ''
Options used for the default rules, granting `root` and the
`wheel` group permission to run any command as any user.
'';
@@ -42,8 +42,7 @@ in
enable = mkOption {
type = types.bool;
default = true;
- description =
- lib.mdDoc ''
+ description = ''
Whether to enable the {command}`sudo` command, which
allows non-root users to execute commands as root.
'';
@@ -54,7 +53,7 @@ in
wheelNeedsPassword = mkOption {
type = types.bool;
default = true;
- description = mdDoc ''
+ description = ''
Whether users of the `wheel` group must
provide a password to run commands as super user via {command}`sudo`.
'';
@@ -63,7 +62,7 @@ in
execWheelOnly = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Only allow members of the `wheel` group to execute sudo by
setting the executable's permissions accordingly.
This prevents users that are not members of `wheel` from
@@ -75,14 +74,14 @@ in
type = types.lines;
# Note: if syntax errors are detected in this file, the NixOS
# configuration will fail to build.
- description = mdDoc ''
+ description = ''
This string contains the contents of the
{file}`sudoers` file.
'';
};
extraRules = mkOption {
- description = mdDoc ''
+ description = ''
Define specific rules to be in the {file}`sudoers` file.
More specific rules should come after more general ones in order to
yield the expected behavior. You can use mkBefore/mkAfter to ensure
@@ -112,7 +111,7 @@ in
options = {
users = mkOption {
type = with types; listOf (either str int);
- description = mdDoc ''
+ description = ''
The usernames / UIDs this rule should apply for.
'';
default = [];
@@ -120,7 +119,7 @@ in
groups = mkOption {
type = with types; listOf (either str int);
- description = mdDoc ''
+ description = ''
The groups / GIDs this rule should apply for.
'';
default = [];
@@ -129,7 +128,7 @@ in
host = mkOption {
type = types.str;
default = "ALL";
- description = mdDoc ''
+ description = ''
For what host this rule should apply.
'';
};
@@ -137,7 +136,7 @@ in
runAs = mkOption {
type = with types; str;
default = "ALL:ALL";
- description = mdDoc ''
+ description = ''
Under which user/group the specified command is allowed to run.
A user can be specified using just the username: `"foo"`.
@@ -147,7 +146,7 @@ in
};
commands = mkOption {
- description = mdDoc ''
+ description = ''
The commands for which the rule should apply.
'';
type = with types; listOf (either str (submodule {
@@ -155,7 +154,7 @@ in
options = {
command = mkOption {
type = with types; str;
- description = mdDoc ''
+ description = ''
A command being either just a path to a binary to allow any arguments,
the full command with arguments pre-set or with `""` used as the argument,
not allowing arguments to the command at all.
@@ -163,9 +162,9 @@ in
};
options = mkOption {
- type = with types; listOf (enum [ "NOPASSWD" "PASSWD" "NOEXEC" "EXEC" "SETENV" "NOSETENV" "LOG_INPUT" "NOLOG_INPUT" "LOG_OUTPUT" "NOLOG_OUTPUT" ]);
- description = mdDoc ''
- Options for running the command. Refer to the [sudo manual](https://www.sudo.ws/man/1.7.10/sudoers.man.html).
+ type = with types; listOf (enum [ "NOPASSWD" "PASSWD" "NOEXEC" "EXEC" "SETENV" "NOSETENV" "LOG_INPUT" "NOLOG_INPUT" "LOG_OUTPUT" "NOLOG_OUTPUT" "MAIL" "NOMAIL" "FOLLOW" "NOFLLOW" "INTERCEPT" "NOINTERCEPT"]);
+ description = ''
+ Options for running the command. Refer to the [sudo manual](https://www.sudo.ws/docs/man/1.9.15/sudoers.man/#Tag_Spec).
'';
default = [];
};
@@ -180,7 +179,7 @@ in
extraConfig = mkOption {
type = types.lines;
default = "";
- description = mdDoc ''
+ description = ''
Extra configuration text appended to {file}`sudoers`.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/security/systemd-confinement.nix b/third_party/nixpkgs/nixos/modules/security/systemd-confinement.nix
index cdf6c22ef1..0304749b8d 100644
--- a/third_party/nixpkgs/nixos/modules/security/systemd-confinement.nix
+++ b/third_party/nixpkgs/nixos/modules/security/systemd-confinement.nix
@@ -10,7 +10,7 @@ in {
options.confinement.enable = lib.mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If set, all the required runtime store paths for this service are
bind-mounted into a `tmpfs`-based
{manpage}`chroot(2)`.
@@ -20,7 +20,7 @@ in {
options.confinement.fullUnit = lib.mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to include the full closure of the systemd unit file into the
chroot, instead of just the dependencies for the executables.
@@ -39,7 +39,7 @@ in {
default = [];
description = let
mkScOption = optName: "{option}`serviceConfig.${optName}`";
- in lib.mdDoc ''
+ in ''
Additional packages or strings with context to add to the closure of
the chroot. By default, this includes all the packages from the
${lib.concatMapStringsSep ", " mkScOption [
@@ -63,7 +63,7 @@ in {
default = toplevelConfig.environment.binsh;
defaultText = lib.literalExpression "config.environment.binsh";
example = lib.literalExpression ''"''${pkgs.dash}/bin/dash"'';
- description = lib.mdDoc ''
+ description = ''
The program to make available as {file}`/bin/sh` inside
the chroot. If this is set to `null`, no
{file}`/bin/sh` is provided at all.
@@ -76,7 +76,7 @@ in {
options.confinement.mode = lib.mkOption {
type = types.enum [ "full-apivfs" "chroot-only" ];
default = "full-apivfs";
- description = lib.mdDoc ''
+ description = ''
The value `full-apivfs` (the default) sets up
private {file}`/dev`, {file}`/proc`,
{file}`/sys` and {file}`/tmp` file systems in a separate user
diff --git a/third_party/nixpkgs/nixos/modules/security/tpm2.nix b/third_party/nixpkgs/nixos/modules/security/tpm2.nix
index 708c3a69d1..bd3c8a5b0c 100644
--- a/third_party/nixpkgs/nixos/modules/security/tpm2.nix
+++ b/third_party/nixpkgs/nixos/modules/security/tpm2.nix
@@ -17,10 +17,10 @@ let
in {
options.security.tpm2 = {
- enable = lib.mkEnableOption (lib.mdDoc "Trusted Platform Module 2 support");
+ enable = lib.mkEnableOption "Trusted Platform Module 2 support";
tssUser = lib.mkOption {
- description = lib.mdDoc ''
+ description = ''
Name of the tpm device-owner and service user, set if applyUdevRules is
set.
'';
@@ -30,7 +30,7 @@ in {
};
tssGroup = lib.mkOption {
- description = lib.mdDoc ''
+ description = ''
Group of the tpm kernel resource manager (tpmrm) device-group, set if
applyUdevRules is set.
'';
@@ -39,7 +39,7 @@ in {
};
applyUdevRules = lib.mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether to make the /dev/tpm[0-9] devices accessible by the tssUser, or
the /dev/tpmrm[0-9] by tssGroup respectively
'';
@@ -48,12 +48,12 @@ in {
};
abrmd = {
- enable = lib.mkEnableOption (lib.mdDoc ''
+ enable = lib.mkEnableOption ''
Trusted Platform 2 userspace resource manager daemon
- '');
+ '';
package = lib.mkOption {
- description = lib.mdDoc "tpm2-abrmd package to use";
+ description = "tpm2-abrmd package to use";
type = lib.types.package;
default = pkgs.tpm2-abrmd;
defaultText = lib.literalExpression "pkgs.tpm2-abrmd";
@@ -61,13 +61,13 @@ in {
};
pkcs11 = {
- enable = lib.mkEnableOption (lib.mdDoc ''
+ enable = lib.mkEnableOption ''
TPM2 PKCS#11 tool and shared library in system path
(`/run/current-system/sw/lib/libtpm2_pkcs11.so`)
- '');
+ '';
package = lib.mkOption {
- description = lib.mdDoc "tpm2-pkcs11 package to use";
+ description = "tpm2-pkcs11 package to use";
type = lib.types.package;
default = pkgs.tpm2-pkcs11;
defaultText = lib.literalExpression "pkgs.tpm2-pkcs11";
@@ -76,7 +76,7 @@ in {
tctiEnvironment = {
enable = lib.mkOption {
- description = lib.mdDoc ''
+ description = ''
Set common TCTI environment variables to the specified value.
The variables are
- `TPM2TOOLS_TCTI`
@@ -87,7 +87,7 @@ in {
};
interface = lib.mkOption {
- description = lib.mdDoc ''
+ description = ''
The name of the TPM command transmission interface (TCTI) library to
use.
'';
@@ -96,7 +96,7 @@ in {
};
deviceConf = lib.mkOption {
- description = lib.mdDoc ''
+ description = ''
Configuration part of the device TCTI, e.g. the path to the TPM device.
Applies if interface is set to "device".
The format is specified in the
@@ -108,7 +108,7 @@ in {
};
tabrmdConf = lib.mkOption {
- description = lib.mdDoc ''
+ description = ''
Configuration part of the tabrmd TCTI, like the D-Bus bus name.
Applies if interface is set to "tabrmd".
The format is specified in the
diff --git a/third_party/nixpkgs/nixos/modules/security/wrappers/default.nix b/third_party/nixpkgs/nixos/modules/security/wrappers/default.nix
index a298686b34..606b620ef1 100644
--- a/third_party/nixpkgs/nixos/modules/security/wrappers/default.nix
+++ b/third_party/nixpkgs/nixos/modules/security/wrappers/default.nix
@@ -43,28 +43,28 @@ let
wrapperType = lib.types.submodule ({ name, config, ... }: {
options.source = lib.mkOption
{ type = lib.types.path;
- description = lib.mdDoc "The absolute path to the program to be wrapped.";
+ description = "The absolute path to the program to be wrapped.";
};
options.program = lib.mkOption
{ type = with lib.types; nullOr str;
default = name;
- description = lib.mdDoc ''
+ description = ''
The name of the wrapper program. Defaults to the attribute name.
'';
};
options.owner = lib.mkOption
{ type = lib.types.str;
- description = lib.mdDoc "The owner of the wrapper program.";
+ description = "The owner of the wrapper program.";
};
options.group = lib.mkOption
{ type = lib.types.str;
- description = lib.mdDoc "The group of the wrapper program.";
+ description = "The group of the wrapper program.";
};
options.permissions = lib.mkOption
{ type = fileModeType;
default = "u+rx,g+x,o+x";
example = "a+rx";
- description = lib.mdDoc ''
+ description = ''
The permissions of the wrapper program. The format is that of a
symbolic or numeric file mode understood by {command}`chmod`.
'';
@@ -72,7 +72,7 @@ let
options.capabilities = lib.mkOption
{ type = lib.types.commas;
default = "";
- description = lib.mdDoc ''
+ description = ''
A comma-separated list of capability clauses to be given to the
wrapper program. The format for capability clauses is described in the
“TEXTUAL REPRESENTATION” section of the {manpage}`cap_from_text(3)`
@@ -92,12 +92,12 @@ let
options.setuid = lib.mkOption
{ type = lib.types.bool;
default = false;
- description = lib.mdDoc "Whether to add the setuid bit the wrapper program.";
+ description = "Whether to add the setuid bit the wrapper program.";
};
options.setgid = lib.mkOption
{ type = lib.types.bool;
default = false;
- description = lib.mdDoc "Whether to add the setgid bit the wrapper program.";
+ description = "Whether to add the setgid bit the wrapper program.";
};
});
@@ -196,7 +196,7 @@ in
};
}
'';
- description = lib.mdDoc ''
+ description = ''
This option effectively allows adding setuid/setgid bits, capabilities,
changing file ownership and permissions of a program without directly
modifying it. This works by creating a wrapper program under the
@@ -209,7 +209,7 @@ in
default = "50%";
example = "10G";
type = lib.types.str;
- description = lib.mdDoc ''
+ description = ''
Size limit for the /run/wrappers tmpfs. Look at mount(8), tmpfs size option,
for the accepted syntax. WARNING: don't set to less than 64MB.
'';
@@ -219,7 +219,7 @@ in
type = lib.types.path;
default = "/run/wrappers/bin";
internal = true;
- description = lib.mdDoc ''
+ description = ''
This option defines the path to the wrapper programs. It
should not be overridden.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/admin/docuum.nix b/third_party/nixpkgs/nixos/modules/services/admin/docuum.nix
new file mode 100644
index 0000000000..6f6cd4e027
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/services/admin/docuum.nix
@@ -0,0 +1,45 @@
+{ config, pkgs, lib, utils, ... }:
+
+let
+ cfg = config.services.docuum;
+ inherit (lib) mkIf mkEnableOption mkOption getExe types;
+in
+{
+ options.services.docuum = {
+ enable = mkEnableOption "docuum daemon";
+
+ threshold = mkOption {
+ description = "Threshold for deletion in bytes, like `10 GB`, `10 GiB`, `10GB` or percentage-based thresholds like `50%`";
+ type = types.str;
+ default = "10 GB";
+ example = "50%";
+ };
+ };
+
+ config = mkIf cfg.enable {
+ assertions = [
+ {
+ assertion = config.virtualisation.docker.enable;
+ message = "docuum requires docker on the host";
+ }
+ ];
+
+ systemd.services.docuum = {
+ after = [ "docker.socket" ];
+ requires = [ "docker.socket" ];
+ wantedBy = [ "multi-user.target" ];
+ path = [ config.virtualisation.docker.package ];
+ environment.HOME = "/var/lib/docuum";
+
+ serviceConfig = {
+ DynamicUser = true;
+ StateDirectory = "docuum";
+ SupplementaryGroups = [ "docker" ];
+ ExecStart = utils.escapeSystemdExecArgs [
+ (getExe pkgs.docuum)
+ "--threshold" cfg.threshold
+ ];
+ };
+ };
+ };
+}
diff --git a/third_party/nixpkgs/nixos/modules/services/admin/meshcentral.nix b/third_party/nixpkgs/nixos/modules/services/admin/meshcentral.nix
index d056356568..25779e0112 100644
--- a/third_party/nixpkgs/nixos/modules/services/admin/meshcentral.nix
+++ b/third_party/nixpkgs/nixos/modules/services/admin/meshcentral.nix
@@ -5,10 +5,10 @@ let
configFile = configFormat.generate "meshcentral-config.json" cfg.settings;
in with lib; {
options.services.meshcentral = with types; {
- enable = mkEnableOption (lib.mdDoc "MeshCentral computer management server");
+ enable = mkEnableOption "MeshCentral computer management server";
package = mkPackageOption pkgs "meshcentral" { };
settings = mkOption {
- description = lib.mdDoc ''
+ description = ''
Settings for MeshCentral. Refer to upstream documentation for details:
- [JSON Schema definition](https://github.com/Ylianst/MeshCentral/blob/master/meshcentral-config-schema.json)
diff --git a/third_party/nixpkgs/nixos/modules/services/admin/oxidized.nix b/third_party/nixpkgs/nixos/modules/services/admin/oxidized.nix
index 56f3303149..49ea3ced76 100644
--- a/third_party/nixpkgs/nixos/modules/services/admin/oxidized.nix
+++ b/third_party/nixpkgs/nixos/modules/services/admin/oxidized.nix
@@ -7,12 +7,12 @@ let
in
{
options.services.oxidized = {
- enable = mkEnableOption (lib.mdDoc "the oxidized configuration backup service");
+ enable = mkEnableOption "the oxidized configuration backup service";
user = mkOption {
type = types.str;
default = "oxidized";
- description = lib.mdDoc ''
+ description = ''
User under which the oxidized service runs.
'';
};
@@ -20,7 +20,7 @@ in
group = mkOption {
type = types.str;
default = "oxidized";
- description = lib.mdDoc ''
+ description = ''
Group under which the oxidized service runs.
'';
};
@@ -28,7 +28,7 @@ in
dataDir = mkOption {
type = types.path;
default = "/var/lib/oxidized";
- description = lib.mdDoc "State directory for the oxidized service.";
+ description = "State directory for the oxidized service.";
};
configFile = mkOption {
@@ -62,7 +62,7 @@ in
# ... additional config
''';
'';
- description = lib.mdDoc ''
+ description = ''
Path to the oxidized configuration file.
'';
};
@@ -76,7 +76,7 @@ in
# ... additional hosts
'''
'';
- description = lib.mdDoc ''
+ description = ''
Path to the file/database which contains the targets for oxidized.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/admin/pgadmin.nix b/third_party/nixpkgs/nixos/modules/services/admin/pgadmin.nix
index 20b6b6670d..ead0c3c6c9 100644
--- a/third_party/nixpkgs/nixos/modules/services/admin/pgadmin.nix
+++ b/third_party/nixpkgs/nixos/modules/services/admin/pgadmin.nix
@@ -27,10 +27,10 @@ let
in
{
options.services.pgadmin = {
- enable = mkEnableOption (lib.mdDoc "PostgreSQL Admin 4");
+ enable = mkEnableOption "PostgreSQL Admin 4";
port = mkOption {
- description = lib.mdDoc "Port for pgadmin4 to run on";
+ description = "Port for pgadmin4 to run on";
type = types.port;
default = 5050;
};
@@ -38,12 +38,12 @@ in
package = mkPackageOptionMD pkgs "pgadmin4" { };
initialEmail = mkOption {
- description = lib.mdDoc "Initial email for the pgAdmin account";
+ description = "Initial email for the pgAdmin account";
type = types.str;
};
initialPasswordFile = mkOption {
- description = lib.mdDoc ''
+ description = ''
Initial password file for the pgAdmin account. Minimum length by default is 6.
Please see `services.pgadmin.minimumPasswordLength`.
NOTE: Should be string not a store path, to prevent the password from being world readable
@@ -52,53 +52,53 @@ in
};
minimumPasswordLength = mkOption {
- description = lib.mdDoc "Minimum length of the password";
+ description = "Minimum length of the password";
type = types.int;
default = 6;
};
emailServer = {
enable = mkOption {
- description = lib.mdDoc ''
+ description = ''
Enable SMTP email server. This is necessary, if you want to use password recovery or change your own password
'';
type = types.bool;
default = false;
};
address = mkOption {
- description = lib.mdDoc "SMTP server for email delivery";
+ description = "SMTP server for email delivery";
type = types.str;
default = "localhost";
};
port = mkOption {
- description = lib.mdDoc "SMTP server port for email delivery";
+ description = "SMTP server port for email delivery";
type = types.port;
default = 25;
};
useSSL = mkOption {
- description = lib.mdDoc "SMTP server should use SSL";
+ description = "SMTP server should use SSL";
type = types.bool;
default = false;
};
useTLS = mkOption {
- description = lib.mdDoc "SMTP server should use TLS";
+ description = "SMTP server should use TLS";
type = types.bool;
default = false;
};
username = mkOption {
- description = lib.mdDoc "SMTP server username for email delivery";
+ description = "SMTP server username for email delivery";
type = types.nullOr types.str;
default = null;
};
sender = mkOption {
- description = lib.mdDoc ''
+ description = ''
SMTP server sender email for email delivery. Some servers require this to be a valid email address from that server
'';
type = types.str;
example = "noreply@example.com";
};
passwordFile = mkOption {
- description = lib.mdDoc ''
+ description = ''
Password for SMTP email account.
NOTE: Should be string not a store path, to prevent the password from being world readable
'';
@@ -106,10 +106,10 @@ in
};
};
- openFirewall = mkEnableOption (lib.mdDoc "firewall passthrough for pgadmin4");
+ openFirewall = mkEnableOption "firewall passthrough for pgadmin4";
settings = mkOption {
- description = lib.mdDoc ''
+ description = ''
Settings for pgadmin4.
[Documentation](https://www.pgadmin.org/docs/pgadmin4/development/config_py.html)
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/admin/salt/master.nix b/third_party/nixpkgs/nixos/modules/services/admin/salt/master.nix
index 4346022970..c447540da1 100644
--- a/third_party/nixpkgs/nixos/modules/services/admin/salt/master.nix
+++ b/third_party/nixpkgs/nixos/modules/services/admin/salt/master.nix
@@ -20,11 +20,11 @@ in
{
options = {
services.salt.master = {
- enable = mkEnableOption (lib.mdDoc "Salt master service");
+ enable = mkEnableOption "Salt configuration management system master service";
configuration = mkOption {
type = types.attrs;
default = {};
- description = lib.mdDoc "Salt master configuration as Nix attribute set.";
+ description = "Salt master configuration as Nix attribute set.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/admin/salt/minion.nix b/third_party/nixpkgs/nixos/modules/services/admin/salt/minion.nix
index 3ae02a4cc5..5d4efc6541 100644
--- a/third_party/nixpkgs/nixos/modules/services/admin/salt/minion.nix
+++ b/third_party/nixpkgs/nixos/modules/services/admin/salt/minion.nix
@@ -21,11 +21,11 @@ in
{
options = {
services.salt.minion = {
- enable = mkEnableOption (lib.mdDoc "Salt minion service");
+ enable = mkEnableOption "Salt configuration management system minion service";
configuration = mkOption {
type = types.attrs;
default = {};
- description = lib.mdDoc ''
+ description = ''
Salt minion configuration as Nix attribute set.
See
for details.
diff --git a/third_party/nixpkgs/nixos/modules/services/amqp/activemq/default.nix b/third_party/nixpkgs/nixos/modules/services/amqp/activemq/default.nix
index b1f9b7a3bb..5c886161e4 100644
--- a/third_party/nixpkgs/nixos/modules/services/amqp/activemq/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/amqp/activemq/default.nix
@@ -26,7 +26,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable the Apache ActiveMQ message broker service.
'';
};
@@ -34,7 +34,7 @@ in
default = "${activemq}/conf";
defaultText = literalExpression ''"''${pkgs.activemq}/conf"'';
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The base directory for ActiveMQ's configuration.
By default, this directory is searched for a file named activemq.xml,
which should contain the configuration for the broker service.
@@ -43,7 +43,7 @@ in
configurationURI = mkOption {
type = types.str;
default = "xbean:activemq.xml";
- description = lib.mdDoc ''
+ description = ''
The URI that is passed along to the BrokerFactory to
set up the configuration of the ActiveMQ broker service.
You should not need to change this. For custom configuration,
@@ -54,7 +54,7 @@ in
baseDir = mkOption {
type = types.str;
default = "/var/activemq";
- description = lib.mdDoc ''
+ description = ''
The base directory where ActiveMQ stores its persistent data and logs.
This will be overridden if you set "activemq.base" and "activemq.data"
in the `javaProperties` option. You can also override
@@ -75,7 +75,7 @@ in
"activemq.conf" = "${cfg.configurationDir}";
"activemq.home" = "${activemq}";
} // attrs;
- description = lib.mdDoc ''
+ description = ''
Specifies Java properties that are sent to the ActiveMQ
broker service with the "-D" option. You can set properties
here to change the behaviour and configuration of the broker.
@@ -87,7 +87,7 @@ in
type = types.separatedString " ";
default = "";
example = "-Xmx2G -Xms2G -XX:MaxPermSize=512M";
- description = lib.mdDoc ''
+ description = ''
Add extra options here that you want to be sent to the
Java runtime when the broker service is started.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/amqp/rabbitmq.nix b/third_party/nixpkgs/nixos/modules/services/amqp/rabbitmq.nix
index f2dee07c91..b5aebaaf12 100644
--- a/third_party/nixpkgs/nixos/modules/services/amqp/rabbitmq.nix
+++ b/third_party/nixpkgs/nixos/modules/services/amqp/rabbitmq.nix
@@ -29,7 +29,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the RabbitMQ server, an Advanced Message
Queuing Protocol (AMQP) broker.
'';
@@ -40,7 +40,7 @@ in
listenAddress = mkOption {
default = "127.0.0.1";
example = "";
- description = lib.mdDoc ''
+ description = ''
IP address on which RabbitMQ will listen for AMQP
connections. Set to the empty string to listen on all
interfaces. Note that RabbitMQ creates a user named
@@ -57,7 +57,7 @@ in
port = mkOption {
default = 5672;
- description = lib.mdDoc ''
+ description = ''
Port on which RabbitMQ will listen for AMQP connections.
'';
type = types.port;
@@ -66,7 +66,7 @@ in
dataDir = mkOption {
type = types.path;
default = "/var/lib/rabbitmq";
- description = lib.mdDoc ''
+ description = ''
Data directory for rabbitmq.
'';
};
@@ -74,7 +74,7 @@ in
unsafeCookie = mkOption {
default = "";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Erlang cookie is a string of arbitrary length which must
be the same for several nodes to be allowed to communicate.
Leave empty to generate automatically.
@@ -95,7 +95,7 @@ in
"auth_backends.1.authz" = "rabbit_auth_backend_internal";
}
'';
- description = lib.mdDoc ''
+ description = ''
Configuration options in RabbitMQ's new config file format,
which is a simple key-value format that can not express nested
data structures. This is known as the `rabbitmq.conf` file,
@@ -115,7 +115,7 @@ in
config = mkOption {
default = "";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Verbatim advanced configuration file contents using the Erlang syntax.
This is also known as the `advanced.config` file or the old config format.
@@ -133,21 +133,21 @@ in
plugins = mkOption {
default = [ ];
type = types.listOf types.str;
- description = lib.mdDoc "The names of plugins to enable";
+ description = "The names of plugins to enable";
};
pluginDirs = mkOption {
default = [ ];
type = types.listOf types.path;
- description = lib.mdDoc "The list of directories containing external plugins";
+ description = "The list of directories containing external plugins";
};
managementPlugin = {
- enable = mkEnableOption (lib.mdDoc "the management plugin");
+ enable = mkEnableOption "the management plugin";
port = mkOption {
default = 15672;
type = types.port;
- description = lib.mdDoc ''
+ description = ''
On which port to run the management plugin
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/alsa.nix b/third_party/nixpkgs/nixos/modules/services/audio/alsa.nix
index 155780199f..e53da4b64e 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/alsa.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/alsa.nix
@@ -25,7 +25,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable ALSA sound.
'';
};
@@ -33,7 +33,7 @@ in
enableOSSEmulation = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable ALSA OSS emulation (with certain cards sound mixing may not work!).
'';
};
@@ -44,7 +44,7 @@ in
example = ''
defaults.pcm.!card 3
'';
- description = lib.mdDoc ''
+ description = ''
Set addition configuration for system-wide alsa.
'';
};
@@ -54,7 +54,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable volume and capture control with keyboard media keys.
You want to leave this disabled if you run a desktop environment
@@ -70,7 +70,7 @@ in
type = types.str;
default = "1";
example = "1%";
- description = lib.mdDoc ''
+ description = ''
The value by which to increment/decrement volume on media keys.
See amixer(1) for allowed values.
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/botamusique.nix b/third_party/nixpkgs/nixos/modules/services/audio/botamusique.nix
index 42227cb147..c764a79b11 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/botamusique.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/botamusique.nix
@@ -12,7 +12,7 @@ in
meta.maintainers = with lib.maintainers; [ hexa ];
options.services.botamusique = {
- enable = mkEnableOption (lib.mdDoc "botamusique, a bot to play audio streams on mumble");
+ enable = mkEnableOption "botamusique, a bot to play audio streams on mumble";
package = mkPackageOption pkgs "botamusique" { };
@@ -24,30 +24,30 @@ in
type = types.str;
default = "localhost";
example = "mumble.example.com";
- description = lib.mdDoc "Hostname of the mumble server to connect to.";
+ description = "Hostname of the mumble server to connect to.";
};
server.port = mkOption {
type = types.port;
default = 64738;
- description = lib.mdDoc "Port of the mumble server to connect to.";
+ description = "Port of the mumble server to connect to.";
};
bot.username = mkOption {
type = types.str;
default = "botamusique";
- description = lib.mdDoc "Name the bot should appear with.";
+ description = "Name the bot should appear with.";
};
bot.comment = mkOption {
type = types.str;
default = "Hi, I'm here to play radio, local music or youtube/soundcloud music. Have fun!";
- description = lib.mdDoc "Comment displayed for the bot.";
+ description = "Comment displayed for the bot.";
};
};
};
default = {};
- description = lib.mdDoc ''
+ description = ''
Your {file}`configuration.ini` as a Nix attribute set. Look up
possible options in the [configuration.example.ini](https://github.com/azlux/botamusique/blob/master/configuration.example.ini).
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/gmediarender.nix b/third_party/nixpkgs/nixos/modules/services/audio/gmediarender.nix
index a4cb89098d..3f031aeedb 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/gmediarender.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/gmediarender.nix
@@ -7,12 +7,12 @@ let
in
{
options.services.gmediarender = {
- enable = mkEnableOption (mdDoc "the gmediarender DLNA renderer");
+ enable = mkEnableOption "the gmediarender DLNA renderer";
audioDevice = mkOption {
type = types.nullOr types.str;
default = null;
- description = mdDoc ''
+ description = ''
The audio device to use.
'';
};
@@ -20,7 +20,7 @@ in
audioSink = mkOption {
type = types.nullOr types.str;
default = null;
- description = mdDoc ''
+ description = ''
The audio sink to use.
'';
};
@@ -28,7 +28,7 @@ in
friendlyName = mkOption {
type = types.nullOr types.str;
default = null;
- description = mdDoc ''
+ description = ''
A "friendly name" for identifying the endpoint.
'';
};
@@ -36,7 +36,7 @@ in
initialVolume = mkOption {
type = types.nullOr types.int;
default = 0;
- description = mdDoc ''
+ description = ''
A default volume attenuation (in dB) for the endpoint.
'';
};
@@ -48,13 +48,13 @@ in
port = mkOption {
type = types.nullOr types.port;
default = null;
- description = mdDoc "Port that will be used to accept client connections.";
+ description = "Port that will be used to accept client connections.";
};
uuid = mkOption {
type = types.nullOr types.str;
default = null;
- description = mdDoc ''
+ description = ''
A UUID for uniquely identifying the endpoint. If you have
multiple renderers on your network, you MUST set this.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/gonic.nix b/third_party/nixpkgs/nixos/modules/services/audio/gonic.nix
index 66daeb60b5..15a35571ac 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/gonic.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/gonic.nix
@@ -13,7 +13,7 @@ in
options = {
services.gonic = {
- enable = mkEnableOption (lib.mdDoc "Gonic music server");
+ enable = mkEnableOption "Gonic music server";
settings = mkOption rec {
type = settingsFormat.type;
@@ -28,7 +28,7 @@ in
music-path = [ "/mnt/music" ];
podcast-path = "/mnt/podcasts";
};
- description = lib.mdDoc ''
+ description = ''
Configuration for Gonic, see for supported values.
'';
};
@@ -55,6 +55,9 @@ in
RuntimeDirectory = "gonic";
RootDirectory = "/run/gonic";
ReadWritePaths = "";
+ BindPaths = [
+ cfg.settings.playlists-path
+ ];
BindReadOnlyPaths = [
# gonic can access scrobbling services
"-/etc/resolv.conf"
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/goxlr-utility.nix b/third_party/nixpkgs/nixos/modules/services/audio/goxlr-utility.nix
index c047dbb221..6081b3707f 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/goxlr-utility.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/goxlr-utility.nix
@@ -12,7 +12,7 @@ with lib;
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to enable goxlr-utility for controlling your TC-Helicon GoXLR or GoXLR Mini
'';
};
@@ -20,7 +20,7 @@ with lib;
autoStart.xdg = mkOption {
default = true;
type = with types; bool;
- description = lib.mdDoc ''
+ description = ''
Start the daemon automatically using XDG autostart.
Sets `xdg.autostart.enable = true` if not already enabled.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/hqplayerd.nix b/third_party/nixpkgs/nixos/modules/services/audio/hqplayerd.nix
index d54400b18e..d6ac8c58c0 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/hqplayerd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/hqplayerd.nix
@@ -12,13 +12,13 @@ in
{
options = {
services.hqplayerd = {
- enable = mkEnableOption (lib.mdDoc "HQPlayer Embedded");
+ enable = mkEnableOption "HQPlayer Embedded";
auth = {
username = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Username used for HQPlayer's WebUI.
Without this you will need to manually create the credentials after
@@ -29,7 +29,7 @@ in
password = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Password used for HQPlayer's WebUI.
Without this you will need to manually create the credentials after
@@ -41,7 +41,7 @@ in
licenseFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to the HQPlayer license key file.
Without this, the service will run in trial mode and restart every 30
@@ -52,7 +52,7 @@ in
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Opens ports needed for the WebUI and controller API.
'';
};
@@ -60,7 +60,7 @@ in
config = mkOption {
type = types.nullOr types.lines;
default = null;
- description = lib.mdDoc ''
+ description = ''
HQplayer daemon configuration, written to /etc/hqplayer/hqplayerd.xml.
Refer to share/doc/hqplayerd/readme.txt in the hqplayerd derivation for possible values.
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/icecast.nix b/third_party/nixpkgs/nixos/modules/services/audio/icecast.nix
index 63049bd93a..9237baa007 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/icecast.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/icecast.nix
@@ -44,11 +44,11 @@ in {
services.icecast = {
- enable = mkEnableOption (lib.mdDoc "Icecast server");
+ enable = mkEnableOption "Icecast server";
hostname = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "DNS name or IP address that will be used for the stream directory lookups or possibly the playlist generation if a Host header is not provided.";
+ description = "DNS name or IP address that will be used for the stream directory lookups or possibly the playlist generation if a Host header is not provided.";
default = config.networking.domain;
defaultText = literalExpression "config.networking.domain";
};
@@ -56,51 +56,51 @@ in {
admin = {
user = mkOption {
type = types.str;
- description = lib.mdDoc "Username used for all administration functions.";
+ description = "Username used for all administration functions.";
default = "admin";
};
password = mkOption {
type = types.str;
- description = lib.mdDoc "Password used for all administration functions.";
+ description = "Password used for all administration functions.";
};
};
logDir = mkOption {
type = types.path;
- description = lib.mdDoc "Base directory used for logging.";
+ description = "Base directory used for logging.";
default = "/var/log/icecast";
};
listen = {
port = mkOption {
type = types.port;
- description = lib.mdDoc "TCP port that will be used to accept client connections.";
+ description = "TCP port that will be used to accept client connections.";
default = 8000;
};
address = mkOption {
type = types.str;
- description = lib.mdDoc "Address Icecast will listen on.";
+ description = "Address Icecast will listen on.";
default = "::";
};
};
user = mkOption {
type = types.str;
- description = lib.mdDoc "User privileges for the server.";
+ description = "User privileges for the server.";
default = "nobody";
};
group = mkOption {
type = types.str;
- description = lib.mdDoc "Group privileges for the server.";
+ description = "Group privileges for the server.";
default = "nogroup";
};
extraConf = mkOption {
type = types.lines;
- description = lib.mdDoc "icecast.xml content.";
+ description = "icecast.xml content.";
default = "";
};
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/jack.nix b/third_party/nixpkgs/nixos/modules/services/audio/jack.nix
index 3869bd974c..20ba091542 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/jack.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/jack.nix
@@ -16,9 +16,9 @@ in {
options = {
services.jack = {
jackd = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
JACK Audio Connection Kit. You need to add yourself to the "jackaudio" group
- '');
+ '';
package = mkPackageOption pkgs "jack2" {
example = "jack1";
@@ -35,14 +35,14 @@ in {
example = literalExpression ''
[ "-dalsa" "--device" "hw:1" ];
'';
- description = lib.mdDoc ''
+ description = ''
Specifies startup command line arguments to pass to JACK server.
'';
};
session = mkOption {
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Commands to run after JACK is started.
'';
};
@@ -53,7 +53,7 @@ in {
enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Route audio to/from generic ALSA-using applications using ALSA JACK PCM plugin.
'';
};
@@ -61,7 +61,7 @@ in {
support32Bit = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to support sound for 32-bit ALSA applications on 64-bit system.
'';
};
@@ -71,7 +71,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Create ALSA loopback device, instead of using PCM plugin. Has broader
application support (things like Steam will work), but may need fine-tuning
for concrete hardware.
@@ -81,14 +81,14 @@ in {
index = mkOption {
type = types.int;
default = 10;
- description = lib.mdDoc ''
+ description = ''
Index of an ALSA loopback device.
'';
};
config = mkOption {
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
ALSA config for loopback device.
'';
};
@@ -100,7 +100,7 @@ in {
period_size 2048
periods 2
'';
- description = lib.mdDoc ''
+ description = ''
For music production software that still doesn't support JACK natively you
would like to put buffer/period adjustments here
to decrease dmix device latency.
@@ -109,7 +109,7 @@ in {
session = mkOption {
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Additional commands to run to setup loopback device.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/jmusicbot.nix b/third_party/nixpkgs/nixos/modules/services/audio/jmusicbot.nix
index e7803677d0..5507f48590 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/jmusicbot.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/jmusicbot.nix
@@ -7,13 +7,13 @@ in
{
options = {
services.jmusicbot = {
- enable = mkEnableOption (lib.mdDoc "jmusicbot, a Discord music bot that's easy to set up and run yourself");
+ enable = mkEnableOption "jmusicbot, a Discord music bot that's easy to set up and run yourself";
package = mkPackageOption pkgs "jmusicbot" { };
stateDir = mkOption {
type = types.path;
- description = lib.mdDoc ''
+ description = ''
The directory where config.txt and serversettings.json is saved.
If left as the default value this directory will automatically be created before JMusicBot starts, otherwise the sysadmin is responsible for ensuring the directory exists with appropriate ownership and permissions.
Untouched by the value of this option config.txt needs to be placed manually into this directory.
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/liquidsoap.nix b/third_party/nixpkgs/nixos/modules/services/audio/liquidsoap.nix
index 9e61a79796..bd35e01b60 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/liquidsoap.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/liquidsoap.nix
@@ -31,8 +31,7 @@ in
services.liquidsoap.streams = mkOption {
- description =
- lib.mdDoc ''
+ description = ''
Set of Liquidsoap streams to start,
one systemd service per stream.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/mopidy.nix b/third_party/nixpkgs/nixos/modules/services/audio/mopidy.nix
index 8eebf0f9d1..1d6c45b64a 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/mopidy.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/mopidy.nix
@@ -26,12 +26,12 @@ in {
services.mopidy = {
- enable = mkEnableOption (lib.mdDoc "Mopidy, a music player daemon");
+ enable = mkEnableOption "Mopidy, a music player daemon";
dataDir = mkOption {
default = "/var/lib/mopidy";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The directory where Mopidy stores its state.
'';
};
@@ -40,7 +40,7 @@ in {
default = [];
type = types.listOf types.package;
example = literalExpression "[ pkgs.mopidy-spotify ]";
- description = lib.mdDoc ''
+ description = ''
Mopidy extensions that should be loaded by the service.
'';
};
@@ -48,7 +48,7 @@ in {
configuration = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
The configuration that Mopidy should use.
'';
};
@@ -56,7 +56,7 @@ in {
extraConfigFiles = mkOption {
default = [];
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
Extra config file read by Mopidy when the service starts.
Later files in the list overrides earlier configuration.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/mpd.nix b/third_party/nixpkgs/nixos/modules/services/audio/mpd.nix
index 3c853973c8..b5e33f3c09 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/mpd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/mpd.nix
@@ -56,7 +56,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable MPD, the music player daemon.
'';
};
@@ -64,7 +64,7 @@ in {
startWhenNeeded = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If set, {command}`mpd` is socket-activated; that
is, instead of having it permanently running as a daemon,
systemd will start it on the first incoming connection.
@@ -75,7 +75,7 @@ in {
type = with types; either path (strMatching "(http|https|nfs|smb)://.+");
default = "${cfg.dataDir}/music";
defaultText = literalExpression ''"''${dataDir}/music"'';
- description = lib.mdDoc ''
+ description = ''
The directory or NFS/SMB network share where MPD reads music from. If left
as the default value this directory will automatically be created before
the MPD server starts, otherwise the sysadmin is responsible for ensuring
@@ -87,7 +87,7 @@ in {
type = types.path;
default = "${cfg.dataDir}/playlists";
defaultText = literalExpression ''"''${dataDir}/playlists"'';
- description = lib.mdDoc ''
+ description = ''
The directory where MPD stores playlists. If left as the default value
this directory will automatically be created before the MPD server starts,
otherwise the sysadmin is responsible for ensuring the directory exists
@@ -98,7 +98,7 @@ in {
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra directives added to to the end of MPD's configuration file,
mpd.conf. Basic configuration like file location and uid/gid
is added automatically to the beginning of the file. For available
@@ -109,7 +109,7 @@ in {
dataDir = mkOption {
type = types.path;
default = "/var/lib/${name}";
- description = lib.mdDoc ''
+ description = ''
The directory where MPD stores its state, tag cache, playlists etc. If
left as the default value this directory will automatically be created
before the MPD server starts, otherwise the sysadmin is responsible for
@@ -120,13 +120,13 @@ in {
user = mkOption {
type = types.str;
default = name;
- description = lib.mdDoc "User account under which MPD runs.";
+ description = "User account under which MPD runs.";
};
group = mkOption {
type = types.str;
default = name;
- description = lib.mdDoc "Group account under which MPD runs.";
+ description = "Group account under which MPD runs.";
};
network = {
@@ -135,7 +135,7 @@ in {
type = types.str;
default = "127.0.0.1";
example = "any";
- description = lib.mdDoc ''
+ description = ''
The address for the daemon to listen on.
Use `any` to listen on all addresses.
'';
@@ -144,7 +144,7 @@ in {
port = mkOption {
type = types.port;
default = 6600;
- description = lib.mdDoc ''
+ description = ''
This setting is the TCP port that is desired for the daemon to get assigned
to.
'';
@@ -156,7 +156,7 @@ in {
type = types.nullOr types.str;
default = "${cfg.dataDir}/tag_cache";
defaultText = literalExpression ''"''${dataDir}/tag_cache"'';
- description = lib.mdDoc ''
+ description = ''
The path to MPD's database. If set to `null` the
parameter is omitted from the configuration.
'';
@@ -167,7 +167,7 @@ in {
options = {
passwordFile = mkOption {
type = types.path;
- description = lib.mdDoc ''
+ description = ''
Path to file containing the password.
'';
};
@@ -176,14 +176,14 @@ in {
in mkOption {
type = types.listOf (types.enum perms);
default = [ "read" ];
- description = lib.mdDoc ''
+ description = ''
List of permissions that are granted with this password.
Permissions can be "${concatStringsSep "\", \"" perms}".
'';
};
};
});
- description = lib.mdDoc ''
+ description = ''
Credentials and permissions for accessing the mpd server.
'';
default = [];
@@ -196,7 +196,7 @@ in {
fluidsynth = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If set, add fluidsynth soundfont and configure the plugin.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/mpdscribble.nix b/third_party/nixpkgs/nixos/modules/services/audio/mpdscribble.nix
index 132d9ad325..3c7270a3a4 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/mpdscribble.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/mpdscribble.nix
@@ -77,12 +77,12 @@ in {
options.services.mpdscribble = {
- enable = mkEnableOption (lib.mdDoc "mpdscribble");
+ enable = mkEnableOption "mpdscribble, an MPD client which submits info about tracks being played to Last.fm (formerly AudioScrobbler)";
proxy = mkOption {
default = null;
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
HTTP proxy URL.
'';
};
@@ -90,7 +90,7 @@ in {
verbose = mkOption {
default = 1;
type = types.int;
- description = lib.mdDoc ''
+ description = ''
Log level for the mpdscribble daemon.
'';
};
@@ -99,7 +99,7 @@ in {
default = 600;
example = 60;
type = types.int;
- description = lib.mdDoc ''
+ description = ''
How often should mpdscribble save the journal file? [seconds]
'';
};
@@ -115,7 +115,7 @@ in {
else "localhost"
'';
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Host for the mpdscribble daemon to search for a mpd daemon on.
'';
};
@@ -133,7 +133,7 @@ in {
otherwise `null`.
'';
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
File containing the password for the mpd daemon.
If there is a local mpd configured using {option}`services.mpd.credentials`
the default is automatically set to a matching passwordFile of the local mpd.
@@ -144,7 +144,7 @@ in {
default = mpdCfg.network.port;
defaultText = literalExpression "config.${mpdOpt.network.port}";
type = types.port;
- description = lib.mdDoc ''
+ description = ''
Port for the mpdscribble daemon to search for a mpd daemon on.
'';
};
@@ -156,19 +156,17 @@ in {
url = mkOption {
type = types.str;
default = endpointUrls.${name} or "";
- description =
- lib.mdDoc "The url endpoint where the scrobble API is listening.";
+ description = "The url endpoint where the scrobble API is listening.";
};
username = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Username for the scrobble service.
'';
};
passwordFile = mkOption {
type = types.nullOr types.str;
- description =
- lib.mdDoc "File containing the password, either as MD5SUM or cleartext.";
+ description = "File containing the password, either as MD5SUM or cleartext.";
};
};
};
@@ -180,7 +178,7 @@ in {
passwordFile = "/run/secrets/lastfm_password";
};
};
- description = lib.mdDoc ''
+ description = ''
Endpoints to scrobble to.
If the endpoint is one of "${
concatStringsSep "\", \"" (attrNames endpointUrls)
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/mympd.nix b/third_party/nixpkgs/nixos/modules/services/audio/mympd.nix
index f1c7197085..cb1357b61a 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/mympd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/mympd.nix
@@ -7,14 +7,14 @@ in {
services.mympd = {
- enable = lib.mkEnableOption (lib.mdDoc "MyMPD server");
+ enable = lib.mkEnableOption "MyMPD server";
package = lib.mkPackageOption pkgs "mympd" {};
openFirewall = lib.mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open ports needed for the functionality of the program.
'';
};
@@ -23,7 +23,7 @@ in {
type = lib.types.listOf lib.types.str;
default = [ ];
example = [ "music" ];
- description = lib.mdDoc ''
+ description = ''
Additional groups for the systemd service.
'';
};
@@ -34,7 +34,7 @@ in {
options = {
http_port = lib.mkOption {
type = lib.types.port;
- description = lib.mdDoc ''
+ description = ''
The HTTP port where mympd's web interface will be available.
The HTTPS/SSL port can be configured via {option}`config`.
@@ -44,7 +44,7 @@ in {
ssl = lib.mkOption {
type = lib.types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to enable listening on the SSL port.
Refer to
@@ -54,7 +54,7 @@ in {
};
};
};
- description = lib.mdDoc ''
+ description = ''
Manages the configuration files declaratively. For all the configuration
options, see .
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/navidrome.nix b/third_party/nixpkgs/nixos/modules/services/audio/navidrome.nix
index 912edb03aa..a5a7e805e3 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/navidrome.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/navidrome.nix
@@ -9,7 +9,7 @@ in {
options = {
services.navidrome = {
- enable = mkEnableOption (lib.mdDoc "Navidrome music server");
+ enable = mkEnableOption "Navidrome music server";
package = mkPackageOption pkgs "navidrome" { };
@@ -23,7 +23,7 @@ in {
example = {
MusicFolder = "/mnt/music";
};
- description = lib.mdDoc ''
+ description = ''
Configuration for Navidrome, see for supported values.
'';
};
@@ -31,7 +31,7 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to open the TCP port in the firewall";
+ description = "Whether to open the TCP port in the firewall";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/networkaudiod.nix b/third_party/nixpkgs/nixos/modules/services/audio/networkaudiod.nix
index 11486429e6..265a4e1d95 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/networkaudiod.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/networkaudiod.nix
@@ -8,7 +8,7 @@ let
in {
options = {
services.networkaudiod = {
- enable = mkEnableOption (lib.mdDoc "Networkaudiod (NAA)");
+ enable = mkEnableOption "Networkaudiod (NAA)";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/roon-bridge.nix b/third_party/nixpkgs/nixos/modules/services/audio/roon-bridge.nix
index 027b0332fd..218bbb2a48 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/roon-bridge.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/roon-bridge.nix
@@ -8,25 +8,25 @@ let
in {
options = {
services.roon-bridge = {
- enable = mkEnableOption (lib.mdDoc "Roon Bridge");
+ enable = mkEnableOption "Roon Bridge";
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open ports in the firewall for the bridge.
'';
};
user = mkOption {
type = types.str;
default = "roon-bridge";
- description = lib.mdDoc ''
+ description = ''
User to run the Roon bridge as.
'';
};
group = mkOption {
type = types.str;
default = "roon-bridge";
- description = lib.mdDoc ''
+ description = ''
Group to run the Roon Bridge as.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/roon-server.nix b/third_party/nixpkgs/nixos/modules/services/audio/roon-server.nix
index 8691c08b0d..d3b3752dd7 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/roon-server.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/roon-server.nix
@@ -8,25 +8,26 @@ let
in {
options = {
services.roon-server = {
- enable = mkEnableOption (lib.mdDoc "Roon Server");
+ enable = mkEnableOption "Roon Server";
+ package = lib.mkPackageOption pkgs "roon-server" { };
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open ports in the firewall for the server.
'';
};
user = mkOption {
type = types.str;
default = "roon-server";
- description = lib.mdDoc ''
+ description = ''
User to run the Roon Server as.
'';
};
group = mkOption {
type = types.str;
default = "roon-server";
- description = lib.mdDoc ''
+ description = ''
Group to run the Roon Server as.
'';
};
@@ -43,7 +44,7 @@ in {
environment.ROON_ID_DIR = "/var/lib/${name}";
serviceConfig = {
- ExecStart = "${pkgs.roon-server}/bin/RoonServer";
+ ExecStart = "${lib.getExe cfg.package}";
LimitNOFILE = 8192;
User = cfg.user;
Group = cfg.group;
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/slimserver.nix b/third_party/nixpkgs/nixos/modules/services/audio/slimserver.nix
index 73cda08c57..a7f8968ef0 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/slimserver.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/slimserver.nix
@@ -14,7 +14,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable slimserver.
'';
};
@@ -24,7 +24,7 @@ in {
dataDir = mkOption {
type = types.path;
default = "/var/lib/slimserver";
- description = lib.mdDoc ''
+ description = ''
The directory where slimserver stores its state, tag cache,
playlists etc.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/snapserver.nix b/third_party/nixpkgs/nixos/modules/services/audio/snapserver.nix
index dbab741bf6..f79fb7a07d 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/snapserver.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/snapserver.nix
@@ -12,7 +12,7 @@ let
sampleFormat = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Default sample format.
'';
example = "48000:16:2";
@@ -21,7 +21,7 @@ let
codec = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Default audio compression method.
'';
example = "flac";
@@ -77,7 +77,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable snapserver.
'';
};
@@ -86,7 +86,7 @@ in {
type = types.str;
default = "::";
example = "0.0.0.0";
- description = lib.mdDoc ''
+ description = ''
The address where snapclients can connect.
'';
};
@@ -94,7 +94,7 @@ in {
port = mkOption {
type = types.port;
default = 1704;
- description = lib.mdDoc ''
+ description = ''
The port that snapclients can connect to.
'';
};
@@ -102,7 +102,7 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to automatically open the specified ports in the firewall.
'';
};
@@ -113,7 +113,7 @@ in {
streamBuffer = mkOption {
type = with types; nullOr int;
default = null;
- description = lib.mdDoc ''
+ description = ''
Stream read (input) buffer in ms.
'';
example = 20;
@@ -122,7 +122,7 @@ in {
buffer = mkOption {
type = with types; nullOr int;
default = null;
- description = lib.mdDoc ''
+ description = ''
Network buffer in ms.
'';
example = 1000;
@@ -131,7 +131,7 @@ in {
sendToMuted = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Send audio to muted clients.
'';
};
@@ -139,7 +139,7 @@ in {
tcp.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the JSON-RPC via TCP.
'';
};
@@ -148,7 +148,7 @@ in {
type = types.str;
default = "::";
example = "0.0.0.0";
- description = lib.mdDoc ''
+ description = ''
The address where the TCP JSON-RPC listens on.
'';
};
@@ -156,7 +156,7 @@ in {
tcp.port = mkOption {
type = types.port;
default = 1705;
- description = lib.mdDoc ''
+ description = ''
The port where the TCP JSON-RPC listens on.
'';
};
@@ -164,7 +164,7 @@ in {
http.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the JSON-RPC via HTTP.
'';
};
@@ -173,7 +173,7 @@ in {
type = types.str;
default = "::";
example = "0.0.0.0";
- description = lib.mdDoc ''
+ description = ''
The address where the HTTP JSON-RPC listens on.
'';
};
@@ -181,7 +181,7 @@ in {
http.port = mkOption {
type = types.port;
default = 1780;
- description = lib.mdDoc ''
+ description = ''
The port where the HTTP JSON-RPC listens on.
'';
};
@@ -189,7 +189,7 @@ in {
http.docRoot = mkOption {
type = with types; nullOr path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to serve from the HTTP servers root.
'';
};
@@ -199,7 +199,7 @@ in {
options = {
location = mkOption {
type = types.oneOf [ types.path types.str ];
- description = lib.mdDoc ''
+ description = ''
For type `pipe` or `file`, the path to the pipe or file.
For type `librespot`, `airplay` or `process`, the path to the corresponding binary.
For type `tcp`, the `host:port` address to connect to or listen on.
@@ -216,14 +216,14 @@ in {
type = mkOption {
type = types.enum [ "pipe" "librespot" "airplay" "file" "process" "tcp" "alsa" "spotify" "meta" ];
default = "pipe";
- description = lib.mdDoc ''
+ description = ''
The type of input stream.
'';
};
query = mkOption {
type = attrsOf str;
default = {};
- description = lib.mdDoc ''
+ description = ''
Key-value pairs that convey additional parameters about a stream.
'';
example = literalExpression ''
@@ -251,7 +251,7 @@ in {
};
});
default = { default = {}; };
- description = lib.mdDoc ''
+ description = ''
The definition for an input source.
'';
example = literalExpression ''
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/spotifyd.nix b/third_party/nixpkgs/nixos/modules/services/audio/spotifyd.nix
index 1194b6f200..60a7f0fd4e 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/spotifyd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/spotifyd.nix
@@ -17,14 +17,14 @@ in
{
options = {
services.spotifyd = {
- enable = mkEnableOption (lib.mdDoc "spotifyd, a Spotify playing daemon");
+ enable = mkEnableOption "spotifyd, a Spotify playing daemon";
config = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
(Deprecated) Configuration for Spotifyd. For syntax and directives, see
- .
+ .
'';
};
@@ -32,9 +32,9 @@ in
default = {};
type = toml.type;
example = { global.bitrate = 320; };
- description = lib.mdDoc ''
+ description = ''
Configuration for Spotifyd. For syntax and directives, see
- .
+ .
'';
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/squeezelite.nix b/third_party/nixpkgs/nixos/modules/services/audio/squeezelite.nix
index 30dc12552f..36295e21c6 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/squeezelite.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/squeezelite.nix
@@ -14,14 +14,14 @@ in
###### interface
options.services.squeezelite = {
- enable = mkEnableOption (lib.mdDoc "Squeezelite, a software Squeezebox emulator");
+ enable = mkEnableOption "Squeezelite, a software Squeezebox emulator";
- pulseAudio = mkEnableOption (lib.mdDoc "pulseaudio support");
+ pulseAudio = mkEnableOption "pulseaudio support";
extraArguments = mkOption {
default = "";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Additional command line arguments to pass to Squeezelite.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/tts.nix b/third_party/nixpkgs/nixos/modules/services/audio/tts.nix
index 0d93224ec0..4db624229a 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/tts.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/tts.nix
@@ -10,18 +10,18 @@ in
{
options.services.tts = let
- inherit (lib) literalExpression mkOption mdDoc mkEnableOption types;
+ inherit (lib) literalExpression mkOption mkEnableOption types;
in {
servers = mkOption {
type = types.attrsOf (types.submodule (
{ ... }: {
options = {
- enable = mkEnableOption (mdDoc "Coqui TTS server");
+ enable = mkEnableOption "Coqui TTS server";
port = mkOption {
type = types.port;
example = 5000;
- description = mdDoc ''
+ description = ''
Port to bind the TTS server to.
'';
};
@@ -30,7 +30,7 @@ in
type = types.nullOr types.str;
default = "tts_models/en/ljspeech/tacotron2-DDC";
example = null;
- description = mdDoc ''
+ description = ''
Name of the model to download and use for speech synthesis.
Check `tts-server --list_models` for possible values.
@@ -43,7 +43,7 @@ in
type = types.bool;
default = false;
example = true;
- description = mdDoc ''
+ description = ''
Whether to offload computation onto a CUDA compatible GPU.
'';
};
@@ -51,7 +51,7 @@ in
extraArgs = mkOption {
type = types.listOf types.str;
default = [];
- description = mdDoc ''
+ description = ''
Extra arguments to pass to the server commandline.
'';
};
@@ -75,7 +75,7 @@ in
};
}
'';
- description = mdDoc ''
+ description = ''
TTS server instances.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/ympd.nix b/third_party/nixpkgs/nixos/modules/services/audio/ympd.nix
index 6e8d22dab3..ebbe59ca67 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/ympd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/audio/ympd.nix
@@ -12,12 +12,12 @@ in {
services.ympd = {
- enable = mkEnableOption (lib.mdDoc "ympd, the MPD Web GUI");
+ enable = mkEnableOption "ympd, the MPD Web GUI";
webPort = mkOption {
type = types.either types.str types.port; # string for backwards compat
default = "8080";
- description = lib.mdDoc "The port where ympd's web interface will be available.";
+ description = "The port where ympd's web interface will be available.";
example = "ssl://8080:/path/to/ssl-private-key.pem";
};
@@ -25,14 +25,14 @@ in {
host = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "The host where MPD is listening.";
+ description = "The host where MPD is listening.";
};
port = mkOption {
type = types.port;
default = config.services.mpd.network.port;
defaultText = literalExpression "config.services.mpd.network.port";
- description = lib.mdDoc "The port where MPD is listening.";
+ description = "The port where MPD is listening.";
example = 6600;
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/automysqlbackup.nix b/third_party/nixpkgs/nixos/modules/services/backup/automysqlbackup.nix
index 27bbff813b..cf3b6b8d13 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/automysqlbackup.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/automysqlbackup.nix
@@ -34,12 +34,12 @@ in
options = {
services.automysqlbackup = {
- enable = mkEnableOption (lib.mdDoc "AutoMySQLBackup");
+ enable = mkEnableOption "AutoMySQLBackup";
calendar = mkOption {
type = types.str;
default = "01:15:00";
- description = lib.mdDoc ''
+ description = ''
Configured when to run the backup service systemd unit (DayOfWeek Year-Month-Day Hour:Minute:Second).
'';
};
@@ -47,7 +47,7 @@ in
settings = mkOption {
type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
default = {};
- description = lib.mdDoc ''
+ description = ''
automysqlbackup configuration. Refer to
{file}`''${pkgs.automysqlbackup}/etc/automysqlbackup.conf`
for details on supported values.
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/bacula.nix b/third_party/nixpkgs/nixos/modules/services/backup/bacula.nix
index 5a75a46e52..94f6e6ba4f 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/bacula.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/bacula.nix
@@ -4,11 +4,35 @@
# TODO: test configuration when building nixexpr (use -t parameter)
# TODO: support sqlite3 (it's deprecate?) and mysql
-with lib;
let
+ inherit (lib)
+ concatStringsSep
+ literalExpression
+ mapAttrsToList
+ mkIf
+ mkOption
+ optional
+ optionalString
+ types
+ ;
libDir = "/var/lib/bacula";
+ yes_no = bool: if bool then "yes" else "no";
+ tls_conf = tls_cfg: optionalString tls_cfg.enable (
+ concatStringsSep
+ "\n"
+ (
+ ["TLS Enable = yes;"]
+ ++ optional (tls_cfg.require != null) "TLS Require = ${yes_no tls_cfg.require};"
+ ++ optional (tls_cfg.certificate != null) ''TLS Certificate = "${tls_cfg.certificate}";''
+ ++ [''TLS Key = "${tls_cfg.key}";'']
+ ++ optional (tls_cfg.verifyPeer != null) "TLS Verify Peer = ${yes_no tls_cfg.verifyPeer};"
+ ++ optional (tls_cfg.allowedCN != [ ]) "TLS Allowed CN = ${concatStringsSep " " (tls_cfg.allowedCN)};"
+ ++ optional (tls_cfg.caCertificateFile != null) ''TLS CA Certificate File = "${tls_cfg.caCertificateFile}";''
+ )
+ );
+
fd_cfg = config.services.bacula-fd;
fd_conf = pkgs.writeText "bacula-fd.conf"
''
@@ -18,6 +42,7 @@ let
WorkingDirectory = ${libDir};
Pid Directory = /run;
${fd_cfg.extraClientConfig}
+ ${tls_conf fd_cfg.tls}
}
${concatStringsSep "\n" (mapAttrsToList (name: value: ''
@@ -25,6 +50,7 @@ let
Name = "${name}";
Password = ${value.password};
Monitor = ${value.monitor};
+ ${tls_conf value.tls}
}
'') fd_cfg.director)}
@@ -44,6 +70,7 @@ let
WorkingDirectory = ${libDir};
Pid Directory = /run;
${sd_cfg.extraStorageConfig}
+ ${tls_conf sd_cfg.tls}
}
${concatStringsSep "\n" (mapAttrsToList (name: value: ''
@@ -70,6 +97,7 @@ let
Name = "${name}";
Password = ${value.password};
Monitor = ${value.monitor};
+ ${tls_conf value.tls}
}
'') sd_cfg.director)}
@@ -90,6 +118,7 @@ let
Working Directory = ${libDir};
Pid Directory = /run/;
QueryFile = ${pkgs.bacula}/etc/query.sql;
+ ${tls_conf dir_cfg.tls}
${dir_cfg.extraDirectorConfig}
}
@@ -108,13 +137,99 @@ let
${dir_cfg.extraConfig}
'';
- directorOptions = {...}:
+ linkOption = name: destination: "[${name}](#opt-${builtins.replaceStrings [ "<" ">"] ["_" "_"] destination})";
+ tlsLink = destination: submodulePath: linkOption "${submodulePath}.${destination}" "${submodulePath}.${destination}";
+
+ tlsOptions = submodulePath: {...}:
+ {
+ options = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Specifies if TLS should be enabled.
+ If this set to `false` TLS will be completely disabled, even if ${tlsLink "tls.require" submodulePath} is true.
+ '';
+ };
+ require = mkOption {
+ type = types.nullOr types.bool;
+ default = null;
+ description = ''
+ Require TLS or TLS-PSK encryption.
+ This directive is ignored unless one of ${tlsLink "tls.enable" submodulePath} is true or TLS PSK Enable is set to `yes`.
+ If TLS is not required while TLS or TLS-PSK are enabled, then the Bacula component
+ will connect with other components either with or without TLS or TLS-PSK
+
+ If ${tlsLink "tls.enable" submodulePath} or TLS-PSK is enabled and TLS is required, then the Bacula
+ component will refuse any connection request that does not use TLS.
+ '';
+ };
+ certificate = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ description = ''
+ The full path to the PEM encoded TLS certificate.
+ It will be used as either a client or server certificate,
+ depending on the connection direction.
+ This directive is required in a server context, but it may
+ not be specified in a client context if ${tlsLink "tls.verifyPeer" submodulePath} is
+ `false` in the corresponding server context.
+ '';
+ };
+ key = mkOption {
+ type = types.path;
+ description = ''
+ The path of a PEM encoded TLS private key.
+ It must correspond to the TLS certificate.
+ '';
+ };
+ verifyPeer = mkOption {
+ type = types.nullOr types.bool;
+ default = null;
+ description = ''
+ Verify peer certificate.
+ Instructs server to request and verify the client's X.509 certificate.
+ Any client certificate signed by a known-CA will be accepted.
+ Additionally, the client's X509 certificate Common Name must meet the value of the Address directive.
+ If ${tlsLink "tls.allowedCN" submodulePath} is used,
+ the client's x509 certificate Common Name must also correspond to
+ one of the CN specified in the ${tlsLink "tls.allowedCN" submodulePath} directive.
+ This directive is valid only for a server and not in client context.
+
+ Standard from Bacula is `true`.
+ '';
+ };
+ allowedCN = mkOption {
+ type = types.listOf types.str;
+ default = [ ];
+ description = ''
+ Common name attribute of allowed peer certificates.
+ This directive is valid for a server and in a client context.
+ If this directive is specified, the peer certificate will be verified against this list.
+ In the case this directive is configured on a server side, the allowed
+ CN list will not be checked if ${tlsLink "tls.verifyPeer" submodulePath} is false.
+ '';
+ };
+ caCertificateFile = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ description = ''
+ The path specifying a PEM encoded TLS CA certificate(s).
+ Multiple certificates are permitted in the file.
+ One of TLS CA Certificate File or TLS CA Certificate Dir are required in a server context, unless
+ ${tlsLink "tls.verifyPeer" submodulePath} is false, and are always required in a client context.
+ '';
+ };
+ };
+ };
+
+ directorOptions = submodulePath:{...}:
{
options = {
password = mkOption {
type = types.str;
# TODO: required?
- description = lib.mdDoc ''
+ description = ''
Specifies the password that must be supplied for the default Bacula
Console to be authorized. The same password must appear in the
Director resource of the Console configuration file. For added
@@ -135,7 +250,7 @@ let
type = types.enum [ "no" "yes" ];
default = "no";
example = "yes";
- description = lib.mdDoc ''
+ description = ''
If Monitor is set to `no`, this director will have
full access to this Storage daemon. If Monitor is set to
`yes`, this director will only be able to fetch the
@@ -146,6 +261,13 @@ let
security problems.
'';
};
+
+ tls = mkOption {
+ type = types.submodule (tlsOptions "${submodulePath}.director.");
+ description = ''
+ TLS Options for the Director in this Configuration.
+ '';
+ };
};
};
@@ -154,7 +276,7 @@ let
options = {
changerDevice = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The specified name-string must be the generic SCSI device name of the
autochanger that corresponds to the normal read/write Archive Device
specified in the Device resource. This generic SCSI device name
@@ -173,7 +295,7 @@ let
changerCommand = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The name-string specifies an external program to be called that will
automatically change volumes as required by Bacula. Normally, this
directive will be specified only in the AutoChanger resource, which
@@ -195,14 +317,14 @@ let
};
devices = mkOption {
- description = lib.mdDoc "";
+ description = "";
type = types.listOf types.str;
};
extraAutochangerConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra configuration to be passed in Autochanger directive.
'';
example = ''
@@ -219,7 +341,7 @@ let
archiveDevice = mkOption {
# TODO: required?
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The specified name-string gives the system file name of the storage
device managed by this storage daemon. This will usually be the
device file name of a removable storage device (tape drive), for
@@ -236,7 +358,7 @@ let
mediaType = mkOption {
# TODO: required?
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The specified name-string names the type of media supported by this
device, for example, `DLT7000`. Media type names are
arbitrary in that you set them to anything you want, but they must be
@@ -274,7 +396,7 @@ let
extraDeviceConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra configuration to be passed in Device directive.
'';
example = ''
@@ -295,7 +417,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the Bacula File Daemon.
'';
};
@@ -304,7 +426,7 @@ in {
default = "${config.networking.hostName}-fd";
defaultText = literalExpression ''"''${config.networking.hostName}-fd"'';
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The client name that must be used by the Director when connecting.
Generally, it is a good idea to use a name related to the machine so
that error messages can be easily identified if you have multiple
@@ -315,7 +437,7 @@ in {
port = mkOption {
default = 9102;
type = types.port;
- description = lib.mdDoc ''
+ description = ''
This specifies the port number on which the Client listens for
Director connections. It must agree with the FDPort specified in
the Client resource of the Director's configuration file.
@@ -324,16 +446,26 @@ in {
director = mkOption {
default = {};
- description = lib.mdDoc ''
+ description = ''
This option defines director resources in Bacula File Daemon.
'';
- type = with types; attrsOf (submodule directorOptions);
+ type = types.attrsOf (types.submodule (directorOptions "services.bacula-fd"));
};
+
+ tls = mkOption {
+ type = types.submodule (tlsOptions "services.bacula-fd");
+ default = { };
+ description = ''
+ TLS Options for the File Daemon.
+ Important notice: The backup won't be encrypted.
+ '';
+ };
+
extraClientConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra configuration to be passed in Client directive.
'';
example = ''
@@ -345,7 +477,7 @@ in {
extraMessagesConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra configuration to be passed in Messages directive.
'';
example = ''
@@ -358,7 +490,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Bacula Storage Daemon.
'';
};
@@ -367,7 +499,7 @@ in {
default = "${config.networking.hostName}-sd";
defaultText = literalExpression ''"''${config.networking.hostName}-sd"'';
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Specifies the Name of the Storage daemon.
'';
};
@@ -375,7 +507,7 @@ in {
port = mkOption {
default = 9103;
type = types.port;
- description = lib.mdDoc ''
+ description = ''
Specifies port number on which the Storage daemon listens for
Director connections.
'';
@@ -383,32 +515,32 @@ in {
director = mkOption {
default = {};
- description = lib.mdDoc ''
+ description = ''
This option defines Director resources in Bacula Storage Daemon.
'';
- type = with types; attrsOf (submodule directorOptions);
+ type = types.attrsOf (types.submodule (directorOptions "services.bacula-sd"));
};
device = mkOption {
default = {};
- description = lib.mdDoc ''
+ description = ''
This option defines Device resources in Bacula Storage Daemon.
'';
- type = with types; attrsOf (submodule deviceOptions);
+ type = types.attrsOf (types.submodule deviceOptions);
};
autochanger = mkOption {
default = {};
- description = lib.mdDoc ''
+ description = ''
This option defines Autochanger resources in Bacula Storage Daemon.
'';
- type = with types; attrsOf (submodule autochangerOptions);
+ type = types.attrsOf (types.submodule autochangerOptions);
};
extraStorageConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra configuration to be passed in Storage directive.
'';
example = ''
@@ -420,13 +552,21 @@ in {
extraMessagesConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra configuration to be passed in Messages directive.
'';
example = ''
console = all
'';
};
+ tls = mkOption {
+ type = types.submodule (tlsOptions "services.bacula-sd");
+ default = { };
+ description = ''
+ TLS Options for the Storage Daemon.
+ Important notice: The backup won't be encrypted.
+ '';
+ };
};
@@ -434,7 +574,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Bacula Director Daemon.
'';
};
@@ -443,7 +583,7 @@ in {
default = "${config.networking.hostName}-dir";
defaultText = literalExpression ''"''${config.networking.hostName}-dir"'';
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The director name used by the system administrator. This directive is
required.
'';
@@ -452,7 +592,7 @@ in {
port = mkOption {
default = 9101;
type = types.port;
- description = lib.mdDoc ''
+ description = ''
Specify the port (a positive integer) on which the Director daemon
will listen for Bacula Console connections. This same port number
must be specified in the Director resource of the Console
@@ -465,7 +605,7 @@ in {
password = mkOption {
# TODO: required?
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Specifies the password that must be supplied for a Director.
'';
};
@@ -473,7 +613,7 @@ in {
extraMessagesConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra configuration to be passed in Messages directive.
'';
example = ''
@@ -484,7 +624,7 @@ in {
extraDirectorConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra configuration to be passed in Director directive.
'';
example = ''
@@ -496,13 +636,22 @@ in {
extraConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra configuration for Bacula Director Daemon.
'';
example = ''
TODO
'';
};
+
+ tls = mkOption {
+ type = types.submodule (tlsOptions "services.bacula-dir");
+ default = { };
+ description = ''
+ TLS Options for the Director.
+ Important notice: The backup won't be encrypted.
+ '';
+ };
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/borgbackup.md b/third_party/nixpkgs/nixos/modules/services/backup/borgbackup.md
index 39141f6ec8..2c91174732 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/borgbackup.md
+++ b/third_party/nixpkgs/nixos/modules/services/backup/borgbackup.md
@@ -21,22 +21,21 @@ A complete list of options for the Borgbase module may be found
## Basic usage for a local backup {#opt-services-backup-borgbackup-local-directory}
A very basic configuration for backing up to a locally accessible directory is:
-```
+```nix
{
opt.services.borgbackup.jobs = {
- { rootBackup = {
- paths = "/";
- exclude = [ "/nix" "/path/to/local/repo" ];
- repo = "/path/to/local/repo";
- doInit = true;
- encryption = {
- mode = "repokey";
- passphrase = "secret";
- };
- compression = "auto,lzma";
- startAt = "weekly";
+ rootBackup = {
+ paths = "/";
+ exclude = [ "/nix" "/path/to/local/repo" ];
+ repo = "/path/to/local/repo";
+ doInit = true;
+ encryption = {
+ mode = "repokey";
+ passphrase = "secret";
};
- }
+ compression = "auto,lzma";
+ startAt = "weekly";
+ };
};
}
```
@@ -59,7 +58,7 @@ ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID78zmOyA+5uPG4Ot0hfAy+sLDPU1L4AiIoRYEIVbbQ/
```
Add the following snippet to your NixOS configuration:
-```
+```nix
{
services.borgbackup.repos = {
my_borg_repo = {
@@ -80,7 +79,7 @@ that you have stored a secret passphrasse in the file
{file}`/run/keys/borgbackup_passphrase`, which should be only
accessible by root
-```
+```nix
{
services.borgbackup.jobs = {
backupToLocalServer = {
@@ -96,7 +95,7 @@ accessible by root
startAt = "hourly";
};
};
-};
+}
```
The following few commands (run as root) let you test your backup.
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/borgbackup.nix b/third_party/nixpkgs/nixos/modules/services/backup/borgbackup.nix
index 6f4455d3be..570f8931bd 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/borgbackup.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/borgbackup.nix
@@ -123,6 +123,7 @@ let
};
# if remote-backup wait for network
after = optional (cfg.persistentTimer && !isLocalPath cfg.repo) "network-online.target";
+ wants = optional (cfg.persistentTimer && !isLocalPath cfg.repo) "network-online.target";
};
# utility function around makeWrapper
@@ -147,6 +148,9 @@ let
let
settings = { inherit (cfg) user group; };
in lib.nameValuePair "borgbackup-job-${name}" ({
+ # Create parent dirs separately, to ensure correct ownership.
+ "${config.users.users."${cfg.user}".home}/.config".d = settings;
+ "${config.users.users."${cfg.user}".home}/.cache".d = settings;
"${config.users.users."${cfg.user}".home}/.config/borg".d = settings;
"${config.users.users."${cfg.user}".home}/.cache/borg".d = settings;
} // optionalAttrs (isLocalPath cfg.repo && !cfg.removableDevice) {
@@ -229,7 +233,7 @@ in {
options.services.borgbackup.package = mkPackageOption pkgs "borgbackup" { };
options.services.borgbackup.jobs = mkOption {
- description = lib.mdDoc ''
+ description = ''
Deduplicating backups using BorgBackup.
Adding a job will cause a borg-job-NAME wrapper to be added
to your system path, so that you can perform maintenance easily.
@@ -275,7 +279,7 @@ in {
paths = mkOption {
type = with types; nullOr (coercedTo str lib.singleton (listOf str));
default = null;
- description = lib.mdDoc ''
+ description = ''
Path(s) to back up.
Mutually exclusive with {option}`dumpCommand`.
'';
@@ -285,7 +289,7 @@ in {
dumpCommand = mkOption {
type = with types; nullOr path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Backup the stdout of this program instead of filesystem paths.
Mutually exclusive with {option}`paths`.
'';
@@ -294,21 +298,21 @@ in {
repo = mkOption {
type = types.str;
- description = lib.mdDoc "Remote or local repository to back up to.";
+ description = "Remote or local repository to back up to.";
example = "user@machine:/path/to/repo";
};
removableDevice = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether the repo (which must be local) is a removable device.";
+ description = "Whether the repo (which must be local) is a removable device.";
};
archiveBaseName = mkOption {
type = types.nullOr (types.strMatching "[^/{}]+");
default = "${globalConfig.networking.hostName}-${name}";
defaultText = literalExpression ''"''${config.networking.hostName}-"'';
- description = lib.mdDoc ''
+ description = ''
How to name the created archives. A timestamp, whose format is
determined by {option}`dateFormat`, will be appended. The full
name can be modified at runtime (`$archiveName`).
@@ -319,7 +323,7 @@ in {
dateFormat = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Arguments passed to {command}`date`
to create a timestamp suffix for the archive name.
'';
@@ -330,7 +334,7 @@ in {
startAt = mkOption {
type = with types; either str (listOf str);
default = "daily";
- description = lib.mdDoc ''
+ description = ''
When or how often the backup should run.
Must be in the format described in
{manpage}`systemd.time(7)`.
@@ -345,7 +349,7 @@ in {
default = false;
type = types.bool;
example = true;
- description = lib.mdDoc ''
+ description = ''
Set the `persistentTimer` option for the
{manpage}`systemd.timer(5)`
which triggers the backup immediately if the last trigger
@@ -357,14 +361,14 @@ in {
default = false;
type = types.bool;
example = true;
- description = lib.mdDoc ''
+ description = ''
Prevents the system from sleeping while backing up.
'';
};
user = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The user {command}`borg` is run as.
User or group need read permission
for the specified {option}`paths`.
@@ -374,7 +378,7 @@ in {
group = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The group borg is run as. User or group needs read permission
for the specified {option}`paths`.
'';
@@ -388,7 +392,7 @@ in {
"authenticated" "authenticated-blake2"
"none"
];
- description = lib.mdDoc ''
+ description = ''
Encryption mode to use. Setting a mode
other than `"none"` requires
you to specify a {option}`passCommand`
@@ -399,7 +403,7 @@ in {
encryption.passCommand = mkOption {
type = with types; nullOr str;
- description = lib.mdDoc ''
+ description = ''
A command which prints the passphrase to stdout.
Mutually exclusive with {option}`passphrase`.
'';
@@ -409,7 +413,7 @@ in {
encryption.passphrase = mkOption {
type = with types; nullOr str;
- description = lib.mdDoc ''
+ description = ''
The passphrase the backups are encrypted with.
Mutually exclusive with {option}`passCommand`.
If you do not want the passphrase to be stored in the
@@ -423,7 +427,7 @@ in {
# compression mode must be given,
# compression level is optional
type = types.strMatching "none|(auto,)?(lz4|zstd|zlib|lzma)(,[[:digit:]]{1,2})?";
- description = lib.mdDoc ''
+ description = ''
Compression method to use. Refer to
{command}`borg help compression`
for all available options.
@@ -434,7 +438,7 @@ in {
exclude = mkOption {
type = with types; listOf str;
- description = lib.mdDoc ''
+ description = ''
Exclude paths matching any of the given patterns. See
{command}`borg help patterns` for pattern syntax.
'';
@@ -447,7 +451,7 @@ in {
patterns = mkOption {
type = with types; listOf str;
- description = lib.mdDoc ''
+ description = ''
Include/exclude paths matching the given patterns. The first
matching patterns is used, so if an include pattern (prefix `+`)
matches before an exclude pattern (prefix `-`), the file is
@@ -462,7 +466,7 @@ in {
readWritePaths = mkOption {
type = with types; listOf path;
- description = lib.mdDoc ''
+ description = ''
By default, borg cannot write anywhere on the system but
`$HOME/.config/borg` and `$HOME/.cache/borg`.
If, for example, your preHook script needs to dump files
@@ -476,7 +480,7 @@ in {
privateTmp = mkOption {
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Set the `PrivateTmp` option for
the systemd-service. Set to false if you need sockets
or other files from global /tmp.
@@ -486,7 +490,7 @@ in {
doInit = mkOption {
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Run {command}`borg init` if the
specified {option}`repo` does not exist.
You should set this to `false`
@@ -498,7 +502,7 @@ in {
appendFailedSuffix = mkOption {
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Append a `.failed` suffix
to the archive name, which is only removed if
{command}`borg create` has a zero exit status.
@@ -511,7 +515,7 @@ in {
# means there is no limit of yearly archives to keep
# The regex is for use with e.g. --keep-within 1y
type = with types; attrsOf (either int (strMatching "[[:digit:]]+[Hdwmy]"));
- description = lib.mdDoc ''
+ description = ''
Prune a repository by deleting all archives not matching any of the
specified retention options. See {command}`borg help prune`
for the available options.
@@ -529,7 +533,7 @@ in {
prune.prefix = mkOption {
type = types.nullOr (types.str);
- description = lib.mdDoc ''
+ description = ''
Only consider archive names starting with this prefix for pruning.
By default, only archives created by this job are considered.
Use `""` or `null` to consider all archives.
@@ -540,7 +544,7 @@ in {
environment = mkOption {
type = with types; attrsOf str;
- description = lib.mdDoc ''
+ description = ''
Environment variables passed to the backup script.
You can for example specify which SSH key to use.
'';
@@ -550,7 +554,7 @@ in {
preHook = mkOption {
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Shell commands to run before the backup.
This can for example be used to mount file systems.
'';
@@ -563,7 +567,7 @@ in {
postInit = mkOption {
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Shell commands to run after {command}`borg init`.
'';
default = "";
@@ -571,7 +575,7 @@ in {
postCreate = mkOption {
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Shell commands to run after {command}`borg create`. The name
of the created archive is stored in `$archiveName`.
'';
@@ -580,7 +584,7 @@ in {
postPrune = mkOption {
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Shell commands to run after {command}`borg prune`.
'';
default = "";
@@ -588,7 +592,7 @@ in {
postHook = mkOption {
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Shell commands to run just before exit. They are executed
even if a previous command exits with a non-zero exit code.
The latter is available as `$exitStatus`.
@@ -598,7 +602,7 @@ in {
extraArgs = mkOption {
type = with types; coercedTo (listOf str) escapeShellArgs str;
- description = lib.mdDoc ''
+ description = ''
Additional arguments for all {command}`borg` calls the
service has. Handle with care.
'';
@@ -608,7 +612,7 @@ in {
extraInitArgs = mkOption {
type = with types; coercedTo (listOf str) escapeShellArgs str;
- description = lib.mdDoc ''
+ description = ''
Additional arguments for {command}`borg init`.
Can also be set at runtime using `$extraInitArgs`.
'';
@@ -618,7 +622,7 @@ in {
extraCreateArgs = mkOption {
type = with types; coercedTo (listOf str) escapeShellArgs str;
- description = lib.mdDoc ''
+ description = ''
Additional arguments for {command}`borg create`.
Can also be set at runtime using `$extraCreateArgs`.
'';
@@ -631,7 +635,7 @@ in {
extraPruneArgs = mkOption {
type = with types; coercedTo (listOf str) escapeShellArgs str;
- description = lib.mdDoc ''
+ description = ''
Additional arguments for {command}`borg prune`.
Can also be set at runtime using `$extraPruneArgs`.
'';
@@ -641,7 +645,7 @@ in {
extraCompactArgs = mkOption {
type = with types; coercedTo (listOf str) escapeShellArgs str;
- description = lib.mdDoc ''
+ description = ''
Additional arguments for {command}`borg compact`.
Can also be set at runtime using `$extraCompactArgs`.
'';
@@ -654,7 +658,7 @@ in {
};
options.services.borgbackup.repos = mkOption {
- description = lib.mdDoc ''
+ description = ''
Serve BorgBackup repositories to given public SSH keys,
restricting their access to the repository only.
See also the chapter about BorgBackup in the NixOS manual.
@@ -667,7 +671,7 @@ in {
options = {
path = mkOption {
type = types.path;
- description = lib.mdDoc ''
+ description = ''
Where to store the backups. Note that the directory
is created automatically, with correct permissions.
'';
@@ -676,7 +680,7 @@ in {
user = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The user {command}`borg serve` is run as.
User or group needs write permission
for the specified {option}`path`.
@@ -686,7 +690,7 @@ in {
group = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The group {command}`borg serve` is run as.
User or group needs write permission
for the specified {option}`path`.
@@ -696,7 +700,7 @@ in {
authorizedKeys = mkOption {
type = with types; listOf str;
- description = lib.mdDoc ''
+ description = ''
Public SSH keys that are given full write access to this repository.
You should use a different SSH key for each repository you write to, because
the specified keys are restricted to running {command}`borg serve`
@@ -707,7 +711,7 @@ in {
authorizedKeysAppendOnly = mkOption {
type = with types; listOf str;
- description = lib.mdDoc ''
+ description = ''
Public SSH keys that can only be used to append new data (archives) to the repository.
Note that archives can still be marked as deleted and are subsequently removed from disk
upon accessing the repo with full write access, e.g. when pruning.
@@ -717,7 +721,7 @@ in {
allowSubRepos = mkOption {
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Allow clients to create repositories in subdirectories of the
specified {option}`path`. These can be accessed using
`user@machine:path/to/subrepo`. Note that a
@@ -731,7 +735,7 @@ in {
quota = mkOption {
# See the definition of parse_file_size() in src/borg/helpers/parseformat.py
type = with types; nullOr (strMatching "[[:digit:].]+[KMGTP]?");
- description = lib.mdDoc ''
+ description = ''
Storage quota for the repository. This quota is ensured for all
sub-repositories if {option}`allowSubRepos` is enabled
but not for the overall storage space used.
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/borgmatic.nix b/third_party/nixpkgs/nixos/modules/services/backup/borgmatic.nix
index b27dd28171..5da78828bf 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/borgmatic.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/borgmatic.nix
@@ -10,13 +10,13 @@ let
options = {
path = mkOption {
type = str;
- description = mdDoc ''
+ description = ''
Path to the repository
'';
};
label = mkOption {
type = str;
- description = mdDoc ''
+ description = ''
Label to the repository
'';
};
@@ -28,7 +28,7 @@ let
source_directories = mkOption {
type = nullOr (listOf str);
default = null;
- description = mdDoc ''
+ description = ''
List of source directories and files to backup. Globs and tildes are
expanded. Do not backslash spaces in path names.
'';
@@ -37,7 +37,7 @@ let
repositories = mkOption {
type = nullOr (listOf repository);
default = null;
- description = mdDoc ''
+ description = ''
A required list of local or remote repositories with paths and
optional labels (which can be used with the --repository flag to
select a repository). Tildes are expanded. Multiple repositories are
@@ -59,10 +59,10 @@ let
in
{
options.services.borgmatic = {
- enable = mkEnableOption (mdDoc "borgmatic");
+ enable = mkEnableOption "borgmatic";
settings = mkOption {
- description = mdDoc ''
+ description = ''
See https://torsion.org/borgmatic/docs/reference/configuration/
'';
default = null;
@@ -70,7 +70,7 @@ in
};
configurations = mkOption {
- description = mdDoc ''
+ description = ''
Set of borgmatic configurations, see https://torsion.org/borgmatic/docs/reference/configuration/
'';
default = { };
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/btrbk.nix b/third_party/nixpkgs/nixos/modules/services/backup/btrbk.nix
index 364b77b6a2..06ca4236ea 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/btrbk.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/btrbk.nix
@@ -109,7 +109,7 @@ in
options = {
services.btrbk = {
extraPackages = mkOption {
- description = lib.mdDoc ''
+ description = ''
Extra packages for btrbk, like compression utilities for `stream_compress`.
**Note**: This option will get deprecated in future releases.
@@ -122,17 +122,17 @@ in
example = literalExpression "[ pkgs.xz ]";
};
niceness = mkOption {
- description = lib.mdDoc "Niceness for local instances of btrbk. Also applies to remote ones connecting via ssh when positive.";
+ description = "Niceness for local instances of btrbk. Also applies to remote ones connecting via ssh when positive.";
type = types.ints.between (-20) 19;
default = 10;
};
ioSchedulingClass = mkOption {
- description = lib.mdDoc "IO scheduling class for btrbk (see ionice(1) for a quick description). Applies to local instances, and remote ones connecting by ssh if set to idle.";
+ description = "IO scheduling class for btrbk (see ionice(1) for a quick description). Applies to local instances, and remote ones connecting by ssh if set to idle.";
type = types.enum [ "idle" "best-effort" "realtime" ];
default = "best-effort";
};
instances = mkOption {
- description = lib.mdDoc "Set of btrbk instances. The instance named `btrbk` is the default one.";
+ description = "Set of btrbk instances. The instance named `btrbk` is the default one.";
type = with types;
attrsOf (
submodule {
@@ -140,7 +140,7 @@ in
onCalendar = mkOption {
type = types.nullOr types.str;
default = "daily";
- description = lib.mdDoc ''
+ description = ''
How often this btrbk instance is started. See systemd.time(7) for more information about the format.
Setting it to null disables the timer, thus this instance can only be started manually.
'';
@@ -150,7 +150,7 @@ in
freeformType = let t = types.attrsOf (types.either types.str (t // { description = "instances of this type recursively"; })); in t;
options = {
stream_compress = mkOption {
- description = lib.mdDoc ''
+ description = ''
Compress the btrfs send stream before transferring it from/to remote locations using a
compression command.
'';
@@ -173,7 +173,7 @@ in
};
};
};
- description = lib.mdDoc "configuration options for btrbk. Nested attrsets translate to subsections.";
+ description = "configuration options for btrbk. Nested attrsets translate to subsections.";
};
};
}
@@ -181,18 +181,18 @@ in
default = { };
};
sshAccess = mkOption {
- description = lib.mdDoc "SSH keys that should be able to make or push snapshots on this system remotely with btrbk";
+ description = "SSH keys that should be able to make or push snapshots on this system remotely with btrbk";
type = with types; listOf (
submodule {
options = {
key = mkOption {
type = str;
- description = lib.mdDoc "SSH public key allowed to login as user `btrbk` to run remote backups.";
+ description = "SSH public key allowed to login as user `btrbk` to run remote backups.";
};
roles = mkOption {
type = listOf (enum [ "info" "source" "target" "delete" "snapshot" "send" "receive" ]);
example = [ "source" "info" "send" ];
- description = lib.mdDoc "What actions can be performed with this SSH key. See ssh_filter_btrbk(1) for details";
+ description = "What actions can be performed with this SSH key. See ssh_filter_btrbk(1) for details";
};
};
}
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/duplicati.nix b/third_party/nixpkgs/nixos/modules/services/backup/duplicati.nix
index bd433b777e..2b9e171d7d 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/duplicati.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/duplicati.nix
@@ -8,14 +8,14 @@ in
{
options = {
services.duplicati = {
- enable = mkEnableOption (lib.mdDoc "Duplicati");
+ enable = mkEnableOption "Duplicati";
package = mkPackageOption pkgs "duplicati" { };
port = mkOption {
default = 8200;
type = types.port;
- description = lib.mdDoc ''
+ description = ''
Port serving the web interface
'';
};
@@ -23,7 +23,7 @@ in
dataDir = mkOption {
type = types.str;
default = "/var/lib/duplicati";
- description = lib.mdDoc ''
+ description = ''
The directory where Duplicati stores its data files.
::: {.note}
@@ -37,7 +37,7 @@ in
interface = mkOption {
default = "127.0.0.1";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Listening interface for the web UI
Set it to "any" to listen on all available interfaces
'';
@@ -46,7 +46,7 @@ in
user = mkOption {
default = "duplicati";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Duplicati runs as it's own user. It will only be able to backup world-readable files.
Run as root with special care.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/duplicity.nix b/third_party/nixpkgs/nixos/modules/services/backup/duplicity.nix
index 05ec997ab6..033d0cffd8 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/duplicity.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/duplicity.nix
@@ -13,12 +13,12 @@ let
in
{
options.services.duplicity = {
- enable = mkEnableOption (lib.mdDoc "backups with duplicity");
+ enable = mkEnableOption "backups with duplicity";
root = mkOption {
type = types.path;
default = "/";
- description = lib.mdDoc ''
+ description = ''
Root directory to backup.
'';
};
@@ -27,7 +27,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "/home" ];
- description = lib.mdDoc ''
+ description = ''
List of paths to include into the backups. See the FILE SELECTION
section in {manpage}`duplicity(1)` for details on the syntax.
'';
@@ -36,7 +36,7 @@ in
exclude = mkOption {
type = types.listOf types.str;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
List of paths to exclude from backups. See the FILE SELECTION section in
{manpage}`duplicity(1)` for details on the syntax.
'';
@@ -45,7 +45,7 @@ in
targetUrl = mkOption {
type = types.str;
example = "s3://host:port/prefix";
- description = lib.mdDoc ''
+ description = ''
Target url to backup to. See the URL FORMAT section in
{manpage}`duplicity(1)` for supported urls.
'';
@@ -54,7 +54,7 @@ in
secretFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path of a file containing secrets (gpg passphrase, access key...) in
the format of EnvironmentFile as described by
{manpage}`systemd.exec(5)`. For example:
@@ -69,7 +69,7 @@ in
frequency = mkOption {
type = types.nullOr types.str;
default = "daily";
- description = lib.mdDoc ''
+ description = ''
Run duplicity with the given frequency (see
{manpage}`systemd.time(7)` for the format).
If null, do not run automatically.
@@ -80,7 +80,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "--backend-retry-delay" "100" ];
- description = lib.mdDoc ''
+ description = ''
Extra command-line flags passed to duplicity. See
{manpage}`duplicity(1)`.
'';
@@ -90,7 +90,7 @@ in
type = types.str;
default = "never";
example = "1M";
- description = lib.mdDoc ''
+ description = ''
If `"never"` (the default) always do incremental
backups (the first backup will be a full backup, of course). If
`"always"` always do full backups. Otherwise, this
@@ -105,7 +105,7 @@ in
type = types.nullOr types.str;
default = null;
example = "6M";
- description = lib.mdDoc ''
+ description = ''
If non-null, delete all backup sets older than the given time. Old backup sets
will not be deleted if backup sets newer than time depend on them.
'';
@@ -114,7 +114,7 @@ in
type = types.nullOr types.int;
default = null;
example = 2;
- description = lib.mdDoc ''
+ description = ''
If non-null, delete all backups sets that are older than the count:th last full
backup (in other words, keep the last count full backups and
associated incremental sets).
@@ -124,7 +124,7 @@ in
type = types.nullOr types.int;
default = null;
example = 1;
- description = lib.mdDoc ''
+ description = ''
If non-null, delete incremental sets of all backups sets that are
older than the count:th last full backup (in other words, keep only
old full backups and not their increments).
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/mysql-backup.nix b/third_party/nixpkgs/nixos/modules/services/backup/mysql-backup.nix
index 9fbc599cd4..00381be4b7 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/mysql-backup.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/mysql-backup.nix
@@ -37,12 +37,12 @@ in
services.mysqlBackup = {
- enable = mkEnableOption (lib.mdDoc "MySQL backups");
+ enable = mkEnableOption "MySQL backups";
calendar = mkOption {
type = types.str;
default = "01:15:00";
- description = lib.mdDoc ''
+ description = ''
Configured when to run the backup service systemd unit (DayOfWeek Year-Month-Day Hour:Minute:Second).
'';
};
@@ -50,7 +50,7 @@ in
user = mkOption {
type = types.str;
default = defaultUser;
- description = lib.mdDoc ''
+ description = ''
User to be used to perform backup.
'';
};
@@ -58,7 +58,7 @@ in
databases = mkOption {
default = [];
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
List of database names to dump.
'';
};
@@ -66,7 +66,7 @@ in
location = mkOption {
type = types.path;
default = "/var/backup/mysql";
- description = lib.mdDoc ''
+ description = ''
Location to put the gzipped MySQL database dumps.
'';
};
@@ -74,7 +74,7 @@ in
singleTransaction = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to create database dump in a single transaction
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/postgresql-backup.nix b/third_party/nixpkgs/nixos/modules/services/backup/postgresql-backup.nix
index 82067d8ade..5dd9e07586 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/postgresql-backup.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/postgresql-backup.nix
@@ -71,12 +71,12 @@ in {
options = {
services.postgresqlBackup = {
- enable = mkEnableOption (lib.mdDoc "PostgreSQL dumps");
+ enable = mkEnableOption "PostgreSQL dumps";
startAt = mkOption {
default = "*-*-* 01:15:00";
type = with types; either (listOf str) str;
- description = lib.mdDoc ''
+ description = ''
This option defines (see `systemd.time` for format) when the
databases should be dumped.
The default is to update at 01:15 (at night) every day.
@@ -87,7 +87,7 @@ in {
default = cfg.databases == [];
defaultText = literalExpression "services.postgresqlBackup.databases == []";
type = lib.types.bool;
- description = lib.mdDoc ''
+ description = ''
Backup all databases using pg_dumpall.
This option is mutual exclusive to
`services.postgresqlBackup.databases`.
@@ -99,7 +99,7 @@ in {
databases = mkOption {
default = [];
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
List of database names to dump.
'';
};
@@ -107,7 +107,7 @@ in {
location = mkOption {
default = "/var/backup/postgresql";
type = types.path;
- description = lib.mdDoc ''
+ description = ''
Path of directory where the PostgreSQL database dumps will be placed.
'';
};
@@ -115,7 +115,7 @@ in {
pgdumpOptions = mkOption {
type = types.separatedString " ";
default = "-C";
- description = lib.mdDoc ''
+ description = ''
Command line options for pg_dump. This options is not used
if `config.services.postgresqlBackup.backupAll` is enabled.
Note that config.services.postgresqlBackup.backupAll is also active,
@@ -126,7 +126,7 @@ in {
compression = mkOption {
type = types.enum ["none" "gzip" "zstd"];
default = "gzip";
- description = lib.mdDoc ''
+ description = ''
The type of compression to use on the generated database dump.
'';
};
@@ -134,7 +134,7 @@ in {
compressionLevel = mkOption {
type = types.ints.between 1 19;
default = 6;
- description = lib.mdDoc ''
+ description = ''
The compression level used when compression is enabled.
gzip accepts levels 1 to 9. zstd accepts levels 1 to 19.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/postgresql-wal-receiver.nix b/third_party/nixpkgs/nixos/modules/services/backup/postgresql-wal-receiver.nix
index 332a32d370..a8f2cf514d 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/postgresql-wal-receiver.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/postgresql-wal-receiver.nix
@@ -12,7 +12,7 @@ let
directory = mkOption {
type = types.path;
example = literalExpression "/mnt/pg_wal/main/";
- description = lib.mdDoc ''
+ description = ''
Directory to write the output to.
'';
};
@@ -20,7 +20,7 @@ let
statusInterval = mkOption {
type = types.int;
default = 10;
- description = lib.mdDoc ''
+ description = ''
Specifies the number of seconds between status packets sent back to the server.
This allows for easier monitoring of the progress from server.
A value of zero disables the periodic status updates completely,
@@ -32,7 +32,7 @@ let
type = types.str;
default = "";
example = "some_slot_name";
- description = lib.mdDoc ''
+ description = ''
Require {command}`pg_receivewal` to use an existing replication slot (see
[Section 26.2.6 of the PostgreSQL manual](https://www.postgresql.org/docs/current/warm-standby.html#STREAMING-REPLICATION-SLOTS)).
When this option is used, {command}`pg_receivewal` will report a flush position to the server,
@@ -48,7 +48,7 @@ let
synchronous = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Flush the WAL data to disk immediately after it has been received.
Also send a status packet back to the server immediately after flushing, regardless of {option}`statusInterval`.
@@ -60,7 +60,7 @@ let
compress = mkOption {
type = types.ints.between 0 9;
default = 0;
- description = lib.mdDoc ''
+ description = ''
Enables gzip compression of write-ahead logs, and specifies the compression level
(`0` through `9`, `0` being no compression and `9` being best compression).
The suffix `.gz` will automatically be added to all filenames.
@@ -72,7 +72,7 @@ let
connection = mkOption {
type = types.str;
example = "postgresql://user@somehost";
- description = lib.mdDoc ''
+ description = ''
Specifies parameters used to connect to the server, as a connection string.
See [Section 34.1.1 of the PostgreSQL manual](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING) for more information.
@@ -89,7 +89,7 @@ let
"--no-sync"
]
'';
- description = lib.mdDoc ''
+ description = ''
A list of extra arguments to pass to the {command}`pg_receivewal` command.
'';
};
@@ -103,7 +103,7 @@ let
PGSSLMODE = "require";
}
'';
- description = lib.mdDoc ''
+ description = ''
Environment variables passed to the service.
Usable parameters are listed in [Section 34.14 of the PostgreSQL manual](https://www.postgresql.org/docs/current/libpq-envars.html).
'';
@@ -127,7 +127,7 @@ in {
};
}
'';
- description = lib.mdDoc ''
+ description = ''
PostgreSQL WAL receivers.
Stream write-ahead logs from a PostgreSQL server using {command}`pg_receivewal` (formerly {command}`pg_receivexlog`).
See [the man page](https://www.postgresql.org/docs/current/app-pgreceivewal.html) for more information.
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/restic-rest-server.nix b/third_party/nixpkgs/nixos/modules/services/backup/restic-rest-server.nix
index 105a05caf3..935907643b 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/restic-rest-server.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/restic-rest-server.nix
@@ -9,25 +9,25 @@ in
meta.maintainers = [ maintainers.bachp ];
options.services.restic.server = {
- enable = mkEnableOption (lib.mdDoc "Restic REST Server");
+ enable = mkEnableOption "Restic REST Server";
listenAddress = mkOption {
- default = ":8000";
+ default = "8000";
example = "127.0.0.1:8080";
type = types.str;
- description = lib.mdDoc "Listen on a specific IP address and port.";
+ description = "Listen on a specific IP address and port.";
};
dataDir = mkOption {
default = "/var/lib/restic";
type = types.path;
- description = lib.mdDoc "The directory for storing the restic repository.";
+ description = "The directory for storing the restic repository.";
};
appendOnly = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enable append only mode.
This mode allows creation of new backups but prevents deletion and modification of existing backups.
This can be useful when backing up systems that have a potential of being hacked.
@@ -37,7 +37,7 @@ in
privateRepos = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enable private repos.
Grants access only when a subdirectory with the same name as the user is specified in the repository URL.
'';
@@ -46,13 +46,13 @@ in
prometheus = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Enable Prometheus metrics at /metrics.";
+ description = "Enable Prometheus metrics at /metrics.";
};
extraFlags = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
Extra commandline options to pass to Restic REST server.
'';
};
@@ -61,14 +61,19 @@ in
};
config = mkIf cfg.enable {
+ assertions = [{
+ assertion = lib.substring 0 1 cfg.listenAddress != ":";
+ message = "The restic-rest-server now uses systemd socket activation, which expects only the Port number: services.restic.server.listenAddress = \"${lib.substring 1 6 cfg.listenAddress}\";";
+ }];
+
systemd.services.restic-rest-server = {
description = "Restic REST Server";
- after = [ "network.target" ];
+ after = [ "network.target" "restic-rest-server.socket" ];
+ requires = [ "restic-rest-server.socket" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = ''
${cfg.package}/bin/rest-server \
- --listen ${cfg.listenAddress} \
--path ${cfg.dataDir} \
${optionalString cfg.appendOnly "--append-only"} \
${optionalString cfg.privateRepos "--private-repos"} \
@@ -80,16 +85,40 @@ in
Group = "restic";
# Security hardening
- ReadWritePaths = [ cfg.dataDir ];
+ CapabilityBoundingSet = "";
+ LockPersonality = true;
+ MemoryDenyWriteExecute = true;
+ NoNewPrivileges = true;
+ PrivateNetwork = true;
PrivateTmp = true;
+ PrivateUsers = true;
+ ProtectClock = true;
+ ProtectHome = true;
+ ProtectHostname = true;
+ ProtectKernelLogs = true;
+ ProtectProc = "invisible";
ProtectSystem = "strict";
ProtectKernelTunables = true;
ProtectKernelModules = true;
ProtectControlGroups = true;
PrivateDevices = true;
+ ReadWritePaths = [ cfg.dataDir ];
+ RemoveIPC = true;
+ RestrictAddressFamilies = "none";
+ RestrictNamespaces = true;
+ RestrictRealtime = true;
+ RestrictSUIDSGID = true;
+ SystemCallArchitectures = "native";
+ SystemCallFilter = "@system-service";
+ UMask = 027;
};
};
+ systemd.sockets.restic-rest-server = {
+ listenStreams = [ cfg.listenAddress ];
+ wantedBy = [ "sockets.target" ];
+ };
+
systemd.tmpfiles.rules = mkIf cfg.privateRepos [
"f ${cfg.dataDir}/.htpasswd 0700 restic restic -"
];
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/restic.nix b/third_party/nixpkgs/nixos/modules/services/backup/restic.nix
index b222dd952d..8b56636c79 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/restic.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/restic.nix
@@ -8,14 +8,14 @@ let
in
{
options.services.restic.backups = mkOption {
- description = lib.mdDoc ''
+ description = ''
Periodic backups to create with Restic.
'';
type = types.attrsOf (types.submodule ({ config, name, ... }: {
options = {
passwordFile = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Read the repository password from a file.
'';
example = "/etc/nixos/restic-password";
@@ -24,7 +24,7 @@ in
environmentFile = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
file containing the credentials to access the repository, in the
format of an EnvironmentFile as described by systemd.exec(5)
'';
@@ -33,7 +33,7 @@ in
rcloneOptions = mkOption {
type = with types; nullOr (attrsOf (oneOf [ str bool ]));
default = null;
- description = lib.mdDoc ''
+ description = ''
Options to pass to rclone to control its behavior.
See for
available options. When specifying option names, strip the
@@ -50,7 +50,7 @@ in
rcloneConfig = mkOption {
type = with types; nullOr (attrsOf (oneOf [ str bool ]));
default = null;
- description = lib.mdDoc ''
+ description = ''
Configuration for the rclone remote being used for backup.
See the remote's specific options under rclone's docs at
. When specifying
@@ -74,7 +74,7 @@ in
rcloneConfigFile = mkOption {
type = with types; nullOr path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to the file containing rclone configuration. This file
must contain configuration for the remote specified in this backup
set and also must be readable by root. Options set in
@@ -86,7 +86,7 @@ in
repository = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
repository to backup to.
'';
example = "sftp:backup@192.168.1.100:/backups/${name}";
@@ -95,7 +95,7 @@ in
repositoryFile = mkOption {
type = with types; nullOr path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to the file containing the repository location to backup to.
'';
};
@@ -105,7 +105,7 @@ in
# after some time has passed since this comment was added.
type = types.nullOr (types.listOf types.str);
default = [ ];
- description = lib.mdDoc ''
+ description = ''
Which paths to backup, in addition to ones specified via
`dynamicFilesFrom`. If null or an empty array and
`dynamicFilesFrom` is also null, no backup command will be run.
@@ -120,7 +120,7 @@ in
exclude = mkOption {
type = types.listOf types.str;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
Patterns to exclude when backing up. See
https://restic.readthedocs.io/en/latest/040_backup.html#excluding-files for
details on syntax.
@@ -138,7 +138,7 @@ in
OnCalendar = "daily";
Persistent = true;
};
- description = lib.mdDoc ''
+ description = ''
When to run the backup. See {manpage}`systemd.timer(5)` for
details. If null no timer is created and the backup will only
run when explicitly started.
@@ -153,7 +153,7 @@ in
user = mkOption {
type = types.str;
default = "root";
- description = lib.mdDoc ''
+ description = ''
As which user the backup should run.
'';
example = "postgresql";
@@ -162,7 +162,7 @@ in
extraBackupArgs = mkOption {
type = types.listOf types.str;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
Extra arguments passed to restic backup.
'';
example = [
@@ -173,7 +173,7 @@ in
extraOptions = mkOption {
type = types.listOf types.str;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
Extra extended options to be passed to the restic --option flag.
'';
example = [
@@ -184,7 +184,7 @@ in
initialize = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Create the repository if it doesn't exist.
'';
};
@@ -192,7 +192,7 @@ in
pruneOpts = mkOption {
type = types.listOf types.str;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
A list of options (--keep-\* et al.) for 'restic forget
--prune', to automatically prune old snapshots. The
'forget' command is run *after* the 'backup' command, so
@@ -209,7 +209,7 @@ in
checkOpts = mkOption {
type = types.listOf types.str;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
A list of options for 'restic check', which is run after
pruning.
'';
@@ -221,7 +221,7 @@ in
dynamicFilesFrom = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
A script that produces a list of files to back up. The
results of this command are given to the '--files-from'
option. The result is merged with paths specified via `paths`.
@@ -232,7 +232,7 @@ in
backupPrepareCommand = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
A script that must run before starting the backup process.
'';
};
@@ -240,7 +240,7 @@ in
backupCleanupCommand = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
A script that must run after finishing the backup process.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/rsnapshot.nix b/third_party/nixpkgs/nixos/modules/services/backup/rsnapshot.nix
index 0b9bb60af0..6635a51ec2 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/rsnapshot.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/rsnapshot.nix
@@ -22,9 +22,9 @@ in
{
options = {
services.rsnapshot = {
- enable = mkEnableOption (lib.mdDoc "rsnapshot backups");
+ enable = mkEnableOption "rsnapshot backups";
enableManualRsnapshot = mkOption {
- description = lib.mdDoc "Whether to enable manual usage of the rsnapshot command with this module.";
+ description = "Whether to enable manual usage of the rsnapshot command with this module.";
default = true;
type = types.bool;
};
@@ -37,7 +37,7 @@ in
backup /home/ localhost/
'';
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
rsnapshot configuration option in addition to the defaults from
rsnapshot and this module.
@@ -53,7 +53,7 @@ in
default = {};
example = { hourly = "0 * * * *"; daily = "50 21 * * *"; };
type = types.attrsOf types.str;
- description = lib.mdDoc ''
+ description = ''
Periodicity at which intervals should be run by cron.
Note that the intervals also have to exist in configuration
as retain options.
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/sanoid.nix b/third_party/nixpkgs/nixos/modules/services/backup/sanoid.nix
index 46d1de4ed9..1b9ace358c 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/sanoid.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/sanoid.nix
@@ -12,37 +12,37 @@ let
commonOptions = {
hourly = mkOption {
- description = lib.mdDoc "Number of hourly snapshots.";
+ description = "Number of hourly snapshots.";
type = with types; nullOr ints.unsigned;
default = null;
};
daily = mkOption {
- description = lib.mdDoc "Number of daily snapshots.";
+ description = "Number of daily snapshots.";
type = with types; nullOr ints.unsigned;
default = null;
};
monthly = mkOption {
- description = lib.mdDoc "Number of monthly snapshots.";
+ description = "Number of monthly snapshots.";
type = with types; nullOr ints.unsigned;
default = null;
};
yearly = mkOption {
- description = lib.mdDoc "Number of yearly snapshots.";
+ description = "Number of yearly snapshots.";
type = with types; nullOr ints.unsigned;
default = null;
};
autoprune = mkOption {
- description = lib.mdDoc "Whether to automatically prune old snapshots.";
+ description = "Whether to automatically prune old snapshots.";
type = with types; nullOr bool;
default = null;
};
autosnap = mkOption {
- description = lib.mdDoc "Whether to automatically take snapshots.";
+ description = "Whether to automatically take snapshots.";
type = with types; nullOr bool;
default = null;
};
@@ -50,7 +50,7 @@ let
datasetOptions = rec {
use_template = mkOption {
- description = lib.mdDoc "Names of the templates to use for this dataset.";
+ description = "Names of the templates to use for this dataset.";
type = types.listOf (types.str // {
check = (types.enum (attrNames cfg.templates)).check;
description = "configured template name";
@@ -60,7 +60,7 @@ let
useTemplate = use_template;
recursive = mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether to recursively snapshot dataset children.
You can also set this to `"zfs"` to handle datasets
recursively in an atomic way without the possibility to
@@ -71,7 +71,7 @@ let
};
process_children_only = mkOption {
- description = lib.mdDoc "Whether to only snapshot child datasets if recursing.";
+ description = "Whether to only snapshot child datasets if recursing.";
type = types.bool;
default = false;
};
@@ -112,7 +112,7 @@ in
# Interface
options.services.sanoid = {
- enable = mkEnableOption (lib.mdDoc "Sanoid ZFS snapshotting service");
+ enable = mkEnableOption "Sanoid ZFS snapshotting service";
package = lib.mkPackageOption pkgs "sanoid" {};
@@ -120,7 +120,7 @@ in
type = types.str;
default = "hourly";
example = "daily";
- description = lib.mdDoc ''
+ description = ''
Run sanoid at this interval. The default is to run hourly.
The format is described in
@@ -136,7 +136,7 @@ in
config.process_children_only = modules.mkAliasAndWrapDefsWithPriority id (options.processChildrenOnly or { });
}));
default = { };
- description = lib.mdDoc "Datasets to snapshot.";
+ description = "Datasets to snapshot.";
};
templates = mkOption {
@@ -145,12 +145,12 @@ in
options = commonOptions;
});
default = { };
- description = lib.mdDoc "Templates for datasets.";
+ description = "Templates for datasets.";
};
settings = mkOption {
type = types.attrsOf datasetSettingsType;
- description = lib.mdDoc ''
+ description = ''
Free-form settings written directly to the config file. See
for allowed values.
@@ -161,7 +161,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "--verbose" "--readonly" "--debug" ];
- description = lib.mdDoc ''
+ description = ''
Extra arguments to pass to sanoid. See
for allowed options.
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/snapraid.nix b/third_party/nixpkgs/nixos/modules/services/backup/snapraid.nix
index c9b2550e80..a621c9f62f 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/snapraid.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/snapraid.nix
@@ -11,7 +11,7 @@ in
];
options.services.snapraid = with types; {
- enable = mkEnableOption (lib.mdDoc "SnapRAID");
+ enable = mkEnableOption "SnapRAID";
dataDisks = mkOption {
default = { };
example = {
@@ -19,7 +19,7 @@ in
d2 = "/mnt/disk2/";
d3 = "/mnt/disk3/";
};
- description = lib.mdDoc "SnapRAID data disks.";
+ description = "SnapRAID data disks.";
type = attrsOf str;
};
parityFiles = mkOption {
@@ -32,7 +32,7 @@ in
"/mnt/diskt/snapraid.5-parity"
"/mnt/disku/snapraid.6-parity"
];
- description = lib.mdDoc "SnapRAID parity files.";
+ description = "SnapRAID parity files.";
type = listOf str;
};
contentFiles = mkOption {
@@ -42,46 +42,46 @@ in
"/mnt/disk1/snapraid.content"
"/mnt/disk2/snapraid.content"
];
- description = lib.mdDoc "SnapRAID content list files.";
+ description = "SnapRAID content list files.";
type = listOf str;
};
exclude = mkOption {
default = [ ];
example = [ "*.unrecoverable" "/tmp/" "/lost+found/" ];
- description = lib.mdDoc "SnapRAID exclude directives.";
+ description = "SnapRAID exclude directives.";
type = listOf str;
};
touchBeforeSync = mkOption {
default = true;
example = false;
- description = lib.mdDoc
+ description =
"Whether {command}`snapraid touch` should be run before {command}`snapraid sync`.";
type = bool;
};
sync.interval = mkOption {
default = "01:00";
example = "daily";
- description = lib.mdDoc "How often to run {command}`snapraid sync`.";
+ description = "How often to run {command}`snapraid sync`.";
type = str;
};
scrub = {
interval = mkOption {
default = "Mon *-*-* 02:00:00";
example = "weekly";
- description = lib.mdDoc "How often to run {command}`snapraid scrub`.";
+ description = "How often to run {command}`snapraid scrub`.";
type = str;
};
plan = mkOption {
default = 8;
example = 5;
- description = lib.mdDoc
+ description =
"Percent of the array that should be checked by {command}`snapraid scrub`.";
type = int;
};
olderThan = mkOption {
default = 10;
example = 20;
- description = lib.mdDoc
+ description =
"Number of days since data was last scrubbed before it can be scrubbed again.";
type = int;
};
@@ -95,7 +95,7 @@ in
autosave 500
pool /pool
'';
- description = lib.mdDoc "Extra config options for SnapRAID.";
+ description = "Extra config options for SnapRAID.";
type = lines;
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/syncoid.nix b/third_party/nixpkgs/nixos/modules/services/backup/syncoid.nix
index 7b8d3b4313..ec9ccaa46d 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/syncoid.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/syncoid.nix
@@ -85,7 +85,7 @@ in
# Interface
options.services.syncoid = {
- enable = mkEnableOption (lib.mdDoc "Syncoid ZFS synchronization service");
+ enable = mkEnableOption "Syncoid ZFS synchronization service";
package = lib.mkPackageOption pkgs "sanoid" {};
@@ -93,7 +93,7 @@ in
type = types.str;
default = "hourly";
example = "*-*-* *:15:00";
- description = lib.mdDoc ''
+ description = ''
Run syncoid at this interval. The default is to run hourly.
The format is described in
@@ -105,7 +105,7 @@ in
type = types.str;
default = "syncoid";
example = "backup";
- description = lib.mdDoc ''
+ description = ''
The user for the service. ZFS privilege delegation will be
automatically configured for any local pools used by syncoid if this
option is set to a user other than root. The user will be given the
@@ -119,13 +119,13 @@ in
type = types.str;
default = "syncoid";
example = "backup";
- description = lib.mdDoc "The group for the service.";
+ description = "The group for the service.";
};
sshKey = mkOption {
type = with types; nullOr (coercedTo path toString str);
default = null;
- description = lib.mdDoc ''
+ description = ''
SSH private key file to use to login to the remote system. Can be
overridden in individual commands.
'';
@@ -134,8 +134,8 @@ in
localSourceAllow = mkOption {
type = types.listOf types.str;
# Permissions snapshot and destroy are in case --no-sync-snap is not used
- default = [ "bookmark" "hold" "send" "snapshot" "destroy" ];
- description = lib.mdDoc ''
+ default = [ "bookmark" "hold" "send" "snapshot" "destroy" "mount" ];
+ description = ''
Permissions granted for the {option}`services.syncoid.user` user
for local source datasets. See
@@ -147,7 +147,7 @@ in
type = types.listOf types.str;
default = [ "change-key" "compression" "create" "mount" "mountpoint" "receive" "rollback" ];
example = [ "create" "mount" "receive" "rollback" ];
- description = lib.mdDoc ''
+ description = ''
Permissions granted for the {option}`services.syncoid.user` user
for local target datasets. See
@@ -162,7 +162,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "--no-sync-snap" ];
- description = lib.mdDoc ''
+ description = ''
Arguments to add to every syncoid command, unless disabled for that
command. See
@@ -173,7 +173,7 @@ in
service = mkOption {
type = types.attrs;
default = { };
- description = lib.mdDoc ''
+ description = ''
Systemd configuration common to all syncoid services.
'';
};
@@ -184,7 +184,7 @@ in
source = mkOption {
type = types.str;
example = "pool/dataset";
- description = lib.mdDoc ''
+ description = ''
Source ZFS dataset. Can be either local or remote. Defaults to
the attribute name.
'';
@@ -193,18 +193,18 @@ in
target = mkOption {
type = types.str;
example = "user@server:pool/dataset";
- description = lib.mdDoc ''
+ description = ''
Target ZFS dataset. Can be either local
(«pool/dataset») or remote
(«user@server:pool/dataset»).
'';
};
- recursive = mkEnableOption (lib.mdDoc ''the transfer of child datasets'');
+ recursive = mkEnableOption ''the transfer of child datasets'';
sshKey = mkOption {
type = with types; nullOr (coercedTo path toString str);
- description = lib.mdDoc ''
+ description = ''
SSH private key file to use to login to the remote system.
Defaults to {option}`services.syncoid.sshKey` option.
'';
@@ -212,7 +212,7 @@ in
localSourceAllow = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
Permissions granted for the {option}`services.syncoid.user` user
for local source datasets. See
@@ -223,7 +223,7 @@ in
localTargetAllow = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
Permissions granted for the {option}`services.syncoid.user` user
for local target datasets. See
@@ -238,7 +238,7 @@ in
type = types.separatedString " ";
default = "";
example = "Lc e";
- description = lib.mdDoc ''
+ description = ''
Advanced options to pass to zfs send. Options are specified
without their leading dashes and separated by spaces.
'';
@@ -248,7 +248,7 @@ in
type = types.separatedString " ";
default = "";
example = "ux recordsize o compression=lz4";
- description = lib.mdDoc ''
+ description = ''
Advanced options to pass to zfs recv. Options are specified
without their leading dashes and separated by spaces.
'';
@@ -257,7 +257,7 @@ in
useCommonArgs = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to add the configured common arguments to this command.
'';
};
@@ -265,7 +265,7 @@ in
service = mkOption {
type = types.attrs;
default = { };
- description = lib.mdDoc ''
+ description = ''
Systemd configuration specific to this syncoid service.
'';
};
@@ -274,7 +274,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "--sshport 2222" ];
- description = lib.mdDoc "Extra syncoid arguments for this command.";
+ description = "Extra syncoid arguments for this command.";
};
};
config = {
@@ -290,7 +290,7 @@ in
"pool/test".target = "root@target:pool/test";
}
'';
- description = lib.mdDoc "Syncoid commands to run.";
+ description = "Syncoid commands to run.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/tarsnap.nix b/third_party/nixpkgs/nixos/modules/services/backup/tarsnap.nix
index 9e1db23ca2..b8f848451d 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/tarsnap.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/tarsnap.nix
@@ -30,14 +30,14 @@ in
options = {
services.tarsnap = {
- enable = mkEnableOption (lib.mdDoc "periodic tarsnap backups");
+ enable = mkEnableOption "periodic tarsnap backups";
package = mkPackageOption pkgs "tarsnap" { };
keyfile = mkOption {
type = types.str;
default = "/root/tarsnap.key";
- description = lib.mdDoc ''
+ description = ''
The keyfile which associates this machine with your tarsnap
account.
Create the keyfile with {command}`tarsnap-keygen`.
@@ -69,7 +69,7 @@ in
type = types.str;
default = gcfg.keyfile;
defaultText = literalExpression "config.${opt.keyfile}";
- description = lib.mdDoc ''
+ description = ''
Set a specific keyfile for this archive. This defaults to
`"/root/tarsnap.key"` if left unspecified.
@@ -94,7 +94,7 @@ in
defaultText = literalExpression ''
"/var/cache/tarsnap/''${utils.escapeSystemdPath config.${options.keyfile}}"
'';
- description = lib.mdDoc ''
+ description = ''
The cache allows tarsnap to identify previously stored data
blocks, reducing archival time and bandwidth usage.
@@ -109,7 +109,7 @@ in
nodump = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Exclude files with the `nodump` flag.
'';
};
@@ -117,7 +117,7 @@ in
printStats = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Print global archive statistics upon completion.
The output is available via
{command}`systemctl status tarsnap-archive-name`.
@@ -127,7 +127,7 @@ in
checkpointBytes = mkOption {
type = types.nullOr types.str;
default = "1GB";
- description = lib.mdDoc ''
+ description = ''
Create a checkpoint every `checkpointBytes`
of uploaded data (optionally specified using an SI prefix).
@@ -142,7 +142,7 @@ in
type = types.str;
default = "01:15";
example = "hourly";
- description = lib.mdDoc ''
+ description = ''
Create archive at this interval.
The format is described in
@@ -153,7 +153,7 @@ in
aggressiveNetworking = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Upload data over multiple TCP connections, potentially
increasing tarsnap's bandwidth utilisation at the cost
of slowing down all other network traffic. Not
@@ -165,13 +165,13 @@ in
directories = mkOption {
type = types.listOf types.path;
default = [];
- description = lib.mdDoc "List of filesystem paths to archive.";
+ description = "List of filesystem paths to archive.";
};
excludes = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
Exclude files and directories matching these patterns.
'';
};
@@ -179,7 +179,7 @@ in
includes = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
Include only files and directories matching these
patterns (the empty list includes everything).
@@ -190,7 +190,7 @@ in
lowmem = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Reduce memory consumption by not caching small files.
Possibly beneficial if the average file size is smaller
than 1 MB and the number of files is lower than the
@@ -201,7 +201,7 @@ in
verylowmem = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Reduce memory consumption by a factor of 2 beyond what
`lowmem` does, at the cost of significantly
slowing down the archiving process.
@@ -211,7 +211,7 @@ in
maxbw = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
Abort archival if upstream bandwidth usage in bytes
exceeds this threshold.
'';
@@ -221,7 +221,7 @@ in
type = types.nullOr types.int;
default = null;
example = literalExpression "25 * 1000";
- description = lib.mdDoc ''
+ description = ''
Upload bandwidth rate limit in bytes.
'';
};
@@ -230,7 +230,7 @@ in
type = types.nullOr types.int;
default = null;
example = literalExpression "50 * 1000";
- description = lib.mdDoc ''
+ description = ''
Download bandwidth rate limit in bytes.
'';
};
@@ -238,21 +238,21 @@ in
verbose = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to produce verbose logging output.
'';
};
explicitSymlinks = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to follow symlinks specified as archives.
'';
};
followSymlinks = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to follow all symlinks in archive trees.
'';
};
@@ -275,7 +275,7 @@ in
}
'';
- description = lib.mdDoc ''
+ description = ''
Tarsnap archive configurations. Each attribute names an archive
to be created at a given time interval, according to the options
associated with it. When uploading to the tarsnap server,
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/tsm.nix b/third_party/nixpkgs/nixos/modules/services/backup/tsm.nix
index 2d727dccde..dc5d8f09e0 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/tsm.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/tsm.nix
@@ -9,17 +9,17 @@ let
inherit (lib.types) nonEmptyStr nullOr;
options.services.tsmBackup = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
automatic backups with the
IBM Storage Protect (Tivoli Storage Manager, TSM) client.
This also enables
{option}`programs.tsmClient.enable`
- '');
+ '';
command = mkOption {
type = nonEmptyStr;
default = "backup";
example = "incr";
- description = lib.mdDoc ''
+ description = ''
The actual command passed to the
`dsmc` executable to start the backup.
'';
@@ -27,7 +27,7 @@ let
servername = mkOption {
type = nonEmptyStr;
example = "mainTsmServer";
- description = lib.mdDoc ''
+ description = ''
Create a systemd system service
`tsm-backup.service` that starts
a backup based on the given servername's stanza.
@@ -45,7 +45,7 @@ let
type = nullOr nonEmptyStr;
default = null;
example = "12:00";
- description = lib.mdDoc ''
+ description = ''
The backup service will be invoked
automatically at the given date/time,
which must be in the format described in
@@ -90,7 +90,7 @@ in
environment.HOME = "/var/lib/tsm-backup";
serviceConfig = {
# for exit status description see
- # https://www.ibm.com/docs/en/storage-protect/8.1.21?topic=clients-client-return-codes
+ # https://www.ibm.com/docs/en/storage-protect/8.1.22?topic=clients-client-return-codes
SuccessExitStatus = "4 8";
# The `-se` option must come after the command.
# The `-optfile` option suppresses a `dsm.opt`-not-found warning.
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/zfs-replication.nix b/third_party/nixpkgs/nixos/modules/services/backup/zfs-replication.nix
index 8e7059e5b5..c89d6fb8ad 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/zfs-replication.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/zfs-replication.nix
@@ -9,46 +9,46 @@ let
in {
options = {
services.zfs.autoReplication = {
- enable = mkEnableOption (lib.mdDoc "ZFS snapshot replication");
+ enable = mkEnableOption "ZFS snapshot replication";
followDelete = mkOption {
- description = lib.mdDoc "Remove remote snapshots that don't have a local correspondent.";
+ description = "Remove remote snapshots that don't have a local correspondent.";
default = true;
type = types.bool;
};
host = mkOption {
- description = lib.mdDoc "Remote host where snapshots should be sent. `lz4` is expected to be installed on this host.";
+ description = "Remote host where snapshots should be sent. `lz4` is expected to be installed on this host.";
example = "example.com";
type = types.str;
};
identityFilePath = mkOption {
- description = lib.mdDoc "Path to SSH key used to login to host.";
+ description = "Path to SSH key used to login to host.";
example = "/home/username/.ssh/id_rsa";
type = types.path;
};
localFilesystem = mkOption {
- description = lib.mdDoc "Local ZFS filesystem from which snapshots should be sent. Defaults to the attribute name.";
+ description = "Local ZFS filesystem from which snapshots should be sent. Defaults to the attribute name.";
example = "pool/file/path";
type = types.str;
};
remoteFilesystem = mkOption {
- description = lib.mdDoc "Remote ZFS filesystem where snapshots should be sent.";
+ description = "Remote ZFS filesystem where snapshots should be sent.";
example = "pool/file/path";
type = types.str;
};
recursive = mkOption {
- description = lib.mdDoc "Recursively discover snapshots to send.";
+ description = "Recursively discover snapshots to send.";
default = true;
type = types.bool;
};
username = mkOption {
- description = lib.mdDoc "Username used by SSH to login to remote host.";
+ description = "Username used by SSH to login to remote host.";
example = "username";
type = types.str;
};
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/znapzend.nix b/third_party/nixpkgs/nixos/modules/services/backup/znapzend.nix
index 2ebe8ad2f6..71e5977c44 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/znapzend.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/znapzend.nix
@@ -52,24 +52,24 @@ let
label = mkOption {
type = str;
- description = lib.mdDoc "Label for this destination. Defaults to the attribute name.";
+ description = "Label for this destination. Defaults to the attribute name.";
};
plan = mkOption {
type = str;
- description = lib.mdDoc planDescription;
+ description = planDescription;
example = planExample;
};
dataset = mkOption {
type = str;
- description = lib.mdDoc "Dataset name to send snapshots to.";
+ description = "Dataset name to send snapshots to.";
example = "tank/main";
};
host = mkOption {
type = nullOr str;
- description = lib.mdDoc ''
+ description = ''
Host to use for the destination dataset. Can be prefixed with
`user@` to specify the ssh user.
'';
@@ -79,7 +79,7 @@ let
presend = mkOption {
type = nullOr str;
- description = lib.mdDoc ''
+ description = ''
Command to run before sending the snapshot to the destination.
Intended to run a remote script via {command}`ssh` on the
destination, e.g. to bring up a backup disk or server or to put a
@@ -91,7 +91,7 @@ let
postsend = mkOption {
type = nullOr str;
- description = lib.mdDoc ''
+ description = ''
Command to run after sending the snapshot to the destination.
Intended to run a remote script via {command}`ssh` on the
destination, e.g. to bring up a backup disk or server or to put a
@@ -115,26 +115,26 @@ let
enable = mkOption {
type = bool;
- description = lib.mdDoc "Whether to enable this source.";
+ description = "Whether to enable this source.";
default = true;
};
recursive = mkOption {
type = bool;
- description = lib.mdDoc "Whether to do recursive snapshots.";
+ description = "Whether to do recursive snapshots.";
default = false;
};
mbuffer = {
enable = mkOption {
type = bool;
- description = lib.mdDoc "Whether to use {command}`mbuffer`.";
+ description = "Whether to use {command}`mbuffer`.";
default = false;
};
port = mkOption {
type = nullOr ints.u16;
- description = lib.mdDoc ''
+ description = ''
Port to use for {command}`mbuffer`.
If this is null, it will run {command}`mbuffer` through
@@ -149,7 +149,7 @@ let
size = mkOption {
type = mbufferSizeType;
- description = lib.mdDoc ''
+ description = ''
The size for {command}`mbuffer`.
Supports the units b, k, M, G.
'';
@@ -160,7 +160,7 @@ let
presnap = mkOption {
type = nullOr str;
- description = lib.mdDoc ''
+ description = ''
Command to run before snapshots are taken on the source dataset,
e.g. for database locking/flushing. See also
{option}`postsnap`.
@@ -173,7 +173,7 @@ let
postsnap = mkOption {
type = nullOr str;
- description = lib.mdDoc ''
+ description = ''
Command to run after snapshots are taken on the source dataset,
e.g. for database unlocking. See also {option}`presnap`.
'';
@@ -185,7 +185,7 @@ let
timestampFormat = mkOption {
type = timestampType;
- description = lib.mdDoc ''
+ description = ''
The timestamp format to use for constructing snapshot names.
The syntax is `strftime`-like. The string must
consist of the mandatory `%Y %m %d %H %M %S`.
@@ -199,7 +199,7 @@ let
sendDelay = mkOption {
type = int;
- description = lib.mdDoc ''
+ description = ''
Specify delay (in seconds) before sending snaps to the destination.
May be useful if you want to control sending time.
'';
@@ -209,19 +209,19 @@ let
plan = mkOption {
type = str;
- description = lib.mdDoc planDescription;
+ description = planDescription;
example = planExample;
};
dataset = mkOption {
type = str;
- description = lib.mdDoc "The dataset to use for this source.";
+ description = "The dataset to use for this source.";
example = "tank/home";
};
destinations = mkOption {
type = attrsOf (destType config);
- description = lib.mdDoc "Additional destinations.";
+ description = "Additional destinations.";
default = {};
example = literalExpression ''
{
@@ -294,13 +294,13 @@ in
{
options = {
services.znapzend = {
- enable = mkEnableOption (lib.mdDoc "ZnapZend ZFS backup daemon");
+ enable = mkEnableOption "ZnapZend ZFS backup daemon";
logLevel = mkOption {
default = "debug";
example = "warning";
type = enum ["debug" "info" "warning" "err" "alert"];
- description = lib.mdDoc ''
+ description = ''
The log level when logging to file. Any of debug, info, warning, err,
alert. Default in daemonized form is debug.
'';
@@ -310,7 +310,7 @@ in
type = str;
default = "syslog::daemon";
example = "/var/log/znapzend.log";
- description = lib.mdDoc ''
+ description = ''
Where to log to (syslog::\ or \).
'';
};
@@ -318,18 +318,18 @@ in
noDestroy = mkOption {
type = bool;
default = false;
- description = lib.mdDoc "Does all changes to the filesystem except destroy.";
+ description = "Does all changes to the filesystem except destroy.";
};
autoCreation = mkOption {
type = bool;
default = false;
- description = lib.mdDoc "Automatically create the destination dataset if it does not exist.";
+ description = "Automatically create the destination dataset if it does not exist.";
};
zetup = mkOption {
type = attrsOf srcType;
- description = lib.mdDoc "Znapzend configuration.";
+ description = "Znapzend configuration.";
default = {};
example = literalExpression ''
{
@@ -350,7 +350,7 @@ in
pure = mkOption {
type = bool;
- description = lib.mdDoc ''
+ description = ''
Do not persist any stateful znapzend setups. If this option is
enabled, your previously set znapzend setups will be cleared and only
the ones defined with this module will be applied.
@@ -358,17 +358,17 @@ in
default = false;
};
- features.oracleMode = mkEnableOption (lib.mdDoc ''
+ features.oracleMode = mkEnableOption ''
destroying snapshots one by one instead of using one long argument list.
If source and destination are out of sync for a long time, you may have
so many snapshots to destroy that the argument gets is too long and the
command fails
- '');
- features.recvu = mkEnableOption (lib.mdDoc ''
+ '';
+ features.recvu = mkEnableOption ''
recvu feature which uses `-u` on the receiving end to keep the destination
filesystem unmounted
- '');
- features.compressed = mkEnableOption (lib.mdDoc ''
+ '';
+ features.compressed = mkEnableOption ''
compressed feature which adds the options `-Lce` to
the {command}`zfs send` command. When this is enabled, make
sure that both the sending and receiving pool have the same relevant
@@ -378,8 +378,8 @@ in
{manpage}`znapzend(1)`
and {manpage}`zfs(8)`
for more info
- '');
- features.sendRaw = mkEnableOption (lib.mdDoc ''
+ '';
+ features.sendRaw = mkEnableOption ''
sendRaw feature which adds the options `-w` to the
{command}`zfs send` command. For encrypted source datasets this
instructs zfs not to decrypt before sending which results in a remote
@@ -387,23 +387,23 @@ in
when the remote isn't fully trusted or not physically secure. This
option must be used consistently, raw incrementals cannot be based on
non-raw snapshots and vice versa
- '');
- features.skipIntermediates = mkEnableOption (lib.mdDoc ''
+ '';
+ features.skipIntermediates = mkEnableOption ''
the skipIntermediates feature to send a single increment
between latest common snapshot and the newly made one. It may skip
several source snaps if the destination was offline for some time, and
it should skip snapshots not managed by znapzend. Normally for online
destinations, the new snapshot is sent as soon as it is created on the
source, so there are no automatic increments to skip
- '');
- features.lowmemRecurse = mkEnableOption (lib.mdDoc ''
+ '';
+ features.lowmemRecurse = mkEnableOption ''
use lowmemRecurse on systems where you have too many datasets, so a
recursive listing of attributes to find backup plans exhausts the
memory available to {command}`znapzend`: instead, go the slower
way to first list all impacted dataset names, and then query their
configs one by one
- '');
- features.zfsGetType = mkEnableOption (lib.mdDoc ''
+ '';
+ features.zfsGetType = mkEnableOption ''
using zfsGetType if your {command}`zfs get` supports a
`-t` argument for filtering by dataset type at all AND
lists properties for snapshots by default when recursing, so that there
@@ -413,7 +413,7 @@ in
differ by hundreds of times (depending on the amount of snapshots in
that dataset tree... and a decent backup plan will ensure you have a lot
of those), so you would benefit from requesting this feature
- '');
+ '';
};
};
@@ -465,5 +465,5 @@ in
};
};
- meta.maintainers = with maintainers; [ infinisil SlothOfAnarchy ];
+ meta.maintainers = with maintainers; [ SlothOfAnarchy ];
}
diff --git a/third_party/nixpkgs/nixos/modules/services/backup/zrepl.nix b/third_party/nixpkgs/nixos/modules/services/backup/zrepl.nix
index 8475a34742..a0e9a0da7e 100644
--- a/third_party/nixpkgs/nixos/modules/services/backup/zrepl.nix
+++ b/third_party/nixpkgs/nixos/modules/services/backup/zrepl.nix
@@ -11,13 +11,13 @@ in
options = {
services.zrepl = {
- enable = mkEnableOption (lib.mdDoc "zrepl");
+ enable = mkEnableOption "zrepl";
package = mkPackageOption pkgs "zrepl" { };
settings = mkOption {
default = { };
- description = lib.mdDoc ''
+ description = ''
Configuration for zrepl. See
for more information.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/blockchain/ethereum/erigon.nix b/third_party/nixpkgs/nixos/modules/services/blockchain/ethereum/erigon.nix
index b8edee33e7..24705b3433 100644
--- a/third_party/nixpkgs/nixos/modules/services/blockchain/ethereum/erigon.nix
+++ b/third_party/nixpkgs/nixos/modules/services/blockchain/ethereum/erigon.nix
@@ -11,19 +11,19 @@ in {
options = {
services.erigon = {
- enable = mkEnableOption (lib.mdDoc "Ethereum implementation on the efficiency frontier");
+ enable = mkEnableOption "Ethereum implementation on the efficiency frontier";
package = mkPackageOption pkgs "erigon" { };
extraArgs = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc "Additional arguments passed to Erigon";
+ description = "Additional arguments passed to Erigon";
default = [ ];
};
secretJwtPath = mkOption {
type = types.path;
- description = lib.mdDoc ''
+ description = ''
Path to the secret jwt used for the http api authentication.
'';
default = "";
@@ -31,7 +31,7 @@ in {
};
settings = mkOption {
- description = lib.mdDoc ''
+ description = ''
Configuration for Erigon
Refer to for details on supported values.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/blockchain/ethereum/geth.nix b/third_party/nixpkgs/nixos/modules/services/blockchain/ethereum/geth.nix
index f07dfa4dc7..f2a7e080ad 100644
--- a/third_party/nixpkgs/nixos/modules/services/blockchain/ethereum/geth.nix
+++ b/third_party/nixpkgs/nixos/modules/services/blockchain/ethereum/geth.nix
@@ -9,129 +9,129 @@ let
options = {
- enable = lib.mkEnableOption (lib.mdDoc "Go Ethereum Node");
+ enable = lib.mkEnableOption "Go Ethereum Node";
port = mkOption {
type = types.port;
default = 30303;
- description = lib.mdDoc "Port number Go Ethereum will be listening on, both TCP and UDP.";
+ description = "Port number Go Ethereum will be listening on, both TCP and UDP.";
};
http = {
- enable = lib.mkEnableOption (lib.mdDoc "Go Ethereum HTTP API");
+ enable = lib.mkEnableOption "Go Ethereum HTTP API";
address = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc "Listen address of Go Ethereum HTTP API.";
+ description = "Listen address of Go Ethereum HTTP API.";
};
port = mkOption {
type = types.port;
default = 8545;
- description = lib.mdDoc "Port number of Go Ethereum HTTP API.";
+ description = "Port number of Go Ethereum HTTP API.";
};
apis = mkOption {
type = types.nullOr (types.listOf types.str);
default = null;
- description = lib.mdDoc "APIs to enable over WebSocket";
+ description = "APIs to enable over WebSocket";
example = ["net" "eth"];
};
};
websocket = {
- enable = lib.mkEnableOption (lib.mdDoc "Go Ethereum WebSocket API");
+ enable = lib.mkEnableOption "Go Ethereum WebSocket API";
address = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc "Listen address of Go Ethereum WebSocket API.";
+ description = "Listen address of Go Ethereum WebSocket API.";
};
port = mkOption {
type = types.port;
default = 8546;
- description = lib.mdDoc "Port number of Go Ethereum WebSocket API.";
+ description = "Port number of Go Ethereum WebSocket API.";
};
apis = mkOption {
type = types.nullOr (types.listOf types.str);
default = null;
- description = lib.mdDoc "APIs to enable over WebSocket";
+ description = "APIs to enable over WebSocket";
example = ["net" "eth"];
};
};
authrpc = {
- enable = lib.mkEnableOption (lib.mdDoc "Go Ethereum Auth RPC API");
+ enable = lib.mkEnableOption "Go Ethereum Auth RPC API";
address = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc "Listen address of Go Ethereum Auth RPC API.";
+ description = "Listen address of Go Ethereum Auth RPC API.";
};
port = mkOption {
type = types.port;
default = 8551;
- description = lib.mdDoc "Port number of Go Ethereum Auth RPC API.";
+ description = "Port number of Go Ethereum Auth RPC API.";
};
vhosts = mkOption {
type = types.nullOr (types.listOf types.str);
default = ["localhost"];
- description = lib.mdDoc "List of virtual hostnames from which to accept requests.";
+ description = "List of virtual hostnames from which to accept requests.";
example = ["localhost" "geth.example.org"];
};
jwtsecret = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc "Path to a JWT secret for authenticated RPC endpoint.";
+ description = "Path to a JWT secret for authenticated RPC endpoint.";
example = "/var/run/geth/jwtsecret";
};
};
metrics = {
- enable = lib.mkEnableOption (lib.mdDoc "Go Ethereum prometheus metrics");
+ enable = lib.mkEnableOption "Go Ethereum prometheus metrics";
address = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc "Listen address of Go Ethereum metrics service.";
+ description = "Listen address of Go Ethereum metrics service.";
};
port = mkOption {
type = types.port;
default = 6060;
- description = lib.mdDoc "Port number of Go Ethereum metrics service.";
+ description = "Port number of Go Ethereum metrics service.";
};
};
network = mkOption {
type = types.nullOr (types.enum [ "goerli" "rinkeby" "yolov2" "ropsten" ]);
default = null;
- description = lib.mdDoc "The network to connect to. Mainnet (null) is the default ethereum network.";
+ description = "The network to connect to. Mainnet (null) is the default ethereum network.";
};
syncmode = mkOption {
type = types.enum [ "snap" "fast" "full" "light" ];
default = "snap";
- description = lib.mdDoc "Blockchain sync mode.";
+ description = "Blockchain sync mode.";
};
gcmode = mkOption {
type = types.enum [ "full" "archive" ];
default = "full";
- description = lib.mdDoc "Blockchain garbage collection mode.";
+ description = "Blockchain garbage collection mode.";
};
maxpeers = mkOption {
type = types.int;
default = 50;
- description = lib.mdDoc "Maximum peers to connect to.";
+ description = "Maximum peers to connect to.";
};
extraArgs = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc "Additional arguments passed to Go Ethereum.";
+ description = "Additional arguments passed to Go Ethereum.";
default = [];
};
@@ -148,7 +148,7 @@ in
services.geth = mkOption {
type = types.attrsOf (types.submodule gethOpts);
default = {};
- description = lib.mdDoc "Specification of one or more geth instances.";
+ description = "Specification of one or more geth instances.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/blockchain/ethereum/lighthouse.nix b/third_party/nixpkgs/nixos/modules/services/blockchain/ethereum/lighthouse.nix
index 863e737d90..dcf56e187e 100644
--- a/third_party/nixpkgs/nixos/modules/services/blockchain/ethereum/lighthouse.nix
+++ b/third_party/nixpkgs/nixos/modules/services/blockchain/ethereum/lighthouse.nix
@@ -9,16 +9,16 @@ in {
options = {
services.lighthouse = {
beacon = mkOption {
- description = lib.mdDoc "Beacon node";
+ description = "Beacon node";
default = {};
type = types.submodule {
options = {
- enable = lib.mkEnableOption (lib.mdDoc "Lightouse Beacon node");
+ enable = lib.mkEnableOption "Lightouse Beacon node";
dataDir = mkOption {
type = types.str;
default = "/var/lib/lighthouse-beacon";
- description = lib.mdDoc ''
+ description = ''
Directory where data will be stored. Each chain will be stored under it's own specific subdirectory.
'';
};
@@ -26,7 +26,7 @@ in {
address = mkOption {
type = types.str;
default = "0.0.0.0";
- description = lib.mdDoc ''
+ description = ''
Listen address of Beacon node.
'';
};
@@ -34,7 +34,7 @@ in {
port = mkOption {
type = types.port;
default = 9000;
- description = lib.mdDoc ''
+ description = ''
Port number the Beacon node will be listening on.
'';
};
@@ -42,7 +42,7 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open the port in the firewall
'';
};
@@ -50,7 +50,7 @@ in {
disableDepositContractSync = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Explicitly disables syncing of deposit logs from the execution node.
This overrides any previous option that depends on it.
Useful if you intend to run a non-validating beacon node.
@@ -61,7 +61,7 @@ in {
address = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc ''
+ description = ''
Listen address for the execution layer.
'';
};
@@ -69,7 +69,7 @@ in {
port = mkOption {
type = types.port;
default = 8551;
- description = lib.mdDoc ''
+ description = ''
Port number the Beacon node will be listening on for the execution layer.
'';
};
@@ -77,18 +77,18 @@ in {
jwtPath = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Path for the jwt secret required to connect to the execution layer.
'';
};
};
http = {
- enable = lib.mkEnableOption (lib.mdDoc "Beacon node http api");
+ enable = lib.mkEnableOption "Beacon node http api";
port = mkOption {
type = types.port;
default = 5052;
- description = lib.mdDoc ''
+ description = ''
Port number of Beacon node RPC service.
'';
};
@@ -96,18 +96,18 @@ in {
address = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc ''
+ description = ''
Listen address of Beacon node RPC service.
'';
};
};
metrics = {
- enable = lib.mkEnableOption (lib.mdDoc "Beacon node prometheus metrics");
+ enable = lib.mkEnableOption "Beacon node prometheus metrics";
address = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc ''
+ description = ''
Listen address of Beacon node metrics service.
'';
};
@@ -115,7 +115,7 @@ in {
port = mkOption {
type = types.port;
default = 5054;
- description = lib.mdDoc ''
+ description = ''
Port number of Beacon node metrics service.
'';
};
@@ -123,7 +123,7 @@ in {
extraArgs = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Additional arguments passed to the lighthouse beacon command.
'';
default = "";
@@ -134,20 +134,20 @@ in {
};
validator = mkOption {
- description = lib.mdDoc "Validator node";
+ description = "Validator node";
default = {};
type = types.submodule {
options = {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable Lightouse Validator node.";
+ description = "Enable Lightouse Validator node.";
};
dataDir = mkOption {
type = types.str;
default = "/var/lib/lighthouse-validator";
- description = lib.mdDoc ''
+ description = ''
Directory where data will be stored. Each chain will be stored under it's own specific subdirectory.
'';
};
@@ -155,17 +155,17 @@ in {
beaconNodes = mkOption {
type = types.listOf types.str;
default = ["http://localhost:5052"];
- description = lib.mdDoc ''
+ description = ''
Beacon nodes to connect to.
'';
};
metrics = {
- enable = lib.mkEnableOption (lib.mdDoc "Validator node prometheus metrics");
+ enable = lib.mkEnableOption "Validator node prometheus metrics";
address = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc ''
+ description = ''
Listen address of Validator node metrics service.
'';
};
@@ -173,7 +173,7 @@ in {
port = mkOption {
type = types.port;
default = 5056;
- description = lib.mdDoc ''
+ description = ''
Port number of Validator node metrics service.
'';
};
@@ -181,7 +181,7 @@ in {
extraArgs = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Additional arguments passed to the lighthouse validator command.
'';
default = "";
@@ -194,14 +194,14 @@ in {
network = mkOption {
type = types.enum [ "mainnet" "prater" "goerli" "gnosis" "kiln" "ropsten" "sepolia" ];
default = "mainnet";
- description = lib.mdDoc ''
+ description = ''
The network to connect to. Mainnet is the default ethereum network.
'';
};
extraArgs = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Additional arguments passed to every lighthouse command.
'';
default = "";
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/corosync/default.nix b/third_party/nixpkgs/nixos/modules/services/cluster/corosync/default.nix
index 477ffbcdb7..cf3448620a 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/corosync/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/corosync/default.nix
@@ -7,38 +7,38 @@ in
{
# interface
options.services.corosync = {
- enable = mkEnableOption (lib.mdDoc "corosync");
+ enable = mkEnableOption "corosync";
package = mkPackageOption pkgs "corosync" { };
clusterName = mkOption {
type = types.str;
default = "nixcluster";
- description = lib.mdDoc "Name of the corosync cluster.";
+ description = "Name of the corosync cluster.";
};
extraOptions = mkOption {
type = with types; listOf str;
default = [];
- description = lib.mdDoc "Additional options with which to start corosync.";
+ description = "Additional options with which to start corosync.";
};
nodelist = mkOption {
- description = lib.mdDoc "Corosync nodelist: all cluster members.";
+ description = "Corosync nodelist: all cluster members.";
default = [];
type = with types; listOf (submodule {
options = {
nodeid = mkOption {
type = int;
- description = lib.mdDoc "Node ID number";
+ description = "Node ID number";
};
name = mkOption {
type = str;
- description = lib.mdDoc "Node name";
+ description = "Node name";
};
ring_addrs = mkOption {
type = listOf str;
- description = lib.mdDoc "List of addresses, one for each ring.";
+ description = "List of addresses, one for each ring.";
};
};
});
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/default.nix b/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/default.nix
index 6fa91d2f04..4b255a97f5 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/default.nix
@@ -16,7 +16,7 @@ with lib;
"fs.defaultFS" = "hdfs://localhost";
}
'';
- description = lib.mdDoc ''
+ description = ''
Hadoop core-site.xml definition
'';
@@ -25,7 +25,7 @@ with lib;
default = {};
type = types.attrsOf types.anything;
internal = true;
- description = lib.mdDoc ''
+ description = ''
Internal option to add configs to core-site.xml based on module options
'';
};
@@ -38,7 +38,7 @@ with lib;
"dfs.namenode.http-bind-host" = "0.0.0.0";
};
type = types.attrsOf types.anything;
- description = lib.mdDoc ''
+ description = ''
Default options for hdfs-site.xml
'';
};
@@ -50,7 +50,7 @@ with lib;
"dfs.nameservices" = "namenode1";
}
'';
- description = lib.mdDoc ''
+ description = ''
Additional options and overrides for hdfs-site.xml
'';
@@ -59,7 +59,7 @@ with lib;
default = {};
type = types.attrsOf types.anything;
internal = true;
- description = lib.mdDoc ''
+ description = ''
Internal option to add configs to hdfs-site.xml based on module options
'';
};
@@ -80,7 +80,7 @@ with lib;
}
'';
type = types.attrsOf types.anything;
- description = lib.mdDoc ''
+ description = ''
Default options for mapred-site.xml
'';
};
@@ -92,7 +92,7 @@ with lib;
"mapreduce.map.java.opts" = "-Xmx900m -XX:+UseParallelGC";
}
'';
- description = lib.mdDoc ''
+ description = ''
Additional options and overrides for mapred-site.xml
'';
@@ -113,7 +113,7 @@ with lib;
"yarn.resourcemanager.scheduler.class" = "org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler";
};
type = types.attrsOf types.anything;
- description = lib.mdDoc ''
+ description = ''
Default options for yarn-site.xml
'';
};
@@ -125,7 +125,7 @@ with lib;
"yarn.resourcemanager.hostname" = "''${config.networking.hostName}";
}
'';
- description = lib.mdDoc ''
+ description = ''
Additional options and overrides for yarn-site.xml
'';
@@ -134,7 +134,7 @@ with lib;
default = {};
type = types.attrsOf types.anything;
internal = true;
- description = lib.mdDoc ''
+ description = ''
Internal option to add configs to yarn-site.xml based on module options
'';
};
@@ -147,7 +147,7 @@ with lib;
"hadoop.http.max.threads" = 500;
}
'';
- description = lib.mdDoc ''
+ description = ''
Hadoop httpfs-site.xml definition
'';
@@ -162,7 +162,7 @@ with lib;
example = literalExpression ''
"''${pkgs.hadoop}/etc/hadoop/log4j.properties";
'';
- description = lib.mdDoc "log4j.properties file added to HADOOP_CONF_DIR";
+ description = "log4j.properties file added to HADOOP_CONF_DIR";
};
containerExecutorCfg = mkOption {
@@ -179,7 +179,7 @@ with lib;
"feature.terminal.enabled" = 0;
}
'';
- description = lib.mdDoc ''
+ description = ''
Yarn container-executor.cfg definition
'';
@@ -194,10 +194,10 @@ with lib;
./extraYARNConfs
]
'';
- description = lib.mdDoc "Directories containing additional config files to be added to HADOOP_CONF_DIR";
+ description = "Directories containing additional config files to be added to HADOOP_CONF_DIR";
};
- gatewayRole.enable = mkEnableOption (lib.mdDoc "gateway role for deploying hadoop configs");
+ gatewayRole.enable = mkEnableOption "gateway role for deploying hadoop configs";
package = mkPackageOption pkgs "hadoop" { };
};
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/hbase.nix b/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/hbase.nix
index 6801e505db..8eb8d83fd8 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/hbase.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/hbase.nix
@@ -7,25 +7,25 @@ let
mkIfNotNull = x: mkIf (x != null) x;
# generic hbase role options
hbaseRoleOption = name: extraOpts: {
- enable = mkEnableOption (mdDoc "HBase ${name}");
+ enable = mkEnableOption "HBase ${name}";
openFirewall = mkOption {
type = types.bool;
default = false;
- description = mdDoc "Open firewall ports for HBase ${name}.";
+ description = "Open firewall ports for HBase ${name}.";
};
restartIfChanged = mkOption {
type = types.bool;
default = false;
- description = mdDoc "Restart ${name} con config change.";
+ description = "Restart ${name} con config change.";
};
extraFlags = mkOption {
type = with types; listOf str;
default = [];
example = literalExpression ''[ "--backup" ]'';
- description = mdDoc "Extra flags for the ${name} service.";
+ description = "Extra flags for the ${name} service.";
};
environment = mkOption {
@@ -36,7 +36,7 @@ let
HBASE_MASTER_OPTS = "-Dcom.sun.management.jmxremote.ssl=true";
}
'';
- description = mdDoc "Environment variables passed to ${name}.";
+ description = "Environment variables passed to ${name}.";
};
} // extraOpts;
# generic hbase role configs
@@ -93,7 +93,7 @@ in
{
options.services.hadoop = {
- gatewayRole.enableHbaseCli = mkEnableOption (mdDoc "HBase CLI tools");
+ gatewayRole.enableHbaseCli = mkEnableOption "HBase CLI tools";
hbaseSiteDefault = mkOption {
default = {
@@ -105,7 +105,7 @@ in
"hbase.cluster.distributed" = "true";
};
type = types.attrsOf types.anything;
- description = mdDoc ''
+ description = ''
Default options for hbase-site.xml
'';
};
@@ -118,7 +118,7 @@ in
"hbase.table.normalization.enabled" = "true";
}
'';
- description = mdDoc ''
+ description = ''
Additional options and overrides for hbase-site.xml
'';
@@ -127,7 +127,7 @@ in
default = {};
type = with types; attrsOf anything;
internal = true;
- description = mdDoc ''
+ description = ''
Internal option to add configs to hbase-site.xml based on module options
'';
};
@@ -137,7 +137,7 @@ in
package = mkPackageOption pkgs "hbase" { };
rootdir = mkOption {
- description = mdDoc ''
+ description = ''
This option will set "hbase.rootdir" in hbase-site.xml and determine
the directory shared by region servers and into which HBase persists.
The URL should be 'fully-qualified' to include the filesystem scheme.
@@ -151,7 +151,7 @@ in
default = "/hbase";
};
zookeeperQuorum = mkOption {
- description = mdDoc ''
+ description = ''
This option will set "hbase.zookeeper.quorum" in hbase-site.xml.
Comma separated list of servers in the ZooKeeper ensemble.
'';
@@ -164,20 +164,20 @@ in
port = mkOption {
type = types.int;
default = port;
- description = mdDoc "RPC port";
+ description = "RPC port";
};
infoPort = mkOption {
type = types.int;
default = infoPort;
- description = mdDoc "web UI port";
+ description = "web UI port";
};
};
in mapAttrs hbaseRoleOption {
- master.initHDFS = mkEnableOption (mdDoc "initialization of the hbase directory on HDFS");
+ master.initHDFS = mkEnableOption "initialization of the hbase directory on HDFS";
regionServer.overrideHosts = mkOption {
type = types.bool;
default = true;
- description = mdDoc ''
+ description = ''
Remove /etc/hosts entries for "127.0.0.2" and "::1" defined in nixos/modules/config/networking.nix
Regionservers must be able to resolve their hostnames to their IP addresses, through PTR records
or /etc/hosts entries.
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/hdfs.nix b/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/hdfs.nix
index 4a49bd0ddd..1f61acf401 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/hdfs.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/hdfs.nix
@@ -8,10 +8,10 @@ let
# Generator for HDFS service options
hadoopServiceOption = { serviceName, firewallOption ? true, extraOpts ? null }: {
- enable = mkEnableOption (lib.mdDoc serviceName);
+ enable = mkEnableOption serviceName;
restartIfChanged = mkOption {
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Automatically restart the service on config change.
This can be set to false to defer restarts on clusters running critical applications.
Please consider the security implications of inadvertently running an older version,
@@ -22,7 +22,7 @@ let
extraFlags = mkOption{
type = with types; listOf str;
default = [];
- description = lib.mdDoc "Extra command line flags to pass to ${serviceName}";
+ description = "Extra command line flags to pass to ${serviceName}";
example = [
"-Dcom.sun.management.jmxremote"
"-Dcom.sun.management.jmxremote.port=8010"
@@ -31,13 +31,13 @@ let
extraEnv = mkOption{
type = with types; attrsOf str;
default = {};
- description = lib.mdDoc "Extra environment variables for ${serviceName}";
+ description = "Extra environment variables for ${serviceName}";
};
} // (optionalAttrs firewallOption {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Open firewall ports for ${serviceName}.";
+ description = "Open firewall ports for ${serviceName}.";
};
}) // (optionalAttrs (extraOpts != null) extraOpts);
@@ -83,7 +83,7 @@ in
formatOnInit = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Format HDFS namenode on first start. This is useful for quickly spinning up
ephemeral HDFS clusters with a single namenode.
For HA clusters, initialization involves multiple steps across multiple nodes.
@@ -96,19 +96,19 @@ in
datanode = hadoopServiceOption { serviceName = "HDFS DataNode"; } // {
dataDirs = mkOption {
default = null;
- description = lib.mdDoc "Tier and path definitions for datanode storage.";
+ description = "Tier and path definitions for datanode storage.";
type = with types; nullOr (listOf (submodule {
options = {
type = mkOption {
type = enum [ "SSD" "DISK" "ARCHIVE" "RAM_DISK" ];
- description = lib.mdDoc ''
+ description = ''
Storage types ([SSD]/[DISK]/[ARCHIVE]/[RAM_DISK]) for HDFS storage policies.
'';
};
path = mkOption {
type = path;
example = [ "/var/lib/hadoop/hdfs/dn" ];
- description = lib.mdDoc "Determines where on the local filesystem a data node should store its blocks.";
+ description = "Determines where on the local filesystem a data node should store its blocks.";
};
};
}));
@@ -126,7 +126,7 @@ in
tempPath = mkOption {
type = types.path;
default = "/tmp/hadoop/httpfs";
- description = lib.mdDoc "HTTPFS_TEMP path used by HTTPFS";
+ description = "HTTPFS_TEMP path used by HTTPFS";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/yarn.nix b/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/yarn.nix
index a49aafbd1d..0a7b4b7e67 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/yarn.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/hadoop/yarn.nix
@@ -5,7 +5,7 @@ let
hadoopConf = "${import ./conf.nix { inherit cfg pkgs lib; }}/";
restartIfChanged = mkOption {
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Automatically restart the service on config change.
This can be set to false to defer restarts on clusters running critical applications.
Please consider the security implications of inadvertently running an older version,
@@ -16,7 +16,7 @@ let
extraFlags = mkOption{
type = with types; listOf str;
default = [];
- description = lib.mdDoc "Extra command line flags to pass to the service";
+ description = "Extra command line flags to pass to the service";
example = [
"-Dcom.sun.management.jmxremote"
"-Dcom.sun.management.jmxremote.port=8010"
@@ -25,45 +25,45 @@ let
extraEnv = mkOption{
type = with types; attrsOf str;
default = {};
- description = lib.mdDoc "Extra environment variables";
+ description = "Extra environment variables";
};
in
{
options.services.hadoop.yarn = {
resourcemanager = {
- enable = mkEnableOption (lib.mdDoc "Hadoop YARN ResourceManager");
+ enable = mkEnableOption "Hadoop YARN ResourceManager";
inherit restartIfChanged extraFlags extraEnv;
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open firewall ports for resourcemanager
'';
};
};
nodemanager = {
- enable = mkEnableOption (lib.mdDoc "Hadoop YARN NodeManager");
+ enable = mkEnableOption "Hadoop YARN NodeManager";
inherit restartIfChanged extraFlags extraEnv;
resource = {
cpuVCores = mkOption {
- description = lib.mdDoc "Number of vcores that can be allocated for containers.";
+ description = "Number of vcores that can be allocated for containers.";
type = with types; nullOr ints.positive;
default = null;
};
maximumAllocationVCores = mkOption {
- description = lib.mdDoc "The maximum virtual CPU cores any container can be allocated.";
+ description = "The maximum virtual CPU cores any container can be allocated.";
type = with types; nullOr ints.positive;
default = null;
};
memoryMB = mkOption {
- description = lib.mdDoc "Amount of physical memory, in MB, that can be allocated for containers.";
+ description = "Amount of physical memory, in MB, that can be allocated for containers.";
type = with types; nullOr ints.positive;
default = null;
};
maximumAllocationMB = mkOption {
- description = lib.mdDoc "The maximum physical memory any container can be allocated.";
+ description = "The maximum physical memory any container can be allocated.";
type = with types; nullOr ints.positive;
default = null;
};
@@ -72,13 +72,13 @@ in
useCGroups = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Use cgroups to enforce resource limits on containers
'';
};
localDir = mkOption {
- description = lib.mdDoc "List of directories to store localized files in.";
+ description = "List of directories to store localized files in.";
type = with types; nullOr (listOf path);
example = [ "/var/lib/hadoop/yarn/nm" ];
default = null;
@@ -87,14 +87,14 @@ in
addBinBash = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Add /bin/bash. This is needed by the linux container executor's launch script.
'';
};
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open firewall ports for nodemanager.
Because containers can listen on any ephemeral port, TCP ports 1024–65535 will be opened.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/k3s/default.nix b/third_party/nixpkgs/nixos/modules/services/cluster/k3s/default.nix
index dc71f1372d..040cf7640d 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/k3s/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/k3s/default.nix
@@ -13,12 +13,12 @@ in
# interface
options.services.k3s = {
- enable = mkEnableOption (lib.mdDoc "k3s");
+ enable = mkEnableOption "k3s";
package = mkPackageOption pkgs "k3s" { };
role = mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether k3s should run as a server or agent.
If it's a server:
@@ -38,7 +38,7 @@ in
serverAddr = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The k3s server to connect to.
Servers and agents need to communicate each other. Read
@@ -52,7 +52,7 @@ in
clusterInit = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Initialize HA cluster using an embedded etcd datastore.
If this option is `false` and `role` is `server`
@@ -73,7 +73,7 @@ in
token = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The k3s token to use when connecting to a server.
WARNING: This option will expose store your token unencrypted world-readable in the nix store.
@@ -84,12 +84,12 @@ in
tokenFile = mkOption {
type = types.nullOr types.path;
- description = lib.mdDoc "File path containing k3s token to use when connecting to the server.";
+ description = "File path containing k3s token to use when connecting to the server.";
default = null;
};
extraFlags = mkOption {
- description = lib.mdDoc "Extra flags to pass to the k3s command.";
+ description = "Extra flags to pass to the k3s command.";
type = types.str;
default = "";
example = "--no-deploy traefik --cluster-cidr 10.24.0.0/16";
@@ -98,12 +98,12 @@ in
disableAgent = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Only run the server. This option only makes sense for a server.";
+ description = "Only run the server. This option only makes sense for a server.";
};
environmentFile = mkOption {
type = types.nullOr types.path;
- description = lib.mdDoc ''
+ description = ''
File path containing environment variables for configuring the k3s service in the format of an EnvironmentFile. See systemd.exec(5).
'';
default = null;
@@ -112,7 +112,7 @@ in
configPath = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc "File path containing the k3s YAML config. This is useful when the config is generated (for example on boot).";
+ description = "File path containing the k3s YAML config. This is useful when the config is generated (for example on boot).";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/addon-manager.nix b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/addon-manager.nix
index dc851688fb..522cb0dd16 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/addon-manager.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/addon-manager.nix
@@ -21,7 +21,7 @@ in
options.services.kubernetes.addonManager = with lib.types; {
bootstrapAddons = mkOption {
- description = lib.mdDoc ''
+ description = ''
Bootstrap addons are like regular addons, but they are applied with cluster-admin rights.
They are applied at addon-manager startup only.
'';
@@ -43,7 +43,7 @@ in
};
addons = mkOption {
- description = lib.mdDoc "Kubernetes addons (any kind of Kubernetes resource can be an addon).";
+ description = "Kubernetes addons (any kind of Kubernetes resource can be an addon).";
default = { };
type = attrsOf (either attrs (listOf attrs));
example = literalExpression ''
@@ -62,7 +62,7 @@ in
'';
};
- enable = mkEnableOption (lib.mdDoc "Kubernetes addon manager");
+ enable = mkEnableOption "Kubernetes addon manager";
};
###### implementation
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/addons/dns.nix b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/addons/dns.nix
index 1c00329e6c..f180035270 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/addons/dns.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/addons/dns.nix
@@ -12,10 +12,10 @@ let
};
in {
options.services.kubernetes.addons.dns = {
- enable = mkEnableOption (lib.mdDoc "kubernetes dns addon");
+ enable = mkEnableOption "kubernetes dns addon";
clusterIp = mkOption {
- description = lib.mdDoc "Dns addon clusterIP";
+ description = "Dns addon clusterIP";
# this default is also what kubernetes users
default = (
@@ -31,19 +31,19 @@ in {
};
clusterDomain = mkOption {
- description = lib.mdDoc "Dns cluster domain";
+ description = "Dns cluster domain";
default = "cluster.local";
type = types.str;
};
replicas = mkOption {
- description = lib.mdDoc "Number of DNS pod replicas to deploy in the cluster.";
+ description = "Number of DNS pod replicas to deploy in the cluster.";
default = 2;
type = types.int;
};
reconcileMode = mkOption {
- description = lib.mdDoc ''
+ description = ''
Controls the addon manager reconciliation mode for the DNS addon.
Setting reconcile mode to EnsureExists makes it possible to tailor DNS behavior by editing the coredns ConfigMap.
@@ -55,7 +55,7 @@ in {
};
coredns = mkOption {
- description = lib.mdDoc "Docker image to seed for the CoreDNS container.";
+ description = "Docker image to seed for the CoreDNS container.";
type = types.attrs;
default = {
imageName = "coredns/coredns";
@@ -66,7 +66,7 @@ in {
};
corefile = mkOption {
- description = lib.mdDoc ''
+ description = ''
Custom coredns corefile configuration.
See: .
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/apiserver.nix b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/apiserver.nix
index d5ec1e5e6d..fe9dacb8b9 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/apiserver.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/apiserver.nix
@@ -31,7 +31,7 @@ in
options.services.kubernetes.apiserver = with lib.types; {
advertiseAddress = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kubernetes apiserver IP address on which to advertise the apiserver
to members of the cluster. This address must be reachable by the rest
of the cluster.
@@ -41,13 +41,13 @@ in
};
allowPrivileged = mkOption {
- description = lib.mdDoc "Whether to allow privileged containers on Kubernetes.";
+ description = "Whether to allow privileged containers on Kubernetes.";
default = false;
type = bool;
};
authorizationMode = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kubernetes apiserver authorization mode (AlwaysAllow/AlwaysDeny/ABAC/Webhook/RBAC/Node). See
'';
@@ -56,7 +56,7 @@ in
};
authorizationPolicy = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kubernetes apiserver authorization policy file. See
'';
@@ -65,7 +65,7 @@ in
};
basicAuthFile = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kubernetes apiserver basic authentication file. See
'';
@@ -74,7 +74,7 @@ in
};
bindAddress = mkOption {
- description = lib.mdDoc ''
+ description = ''
The IP address on which to listen for the --secure-port port.
The associated interface(s) must be reachable by the rest
of the cluster, and by CLI/web clients.
@@ -84,14 +84,14 @@ in
};
clientCaFile = mkOption {
- description = lib.mdDoc "Kubernetes apiserver CA file for client auth.";
+ description = "Kubernetes apiserver CA file for client auth.";
default = top.caFile;
defaultText = literalExpression "config.${otop.caFile}";
type = nullOr path;
};
disableAdmissionPlugins = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kubernetes admission control plugins to disable. See
'';
@@ -99,10 +99,10 @@ in
type = listOf str;
};
- enable = mkEnableOption (lib.mdDoc "Kubernetes apiserver");
+ enable = mkEnableOption "Kubernetes apiserver";
enableAdmissionPlugins = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kubernetes admission control plugins to enable. See
'';
@@ -121,25 +121,25 @@ in
etcd = {
servers = mkOption {
- description = lib.mdDoc "List of etcd servers.";
+ description = "List of etcd servers.";
default = ["http://127.0.0.1:2379"];
type = types.listOf types.str;
};
keyFile = mkOption {
- description = lib.mdDoc "Etcd key file.";
+ description = "Etcd key file.";
default = null;
type = types.nullOr types.path;
};
certFile = mkOption {
- description = lib.mdDoc "Etcd cert file.";
+ description = "Etcd cert file.";
default = null;
type = types.nullOr types.path;
};
caFile = mkOption {
- description = lib.mdDoc "Etcd ca file.";
+ description = "Etcd ca file.";
default = top.caFile;
defaultText = literalExpression "config.${otop.caFile}";
type = types.nullOr types.path;
@@ -147,63 +147,63 @@ in
};
extraOpts = mkOption {
- description = lib.mdDoc "Kubernetes apiserver extra command line options.";
+ description = "Kubernetes apiserver extra command line options.";
default = "";
type = separatedString " ";
};
extraSANs = mkOption {
- description = lib.mdDoc "Extra x509 Subject Alternative Names to be added to the kubernetes apiserver tls cert.";
+ description = "Extra x509 Subject Alternative Names to be added to the kubernetes apiserver tls cert.";
default = [];
type = listOf str;
};
featureGates = mkOption {
- description = lib.mdDoc "List set of feature gates";
+ description = "List set of feature gates";
default = top.featureGates;
defaultText = literalExpression "config.${otop.featureGates}";
type = listOf str;
};
kubeletClientCaFile = mkOption {
- description = lib.mdDoc "Path to a cert file for connecting to kubelet.";
+ description = "Path to a cert file for connecting to kubelet.";
default = top.caFile;
defaultText = literalExpression "config.${otop.caFile}";
type = nullOr path;
};
kubeletClientCertFile = mkOption {
- description = lib.mdDoc "Client certificate to use for connections to kubelet.";
+ description = "Client certificate to use for connections to kubelet.";
default = null;
type = nullOr path;
};
kubeletClientKeyFile = mkOption {
- description = lib.mdDoc "Key to use for connections to kubelet.";
+ description = "Key to use for connections to kubelet.";
default = null;
type = nullOr path;
};
preferredAddressTypes = mkOption {
- description = lib.mdDoc "List of the preferred NodeAddressTypes to use for kubelet connections.";
+ description = "List of the preferred NodeAddressTypes to use for kubelet connections.";
type = nullOr str;
default = null;
};
proxyClientCertFile = mkOption {
- description = lib.mdDoc "Client certificate to use for connections to proxy.";
+ description = "Client certificate to use for connections to proxy.";
default = null;
type = nullOr path;
};
proxyClientKeyFile = mkOption {
- description = lib.mdDoc "Key to use for connections to proxy.";
+ description = "Key to use for connections to proxy.";
default = null;
type = nullOr path;
};
runtimeConfig = mkOption {
- description = lib.mdDoc ''
+ description = ''
Api runtime configuration. See
'';
@@ -213,7 +213,7 @@ in
};
storageBackend = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kubernetes apiserver storage backend.
'';
default = "etcd3";
@@ -221,13 +221,13 @@ in
};
securePort = mkOption {
- description = lib.mdDoc "Kubernetes apiserver secure port.";
+ description = "Kubernetes apiserver secure port.";
default = 6443;
type = int;
};
apiAudiences = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kubernetes apiserver ServiceAccount issuer.
'';
default = "api,https://kubernetes.default.svc";
@@ -235,7 +235,7 @@ in
};
serviceAccountIssuer = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kubernetes apiserver ServiceAccount issuer.
'';
default = "https://kubernetes.default.svc";
@@ -243,7 +243,7 @@ in
};
serviceAccountSigningKeyFile = mkOption {
- description = lib.mdDoc ''
+ description = ''
Path to the file that contains the current private key of the service
account token issuer. The issuer will sign issued ID tokens with this
private key.
@@ -252,7 +252,7 @@ in
};
serviceAccountKeyFile = mkOption {
- description = lib.mdDoc ''
+ description = ''
File containing PEM-encoded x509 RSA or ECDSA private or public keys,
used to verify ServiceAccount tokens. The specified file can contain
multiple keys, and the flag can be specified multiple times with
@@ -263,7 +263,7 @@ in
};
serviceClusterIpRange = mkOption {
- description = lib.mdDoc ''
+ description = ''
A CIDR notation IP range from which to assign service cluster IPs.
This must not overlap with any IP ranges assigned to nodes for pods.
'';
@@ -272,19 +272,19 @@ in
};
tlsCertFile = mkOption {
- description = lib.mdDoc "Kubernetes apiserver certificate file.";
+ description = "Kubernetes apiserver certificate file.";
default = null;
type = nullOr path;
};
tlsKeyFile = mkOption {
- description = lib.mdDoc "Kubernetes apiserver private key file.";
+ description = "Kubernetes apiserver private key file.";
default = null;
type = nullOr path;
};
tokenAuthFile = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kubernetes apiserver token authentication file. See
'';
@@ -293,7 +293,7 @@ in
};
verbosity = mkOption {
- description = lib.mdDoc ''
+ description = ''
Optional glog verbosity level for logging statements. See
'';
@@ -302,7 +302,7 @@ in
};
webhookConfig = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kubernetes apiserver Webhook config file. It uses the kubeconfig file format.
See
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/controller-manager.nix b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/controller-manager.nix
index 18c82fc235..453043e507 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/controller-manager.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/controller-manager.nix
@@ -17,34 +17,34 @@ in
options.services.kubernetes.controllerManager = with lib.types; {
allocateNodeCIDRs = mkOption {
- description = lib.mdDoc "Whether to automatically allocate CIDR ranges for cluster nodes.";
+ description = "Whether to automatically allocate CIDR ranges for cluster nodes.";
default = true;
type = bool;
};
bindAddress = mkOption {
- description = lib.mdDoc "Kubernetes controller manager listening address.";
+ description = "Kubernetes controller manager listening address.";
default = "127.0.0.1";
type = str;
};
clusterCidr = mkOption {
- description = lib.mdDoc "Kubernetes CIDR Range for Pods in cluster.";
+ description = "Kubernetes CIDR Range for Pods in cluster.";
default = top.clusterCidr;
defaultText = literalExpression "config.${otop.clusterCidr}";
type = str;
};
- enable = mkEnableOption (lib.mdDoc "Kubernetes controller manager");
+ enable = mkEnableOption "Kubernetes controller manager";
extraOpts = mkOption {
- description = lib.mdDoc "Kubernetes controller manager extra command line options.";
+ description = "Kubernetes controller manager extra command line options.";
default = "";
type = separatedString " ";
};
featureGates = mkOption {
- description = lib.mdDoc "List set of feature gates";
+ description = "List set of feature gates";
default = top.featureGates;
defaultText = literalExpression "config.${otop.featureGates}";
type = listOf str;
@@ -53,13 +53,13 @@ in
kubeconfig = top.lib.mkKubeConfigOptions "Kubernetes controller manager";
leaderElect = mkOption {
- description = lib.mdDoc "Whether to start leader election before executing main loop.";
+ description = "Whether to start leader election before executing main loop.";
type = bool;
default = true;
};
rootCaFile = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kubernetes controller manager certificate authority file included in
service account's token secret.
'';
@@ -69,13 +69,13 @@ in
};
securePort = mkOption {
- description = lib.mdDoc "Kubernetes controller manager secure listening port.";
+ description = "Kubernetes controller manager secure listening port.";
default = 10252;
type = int;
};
serviceAccountKeyFile = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kubernetes controller manager PEM-encoded private RSA key file used to
sign service account tokens
'';
@@ -84,19 +84,19 @@ in
};
tlsCertFile = mkOption {
- description = lib.mdDoc "Kubernetes controller-manager certificate file.";
+ description = "Kubernetes controller-manager certificate file.";
default = null;
type = nullOr path;
};
tlsKeyFile = mkOption {
- description = lib.mdDoc "Kubernetes controller-manager private key file.";
+ description = "Kubernetes controller-manager private key file.";
default = null;
type = nullOr path;
};
verbosity = mkOption {
- description = lib.mdDoc ''
+ description = ''
Optional glog verbosity level for logging statements. See
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/default.nix b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/default.nix
index a920b6cb12..89bbedf4d0 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/default.nix
@@ -77,25 +77,25 @@ let
mkKubeConfigOptions = prefix: {
server = mkOption {
- description = lib.mdDoc "${prefix} kube-apiserver server address.";
+ description = "${prefix} kube-apiserver server address.";
type = types.str;
};
caFile = mkOption {
- description = lib.mdDoc "${prefix} certificate authority file used to connect to kube-apiserver.";
+ description = "${prefix} certificate authority file used to connect to kube-apiserver.";
type = types.nullOr types.path;
default = cfg.caFile;
defaultText = literalExpression "config.${opt.caFile}";
};
certFile = mkOption {
- description = lib.mdDoc "${prefix} client certificate file used to connect to kube-apiserver.";
+ description = "${prefix} client certificate file used to connect to kube-apiserver.";
type = types.nullOr types.path;
default = null;
};
keyFile = mkOption {
- description = lib.mdDoc "${prefix} client key file used to connect to kube-apiserver.";
+ description = "${prefix} client key file used to connect to kube-apiserver.";
type = types.nullOr types.path;
default = null;
};
@@ -111,7 +111,7 @@ in {
options.services.kubernetes = {
roles = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kubernetes role that this machine should take.
Master role will enable etcd, apiserver, scheduler, controller manager
@@ -127,7 +127,7 @@ in {
kubeconfig = mkKubeConfigOptions "Default kubeconfig";
apiserverAddress = mkOption {
- description = lib.mdDoc ''
+ description = ''
Clusterwide accessible address for the kubernetes apiserver,
including protocol and optional port.
'';
@@ -136,49 +136,49 @@ in {
};
caFile = mkOption {
- description = lib.mdDoc "Default kubernetes certificate authority";
+ description = "Default kubernetes certificate authority";
type = types.nullOr types.path;
default = null;
};
dataDir = mkOption {
- description = lib.mdDoc "Kubernetes root directory for managing kubelet files.";
+ description = "Kubernetes root directory for managing kubelet files.";
default = "/var/lib/kubernetes";
type = types.path;
};
easyCerts = mkOption {
- description = lib.mdDoc "Automatically setup x509 certificates and keys for the entire cluster.";
+ description = "Automatically setup x509 certificates and keys for the entire cluster.";
default = false;
type = types.bool;
};
featureGates = mkOption {
- description = lib.mdDoc "List set of feature gates.";
+ description = "List set of feature gates.";
default = [];
type = types.listOf types.str;
};
masterAddress = mkOption {
- description = lib.mdDoc "Clusterwide available network address or hostname for the kubernetes master server.";
+ description = "Clusterwide available network address or hostname for the kubernetes master server.";
example = "master.example.com";
type = types.str;
};
path = mkOption {
- description = lib.mdDoc "Packages added to the services' PATH environment variable. Both the bin and sbin subdirectories of each package are added.";
+ description = "Packages added to the services' PATH environment variable. Both the bin and sbin subdirectories of each package are added.";
type = types.listOf types.package;
default = [];
};
clusterCidr = mkOption {
- description = lib.mdDoc "Kubernetes controller manager and proxy CIDR Range for Pods in cluster.";
+ description = "Kubernetes controller manager and proxy CIDR Range for Pods in cluster.";
default = "10.1.0.0/16";
type = types.nullOr types.str;
};
lib = mkOption {
- description = lib.mdDoc "Common functions for the kubernetes modules.";
+ description = "Common functions for the kubernetes modules.";
default = {
inherit mkCert;
inherit mkKubeConfig;
@@ -188,7 +188,7 @@ in {
};
secretsPath = mkOption {
- description = lib.mdDoc "Default location for kubernetes secrets. Not a store location.";
+ description = "Default location for kubernetes secrets. Not a store location.";
type = types.path;
default = cfg.dataDir + "/secrets";
defaultText = literalExpression ''
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/flannel.nix b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/flannel.nix
index dca8996df0..93a4609710 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/flannel.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/flannel.nix
@@ -12,10 +12,10 @@ in
{
###### interface
options.services.kubernetes.flannel = {
- enable = mkEnableOption (lib.mdDoc "flannel networking");
+ enable = mkEnableOption "flannel networking";
openFirewallPorts = mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether to open the Flannel UDP ports in the firewall on all interfaces.'';
type = types.bool;
default = true;
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/kubelet.nix b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/kubelet.nix
index 313dbe2340..c841f4e5f1 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/kubelet.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/kubelet.nix
@@ -73,17 +73,17 @@ let
taintOptions = with lib.types; { name, ... }: {
options = {
key = mkOption {
- description = lib.mdDoc "Key of taint.";
+ description = "Key of taint.";
default = name;
defaultText = literalMD "Name of this submodule.";
type = str;
};
value = mkOption {
- description = lib.mdDoc "Value of taint.";
+ description = "Value of taint.";
type = str;
};
effect = mkOption {
- description = lib.mdDoc "Effect of taint.";
+ description = "Effect of taint.";
example = "NoSchedule";
type = enum ["NoSchedule" "PreferNoSchedule" "NoExecute"];
};
@@ -105,26 +105,26 @@ in
options.services.kubernetes.kubelet = with lib.types; {
address = mkOption {
- description = lib.mdDoc "Kubernetes kubelet info server listening address.";
+ description = "Kubernetes kubelet info server listening address.";
default = "0.0.0.0";
type = str;
};
clusterDns = mkOption {
- description = lib.mdDoc "Use alternative DNS.";
+ description = "Use alternative DNS.";
default = "10.1.0.1";
type = str;
};
clusterDomain = mkOption {
- description = lib.mdDoc "Use alternative domain.";
+ description = "Use alternative domain.";
default = config.services.kubernetes.addons.dns.clusterDomain;
defaultText = literalExpression "config.${options.services.kubernetes.addons.dns.clusterDomain}";
type = str;
};
clientCaFile = mkOption {
- description = lib.mdDoc "Kubernetes apiserver CA file for client authentication.";
+ description = "Kubernetes apiserver CA file for client authentication.";
default = top.caFile;
defaultText = literalExpression "config.${otop.caFile}";
type = nullOr path;
@@ -132,13 +132,13 @@ in
cni = {
packages = mkOption {
- description = lib.mdDoc "List of network plugin packages to install.";
+ description = "List of network plugin packages to install.";
type = listOf package;
default = [];
};
config = mkOption {
- description = lib.mdDoc "Kubernetes CNI configuration.";
+ description = "Kubernetes CNI configuration.";
type = listOf attrs;
default = [];
example = literalExpression ''
@@ -164,28 +164,28 @@ in
};
configDir = mkOption {
- description = lib.mdDoc "Path to Kubernetes CNI configuration directory.";
+ description = "Path to Kubernetes CNI configuration directory.";
type = nullOr path;
default = null;
};
};
containerRuntimeEndpoint = mkOption {
- description = lib.mdDoc "Endpoint at which to find the container runtime api interface/socket";
+ description = "Endpoint at which to find the container runtime api interface/socket";
type = str;
default = "unix:///run/containerd/containerd.sock";
};
- enable = mkEnableOption (lib.mdDoc "Kubernetes kubelet");
+ enable = mkEnableOption "Kubernetes kubelet";
extraOpts = mkOption {
- description = lib.mdDoc "Kubernetes kubelet extra command line options.";
+ description = "Kubernetes kubelet extra command line options.";
default = "";
type = separatedString " ";
};
featureGates = mkOption {
- description = lib.mdDoc "List set of feature gates";
+ description = "List set of feature gates";
default = top.featureGates;
defaultText = literalExpression "config.${otop.featureGates}";
type = listOf str;
@@ -193,20 +193,20 @@ in
healthz = {
bind = mkOption {
- description = lib.mdDoc "Kubernetes kubelet healthz listening address.";
+ description = "Kubernetes kubelet healthz listening address.";
default = "127.0.0.1";
type = str;
};
port = mkOption {
- description = lib.mdDoc "Kubernetes kubelet healthz port.";
+ description = "Kubernetes kubelet healthz port.";
default = 10248;
type = port;
};
};
hostname = mkOption {
- description = lib.mdDoc "Kubernetes kubelet hostname override.";
+ description = "Kubernetes kubelet hostname override.";
defaultText = literalExpression "config.networking.fqdnOrHostName";
type = str;
};
@@ -214,61 +214,61 @@ in
kubeconfig = top.lib.mkKubeConfigOptions "Kubelet";
manifests = mkOption {
- description = lib.mdDoc "List of manifests to bootstrap with kubelet (only pods can be created as manifest entry)";
+ description = "List of manifests to bootstrap with kubelet (only pods can be created as manifest entry)";
type = attrsOf attrs;
default = {};
};
nodeIp = mkOption {
- description = lib.mdDoc "IP address of the node. If set, kubelet will use this IP address for the node.";
+ description = "IP address of the node. If set, kubelet will use this IP address for the node.";
default = null;
type = nullOr str;
};
registerNode = mkOption {
- description = lib.mdDoc "Whether to auto register kubelet with API server.";
+ description = "Whether to auto register kubelet with API server.";
default = true;
type = bool;
};
port = mkOption {
- description = lib.mdDoc "Kubernetes kubelet info server listening port.";
+ description = "Kubernetes kubelet info server listening port.";
default = 10250;
type = port;
};
seedDockerImages = mkOption {
- description = lib.mdDoc "List of docker images to preload on system";
+ description = "List of docker images to preload on system";
default = [];
type = listOf package;
};
taints = mkOption {
- description = lib.mdDoc "Node taints (https://kubernetes.io/docs/concepts/configuration/assign-pod-node/).";
+ description = "Node taints (https://kubernetes.io/docs/concepts/configuration/assign-pod-node/).";
default = {};
type = attrsOf (submodule [ taintOptions ]);
};
tlsCertFile = mkOption {
- description = lib.mdDoc "File containing x509 Certificate for HTTPS.";
+ description = "File containing x509 Certificate for HTTPS.";
default = null;
type = nullOr path;
};
tlsKeyFile = mkOption {
- description = lib.mdDoc "File containing x509 private key matching tlsCertFile.";
+ description = "File containing x509 private key matching tlsCertFile.";
default = null;
type = nullOr path;
};
unschedulable = mkOption {
- description = lib.mdDoc "Whether to set node taint to unschedulable=true as it is the case of node that has only master role.";
+ description = "Whether to set node taint to unschedulable=true as it is the case of node that has only master role.";
default = false;
type = bool;
};
verbosity = mkOption {
- description = lib.mdDoc ''
+ description = ''
Optional glog verbosity level for logging statements. See
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/pki.nix b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/pki.nix
index a4b5cb8eda..5e725df41f 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/pki.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/pki.nix
@@ -41,16 +41,16 @@ in
###### interface
options.services.kubernetes.pki = with lib.types; {
- enable = mkEnableOption (lib.mdDoc "easyCert issuer service");
+ enable = mkEnableOption "easyCert issuer service";
certs = mkOption {
- description = lib.mdDoc "List of certificate specs to feed to cert generator.";
+ description = "List of certificate specs to feed to cert generator.";
default = {};
type = attrs;
};
genCfsslCACert = mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether to automatically generate cfssl CA certificate and key,
if they don't exist.
'';
@@ -59,7 +59,7 @@ in
};
genCfsslAPICerts = mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether to automatically generate cfssl API webserver TLS cert and key,
if they don't exist.
'';
@@ -68,7 +68,7 @@ in
};
cfsslAPIExtraSANs = mkOption {
- description = lib.mdDoc ''
+ description = ''
Extra x509 Subject Alternative Names to be added to the cfssl API webserver TLS cert.
'';
default = [];
@@ -77,7 +77,7 @@ in
};
genCfsslAPIToken = mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether to automatically generate cfssl API-token secret,
if they doesn't exist.
'';
@@ -86,13 +86,13 @@ in
};
pkiTrustOnBootstrap = mkOption {
- description = lib.mdDoc "Whether to always trust remote cfssl server upon initial PKI bootstrap.";
+ description = "Whether to always trust remote cfssl server upon initial PKI bootstrap.";
default = true;
type = bool;
};
caCertPathPrefix = mkOption {
- description = lib.mdDoc ''
+ description = ''
Path-prefrix for the CA-certificate to be used for cfssl signing.
Suffixes ".pem" and "-key.pem" will be automatically appended for
the public and private keys respectively.
@@ -103,7 +103,7 @@ in
};
caSpec = mkOption {
- description = lib.mdDoc "Certificate specification for the auto-generated CAcert.";
+ description = "Certificate specification for the auto-generated CAcert.";
default = {
CN = "kubernetes-cluster-ca";
O = "NixOS";
@@ -114,7 +114,7 @@ in
};
etcClusterAdminKubeconfig = mkOption {
- description = lib.mdDoc ''
+ description = ''
Symlink a kubeconfig with cluster-admin privileges to environment path
(/etc/\).
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/proxy.nix b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/proxy.nix
index 015784f7e3..c09e7695f2 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/proxy.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/proxy.nix
@@ -16,28 +16,28 @@ in
options.services.kubernetes.proxy = with lib.types; {
bindAddress = mkOption {
- description = lib.mdDoc "Kubernetes proxy listening address.";
+ description = "Kubernetes proxy listening address.";
default = "0.0.0.0";
type = str;
};
- enable = mkEnableOption (lib.mdDoc "Kubernetes proxy");
+ enable = mkEnableOption "Kubernetes proxy";
extraOpts = mkOption {
- description = lib.mdDoc "Kubernetes proxy extra command line options.";
+ description = "Kubernetes proxy extra command line options.";
default = "";
type = separatedString " ";
};
featureGates = mkOption {
- description = lib.mdDoc "List set of feature gates";
+ description = "List set of feature gates";
default = top.featureGates;
defaultText = literalExpression "config.${otop.featureGates}";
type = listOf str;
};
hostname = mkOption {
- description = lib.mdDoc "Kubernetes proxy hostname override.";
+ description = "Kubernetes proxy hostname override.";
default = config.networking.hostName;
defaultText = literalExpression "config.networking.hostName";
type = str;
@@ -46,7 +46,7 @@ in
kubeconfig = top.lib.mkKubeConfigOptions "Kubernetes proxy";
verbosity = mkOption {
- description = lib.mdDoc ''
+ description = ''
Optional glog verbosity level for logging statements. See
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/scheduler.nix b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/scheduler.nix
index f31a92f368..da2f39226a 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/scheduler.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/kubernetes/scheduler.nix
@@ -12,21 +12,21 @@ in
options.services.kubernetes.scheduler = with lib.types; {
address = mkOption {
- description = lib.mdDoc "Kubernetes scheduler listening address.";
+ description = "Kubernetes scheduler listening address.";
default = "127.0.0.1";
type = str;
};
- enable = mkEnableOption (lib.mdDoc "Kubernetes scheduler");
+ enable = mkEnableOption "Kubernetes scheduler";
extraOpts = mkOption {
- description = lib.mdDoc "Kubernetes scheduler extra command line options.";
+ description = "Kubernetes scheduler extra command line options.";
default = "";
type = separatedString " ";
};
featureGates = mkOption {
- description = lib.mdDoc "List set of feature gates";
+ description = "List set of feature gates";
default = top.featureGates;
defaultText = literalExpression "config.${otop.featureGates}";
type = listOf str;
@@ -35,19 +35,19 @@ in
kubeconfig = top.lib.mkKubeConfigOptions "Kubernetes scheduler";
leaderElect = mkOption {
- description = lib.mdDoc "Whether to start leader election before executing main loop.";
+ description = "Whether to start leader election before executing main loop.";
type = bool;
default = true;
};
port = mkOption {
- description = lib.mdDoc "Kubernetes scheduler listening port.";
+ description = "Kubernetes scheduler listening port.";
default = 10251;
type = port;
};
verbosity = mkOption {
- description = lib.mdDoc ''
+ description = ''
Optional glog verbosity level for logging statements. See
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/pacemaker/default.nix b/third_party/nixpkgs/nixos/modules/services/cluster/pacemaker/default.nix
index 255bb10779..005a952e80 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/pacemaker/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/pacemaker/default.nix
@@ -7,7 +7,7 @@ in
{
# interface
options.services.pacemaker = {
- enable = mkEnableOption (lib.mdDoc "pacemaker");
+ enable = mkEnableOption "pacemaker";
package = mkPackageOption pkgs "pacemaker" { };
};
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/patroni/default.nix b/third_party/nixpkgs/nixos/modules/services/cluster/patroni/default.nix
index 5ab016a9f5..d1a165603f 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/patroni/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/patroni/default.nix
@@ -12,12 +12,12 @@ in
{
options.services.patroni = {
- enable = mkEnableOption (lib.mdDoc "Patroni");
+ enable = mkEnableOption "Patroni";
postgresqlPackage = mkOption {
type = types.package;
example = literalExpression "pkgs.postgresql_14";
- description = mdDoc ''
+ description = ''
PostgreSQL package to use.
Plugins can be enabled like this `pkgs.postgresql_14.withPackages (p: [ p.pg_safeupdate p.postgis ])`.
'';
@@ -28,7 +28,7 @@ in
defaultText = literalExpression ''"/var/lib/postgresql/''${config.services.patroni.postgresqlPackage.psqlSchema}"'';
example = "/var/lib/postgresql/14";
default = "/var/lib/postgresql/${cfg.postgresqlPackage.psqlSchema}";
- description = mdDoc ''
+ description = ''
The data directory for PostgreSQL. If left as the default value
this directory will automatically be created before the PostgreSQL server starts, otherwise
the sysadmin is responsible for ensuring the directory exists with appropriate ownership
@@ -39,7 +39,7 @@ in
postgresqlPort = mkOption {
type = types.port;
default = 5432;
- description = mdDoc ''
+ description = ''
The port on which PostgreSQL listens.
'';
};
@@ -48,7 +48,7 @@ in
type = types.str;
default = defaultUser;
example = "postgres";
- description = mdDoc ''
+ description = ''
The user for the service. If left as the default value this user will automatically be created,
otherwise the sysadmin is responsible for ensuring the user exists.
'';
@@ -58,7 +58,7 @@ in
type = types.str;
default = defaultGroup;
example = "postgres";
- description = mdDoc ''
+ description = ''
The group for the service. If left as the default value this group will automatically be created,
otherwise the sysadmin is responsible for ensuring the group exists.
'';
@@ -67,7 +67,7 @@ in
dataDir = mkOption {
type = types.path;
default = "/var/lib/patroni";
- description = mdDoc ''
+ description = ''
Folder where Patroni data will be written, used by Raft as well if enabled.
'';
};
@@ -75,7 +75,7 @@ in
scope = mkOption {
type = types.str;
example = "cluster1";
- description = mdDoc ''
+ description = ''
Cluster name.
'';
};
@@ -83,7 +83,7 @@ in
name = mkOption {
type = types.str;
example = "node1";
- description = mdDoc ''
+ description = ''
The name of the host. Must be unique for the cluster.
'';
};
@@ -91,7 +91,7 @@ in
namespace = mkOption {
type = types.str;
default = "/service";
- description = mdDoc ''
+ description = ''
Path within the configuration store where Patroni will keep information about the cluster.
'';
};
@@ -99,7 +99,7 @@ in
nodeIp = mkOption {
type = types.str;
example = "192.168.1.1";
- description = mdDoc ''
+ description = ''
IP address of this node.
'';
};
@@ -107,7 +107,7 @@ in
otherNodesIps = mkOption {
type = types.listOf types.str;
example = [ "192.168.1.2" "192.168.1.3" ];
- description = mdDoc ''
+ description = ''
IP addresses of the other nodes.
'';
};
@@ -115,7 +115,7 @@ in
restApiPort = mkOption {
type = types.port;
default = 8008;
- description = mdDoc ''
+ description = ''
The port on Patroni's REST api listens.
'';
};
@@ -123,7 +123,7 @@ in
raft = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
This will configure Patroni to use its own RAFT implementation instead of using a dedicated DCS.
'';
};
@@ -131,7 +131,7 @@ in
raftPort = mkOption {
type = types.port;
default = 5010;
- description = mdDoc ''
+ description = ''
The port on which RAFT listens.
'';
};
@@ -139,7 +139,7 @@ in
softwareWatchdog = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
This will configure Patroni to use the software watchdog built into the Linux kernel
as described in the [documentation](https://patroni.readthedocs.io/en/latest/watchdog.html#setting-up-software-watchdog-on-linux).
'';
@@ -148,7 +148,7 @@ in
settings = mkOption {
type = format.type;
default = { };
- description = mdDoc ''
+ description = ''
The primary patroni configuration. See the [documentation](https://patroni.readthedocs.io/en/latest/SETTINGS.html)
for possible values.
Secrets should be passed in by using the `environmentFiles` option.
@@ -162,7 +162,7 @@ in
PATRONI_REPLICATION_PASSWORD = "/secret/file";
PATRONI_SUPERUSER_PASSWORD = "/secret/file";
};
- description = mdDoc "Environment variables made available to Patroni as files content, useful for providing secrets from files.";
+ description = "Environment variables made available to Patroni as files content, useful for providing secrets from files.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/cluster/spark/default.nix b/third_party/nixpkgs/nixos/modules/services/cluster/spark/default.nix
index b3e1ac399a..7a3f768471 100644
--- a/third_party/nixpkgs/nixos/modules/services/cluster/spark/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/cluster/spark/default.nix
@@ -7,16 +7,16 @@ with lib;
options = {
services.spark = {
master = {
- enable = mkEnableOption (lib.mdDoc "Spark master service");
+ enable = mkEnableOption "Spark master service";
bind = mkOption {
type = types.str;
- description = lib.mdDoc "Address the spark master binds to.";
+ description = "Address the spark master binds to.";
default = "127.0.0.1";
example = "0.0.0.0";
};
restartIfChanged = mkOption {
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Automatically restart master service on config change.
This can be set to false to defer restarts on clusters running critical applications.
Please consider the security implications of inadvertently running an older version,
@@ -26,7 +26,7 @@ with lib;
};
extraEnvironment = mkOption {
type = types.attrsOf types.str;
- description = lib.mdDoc "Extra environment variables to pass to spark master. See spark-standalone documentation.";
+ description = "Extra environment variables to pass to spark master. See spark-standalone documentation.";
default = {};
example = {
SPARK_MASTER_WEBUI_PORT = 8181;
@@ -35,20 +35,20 @@ with lib;
};
};
worker = {
- enable = mkEnableOption (lib.mdDoc "Spark worker service");
+ enable = mkEnableOption "Spark worker service";
workDir = mkOption {
type = types.path;
- description = lib.mdDoc "Spark worker work dir.";
+ description = "Spark worker work dir.";
default = "/var/lib/spark";
};
master = mkOption {
type = types.str;
- description = lib.mdDoc "Address of the spark master.";
+ description = "Address of the spark master.";
default = "127.0.0.1:7077";
};
restartIfChanged = mkOption {
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Automatically restart worker service on config change.
This can be set to false to defer restarts on clusters running critical applications.
Please consider the security implications of inadvertently running an older version,
@@ -58,7 +58,7 @@ with lib;
};
extraEnvironment = mkOption {
type = types.attrsOf types.str;
- description = lib.mdDoc "Extra environment variables to pass to spark worker.";
+ description = "Extra environment variables to pass to spark worker.";
default = {};
example = {
SPARK_WORKER_CORES = 5;
@@ -68,13 +68,13 @@ with lib;
};
confDir = mkOption {
type = types.path;
- description = lib.mdDoc "Spark configuration directory. Spark will use the configuration files (spark-defaults.conf, spark-env.sh, log4j.properties, etc) from this directory.";
+ description = "Spark configuration directory. Spark will use the configuration files (spark-defaults.conf, spark-env.sh, log4j.properties, etc) from this directory.";
default = "${cfg.package}/conf";
defaultText = literalExpression ''"''${package}/conf"'';
};
logDir = mkOption {
type = types.path;
- description = lib.mdDoc "Spark log directory.";
+ description = "Spark log directory.";
default = "/var/log/spark";
};
package = mkPackageOption pkgs "spark" {
diff --git a/third_party/nixpkgs/nixos/modules/services/computing/boinc/client.nix b/third_party/nixpkgs/nixos/modules/services/computing/boinc/client.nix
index c2132149a3..f5d7ab8d8c 100644
--- a/third_party/nixpkgs/nixos/modules/services/computing/boinc/client.nix
+++ b/third_party/nixpkgs/nixos/modules/services/computing/boinc/client.nix
@@ -19,7 +19,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the BOINC distributed computing client. If this
option is set to true, the boinc_client daemon will be run as a
background service. The boinccmd command can be used to control the
@@ -34,7 +34,7 @@ in
dataDir = mkOption {
type = types.path;
default = "/var/lib/boinc";
- description = lib.mdDoc ''
+ description = ''
The directory in which to store BOINC's configuration and data files.
'';
};
@@ -42,7 +42,7 @@ in
allowRemoteGuiRpc = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If set to true, any remote host can connect to and control this BOINC
client (subject to password authentication). If instead set to false,
only the hosts listed in {var}`dataDir`/remote_hosts.cfg will be allowed to
@@ -56,7 +56,7 @@ in
type = types.listOf types.package;
default = [];
example = literalExpression "[ pkgs.virtualbox ]";
- description = lib.mdDoc ''
+ description = ''
Additional packages to make available in the environment in which
BOINC will run. Common choices are:
diff --git a/third_party/nixpkgs/nixos/modules/services/computing/foldingathome/client.nix b/third_party/nixpkgs/nixos/modules/services/computing/foldingathome/client.nix
index 09f31cda76..8d330fd871 100644
--- a/third_party/nixpkgs/nixos/modules/services/computing/foldingathome/client.nix
+++ b/third_party/nixpkgs/nixos/modules/services/computing/foldingathome/client.nix
@@ -18,14 +18,14 @@ in
'')
];
options.services.foldingathome = {
- enable = mkEnableOption (lib.mdDoc "Folding@home client");
+ enable = mkEnableOption "Folding@home client";
package = mkPackageOption pkgs "fahclient" { };
user = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The user associated with the reported computation results. This will
be used in the ranking statistics.
'';
@@ -34,7 +34,7 @@ in
team = mkOption {
type = types.int;
default = 236565;
- description = lib.mdDoc ''
+ description = ''
The team ID associated with the reported computation results. This
will be used in the ranking statistics.
@@ -45,7 +45,7 @@ in
daemonNiceLevel = mkOption {
type = types.ints.between (-20) 19;
default = 0;
- description = lib.mdDoc ''
+ description = ''
Daemon process priority for FAHClient.
0 is the default Unix process priority, 19 is the lowest.
'';
@@ -54,7 +54,7 @@ in
extraArgs = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
Extra startup options for the FAHClient. Run
`fah-client --help` to find all the available options.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/computing/slurm/slurm.nix b/third_party/nixpkgs/nixos/modules/services/computing/slurm/slurm.nix
index 9212fe39fd..360a72677c 100644
--- a/third_party/nixpkgs/nixos/modules/services/computing/slurm/slurm.nix
+++ b/third_party/nixpkgs/nixos/modules/services/computing/slurm/slurm.nix
@@ -66,7 +66,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the slurm control daemon.
Note that the standard authentication method is "munge".
The "munge" service needs to be provided with a password file in order for
@@ -76,13 +76,13 @@ in
};
dbdserver = {
- enable = mkEnableOption (lib.mdDoc "SlurmDBD service");
+ enable = mkEnableOption "SlurmDBD service";
dbdHost = mkOption {
type = types.str;
default = config.networking.hostName;
defaultText = literalExpression "config.networking.hostName";
- description = lib.mdDoc ''
+ description = ''
Hostname of the machine where `slurmdbd`
is running (i.e. name returned by `hostname -s`).
'';
@@ -92,7 +92,7 @@ in
type = types.str;
default = cfg.user;
defaultText = literalExpression "config.${opt.user}";
- description = lib.mdDoc ''
+ description = ''
Database user name.
'';
};
@@ -100,7 +100,7 @@ in
storagePassFile = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to file with database password. The content of this will be used to
create the password for the `StoragePass` option.
'';
@@ -109,7 +109,7 @@ in
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra configuration for `slurmdbd.conf` See also:
{manpage}`slurmdbd.conf(8)`.
'';
@@ -117,13 +117,13 @@ in
};
client = {
- enable = mkEnableOption (lib.mdDoc "slurm client daemon");
+ enable = mkEnableOption "slurm client daemon";
};
enableStools = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to provide a slurm.conf file.
Enable this option if you do not run a slurm daemon on this host
(i.e. `server.enable` and `client.enable` are `false`)
@@ -141,7 +141,7 @@ in
type = types.nullOr types.str;
default = null;
example = null;
- description = lib.mdDoc ''
+ description = ''
The short hostname of the machine where SLURM control functions are
executed (i.e. the name returned by the command "hostname -s", use "tux001"
rather than "tux001.my.com").
@@ -153,7 +153,7 @@ in
default = cfg.controlMachine;
defaultText = literalExpression "config.${opt.controlMachine}";
example = null;
- description = lib.mdDoc ''
+ description = ''
Name that ControlMachine should be referred to in establishing a
communications path.
'';
@@ -163,7 +163,7 @@ in
type = types.str;
default = "default";
example = "myCluster";
- description = lib.mdDoc ''
+ description = ''
Necessary to distinguish accounting records in a multi-cluster environment.
'';
};
@@ -172,7 +172,7 @@ in
type = types.listOf types.str;
default = [];
example = literalExpression ''[ "linux[1-32] CPUs=1 State=UNKNOWN" ];'';
- description = lib.mdDoc ''
+ description = ''
Name that SLURM uses to refer to a node (or base partition for BlueGene
systems). Typically this would be the string that "/bin/hostname -s"
returns. Note that now you have to write node's parameters after the name.
@@ -183,7 +183,7 @@ in
type = types.listOf types.str;
default = [];
example = literalExpression ''[ "debug Nodes=linux[1-32] Default=YES MaxTime=INFINITE State=UP" ];'';
- description = lib.mdDoc ''
+ description = ''
Name by which the partition may be referenced. Note that now you have
to write the partition's parameters after the name.
'';
@@ -192,7 +192,7 @@ in
enableSrunX11 = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
If enabled srun will accept the option "--x11" to allow for X11 forwarding
from within an interactive session or a batch job. This activates the
slurm-spank-x11 module. Note that this option also enables
@@ -210,7 +210,7 @@ in
procTrackType = mkOption {
type = types.str;
default = "proctrack/linuxproc";
- description = lib.mdDoc ''
+ description = ''
Plugin to be used for process tracking on a job step basis.
The slurmd daemon uses this mechanism to identify all processes
which are children of processes it spawns for a user job step.
@@ -220,7 +220,7 @@ in
stateSaveLocation = mkOption {
type = types.str;
default = "/var/spool/slurmctld";
- description = lib.mdDoc ''
+ description = ''
Directory into which the Slurm controller, slurmctld, saves its state.
'';
};
@@ -228,7 +228,7 @@ in
user = mkOption {
type = types.str;
default = defaultUser;
- description = lib.mdDoc ''
+ description = ''
Set this option when you want to run the slurmctld daemon
as something else than the default slurm user "slurm".
Note that the UID of this user needs to be the same
@@ -239,7 +239,7 @@ in
extraConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra configuration options that will be added verbatim at
the end of the slurm configuration file.
'';
@@ -248,7 +248,7 @@ in
extraPlugstackConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra configuration that will be added to the end of `plugstack.conf`.
'';
};
@@ -256,7 +256,7 @@ in
extraCgroupConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra configuration for `cgroup.conf`. This file is
used when `procTrackType=proctrack/cgroup`.
'';
@@ -265,7 +265,7 @@ in
extraConfigPaths = mkOption {
type = with types; listOf path;
default = [];
- description = lib.mdDoc ''
+ description = ''
Slurm expects config files for plugins in the same path
as `slurm.conf`. Add extra nix store
paths that should be merged into same directory as
@@ -281,7 +281,7 @@ in
Directory created from generated config files and
`config.${opt.extraConfigPaths}`.
'';
- description = lib.mdDoc ''
+ description = ''
Path to directory with slurm config files. This option is set by default from the
Slurm module and is meant to make the Slurm config file available to other modules.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/computing/torque/mom.nix b/third_party/nixpkgs/nixos/modules/services/computing/torque/mom.nix
index 5dd41429bf..6747bd4b0d 100644
--- a/third_party/nixpkgs/nixos/modules/services/computing/torque/mom.nix
+++ b/third_party/nixpkgs/nixos/modules/services/computing/torque/mom.nix
@@ -17,11 +17,11 @@ in
options = {
services.torque.mom = {
- enable = mkEnableOption (lib.mdDoc "torque computing node");
+ enable = mkEnableOption "torque computing node";
serverNode = mkOption {
type = types.str;
- description = lib.mdDoc "Hostname running pbs server.";
+ description = "Hostname running pbs server.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/computing/torque/server.nix b/third_party/nixpkgs/nixos/modules/services/computing/torque/server.nix
index 02f20fb37c..8d923fc04d 100644
--- a/third_party/nixpkgs/nixos/modules/services/computing/torque/server.nix
+++ b/third_party/nixpkgs/nixos/modules/services/computing/torque/server.nix
@@ -11,7 +11,7 @@ in
services.torque.server = {
- enable = mkEnableOption (lib.mdDoc "torque server");
+ enable = mkEnableOption "torque server";
};
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/buildbot/master.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/buildbot/master.nix
index 9f702b1793..a4a9eee672 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/buildbot/master.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/buildbot/master.nix
@@ -64,7 +64,7 @@ in {
factorySteps = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc "Factory Steps";
+ description = "Factory Steps";
default = [];
example = [
"steps.Git(repourl='https://github.com/buildbot/pyflakes.git', mode='incremental')"
@@ -74,7 +74,7 @@ in {
changeSource = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc "List of Change Sources.";
+ description = "List of Change Sources.";
default = [];
example = [
"changes.GitPoller('https://github.com/buildbot/pyflakes.git', workdir='gitpoller-workdir', branch='master', pollinterval=300)"
@@ -83,7 +83,7 @@ in {
configurators = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc "Configurator Steps, see https://docs.buildbot.net/latest/manual/configuration/configurators.html";
+ description = "Configurator Steps, see https://docs.buildbot.net/latest/manual/configuration/configurators.html";
default = [];
example = [
"util.JanitorConfigurator(logHorizon=timedelta(weeks=4), hour=12, dayOfWeek=6)"
@@ -93,25 +93,25 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the Buildbot continuous integration server.";
+ description = "Whether to enable the Buildbot continuous integration server.";
};
extraConfig = mkOption {
type = types.str;
- description = lib.mdDoc "Extra configuration to append to master.cfg";
+ description = "Extra configuration to append to master.cfg";
default = "c['buildbotNetUsageData'] = None";
};
extraImports = mkOption {
type = types.str;
- description = lib.mdDoc "Extra python imports to prepend to master.cfg";
+ description = "Extra python imports to prepend to master.cfg";
default = "";
example = "from buildbot.process.project import Project";
};
masterCfg = mkOption {
type = types.path;
- description = lib.mdDoc "Optionally pass master.cfg path. Other options in this configuration will be ignored.";
+ description = "Optionally pass master.cfg path. Other options in this configuration will be ignored.";
default = defaultMasterCfg;
defaultText = literalMD ''generated configuration file'';
example = "/etc/nixos/buildbot/master.cfg";
@@ -119,7 +119,7 @@ in {
schedulers = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc "List of Schedulers.";
+ description = "List of Schedulers.";
default = [
"schedulers.SingleBranchScheduler(name='all', change_filter=util.ChangeFilter(branch='master'), treeStableTimer=None, builderNames=['runtests'])"
"schedulers.ForceScheduler(name='force',builderNames=['runtests'])"
@@ -128,7 +128,7 @@ in {
builders = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc "List of Builders.";
+ description = "List of Builders.";
default = [
"util.BuilderConfig(name='runtests',workernames=['example-worker'],factory=factory)"
];
@@ -136,52 +136,52 @@ in {
workers = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc "List of Workers.";
+ description = "List of Workers.";
default = [ "worker.Worker('example-worker', 'pass')" ];
};
reporters = mkOption {
default = [];
type = types.listOf types.str;
- description = lib.mdDoc "List of reporter objects used to present build status to various users.";
+ description = "List of reporter objects used to present build status to various users.";
};
user = mkOption {
default = "buildbot";
type = types.str;
- description = lib.mdDoc "User the buildbot server should execute under.";
+ description = "User the buildbot server should execute under.";
};
group = mkOption {
default = "buildbot";
type = types.str;
- description = lib.mdDoc "Primary group of buildbot user.";
+ description = "Primary group of buildbot user.";
};
extraGroups = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "List of extra groups that the buildbot user should be a part of.";
+ description = "List of extra groups that the buildbot user should be a part of.";
};
home = mkOption {
default = "/home/buildbot";
type = types.path;
- description = lib.mdDoc "Buildbot home directory.";
+ description = "Buildbot home directory.";
};
buildbotDir = mkOption {
default = "${cfg.home}/master";
defaultText = literalExpression ''"''${config.${opt.home}}/master"'';
type = types.path;
- description = lib.mdDoc "Specifies the Buildbot directory.";
+ description = "Specifies the Buildbot directory.";
};
pbPort = mkOption {
default = 9989;
type = types.either types.str types.int;
example = "'tcp:9990:interface=127.0.0.1'";
- description = lib.mdDoc ''
+ description = ''
The buildmaster will listen on a TCP port of your choosing
for connections from workers.
It can also use this port for connections from remote Change Sources,
@@ -196,37 +196,37 @@ in {
listenAddress = mkOption {
default = "0.0.0.0";
type = types.str;
- description = lib.mdDoc "Specifies the bind address on which the buildbot HTTP interface listens.";
+ description = "Specifies the bind address on which the buildbot HTTP interface listens.";
};
buildbotUrl = mkOption {
default = "http://localhost:8010/";
type = types.str;
- description = lib.mdDoc "Specifies the Buildbot URL.";
+ description = "Specifies the Buildbot URL.";
};
title = mkOption {
default = "Buildbot";
type = types.str;
- description = lib.mdDoc "Specifies the Buildbot Title.";
+ description = "Specifies the Buildbot Title.";
};
titleUrl = mkOption {
default = "Buildbot";
type = types.str;
- description = lib.mdDoc "Specifies the Buildbot TitleURL.";
+ description = "Specifies the Buildbot TitleURL.";
};
dbUrl = mkOption {
default = "sqlite:///state.sqlite";
type = types.str;
- description = lib.mdDoc "Specifies the database connection string.";
+ description = "Specifies the database connection string.";
};
port = mkOption {
default = 8010;
type = types.port;
- description = lib.mdDoc "Specifies port number on which the buildbot HTTP interface listens.";
+ description = "Specifies port number on which the buildbot HTTP interface listens.";
};
package = mkPackageOption pkgs "buildbot-full" {
@@ -237,14 +237,14 @@ in {
default = [ pkgs.git ];
defaultText = literalExpression "[ pkgs.git ]";
type = types.listOf types.package;
- description = lib.mdDoc "Packages to add to PATH for the buildbot process.";
+ description = "Packages to add to PATH for the buildbot process.";
};
pythonPackages = mkOption {
type = types.functionTo (types.listOf types.package);
default = pythonPackages: with pythonPackages; [ ];
defaultText = literalExpression "pythonPackages: with pythonPackages; [ ]";
- description = lib.mdDoc "Packages to add the to the PYTHONPATH of the buildbot process.";
+ description = "Packages to add the to the PYTHONPATH of the buildbot process.";
example = literalExpression "pythonPackages: with pythonPackages; [ requests ]";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/buildbot/worker.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/buildbot/worker.nix
index 9c7b2bdd06..1534ca6f57 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/buildbot/worker.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/buildbot/worker.nix
@@ -50,79 +50,79 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the Buildbot Worker.";
+ description = "Whether to enable the Buildbot Worker.";
};
user = mkOption {
default = "bbworker";
type = types.str;
- description = lib.mdDoc "User the buildbot Worker should execute under.";
+ description = "User the buildbot Worker should execute under.";
};
group = mkOption {
default = "bbworker";
type = types.str;
- description = lib.mdDoc "Primary group of buildbot Worker user.";
+ description = "Primary group of buildbot Worker user.";
};
extraGroups = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "List of extra groups that the Buildbot Worker user should be a part of.";
+ description = "List of extra groups that the Buildbot Worker user should be a part of.";
};
home = mkOption {
default = "/home/bbworker";
type = types.path;
- description = lib.mdDoc "Buildbot home directory.";
+ description = "Buildbot home directory.";
};
buildbotDir = mkOption {
default = "${cfg.home}/worker";
defaultText = literalExpression ''"''${config.${opt.home}}/worker"'';
type = types.path;
- description = lib.mdDoc "Specifies the Buildbot directory.";
+ description = "Specifies the Buildbot directory.";
};
workerUser = mkOption {
default = "example-worker";
type = types.str;
- description = lib.mdDoc "Specifies the Buildbot Worker user.";
+ description = "Specifies the Buildbot Worker user.";
};
workerPass = mkOption {
default = "pass";
type = types.str;
- description = lib.mdDoc "Specifies the Buildbot Worker password.";
+ description = "Specifies the Buildbot Worker password.";
};
workerPassFile = mkOption {
type = types.path;
- description = lib.mdDoc "File used to store the Buildbot Worker password";
+ description = "File used to store the Buildbot Worker password";
};
hostMessage = mkOption {
default = null;
type = types.nullOr types.str;
- description = lib.mdDoc "Description of this worker";
+ description = "Description of this worker";
};
adminMessage = mkOption {
default = null;
type = types.nullOr types.str;
- description = lib.mdDoc "Name of the administrator of this worker";
+ description = "Name of the administrator of this worker";
};
masterUrl = mkOption {
default = "localhost:9989";
type = types.str;
- description = lib.mdDoc "Specifies the Buildbot Worker connection string.";
+ description = "Specifies the Buildbot Worker connection string.";
};
keepalive = mkOption {
default = 600;
type = types.int;
- description = lib.mdDoc ''
+ description = ''
This is a number that indicates how frequently keepalive messages should be sent
from the worker to the buildmaster, expressed in seconds.
'';
@@ -134,7 +134,7 @@ in {
default = with pkgs; [ git ];
defaultText = literalExpression "[ pkgs.git ]";
type = types.listOf types.package;
- description = lib.mdDoc "Packages to add to PATH for the buildbot process.";
+ description = "Packages to add to PATH for the buildbot process.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/buildkite-agents.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/buildkite-agents.nix
index 2e488f83d4..fc30172c64 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/buildkite-agents.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/buildkite-agents.nix
@@ -19,38 +19,38 @@ let
enable = lib.mkOption {
default = true;
type = lib.types.bool;
- description = lib.mdDoc "Whether to enable this buildkite agent";
+ description = "Whether to enable this buildkite agent";
};
package = lib.mkOption {
default = pkgs.buildkite-agent;
defaultText = lib.literalExpression "pkgs.buildkite-agent";
- description = lib.mdDoc "Which buildkite-agent derivation to use";
+ description = "Which buildkite-agent derivation to use";
type = lib.types.package;
};
dataDir = lib.mkOption {
default = "/var/lib/buildkite-agent-${name}";
- description = lib.mdDoc "The workdir for the agent";
+ description = "The workdir for the agent";
type = lib.types.str;
};
extraGroups = lib.mkOption {
default = [ "keys" ];
- description = lib.mdDoc "Groups the user for this buildkite agent should belong to";
+ description = "Groups the user for this buildkite agent should belong to";
type = lib.types.listOf lib.types.str;
};
runtimePackages = lib.mkOption {
default = [ pkgs.bash pkgs.gnutar pkgs.gzip pkgs.git pkgs.nix ];
defaultText = lib.literalExpression "[ pkgs.bash pkgs.gnutar pkgs.gzip pkgs.git pkgs.nix ]";
- description = lib.mdDoc "Add programs to the buildkite-agent environment";
+ description = "Add programs to the buildkite-agent environment";
type = lib.types.listOf lib.types.package;
};
tokenPath = lib.mkOption {
type = lib.types.path;
- description = lib.mdDoc ''
+ description = ''
The token from your Buildkite "Agents" page.
A run-time path to the token file, which is supposed to be provisioned
@@ -61,7 +61,7 @@ let
name = lib.mkOption {
type = lib.types.str;
default = "%hostname-${name}-%n";
- description = lib.mdDoc ''
+ description = ''
The name of the agent as seen in the buildkite dashboard.
'';
};
@@ -70,7 +70,7 @@ let
type = lib.types.attrsOf (lib.types.either lib.types.str (lib.types.listOf lib.types.str));
default = { };
example = { queue = "default"; docker = "true"; ruby2 = "true"; };
- description = lib.mdDoc ''
+ description = ''
Tags for the agent.
'';
};
@@ -79,7 +79,7 @@ let
type = lib.types.lines;
default = "";
example = "debug=true";
- description = lib.mdDoc ''
+ description = ''
Extra lines to be added verbatim to the configuration file.
'';
};
@@ -91,7 +91,7 @@ let
## don't end up in the Nix store.
apply = final: if final == null then null else toString final;
- description = lib.mdDoc ''
+ description = ''
OpenSSH private key
A run-time path to the key file, which is supposed to be provisioned
@@ -108,7 +108,7 @@ let
export SECRET_VAR=`head -1 /run/keys/secret`
''';
}'';
- description = lib.mdDoc ''
+ description = ''
"Agent" hooks to install.
See for possible options.
'';
@@ -118,7 +118,7 @@ let
type = lib.types.path;
default = hooksDir config.hooks;
defaultText = lib.literalMD "generated from {option}`services.buildkite-agents..hooks`";
- description = lib.mdDoc ''
+ description = ''
Path to the directory storing the hooks.
Consider using {option}`services.buildkite-agents..hooks.`
instead.
@@ -129,7 +129,7 @@ let
type = lib.types.str;
default = "${pkgs.bash}/bin/bash -e -c";
defaultText = lib.literalExpression ''"''${pkgs.bash}/bin/bash -e -c"'';
- description = lib.mdDoc ''
+ description = ''
Command that buildkite-agent 3 will execute when it spawns a shell.
'';
};
@@ -142,7 +142,7 @@ in
options.services.buildkite-agents = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule buildkiteOptions);
default = { };
- description = lib.mdDoc ''
+ description = ''
Attribute set of buildkite agents.
The attribute key is combined with the hostname and a unique integer to
create the final agent name. This can be overridden by setting the `name`
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/gitea-actions-runner.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/gitea-actions-runner.nix
index 06f0da3451..30be56f8ee 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/gitea-actions-runner.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/gitea-actions-runner.nix
@@ -60,17 +60,17 @@ in
instances = mkOption {
default = {};
- description = lib.mdDoc ''
+ description = ''
Gitea Actions Runner instances.
'';
type = attrsOf (submodule {
options = {
- enable = mkEnableOption (lib.mdDoc "Gitea Actions Runner instance");
+ enable = mkEnableOption "Gitea Actions Runner instance";
name = mkOption {
type = str;
example = literalExpression "config.networking.hostName";
- description = lib.mdDoc ''
+ description = ''
The name identifying the runner instance towards the Gitea/Forgejo instance.
'';
};
@@ -78,7 +78,7 @@ in
url = mkOption {
type = str;
example = "https://forge.example.com";
- description = lib.mdDoc ''
+ description = ''
Base URL of your Gitea/Forgejo instance.
'';
};
@@ -86,7 +86,7 @@ in
token = mkOption {
type = nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Plain token to register at the configured Gitea/Forgejo instance.
'';
};
@@ -94,7 +94,7 @@ in
tokenFile = mkOption {
type = nullOr (either str path);
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to an environment file, containing the `TOKEN` environment
variable, that holds a token to register at the configured
Gitea/Forgejo instance.
@@ -113,7 +113,7 @@ in
#"native:host"
]
'';
- description = lib.mdDoc ''
+ description = ''
Labels used to map jobs to their runtime environment. Changing these
labels currently requires a new registration token.
@@ -122,7 +122,7 @@ in
'';
};
settings = mkOption {
- description = lib.mdDoc ''
+ description = ''
Configuration for `act_runner daemon`.
See https://gitea.com/gitea/act_runner/src/branch/main/internal/pkg/config/config.example.yaml for an example configuration
'';
@@ -158,7 +158,7 @@ in
wget
]
'';
- description = lib.mdDoc ''
+ description = ''
List of packages, that are available to actions, when the runner is configured
with a host execution label.
'';
@@ -203,6 +203,8 @@ in
TOKEN = "${instance.token}";
} // optionalAttrs (wantsPodman) {
DOCKER_HOST = "unix:///run/podman/podman.sock";
+ } // {
+ HOME = "/var/lib/gitea-runner/${name}";
};
path = with pkgs; [
coreutils
@@ -236,7 +238,8 @@ in
--instance ${escapeShellArg instance.url} \
--token "$TOKEN" \
--name ${escapeShellArg instance.name} \
- --labels ${escapeShellArg (concatStringsSep "," instance.labels)}
+ --labels ${escapeShellArg (concatStringsSep "," instance.labels)} \
+ --config ${configFile}
# and write back the configured labels
echo "$LABELS_WANTED" > "$LABELS_FILE"
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/github-runner/options.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/github-runner/options.nix
index 193261fc2a..6ace6a1b18 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/github-runner/options.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/github-runner/options.nix
@@ -6,7 +6,7 @@
with lib;
{
options.services.github-runners = mkOption {
- description = mdDoc ''
+ description = ''
Multiple GitHub Runners.
'';
example = {
@@ -30,7 +30,7 @@ with lib;
enable = mkOption {
default = false;
example = true;
- description = mdDoc ''
+ description = ''
Whether to enable GitHub Actions runner.
Note: GitHub recommends using self-hosted runners with private repositories only. Learn more here:
@@ -41,7 +41,7 @@ with lib;
url = mkOption {
type = types.str;
- description = mdDoc ''
+ description = ''
Repository to add the runner to.
Changing this option triggers a new runner registration.
@@ -59,7 +59,7 @@ with lib;
tokenFile = mkOption {
type = types.path;
- description = mdDoc ''
+ description = ''
The full path to a file which contains either
* a fine-grained personal access token (PAT),
@@ -102,7 +102,7 @@ with lib;
name = mkOption {
type = types.nullOr types.str;
- description = mdDoc ''
+ description = ''
Name of the runner to configure. If null, defaults to the hostname.
Changing this option triggers a new runner registration.
@@ -113,7 +113,7 @@ with lib;
runnerGroup = mkOption {
type = types.nullOr types.str;
- description = mdDoc ''
+ description = ''
Name of the runner group to add this runner to (defaults to the default runner group).
Changing this option triggers a new runner registration.
@@ -123,7 +123,7 @@ with lib;
extraLabels = mkOption {
type = types.listOf types.str;
- description = mdDoc ''
+ description = ''
Extra labels in addition to the default (unless disabled through the `noDefaultLabels` option).
Changing this option triggers a new runner registration.
@@ -134,7 +134,7 @@ with lib;
noDefaultLabels = mkOption {
type = types.bool;
- description = mdDoc ''
+ description = ''
Disables adding the default labels. Also see the `extraLabels` option.
Changing this option triggers a new runner registration.
@@ -144,7 +144,7 @@ with lib;
replace = mkOption {
type = types.bool;
- description = mdDoc ''
+ description = ''
Replace any existing runner with the same name.
Without this flag, registering a new runner with the same name fails.
@@ -154,7 +154,7 @@ with lib;
extraPackages = mkOption {
type = types.listOf types.package;
- description = mdDoc ''
+ description = ''
Extra packages to add to `PATH` of the service to make them available to workflows.
'';
default = [ ];
@@ -162,7 +162,7 @@ with lib;
extraEnvironment = mkOption {
type = types.attrs;
- description = mdDoc ''
+ description = ''
Extra environment variables to set for the runner, as an attrset.
'';
example = {
@@ -173,7 +173,7 @@ with lib;
serviceOverrides = mkOption {
type = types.attrs;
- description = mdDoc ''
+ description = ''
Modify the systemd service. Can be used to, e.g., adjust the sandboxing options.
See {manpage}`systemd.exec(5)` for more options.
'';
@@ -188,7 +188,7 @@ with lib;
ephemeral = mkOption {
type = types.bool;
- description = mdDoc ''
+ description = ''
If enabled, causes the following behavior:
- Passes the `--ephemeral` flag to the runner configuration script
@@ -208,7 +208,7 @@ with lib;
user = mkOption {
type = types.nullOr types.str;
- description = mdDoc ''
+ description = ''
User under which to run the service.
If this option and the `group` option is set to `null`,
@@ -222,7 +222,7 @@ with lib;
group = mkOption {
type = types.nullOr types.str;
- description = mdDoc ''
+ description = ''
Group under which to run the service.
The effect of this option depends on the value of the `user` option:
@@ -241,7 +241,7 @@ with lib;
workDir = mkOption {
type = with types; nullOr str;
- description = mdDoc ''
+ description = ''
Working directory, available as `$GITHUB_WORKSPACE` during workflow runs
and used as a default for [repository checkouts](https://github.com/actions/checkout).
The service cleans this directory on every service start.
@@ -256,7 +256,7 @@ with lib;
nodeRuntimes = mkOption {
type = with types; nonEmptyListOf (enum [ "node20" ]);
default = [ "node20" ];
- description = mdDoc ''
+ description = ''
List of Node.js runtimes the runner should support.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/gitlab-runner.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/gitlab-runner.nix
index 05b2449936..62c62c5d23 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/gitlab-runner.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/gitlab-runner.nix
@@ -151,11 +151,11 @@ let
'';
in {
options.services.gitlab-runner = {
- enable = mkEnableOption (lib.mdDoc "Gitlab Runner");
+ enable = mkEnableOption "Gitlab Runner";
configFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Configuration file for gitlab-runner.
{option}`configFile` takes precedence over {option}`services`.
@@ -172,7 +172,7 @@ in {
freeformType = (pkgs.formats.json { }).type;
};
default = { };
- description = lib.mdDoc ''
+ description = ''
Global gitlab-runner configuration. See
for supported values.
@@ -181,7 +181,7 @@ in {
gracefulTermination = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Finish all remaining jobs before stopping.
If not set gitlab-runner will stop immediately without waiting
for jobs to finish, which will lead to failed builds.
@@ -191,7 +191,7 @@ in {
type = types.str;
default = "infinity";
example = "5min 20s";
- description = lib.mdDoc ''
+ description = ''
Time to wait until a graceful shutdown is turned into a forceful one.
'';
};
@@ -201,12 +201,12 @@ in {
extraPackages = mkOption {
type = types.listOf types.package;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
Extra packages to add to PATH for the gitlab-runner process.
'';
};
services = mkOption {
- description = lib.mdDoc "GitLab Runner services.";
+ description = "GitLab Runner services.";
default = { };
example = literalExpression ''
{
@@ -288,7 +288,7 @@ in {
options = {
registrationConfigFile = mkOption {
type = types.path;
- description = lib.mdDoc ''
+ description = ''
Absolute path to a file with environment variables
used for gitlab-runner registration.
A list of all supported environment variables can be found in
@@ -308,7 +308,7 @@ in {
type = types.listOf types.str;
default = [ ];
example = [ "--docker-helper-image my/gitlab-runner-helper" ];
- description = lib.mdDoc ''
+ description = ''
Extra command-line flags passed to
`gitlab-runner register`.
Execute `gitlab-runner register --help`
@@ -319,7 +319,7 @@ in {
type = types.attrsOf types.str;
default = { };
example = { NAME = "value"; };
- description = lib.mdDoc ''
+ description = ''
Custom environment variables injected to build environment.
For secrets you can use {option}`registrationConfigFile`
with `RUNNER_ENV` variable set.
@@ -328,14 +328,14 @@ in {
description = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Name/description of the runner.
'';
};
executor = mkOption {
type = types.str;
default = "docker";
- description = lib.mdDoc ''
+ description = ''
Select executor, eg. shell, docker, etc.
See [runner documentation](https://docs.gitlab.com/runner/executors/README.html) for more information.
'';
@@ -344,7 +344,7 @@ in {
type = types.nullOr types.path;
default = null;
example = "/var/lib/gitlab-runner/builds";
- description = lib.mdDoc ''
+ description = ''
Absolute path to a directory where builds will be stored
in context of selected executor (Locally, Docker, SSH).
'';
@@ -353,14 +353,14 @@ in {
type = types.nullOr types.str;
default = null;
example = "http://gitlab.example.local";
- description = lib.mdDoc ''
+ description = ''
Overwrite the URL for the GitLab instance. Used if the Runner can’t connect to GitLab on the URL GitLab exposes itself.
'';
};
dockerImage = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Docker image to be used.
'';
};
@@ -368,7 +368,7 @@ in {
type = types.listOf types.str;
default = [ ];
example = [ "/var/run/docker.sock:/var/run/docker.sock" ];
- description = lib.mdDoc ''
+ description = ''
Bind-mount a volume and create it
if it doesn't exist prior to mounting.
'';
@@ -376,14 +376,14 @@ in {
dockerDisableCache = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Disable all container caching.
'';
};
dockerPrivileged = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Give extended privileges to container.
'';
};
@@ -391,7 +391,7 @@ in {
type = types.listOf types.str;
default = [ ];
example = [ "other-host:127.0.0.1" ];
- description = lib.mdDoc ''
+ description = ''
Add a custom host-to-IP mapping.
'';
};
@@ -399,7 +399,7 @@ in {
type = types.listOf types.str;
default = [ ];
example = [ "ruby:*" "python:*" "php:*" "my.registry.tld:5000/*:*" ];
- description = lib.mdDoc ''
+ description = ''
Whitelist allowed images.
'';
};
@@ -407,21 +407,21 @@ in {
type = types.listOf types.str;
default = [ ];
example = [ "postgres:9" "redis:*" "mysql:*" ];
- description = lib.mdDoc ''
+ description = ''
Whitelist allowed services.
'';
};
preCloneScript = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Runner-specific command script executed before code is pulled.
'';
};
preBuildScript = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Runner-specific command script executed after code is pulled,
just before build executes.
'';
@@ -429,7 +429,7 @@ in {
postBuildScript = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Runner-specific command script executed after code is pulled
and just after build executes.
'';
@@ -437,14 +437,14 @@ in {
tagList = mkOption {
type = types.listOf types.str;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
Tag list.
'';
};
runUntagged = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Register to run untagged builds; defaults to
`true` when {option}`tagList` is empty.
'';
@@ -452,7 +452,7 @@ in {
limit = mkOption {
type = types.int;
default = 0;
- description = lib.mdDoc ''
+ description = ''
Limit how many jobs can be handled concurrently by this service.
0 (default) simply means don't limit.
'';
@@ -460,14 +460,14 @@ in {
requestConcurrency = mkOption {
type = types.int;
default = 0;
- description = lib.mdDoc ''
+ description = ''
Limit number of concurrent requests for new jobs from GitLab.
'';
};
maximumTimeout = mkOption {
type = types.int;
default = 0;
- description = lib.mdDoc ''
+ description = ''
What is the maximum timeout (in seconds) that will be set for
job when using this Runner. 0 (default) simply means don't limit.
'';
@@ -475,7 +475,7 @@ in {
protected = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
When set to true Runner will only run on pipelines
triggered on protected branches.
'';
@@ -483,7 +483,7 @@ in {
debugTraceDisabled = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
When set to true Runner will disable the possibility of
using the `CI_DEBUG_TRACE` feature.
'';
@@ -495,7 +495,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to periodically prune gitlab runner's Docker resources. If
enabled, a systemd timer will run {command}`clear-docker-cache` as
specified by the `dates` option.
@@ -506,7 +506,7 @@ in {
type = types.listOf types.str;
default = [ ];
example = [ "prune" ];
- description = lib.mdDoc ''
+ description = ''
Any additional flags passed to {command}`clear-docker-cache`.
'';
};
@@ -514,7 +514,7 @@ in {
dates = mkOption {
default = "weekly";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Specification (in the format described by
{manpage}`systemd.time(7)`) of the time at
which the prune will occur.
@@ -525,7 +525,7 @@ in {
default = config.virtualisation.docker.package;
defaultText = literalExpression "config.virtualisation.docker.package";
example = literalExpression "pkgs.docker";
- description = lib.mdDoc "Docker package to use for clearing up docker cache.";
+ description = "Docker package to use for clearing up docker cache.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/gocd-agent/default.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/gocd-agent/default.nix
index c0d752443a..0e61b253f1 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/gocd-agent/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/gocd-agent/default.nix
@@ -8,12 +8,12 @@ let
in {
options = {
services.gocd-agent = {
- enable = mkEnableOption (lib.mdDoc "gocd-agent");
+ enable = mkEnableOption "gocd-agent";
user = mkOption {
default = "gocd-agent";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
User the Go.CD agent should execute under.
'';
};
@@ -21,7 +21,7 @@ in {
group = mkOption {
default = "gocd-agent";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
If the default user "gocd-agent" is configured then this is the primary
group of that user.
'';
@@ -31,7 +31,7 @@ in {
type = types.listOf types.str;
default = [ ];
example = [ "wheel" "docker" ];
- description = lib.mdDoc ''
+ description = ''
List of extra groups that the "gocd-agent" user should be a part of.
'';
};
@@ -40,7 +40,7 @@ in {
default = [ pkgs.stdenv pkgs.jre pkgs.git config.programs.ssh.package pkgs.nix ];
defaultText = literalExpression "[ pkgs.stdenv pkgs.jre pkgs.git config.programs.ssh.package pkgs.nix ]";
type = types.listOf types.package;
- description = lib.mdDoc ''
+ description = ''
Packages to add to PATH for the Go.CD agent process.
'';
};
@@ -53,7 +53,7 @@ in {
agent.auto.register.environments=QA,Performance
agent.auto.register.hostname=Agent01
'';
- description = lib.mdDoc ''
+ description = ''
Agent registration configuration.
'';
};
@@ -61,7 +61,7 @@ in {
goServer = mkOption {
default = "https://127.0.0.1:8154/go";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
URL of the GoCD Server to attach the Go.CD Agent to.
'';
};
@@ -69,7 +69,7 @@ in {
workDir = mkOption {
default = "/var/lib/go-agent";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Specifies the working directory in which the Go.CD agent java archive resides.
'';
};
@@ -77,7 +77,7 @@ in {
initialJavaHeapSize = mkOption {
default = "128m";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Specifies the initial java heap memory size for the Go.CD agent java process.
'';
};
@@ -85,7 +85,7 @@ in {
maxJavaHeapMemory = mkOption {
default = "256m";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Specifies the java maximum heap memory size for the Go.CD agent java process.
'';
};
@@ -108,7 +108,7 @@ in {
"-Djava.security.egd=file:/dev/./urandom"
]
'';
- description = lib.mdDoc ''
+ description = ''
Specifies startup command line arguments to pass to Go.CD agent
java process.
'';
@@ -127,7 +127,7 @@ in {
"-XX:+PrintGCDetails"
"-XX:+PrintGC"
];
- description = lib.mdDoc ''
+ description = ''
Specifies additional command line arguments to pass to Go.CD agent
java process. Example contains debug and gcLog arguments.
'';
@@ -136,7 +136,7 @@ in {
environment = mkOption {
default = { };
type = with types; attrsOf str;
- description = lib.mdDoc ''
+ description = ''
Additional environment variables to be passed to the Go.CD agent process.
As a base environment, Go.CD agent receives NIX_PATH from
{option}`environment.sessionVariables`, NIX_REMOTE is set to
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/gocd-server/default.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/gocd-server/default.nix
index bf7fd529bf..a1fb740c26 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/gocd-server/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/gocd-server/default.nix
@@ -8,12 +8,12 @@ let
in {
options = {
services.gocd-server = {
- enable = mkEnableOption (lib.mdDoc "gocd-server");
+ enable = mkEnableOption "gocd-server";
user = mkOption {
default = "gocd-server";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
User the Go.CD server should execute under.
'';
};
@@ -21,7 +21,7 @@ in {
group = mkOption {
default = "gocd-server";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
If the default user "gocd-server" is configured then this is the primary group of that user.
'';
};
@@ -30,7 +30,7 @@ in {
default = [ ];
type = types.listOf types.str;
example = [ "wheel" "docker" ];
- description = lib.mdDoc ''
+ description = ''
List of extra groups that the "gocd-server" user should be a part of.
'';
};
@@ -39,7 +39,7 @@ in {
default = "0.0.0.0";
example = "localhost";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Specifies the bind address on which the Go.CD server HTTP interface listens.
'';
};
@@ -47,7 +47,7 @@ in {
port = mkOption {
default = 8153;
type = types.port;
- description = lib.mdDoc ''
+ description = ''
Specifies port number on which the Go.CD server HTTP interface listens.
'';
};
@@ -55,7 +55,7 @@ in {
sslPort = mkOption {
default = 8154;
type = types.int;
- description = lib.mdDoc ''
+ description = ''
Specifies port number on which the Go.CD server HTTPS interface listens.
'';
};
@@ -63,7 +63,7 @@ in {
workDir = mkOption {
default = "/var/lib/go-server";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Specifies the working directory in which the Go.CD server java archive resides.
'';
};
@@ -72,7 +72,7 @@ in {
default = [ pkgs.stdenv pkgs.jre pkgs.git config.programs.ssh.package pkgs.nix ];
defaultText = literalExpression "[ pkgs.stdenv pkgs.jre pkgs.git config.programs.ssh.package pkgs.nix ]";
type = types.listOf types.package;
- description = lib.mdDoc ''
+ description = ''
Packages to add to PATH for the Go.CD server's process.
'';
};
@@ -80,7 +80,7 @@ in {
initialJavaHeapSize = mkOption {
default = "512m";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Specifies the initial java heap memory size for the Go.CD server's java process.
'';
};
@@ -88,7 +88,7 @@ in {
maxJavaHeapMemory = mkOption {
default = "1024m";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Specifies the java maximum heap memory size for the Go.CD server's java process.
'';
};
@@ -126,7 +126,7 @@ in {
]
'';
- description = lib.mdDoc ''
+ description = ''
Specifies startup command line arguments to pass to Go.CD server
java process.
'';
@@ -145,7 +145,7 @@ in {
"-XX:+PrintGCDetails"
"-XX:+PrintGC"
];
- description = lib.mdDoc ''
+ description = ''
Specifies additional command line arguments to pass to Go.CD server's
java process. Example contains debug and gcLog arguments.
'';
@@ -154,7 +154,7 @@ in {
environment = mkOption {
default = { };
type = with types; attrsOf str;
- description = lib.mdDoc ''
+ description = ''
Additional environment variables to be passed to the gocd-server process.
As a base environment, gocd-server receives NIX_PATH from
{option}`environment.sessionVariables`, NIX_REMOTE is set to
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix
index 7d33989044..a0d4a78a5f 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix
@@ -36,7 +36,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable to run Hercules CI Agent as a system service.
[Hercules CI](https://hercules-ci.com) is a
@@ -47,7 +47,7 @@ in
};
package = mkPackageOption pkgs "hercules-ci-agent" { };
settings = mkOption {
- description = lib.mdDoc ''
+ description = ''
These settings are written to the `agent.toml` file.
Not all settings are listed as options, can be set nonetheless.
@@ -67,7 +67,7 @@ in
type = types.path;
internal = true;
defaultText = lib.literalMD "generated `hercules-ci-agent.toml`";
- description = lib.mdDoc ''
+ description = ''
The fully assembled config file.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/hercules-ci-agent/settings.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/hercules-ci-agent/settings.nix
index 8eb902313e..e6e73090d4 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/hercules-ci-agent/settings.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/hercules-ci-agent/settings.nix
@@ -13,7 +13,7 @@ let
freeformType = format.type;
options = {
apiBaseUrl = mkOption {
- description = lib.mdDoc ''
+ description = ''
API base URL that the agent will connect to.
When using Hercules CI Enterprise, set this to the URL where your
@@ -25,12 +25,12 @@ let
baseDirectory = mkOption {
type = types.path;
default = "/var/lib/hercules-ci-agent";
- description = lib.mdDoc ''
+ description = ''
State directory (secrets, work directory, etc) for agent
'';
};
concurrentTasks = mkOption {
- description = lib.mdDoc ''
+ description = ''
Number of tasks to perform simultaneously.
A task is a single derivation build, an evaluation or an effect run.
@@ -54,7 +54,7 @@ let
'';
};
labels = mkOption {
- description = lib.mdDoc ''
+ description = ''
A key-value map of user data.
This data will be available to organization members in the dashboard and API.
@@ -73,7 +73,7 @@ let
'';
};
workDirectory = mkOption {
- description = lib.mdDoc ''
+ description = ''
The directory in which temporary subdirectories are created for task state. This includes sources for Nix evaluation.
'';
type = types.path;
@@ -81,7 +81,7 @@ let
defaultText = literalExpression ''baseDirectory + "/work"'';
};
staticSecretsDirectory = mkOption {
- description = lib.mdDoc ''
+ description = ''
This is the default directory to look for statically configured secrets like `cluster-join-token.key`.
See also `clusterJoinTokenPath` and `binaryCachesPath` for fine-grained configuration.
@@ -91,7 +91,7 @@ let
defaultText = literalExpression ''baseDirectory + "/secrets"'';
};
clusterJoinTokenPath = mkOption {
- description = lib.mdDoc ''
+ description = ''
Location of the cluster-join-token.key file.
You can retrieve the contents of the file when creating a new agent via
@@ -108,7 +108,7 @@ let
defaultText = literalExpression ''staticSecretsDirectory + "/cluster-join-token.key"'';
};
binaryCachesPath = mkOption {
- description = lib.mdDoc ''
+ description = ''
Path to a JSON file containing binary cache secret keys.
As these values are confidential, they should not be in the store, but
@@ -122,7 +122,7 @@ let
defaultText = literalExpression ''staticSecretsDirectory + "/binary-caches.json"'';
};
secretsJsonPath = mkOption {
- description = lib.mdDoc ''
+ description = ''
Path to a JSON file containing secrets for effects.
As these values are confidential, they should not be in the store, but
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/hydra/default.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/hydra/default.nix
index b1d44e6765..23f07eb64b 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/hydra/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/hydra/default.nix
@@ -78,7 +78,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to run Hydra services.
'';
};
@@ -87,7 +87,7 @@ in
type = types.str;
default = localDB;
example = "dbi:Pg:dbname=hydra;host=postgres.example.org;user=foo;";
- description = lib.mdDoc ''
+ description = ''
The DBI string for Hydra database connection.
NOTE: Attempts to set `application_name` will be overridden by
@@ -101,7 +101,7 @@ in
hydraURL = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The base URL for the Hydra webserver instance. Used for links in emails.
'';
};
@@ -110,7 +110,7 @@ in
type = types.str;
default = "*";
example = "localhost";
- description = lib.mdDoc ''
+ description = ''
The hostname or address to listen on or `*` to listen
on all interfaces.
'';
@@ -119,7 +119,7 @@ in
port = mkOption {
type = types.port;
default = 3000;
- description = lib.mdDoc ''
+ description = ''
TCP port the web server should listen to.
'';
};
@@ -127,7 +127,7 @@ in
minimumDiskFree = mkOption {
type = types.int;
default = 0;
- description = lib.mdDoc ''
+ description = ''
Threshold of minimum disk space (GiB) to determine if the queue runner should run or not.
'';
};
@@ -135,14 +135,14 @@ in
minimumDiskFreeEvaluator = mkOption {
type = types.int;
default = 0;
- description = lib.mdDoc ''
+ description = ''
Threshold of minimum disk space (GiB) to determine if the evaluator should run or not.
'';
};
notificationSender = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Sender email address used for email notifications.
'';
};
@@ -151,7 +151,7 @@ in
type = types.nullOr types.str;
default = null;
example = "localhost";
- description = lib.mdDoc ''
+ description = ''
Hostname of the SMTP server to use to send email.
'';
};
@@ -159,7 +159,7 @@ in
tracker = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Piece of HTML that is included on all pages.
'';
};
@@ -167,7 +167,7 @@ in
logo = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to a file containing the logo of your Hydra instance.
'';
};
@@ -175,24 +175,42 @@ in
debugServer = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to run the server in debug mode.";
+ description = "Whether to run the server in debug mode.";
+ };
+
+ maxServers = mkOption {
+ type = types.int;
+ default = 25;
+ description = "Maximum number of starman workers to spawn.";
+ };
+
+ minSpareServers = mkOption {
+ type = types.int;
+ default = 4;
+ description = "Minimum number of spare starman workers to keep.";
+ };
+
+ maxSpareServers = mkOption {
+ type = types.int;
+ default = 5;
+ description = "Maximum number of spare starman workers to keep.";
};
extraConfig = mkOption {
type = types.lines;
- description = lib.mdDoc "Extra lines for the Hydra configuration.";
+ description = "Extra lines for the Hydra configuration.";
};
extraEnv = mkOption {
type = types.attrsOf types.str;
default = {};
- description = lib.mdDoc "Extra environment variables for Hydra.";
+ description = "Extra environment variables for Hydra.";
};
gcRootsDir = mkOption {
type = types.path;
default = "/nix/var/nix/gcroots/hydra";
- description = lib.mdDoc "Directory that holds Hydra garbage collector roots.";
+ description = "Directory that holds Hydra garbage collector roots.";
};
buildMachinesFiles = mkOption {
@@ -200,13 +218,13 @@ in
default = optional (config.nix.buildMachines != []) "/etc/nix/machines";
defaultText = literalExpression ''optional (config.nix.buildMachines != []) "/etc/nix/machines"'';
example = [ "/etc/nix/machines" "/var/lib/hydra/provisioner/machines" ];
- description = lib.mdDoc "List of files containing build machines.";
+ description = "List of files containing build machines.";
};
useSubstitutes = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to use binary caches for downloading store paths. Note that
binary substitutions trigger (a potentially large number of) additional
HTTP requests that slow down the queue monitor thread significantly.
@@ -224,6 +242,16 @@ in
###### implementation
config = mkIf cfg.enable {
+ assertions = [
+ {
+ assertion = cfg.maxServers != 0 && cfg.maxSpareServers != 0 && cfg.minSpareServers != 0;
+ message = "services.hydra.{minSpareServers,maxSpareServers,minSpareServers} cannot be 0";
+ }
+ {
+ assertion = cfg.minSpareServers < cfg.maxSpareServers;
+ message = "services.hydra.minSpareServers cannot be bigger than servives.hydra.maxSpareServers";
+ }
+ ];
users.groups.hydra = {
gid = config.ids.gids.hydra;
@@ -258,7 +286,7 @@ in
using_frontend_proxy = 1
base_uri = ${cfg.hydraURL}
notification_sender = ${cfg.notificationSender}
- max_servers = 25
+ max_servers = ${toString cfg.maxServers}
${optionalString (cfg.logo != null) ''
hydra_logo = ${cfg.logo}
''}
@@ -359,8 +387,8 @@ in
serviceConfig =
{ ExecStart =
"@${hydra-package}/bin/hydra-server hydra-server -f -h '${cfg.listenHost}' "
- + "-p ${toString cfg.port} --max_spare_servers 5 --max_servers 25 "
- + "--max_requests 100 ${optionalString cfg.debugServer "-d"}";
+ + "-p ${toString cfg.port} --min_spare_servers ${toString cfg.minSpareServers} --max_spare_servers ${toString cfg.maxSpareServers} "
+ + "--max_servers ${toString cfg.maxServers} --max_requests 100 ${optionalString cfg.debugServer "-d"}";
User = "hydra-www";
PermissionsStartOnly = true;
Restart = "always";
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/jenkins/default.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/jenkins/default.nix
index d69cf4587a..7b671ba9ed 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/jenkins/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/jenkins/default.nix
@@ -9,7 +9,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the jenkins continuous integration server.
'';
};
@@ -17,7 +17,7 @@ in {
user = mkOption {
default = "jenkins";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
User the jenkins server should execute under.
'';
};
@@ -25,7 +25,7 @@ in {
group = mkOption {
default = "jenkins";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
If the default user "jenkins" is configured then this is the primary
group of that user.
'';
@@ -35,7 +35,7 @@ in {
type = types.listOf types.str;
default = [ ];
example = [ "wheel" "dialout" ];
- description = lib.mdDoc ''
+ description = ''
List of extra groups that the "jenkins" user should be a part of.
'';
};
@@ -43,7 +43,7 @@ in {
home = mkOption {
default = "/var/lib/jenkins";
type = types.path;
- description = lib.mdDoc ''
+ description = ''
The path to use as JENKINS_HOME. If the default user "jenkins" is configured then
this is the home of the "jenkins" user.
'';
@@ -53,7 +53,7 @@ in {
default = "0.0.0.0";
example = "localhost";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Specifies the bind address on which the jenkins HTTP interface listens.
The default is the wildcard address.
'';
@@ -62,7 +62,7 @@ in {
port = mkOption {
default = 8080;
type = types.port;
- description = lib.mdDoc ''
+ description = ''
Specifies port number on which the jenkins HTTP interface listens.
The default is 8080.
'';
@@ -72,7 +72,7 @@ in {
default = "";
example = "/jenkins";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Specifies a urlPrefix to use with jenkins.
If the example /jenkins is given, the jenkins server will be
accessible using localhost:8080/jenkins.
@@ -85,7 +85,7 @@ in {
default = [ pkgs.stdenv pkgs.git pkgs.jdk17 config.programs.ssh.package pkgs.nix ];
defaultText = literalExpression "[ pkgs.stdenv pkgs.git pkgs.jdk17 config.programs.ssh.package pkgs.nix ]";
type = types.listOf types.package;
- description = lib.mdDoc ''
+ description = ''
Packages to add to PATH for the jenkins process.
'';
};
@@ -93,7 +93,7 @@ in {
environment = mkOption {
default = { };
type = with types; attrsOf str;
- description = lib.mdDoc ''
+ description = ''
Additional environment variables to be passed to the jenkins process.
As a base environment, jenkins receives NIX_PATH from
{option}`environment.sessionVariables`, NIX_REMOTE is set to
@@ -107,7 +107,7 @@ in {
plugins = mkOption {
default = null;
type = types.nullOr (types.attrsOf types.package);
- description = lib.mdDoc ''
+ description = ''
A set of plugins to activate. Note that this will completely
remove and replace any previously installed plugins. If you
have manually-installed plugins that you want to keep while
@@ -124,7 +124,7 @@ in {
type = types.listOf types.str;
default = [ ];
example = [ "--debug=9" ];
- description = lib.mdDoc ''
+ description = ''
Additional command line arguments to pass to Jenkins.
'';
};
@@ -133,7 +133,7 @@ in {
type = types.listOf types.str;
default = [ ];
example = [ "-Xmx80m" ];
- description = lib.mdDoc ''
+ description = ''
Additional command line arguments to pass to the Java run time (as opposed to Jenkins).
'';
};
@@ -141,7 +141,7 @@ in {
withCLI = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to make the CLI available.
More info about the CLI available at
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/jenkins/job-builder.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/jenkins/job-builder.nix
index a8e3effd1f..6400da13d3 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/jenkins/job-builder.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/jenkins/job-builder.nix
@@ -9,7 +9,7 @@ let
in {
options = {
services.jenkins.jobBuilder = {
- enable = mkEnableOption (mdDoc ''
+ enable = mkEnableOption ''
the Jenkins Job Builder (JJB) service. It
allows defining jobs for Jenkins in a declarative manner.
@@ -22,12 +22,12 @@ in {
Please see the Jenkins Job Builder documentation for more info:
- '');
+ '';
accessUser = mkOption {
default = "admin";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
User id in Jenkins used to reload config.
'';
};
@@ -35,7 +35,7 @@ in {
accessToken = mkOption {
default = "";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
User token in Jenkins used to reload config.
WARNING: This token will be world readable in the Nix store. To keep
it secret, use the {option}`accessTokenFile` option instead.
@@ -47,7 +47,7 @@ in {
defaultText = literalExpression ''"''${config.services.jenkins.home}/secrets/initialAdminPassword"'';
type = types.str;
example = "/run/keys/jenkins-job-builder-access-token";
- description = lib.mdDoc ''
+ description = ''
File containing the API token for the {option}`accessUser`
user.
'';
@@ -62,7 +62,7 @@ in {
builders:
- shell: echo 'Hello world!'
'';
- description = lib.mdDoc ''
+ description = ''
Job descriptions for Jenkins Job Builder in YAML format.
'';
};
@@ -82,7 +82,7 @@ in {
'''
]
'';
- description = lib.mdDoc ''
+ description = ''
Job descriptions for Jenkins Job Builder in JSON format.
'';
};
@@ -100,7 +100,7 @@ in {
}
]
'';
- description = lib.mdDoc ''
+ description = ''
Job descriptions for Jenkins Job Builder in Nix format.
This is a trivial wrapper around jsonJobs, using builtins.toJSON
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/jenkins/slave.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/jenkins/slave.nix
index 82d34a058c..c0599a65b4 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/jenkins/slave.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/jenkins/slave.nix
@@ -14,7 +14,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If true the system will be configured to work as a jenkins slave.
If the system is also configured to work as a jenkins master then this has no effect.
In progress: Currently only assures the jenkins user is configured.
@@ -24,7 +24,7 @@ in {
user = mkOption {
default = "jenkins";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
User the jenkins slave agent should execute under.
'';
};
@@ -32,7 +32,7 @@ in {
group = mkOption {
default = "jenkins";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
If the default slave agent user "jenkins" is configured then this is
the primary group of that user.
'';
@@ -41,7 +41,7 @@ in {
home = mkOption {
default = "/var/lib/jenkins";
type = types.path;
- description = lib.mdDoc ''
+ description = ''
The path to use as JENKINS_HOME. If the default user "jenkins" is configured then
this is the home of the "jenkins" user.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/woodpecker/agents.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/woodpecker/agents.nix
index ef7bf3fd2a..ce5926a246 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/woodpecker/agents.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/woodpecker/agents.nix
@@ -9,7 +9,7 @@ let
agentModule = lib.types.submodule {
options = {
- enable = lib.mkEnableOption (lib.mdDoc "this Woodpecker-Agent. Agents execute tasks generated by a Server, every install will need one server and at least one agent");
+ enable = lib.mkEnableOption "this Woodpecker-Agent. Agents execute tasks generated by a Server, every install will need one server and at least one agent";
package = lib.mkPackageOption pkgs "woodpecker-agent" { };
@@ -23,14 +23,14 @@ let
DOCKER_HOST = "unix:///run/podman/podman.sock";
}
'';
- description = lib.mdDoc "woodpecker-agent config environment variables, for other options read the [documentation](https://woodpecker-ci.org/docs/administration/agent-config)";
+ description = "woodpecker-agent config environment variables, for other options read the [documentation](https://woodpecker-ci.org/docs/administration/agent-config)";
};
extraGroups = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
example = [ "podman" ];
- description = lib.mdDoc ''
+ description = ''
Additional groups for the systemd service.
'';
};
@@ -39,7 +39,7 @@ let
type = lib.types.listOf lib.types.package;
default = [ ];
example = [ "" ];
- description = lib.mdDoc ''
+ description = ''
Additional packages that should be added to the agent's `PATH`.
Mostly useful for the `local` backend.
'';
@@ -49,7 +49,7 @@ let
type = lib.types.listOf lib.types.path;
default = [ ];
example = [ "/var/secrets/woodpecker-agent.env" ];
- description = lib.mdDoc ''
+ description = ''
File to load environment variables
from. This is helpful for specifying secrets.
Example content of environmentFile:
@@ -151,7 +151,7 @@ in
};
}
'';
- description = lib.mdDoc "woodpecker-agents configurations";
+ description = "woodpecker-agents configurations";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/continuous-integration/woodpecker/server.nix b/third_party/nixpkgs/nixos/modules/services/continuous-integration/woodpecker/server.nix
index 4a0f15756c..54d8da8a59 100644
--- a/third_party/nixpkgs/nixos/modules/services/continuous-integration/woodpecker/server.nix
+++ b/third_party/nixpkgs/nixos/modules/services/continuous-integration/woodpecker/server.nix
@@ -13,7 +13,7 @@ in
options = {
services.woodpecker-server = {
- enable = lib.mkEnableOption (lib.mdDoc "the Woodpecker-Server, a CI/CD application for automatic builds, deployments and tests");
+ enable = lib.mkEnableOption "the Woodpecker-Server, a CI/CD application for automatic builds, deployments and tests";
package = lib.mkPackageOption pkgs "woodpecker-server" { };
environment = lib.mkOption {
default = { };
@@ -28,13 +28,13 @@ in
WOODPECKER_GITEA_URL = "https://git.example.com";
}
'';
- description = lib.mdDoc "woodpecker-server config environment variables, for other options read the [documentation](https://woodpecker-ci.org/docs/administration/server-config)";
+ description = "woodpecker-server config environment variables, for other options read the [documentation](https://woodpecker-ci.org/docs/administration/server-config)";
};
environmentFile = lib.mkOption {
type = with lib.types; coercedTo path (f: [ f ]) (listOf path);
default = [ ];
example = [ "/root/woodpecker-server.env" ];
- description = lib.mdDoc ''
+ description = ''
File to load environment variables
from. This is helpful for specifying secrets.
Example content of environmentFile:
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/aerospike.nix b/third_party/nixpkgs/nixos/modules/services/databases/aerospike.nix
index 4923c0f00d..676341084a 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/aerospike.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/aerospike.nix
@@ -39,14 +39,14 @@ in
options = {
services.aerospike = {
- enable = mkEnableOption (lib.mdDoc "Aerospike server");
+ enable = mkEnableOption "Aerospike server";
package = mkPackageOption pkgs "aerospike" { };
workDir = mkOption {
type = types.str;
default = "/var/lib/aerospike";
- description = lib.mdDoc "Location where Aerospike stores its files";
+ description = "Location where Aerospike stores its files";
};
networkConfig = mkOption {
@@ -75,7 +75,7 @@ in
port 3003
}
'';
- description = lib.mdDoc "network section of configuration file";
+ description = "network section of configuration file";
};
extraConfig = mkOption {
@@ -89,7 +89,7 @@ in
storage-engine memory
}
'';
- description = lib.mdDoc "Extra configuration";
+ description = "Extra configuration";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/cassandra.nix b/third_party/nixpkgs/nixos/modules/services/databases/cassandra.nix
index adf7213dd1..c8fce9b939 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/cassandra.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/cassandra.nix
@@ -9,7 +9,6 @@ let
optionalAttrs
optionals
recursiveUpdate
- mdDoc
mkEnableOption
mkPackageOption
mkIf
@@ -122,14 +121,14 @@ in
{
options.services.cassandra = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
Apache Cassandra – Scalable and highly available database
- '');
+ '';
clusterName = mkOption {
type = types.str;
default = "Test Cluster";
- description = mdDoc ''
+ description = ''
The name of the cluster.
This setting prevents nodes in one logical cluster from joining
another. All nodes in a cluster must have the same value.
@@ -139,19 +138,19 @@ in
user = mkOption {
type = types.str;
default = defaultUser;
- description = mdDoc "Run Apache Cassandra under this user.";
+ description = "Run Apache Cassandra under this user.";
};
group = mkOption {
type = types.str;
default = defaultUser;
- description = mdDoc "Run Apache Cassandra under this group.";
+ description = "Run Apache Cassandra under this group.";
};
homeDir = mkOption {
type = types.path;
default = "/var/lib/cassandra";
- description = mdDoc ''
+ description = ''
Home directory for Apache Cassandra.
'';
};
@@ -163,7 +162,7 @@ in
jvmOpts = mkOption {
type = types.listOf types.str;
default = [ ];
- description = mdDoc ''
+ description = ''
Populate the `JVM_OPT` environment variable.
'';
};
@@ -172,7 +171,7 @@ in
type = types.nullOr types.str;
default = "127.0.0.1";
example = null;
- description = mdDoc ''
+ description = ''
Address or interface to bind to and tell other Cassandra nodes
to connect to. You _must_ change this if you want multiple
nodes to be able to communicate!
@@ -193,7 +192,7 @@ in
type = types.nullOr types.str;
default = null;
example = "eth1";
- description = mdDoc ''
+ description = ''
Set `listenAddress` OR `listenInterface`, not both. Interfaces
must correspond to a single address, IP aliasing is not
supported.
@@ -204,7 +203,7 @@ in
type = types.nullOr types.str;
default = "127.0.0.1";
example = null;
- description = mdDoc ''
+ description = ''
The address or interface to bind the native transport server to.
Set {option}`rpcAddress` OR {option}`rpcInterface`, not both.
@@ -226,7 +225,7 @@ in
type = types.nullOr types.str;
default = null;
example = "eth1";
- description = mdDoc ''
+ description = ''
Set {option}`rpcAddress` OR {option}`rpcInterface`, not both. Interfaces must
correspond to a single address, IP aliasing is not supported.
'';
@@ -249,7 +248,7 @@ in
'';
- description = mdDoc ''
+ description = ''
XML logback configuration for cassandra
'';
};
@@ -257,7 +256,7 @@ in
seedAddresses = mkOption {
type = types.listOf types.str;
default = [ "127.0.0.1" ];
- description = mdDoc ''
+ description = ''
The addresses of hosts designated as contact points in the cluster. A
joining node contacts one of the nodes in the seeds list to learn the
topology of the ring.
@@ -268,7 +267,7 @@ in
allowClients = mkOption {
type = types.bool;
default = true;
- description = mdDoc ''
+ description = ''
Enables or disables the native transport server (CQL binary protocol).
This server uses the same address as the {option}`rpcAddress`,
but the port it uses is not `rpc_port` but
@@ -285,7 +284,7 @@ in
{
commitlog_sync_batch_window_in_ms = 3;
};
- description = mdDoc ''
+ description = ''
Extra options to be merged into {file}`cassandra.yaml` as nix attribute set.
'';
};
@@ -294,7 +293,7 @@ in
type = types.lines;
default = "";
example = literalExpression ''"CLASSPATH=$CLASSPATH:''${extraJar}"'';
- description = mdDoc ''
+ description = ''
Extra shell lines to be appended onto {file}`cassandra-env.sh`.
'';
};
@@ -303,7 +302,7 @@ in
type = types.nullOr types.str;
default = "3w";
example = null;
- description = mdDoc ''
+ description = ''
Set the interval how often full repairs are run, i.e.
{command}`nodetool repair --full` is executed. See
@@ -317,7 +316,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "--partitioner-range" ];
- description = mdDoc ''
+ description = ''
Options passed through to the full repair command.
'';
};
@@ -326,7 +325,7 @@ in
type = types.nullOr types.str;
default = "3d";
example = null;
- description = mdDoc ''
+ description = ''
Set the interval how often incremental repairs are run, i.e.
{command}`nodetool repair` is executed. See
@@ -340,7 +339,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "--partitioner-range" ];
- description = mdDoc ''
+ description = ''
Options passed through to the incremental repair command.
'';
};
@@ -349,7 +348,7 @@ in
type = types.nullOr types.str;
default = null;
example = "4G";
- description = mdDoc ''
+ description = ''
Must be left blank or set together with {option}`heapNewSize`.
If left blank a sensible value for the available amount of RAM and CPU
cores is calculated.
@@ -370,7 +369,7 @@ in
type = types.nullOr types.str;
default = null;
example = "800M";
- description = mdDoc ''
+ description = ''
Must be left blank or set together with {option}`heapNewSize`.
If left blank a sensible value for the available amount of RAM and CPU
cores is calculated.
@@ -394,7 +393,7 @@ in
type = types.nullOr types.int;
default = null;
example = 4;
- description = mdDoc ''
+ description = ''
Set this to control the amount of arenas per-thread in glibc.
'';
};
@@ -402,7 +401,7 @@ in
remoteJmx = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Cassandra ships with JMX accessible *only* from localhost.
To enable remote JMX connections set to true.
@@ -414,7 +413,7 @@ in
jmxPort = mkOption {
type = types.int;
default = 7199;
- description = mdDoc ''
+ description = ''
Specifies the default port over which Cassandra will be available for
JMX connections.
For security reasons, you should not expose this port to the internet.
@@ -424,7 +423,7 @@ in
jmxRoles = mkOption {
default = [ ];
- description = mdDoc ''
+ description = ''
Roles that are allowed to access the JMX (e.g. {command}`nodetool`)
BEWARE: The passwords will be stored world readable in the nix store.
It's recommended to use your own protected file using
@@ -437,11 +436,11 @@ in
options = {
username = mkOption {
type = types.str;
- description = lib.mdDoc "Username for JMX";
+ description = "Username for JMX";
};
password = mkOption {
type = types.str;
- description = lib.mdDoc "Password for JMX";
+ description = "Password for JMX";
};
};
});
@@ -455,7 +454,7 @@ in
else null;
defaultText = literalMD ''generated configuration file if version is at least 3.11, otherwise `null`'';
example = "/var/lib/cassandra/jmx.password";
- description = lib.mdDoc ''
+ description = ''
Specify your own jmx roles file.
Make sure the permissions forbid "others" from reading the file if
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/clickhouse.nix b/third_party/nixpkgs/nixos/modules/services/databases/clickhouse.nix
index 2880466777..37a1fe5d5b 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/clickhouse.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/clickhouse.nix
@@ -11,7 +11,7 @@ with lib;
services.clickhouse = {
- enable = mkEnableOption (lib.mdDoc "ClickHouse database server");
+ enable = mkEnableOption "ClickHouse database server";
package = mkPackageOption pkgs "clickhouse" { };
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/cockroachdb.nix b/third_party/nixpkgs/nixos/modules/services/databases/cockroachdb.nix
index 789f086158..34e4e87607 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/cockroachdb.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/cockroachdb.nix
@@ -35,13 +35,13 @@ let
address = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "Address to bind to for ${descr}";
+ description = "Address to bind to for ${descr}";
};
port = mkOption {
type = types.port;
default = defaultPort;
- description = lib.mdDoc "Port to bind to for ${descr}";
+ description = "Port to bind to for ${descr}";
};
};
in
@@ -49,7 +49,7 @@ in
{
options = {
services.cockroachdb = {
- enable = mkEnableOption (lib.mdDoc "CockroachDB Server");
+ enable = mkEnableOption "CockroachDB Server";
listen = addressOption "intra-cluster communication" 26257;
@@ -58,7 +58,7 @@ in
locality = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
An ordered, comma-separated list of key-value pairs that describe the
topography of the machine. Topography might include country,
datacenter or rack designations. Data is automatically replicated to
@@ -80,43 +80,43 @@ in
join = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "The addresses for connecting the node to a cluster.";
+ description = "The addresses for connecting the node to a cluster.";
};
insecure = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Run in insecure mode.";
+ description = "Run in insecure mode.";
};
certsDir = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc "The path to the certificate directory.";
+ description = "The path to the certificate directory.";
};
user = mkOption {
type = types.str;
default = "cockroachdb";
- description = lib.mdDoc "User account under which CockroachDB runs";
+ description = "User account under which CockroachDB runs";
};
group = mkOption {
type = types.str;
default = "cockroachdb";
- description = lib.mdDoc "User account under which CockroachDB runs";
+ description = "User account under which CockroachDB runs";
};
openPorts = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Open firewall ports for cluster communication by default";
+ description = "Open firewall ports for cluster communication by default";
};
cache = mkOption {
type = types.str;
default = "25%";
- description = lib.mdDoc ''
+ description = ''
The total size for caches.
This can be a percentage, expressed with a fraction sign or as a
@@ -132,7 +132,7 @@ in
maxSqlMemory = mkOption {
type = types.str;
default = "25%";
- description = lib.mdDoc ''
+ description = ''
The maximum in-memory storage capacity available to store temporary
data for SQL queries.
@@ -157,7 +157,7 @@ in
type = types.listOf types.str;
default = [];
example = [ "--advertise-addr" "[fe80::f6f2:::]" ];
- description = lib.mdDoc ''
+ description = ''
Extra CLI arguments passed to {command}`cockroach start`.
For the full list of supported arguments, check
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/couchdb.nix b/third_party/nixpkgs/nixos/modules/services/databases/couchdb.nix
index 72212c3904..e007bfce77 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/couchdb.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/couchdb.nix
@@ -34,14 +34,14 @@ in {
services.couchdb = {
- enable = mkEnableOption (lib.mdDoc "CouchDB Server");
+ enable = mkEnableOption "CouchDB Server";
package = mkPackageOption pkgs "couchdb3" { };
adminUser = mkOption {
type = types.str;
default = "admin";
- description = lib.mdDoc ''
+ description = ''
Couchdb (i.e. fauxton) account with permission for all dbs and
tasks.
'';
@@ -50,7 +50,7 @@ in {
adminPass = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Couchdb (i.e. fauxton) account with permission for all dbs and
tasks.
'';
@@ -59,7 +59,7 @@ in {
user = mkOption {
type = types.str;
default = "couchdb";
- description = lib.mdDoc ''
+ description = ''
User account under which couchdb runs.
'';
};
@@ -67,7 +67,7 @@ in {
group = mkOption {
type = types.str;
default = "couchdb";
- description = lib.mdDoc ''
+ description = ''
Group account under which couchdb runs.
'';
};
@@ -77,7 +77,7 @@ in {
databaseDir = mkOption {
type = types.path;
default = "/var/lib/couchdb";
- description = lib.mdDoc ''
+ description = ''
Specifies location of CouchDB database files (*.couch named). This
location should be writable and readable for the user the CouchDB
service runs as (couchdb by default).
@@ -87,7 +87,7 @@ in {
uriFile = mkOption {
type = types.path;
default = "/run/couchdb/couchdb.uri";
- description = lib.mdDoc ''
+ description = ''
This file contains the full URI that can be used to access this
instance of CouchDB. It is used to help discover the port CouchDB is
running on (if it was set to 0 (e.g. automatically assigned any free
@@ -99,7 +99,7 @@ in {
viewIndexDir = mkOption {
type = types.path;
default = "/var/lib/couchdb";
- description = lib.mdDoc ''
+ description = ''
Specifies location of CouchDB view index files. This location should
be writable and readable for the user that runs the CouchDB service
(couchdb by default).
@@ -109,7 +109,7 @@ in {
bindAddress = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc ''
+ description = ''
Defines the IP address by which CouchDB will be accessible.
'';
};
@@ -117,7 +117,7 @@ in {
port = mkOption {
type = types.port;
default = 5984;
- description = lib.mdDoc ''
+ description = ''
Defined the port number to listen.
'';
};
@@ -125,7 +125,7 @@ in {
logFile = mkOption {
type = types.path;
default = "/var/log/couchdb.log";
- description = lib.mdDoc ''
+ description = ''
Specifies the location of file for logging output.
'';
};
@@ -133,7 +133,7 @@ in {
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra configuration. Overrides any other configuration.
'';
};
@@ -142,14 +142,14 @@ in {
type = types.path;
default = "${cfg.package}/etc/vm.args";
defaultText = literalExpression ''"config.${opt.package}/etc/vm.args"'';
- description = lib.mdDoc ''
+ description = ''
vm.args configuration. Overrides Couchdb's Erlang VM parameters file.
'';
};
configFile = mkOption {
type = types.path;
- description = lib.mdDoc ''
+ description = ''
Configuration file for persisting runtime changes. File
needs to be readable and writable from couchdb user/group.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/dgraph.nix b/third_party/nixpkgs/nixos/modules/services/databases/dgraph.nix
index 479754a644..00a11d6b68 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/dgraph.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/dgraph.nix
@@ -53,14 +53,14 @@ in
{
options = {
services.dgraph = {
- enable = mkEnableOption (lib.mdDoc "Dgraph native GraphQL database with a graph backend");
+ enable = mkEnableOption "Dgraph native GraphQL database with a graph backend";
package = lib.mkPackageOption pkgs "dgraph" { };
settings = mkOption {
type = settingsFormat.type;
default = {};
- description = lib.mdDoc ''
+ description = ''
Contents of the dgraph config. For more details see https://dgraph.io/docs/deploy/config
'';
};
@@ -69,14 +69,14 @@ in
host = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc ''
+ description = ''
The host which dgraph alpha will be run on.
'';
};
port = mkOption {
type = types.port;
default = 7080;
- description = lib.mdDoc ''
+ description = ''
The port which to run dgraph alpha on.
'';
};
@@ -87,14 +87,14 @@ in
host = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc ''
+ description = ''
The host which dgraph zero will be run on.
'';
};
port = mkOption {
type = types.port;
default = 5080;
- description = lib.mdDoc ''
+ description = ''
The port which to run dgraph zero on.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/dragonflydb.nix b/third_party/nixpkgs/nixos/modules/services/databases/dragonflydb.nix
index 46a0c188c3..220605c8b4 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/dragonflydb.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/dragonflydb.nix
@@ -25,24 +25,24 @@ in
options = {
services.dragonflydb = {
- enable = mkEnableOption (lib.mdDoc "DragonflyDB");
+ enable = mkEnableOption "DragonflyDB";
user = mkOption {
type = types.str;
default = "dragonfly";
- description = lib.mdDoc "The user to run DragonflyDB as";
+ description = "The user to run DragonflyDB as";
};
port = mkOption {
type = types.port;
default = 6379;
- description = lib.mdDoc "The TCP port to accept connections.";
+ description = "The TCP port to accept connections.";
};
bind = mkOption {
type = with types; nullOr str;
default = "127.0.0.1";
- description = lib.mdDoc ''
+ description = ''
The IP interface to bind to.
`null` means "all interfaces".
'';
@@ -51,14 +51,14 @@ in
requirePass = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc "Password for database";
+ description = "Password for database";
example = "letmein!";
};
maxMemory = mkOption {
type = with types; nullOr ints.unsigned;
default = null;
- description = lib.mdDoc ''
+ description = ''
The maximum amount of memory to use for storage (in bytes).
`null` means this will be automatically set.
'';
@@ -67,7 +67,7 @@ in
memcachePort = mkOption {
type = with types; nullOr port;
default = null;
- description = lib.mdDoc ''
+ description = ''
To enable memcached compatible API on this port.
`null` means disabled.
'';
@@ -76,7 +76,7 @@ in
keysOutputLimit = mkOption {
type = types.ints.unsigned;
default = 8192;
- description = lib.mdDoc ''
+ description = ''
Maximum number of returned keys in keys command.
`keys` is a dangerous command.
We truncate its result to avoid blowup in memory when fetching too many keys.
@@ -86,13 +86,13 @@ in
dbNum = mkOption {
type = with types; nullOr ints.unsigned;
default = null;
- description = lib.mdDoc "Maximum number of supported databases for `select`";
+ description = "Maximum number of supported databases for `select`";
};
cacheMode = mkOption {
type = with types; nullOr bool;
default = null;
- description = lib.mdDoc ''
+ description = ''
Once this mode is on, Dragonfly will evict items least likely to be stumbled
upon in the future but only when it is near maxmemory limit.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/etcd.nix b/third_party/nixpkgs/nixos/modules/services/databases/etcd.nix
index a5b3abdbcb..ebc905ad08 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/etcd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/etcd.nix
@@ -10,7 +10,7 @@ in {
options.services.etcd = {
enable = mkOption {
- description = lib.mdDoc "Whether to enable etcd.";
+ description = "Whether to enable etcd.";
default = false;
type = types.bool;
};
@@ -18,83 +18,83 @@ in {
package = mkPackageOption pkgs "etcd" { };
name = mkOption {
- description = lib.mdDoc "Etcd unique node name.";
+ description = "Etcd unique node name.";
default = config.networking.hostName;
defaultText = literalExpression "config.networking.hostName";
type = types.str;
};
advertiseClientUrls = mkOption {
- description = lib.mdDoc "Etcd list of this member's client URLs to advertise to the rest of the cluster.";
+ description = "Etcd list of this member's client URLs to advertise to the rest of the cluster.";
default = cfg.listenClientUrls;
defaultText = literalExpression "config.${opt.listenClientUrls}";
type = types.listOf types.str;
};
listenClientUrls = mkOption {
- description = lib.mdDoc "Etcd list of URLs to listen on for client traffic.";
+ description = "Etcd list of URLs to listen on for client traffic.";
default = ["http://127.0.0.1:2379"];
type = types.listOf types.str;
};
listenPeerUrls = mkOption {
- description = lib.mdDoc "Etcd list of URLs to listen on for peer traffic.";
+ description = "Etcd list of URLs to listen on for peer traffic.";
default = ["http://127.0.0.1:2380"];
type = types.listOf types.str;
};
initialAdvertisePeerUrls = mkOption {
- description = lib.mdDoc "Etcd list of this member's peer URLs to advertise to rest of the cluster.";
+ description = "Etcd list of this member's peer URLs to advertise to rest of the cluster.";
default = cfg.listenPeerUrls;
defaultText = literalExpression "config.${opt.listenPeerUrls}";
type = types.listOf types.str;
};
initialCluster = mkOption {
- description = lib.mdDoc "Etcd initial cluster configuration for bootstrapping.";
+ description = "Etcd initial cluster configuration for bootstrapping.";
default = ["${cfg.name}=http://127.0.0.1:2380"];
defaultText = literalExpression ''["''${config.${opt.name}}=http://127.0.0.1:2380"]'';
type = types.listOf types.str;
};
initialClusterState = mkOption {
- description = lib.mdDoc "Etcd initial cluster configuration for bootstrapping.";
+ description = "Etcd initial cluster configuration for bootstrapping.";
default = "new";
type = types.enum ["new" "existing"];
};
initialClusterToken = mkOption {
- description = lib.mdDoc "Etcd initial cluster token for etcd cluster during bootstrap.";
+ description = "Etcd initial cluster token for etcd cluster during bootstrap.";
default = "etcd-cluster";
type = types.str;
};
discovery = mkOption {
- description = lib.mdDoc "Etcd discovery url";
+ description = "Etcd discovery url";
default = "";
type = types.str;
};
clientCertAuth = mkOption {
- description = lib.mdDoc "Whether to use certs for client authentication";
+ description = "Whether to use certs for client authentication";
default = false;
type = types.bool;
};
trustedCaFile = mkOption {
- description = lib.mdDoc "Certificate authority file to use for clients";
+ description = "Certificate authority file to use for clients";
default = null;
type = types.nullOr types.path;
};
certFile = mkOption {
- description = lib.mdDoc "Cert file to use for clients";
+ description = "Cert file to use for clients";
default = null;
type = types.nullOr types.path;
};
keyFile = mkOption {
- description = lib.mdDoc "Key file to use for clients";
+ description = "Key file to use for clients";
default = null;
type = types.nullOr types.path;
};
@@ -102,7 +102,7 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open etcd ports in the firewall.
Ports opened:
- 2379/tcp for client requests
@@ -111,34 +111,34 @@ in {
};
peerCertFile = mkOption {
- description = lib.mdDoc "Cert file to use for peer to peer communication";
+ description = "Cert file to use for peer to peer communication";
default = cfg.certFile;
defaultText = literalExpression "config.${opt.certFile}";
type = types.nullOr types.path;
};
peerKeyFile = mkOption {
- description = lib.mdDoc "Key file to use for peer to peer communication";
+ description = "Key file to use for peer to peer communication";
default = cfg.keyFile;
defaultText = literalExpression "config.${opt.keyFile}";
type = types.nullOr types.path;
};
peerTrustedCaFile = mkOption {
- description = lib.mdDoc "Certificate authority file to use for peer to peer communication";
+ description = "Certificate authority file to use for peer to peer communication";
default = cfg.trustedCaFile;
defaultText = literalExpression "config.${opt.trustedCaFile}";
type = types.nullOr types.path;
};
peerClientCertAuth = mkOption {
- description = lib.mdDoc "Whether to check all incoming peer requests from the cluster for valid client certificates signed by the supplied CA";
+ description = "Whether to check all incoming peer requests from the cluster for valid client certificates signed by the supplied CA";
default = false;
type = types.bool;
};
extraConf = mkOption {
- description = lib.mdDoc ''
+ description = ''
Etcd extra configuration. See
'';
@@ -158,7 +158,7 @@ in {
dataDir = mkOption {
type = types.path;
default = "/var/lib/etcd";
- description = lib.mdDoc "Etcd data directory.";
+ description = "Etcd data directory.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/firebird.nix b/third_party/nixpkgs/nixos/modules/services/databases/firebird.nix
index 431233ce5e..17606218b6 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/firebird.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/firebird.nix
@@ -40,7 +40,7 @@ in
services.firebird = {
- enable = mkEnableOption (lib.mdDoc "the Firebird super server");
+ enable = mkEnableOption "the Firebird super server";
package = mkPackageOption pkgs "firebird" {
example = "firebird_3";
@@ -52,7 +52,7 @@ in
port = mkOption {
default = 3050;
type = types.port;
- description = lib.mdDoc ''
+ description = ''
Port Firebird uses.
'';
};
@@ -60,7 +60,7 @@ in
user = mkOption {
default = "firebird";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
User account under which firebird runs.
'';
};
@@ -68,7 +68,7 @@ in
baseDir = mkOption {
default = "/var/lib/firebird";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Location containing data/ and system/ directories.
data/ stores the databases, system/ stores the password database security2.fdb.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/foundationdb.md b/third_party/nixpkgs/nixos/modules/services/databases/foundationdb.md
index 0815c13915..9f7addc9c1 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/foundationdb.md
+++ b/third_party/nixpkgs/nixos/modules/services/databases/foundationdb.md
@@ -15,9 +15,11 @@ key-value store.
To enable FoundationDB, add the following to your
{file}`configuration.nix`:
-```
-services.foundationdb.enable = true;
-services.foundationdb.package = pkgs.foundationdb71; # FoundationDB 7.1.x
+```nix
+{
+ services.foundationdb.enable = true;
+ services.foundationdb.package = pkgs.foundationdb71; # FoundationDB 7.1.x
+}
```
The {option}`services.foundationdb.package` option is required, and
@@ -109,8 +111,10 @@ default configuration. See below for more on scaling to increase this.
FoundationDB stores all data for all server processes under
{file}`/var/lib/foundationdb`. You can override this using
{option}`services.foundationdb.dataDir`, e.g.
-```
-services.foundationdb.dataDir = "/data/fdb";
+```nix
+{
+ services.foundationdb.dataDir = "/data/fdb";
+}
```
Similarly, logs are stored under {file}`/var/log/foundationdb`
@@ -265,8 +269,10 @@ directories.
For example, to create backups in {command}`/opt/fdb-backups`, first
set up the paths in the module options:
-```
-services.foundationdb.extraReadWritePaths = [ "/opt/fdb-backups" ];
+```nix
+{
+ services.foundationdb.extraReadWritePaths = [ "/opt/fdb-backups" ];
+}
```
Restart the FoundationDB service, and it will now be able to write to this
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/foundationdb.nix b/third_party/nixpkgs/nixos/modules/services/databases/foundationdb.nix
index 48e9898a68..670a149ea5 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/foundationdb.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/foundationdb.nix
@@ -62,11 +62,11 @@ in
{
options.services.foundationdb = {
- enable = mkEnableOption (lib.mdDoc "FoundationDB Server");
+ enable = mkEnableOption "FoundationDB Server";
package = mkOption {
type = types.package;
- description = lib.mdDoc ''
+ description = ''
The FoundationDB package to use for this server. This must be specified by the user
in order to ensure migrations and upgrades are controlled appropriately.
'';
@@ -75,19 +75,19 @@ in
publicAddress = mkOption {
type = types.str;
default = "auto";
- description = lib.mdDoc "Publicly visible IP address of the process. Port is determined by process ID";
+ description = "Publicly visible IP address of the process. Port is determined by process ID";
};
listenAddress = mkOption {
type = types.str;
default = "public";
- description = lib.mdDoc "Publicly visible IP address of the process. Port is determined by process ID";
+ description = "Publicly visible IP address of the process. Port is determined by process ID";
};
listenPortStart = mkOption {
type = types.int;
default = 4500;
- description = lib.mdDoc ''
+ description = ''
Starting port number for database listening sockets. Every FDB process binds to a
subsequent port, to this number reflects the start of the overall range. e.g. having
8 server processes will use all ports between 4500 and 4507.
@@ -97,7 +97,7 @@ in
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open the firewall ports corresponding to FoundationDB processes and coordinators
using {option}`config.networking.firewall.*`.
'';
@@ -106,43 +106,43 @@ in
dataDir = mkOption {
type = types.path;
default = "/var/lib/foundationdb";
- description = lib.mdDoc "Data directory. All cluster data will be put under here.";
+ description = "Data directory. All cluster data will be put under here.";
};
logDir = mkOption {
type = types.path;
default = "/var/log/foundationdb";
- description = lib.mdDoc "Log directory.";
+ description = "Log directory.";
};
user = mkOption {
type = types.str;
default = "foundationdb";
- description = lib.mdDoc "User account under which FoundationDB runs.";
+ description = "User account under which FoundationDB runs.";
};
group = mkOption {
type = types.str;
default = "foundationdb";
- description = lib.mdDoc "Group account under which FoundationDB runs.";
+ description = "Group account under which FoundationDB runs.";
};
class = mkOption {
type = types.nullOr (types.enum [ "storage" "transaction" "stateless" ]);
default = null;
- description = lib.mdDoc "Process class";
+ description = "Process class";
};
restartDelay = mkOption {
type = types.int;
default = 10;
- description = lib.mdDoc "Number of seconds to wait before restarting servers.";
+ description = "Number of seconds to wait before restarting servers.";
};
logSize = mkOption {
type = types.str;
default = "10MiB";
- description = lib.mdDoc ''
+ description = ''
Roll over to a new log file after the current log file
reaches the specified size.
'';
@@ -151,7 +151,7 @@ in
maxLogSize = mkOption {
type = types.str;
default = "100MiB";
- description = lib.mdDoc ''
+ description = ''
Delete the oldest log file when the total size of all log
files exceeds the specified size. If set to 0, old log files
will not be deleted.
@@ -161,19 +161,19 @@ in
serverProcesses = mkOption {
type = types.int;
default = 1;
- description = lib.mdDoc "Number of fdbserver processes to run.";
+ description = "Number of fdbserver processes to run.";
};
backupProcesses = mkOption {
type = types.int;
default = 1;
- description = lib.mdDoc "Number of backup_agent processes to run for snapshots.";
+ description = "Number of backup_agent processes to run for snapshots.";
};
memory = mkOption {
type = types.str;
default = "8GiB";
- description = lib.mdDoc ''
+ description = ''
Maximum memory used by the process. The default value is
`8GiB`. When specified without a unit,
`MiB` is assumed. This parameter does not
@@ -195,7 +195,7 @@ in
storageMemory = mkOption {
type = types.str;
default = "1GiB";
- description = lib.mdDoc ''
+ description = ''
Maximum memory used for data storage. The default value is
`1GiB`. When specified without a unit,
`MB` is assumed. Clusters using the memory
@@ -210,7 +210,7 @@ in
tls = mkOption {
default = null;
- description = lib.mdDoc ''
+ description = ''
FoundationDB Transport Security Layer (TLS) settings.
'';
@@ -218,7 +218,7 @@ in
options = {
certificate = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Path to the TLS certificate file. This certificate will
be offered to, and may be verified by, clients.
'';
@@ -226,13 +226,13 @@ in
key = mkOption {
type = types.str;
- description = lib.mdDoc "Private key file for the certificate.";
+ description = "Private key file for the certificate.";
};
allowedPeers = mkOption {
type = types.str;
default = "Check.Valid=1,Check.Unexpired=1";
- description = lib.mdDoc ''
+ description = ''
"Peer verification string". This may be used to adjust which TLS
client certificates a server will accept, as a form of user
authorization; for example, it may only accept TLS clients who
@@ -253,7 +253,7 @@ in
dataHall = null;
};
- description = lib.mdDoc ''
+ description = ''
FoundationDB locality settings.
'';
@@ -262,7 +262,7 @@ in
machineId = mkOption {
default = null;
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
Machine identifier key. All processes on a machine should share a
unique id. By default, processes on a machine determine a unique id to share.
This does not generally need to be set.
@@ -272,7 +272,7 @@ in
zoneId = mkOption {
default = null;
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
Zone identifier key. Processes that share a zone id are
considered non-unique for the purposes of data replication.
If unset, defaults to machine id.
@@ -282,7 +282,7 @@ in
datacenterId = mkOption {
default = null;
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
Data center identifier key. All processes physically located in a
data center should share the id. If you are depending on data
center based replication this must be set on all processes.
@@ -292,7 +292,7 @@ in
dataHall = mkOption {
default = null;
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
Data hall identifier key. All processes physically located in a
data hall should share the id. If you are depending on data
hall based replication this must be set on all processes.
@@ -305,7 +305,7 @@ in
extraReadWritePaths = mkOption {
default = [ ];
type = types.listOf types.path;
- description = lib.mdDoc ''
+ description = ''
An extra set of filesystem paths that FoundationDB can read to
and write from. By default, FoundationDB runs under a heavily
namespaced systemd environment without write access to most of
@@ -319,13 +319,13 @@ in
pidfile = mkOption {
type = types.path;
default = "/run/foundationdb.pid";
- description = lib.mdDoc "Path to pidfile for fdbmonitor.";
+ description = "Path to pidfile for fdbmonitor.";
};
traceFormat = mkOption {
type = types.enum [ "xml" "json" ];
default = "xml";
- description = lib.mdDoc "Trace logging format.";
+ description = "Trace logging format.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/hbase-standalone.nix b/third_party/nixpkgs/nixos/modules/services/databases/hbase-standalone.nix
index 08ae7625d5..ac37e39329 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/hbase-standalone.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/hbase-standalone.nix
@@ -41,17 +41,17 @@ in {
options = {
services.hbase-standalone = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
HBase master in standalone mode with embedded regionserver and zookeper.
- Do not use this configuration for production nor for evaluating HBase performance.
- '');
+ Do not use this configuration for production nor for evaluating HBase performance
+ '';
package = mkPackageOption pkgs "hbase" { };
user = mkOption {
type = types.str;
default = "hbase";
- description = lib.mdDoc ''
+ description = ''
User account under which HBase runs.
'';
};
@@ -59,7 +59,7 @@ in {
group = mkOption {
type = types.str;
default = "hbase";
- description = lib.mdDoc ''
+ description = ''
Group account under which HBase runs.
'';
};
@@ -67,7 +67,7 @@ in {
dataDir = mkOption {
type = types.path;
default = "/var/lib/hbase";
- description = lib.mdDoc ''
+ description = ''
Specifies location of HBase database files. This location should be
writable and readable for the user the HBase service runs as
(hbase by default).
@@ -77,7 +77,7 @@ in {
logDir = mkOption {
type = types.path;
default = "/var/log/hbase";
- description = lib.mdDoc ''
+ description = ''
Specifies the location of HBase log files.
'';
};
@@ -94,7 +94,7 @@ in {
"hbase.zookeeper.property.dataDir" = "''${config.${opt.dataDir}}/zookeeper";
}
'';
- description = lib.mdDoc ''
+ description = ''
configurations in hbase-site.xml, see for details.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/influxdb.nix b/third_party/nixpkgs/nixos/modules/services/databases/influxdb.nix
index adb212ab08..6dd4ca3b71 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/influxdb.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/influxdb.nix
@@ -112,7 +112,7 @@ in
enable = mkOption {
default = false;
- description = lib.mdDoc "Whether to enable the influxdb server";
+ description = "Whether to enable the influxdb server";
type = types.bool;
};
@@ -120,25 +120,25 @@ in
user = mkOption {
default = "influxdb";
- description = lib.mdDoc "User account under which influxdb runs";
+ description = "User account under which influxdb runs";
type = types.str;
};
group = mkOption {
default = "influxdb";
- description = lib.mdDoc "Group under which influxdb runs";
+ description = "Group under which influxdb runs";
type = types.str;
};
dataDir = mkOption {
default = "/var/db/influxdb";
- description = lib.mdDoc "Data directory for influxd data files.";
+ description = "Data directory for influxd data files.";
type = types.path;
};
extraConfig = mkOption {
default = {};
- description = lib.mdDoc "Extra configuration options for influxdb";
+ description = "Extra configuration options for influxdb";
type = types.attrs;
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/influxdb2.nix b/third_party/nixpkgs/nixos/modules/services/databases/influxdb2.nix
index 2a67d87d4b..a534cdfbe1 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/influxdb2.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/influxdb2.nix
@@ -17,7 +17,6 @@ let
listToAttrs
literalExpression
mapAttrsToList
- mdDoc
mkEnableOption
mkPackageOption
mkIf
@@ -130,32 +129,32 @@ let
in {
options = {
present = mkOption {
- description = mdDoc "Whether to ensure that this organization is present or absent.";
+ description = "Whether to ensure that this organization is present or absent.";
type = types.bool;
default = true;
};
description = mkOption {
- description = mdDoc "Optional description for the organization.";
+ description = "Optional description for the organization.";
default = null;
type = types.nullOr types.str;
};
buckets = mkOption {
- description = mdDoc "Buckets to provision in this organization.";
+ description = "Buckets to provision in this organization.";
default = {};
type = types.attrsOf (types.submodule (bucketSubmod: let
bucket = bucketSubmod.config._module.args.name;
in {
options = {
present = mkOption {
- description = mdDoc "Whether to ensure that this bucket is present or absent.";
+ description = "Whether to ensure that this bucket is present or absent.";
type = types.bool;
default = true;
};
description = mkOption {
- description = mdDoc "Optional description for the bucket.";
+ description = "Optional description for the bucket.";
default = null;
type = types.nullOr types.str;
};
@@ -163,21 +162,21 @@ let
retention = mkOption {
type = types.ints.unsigned;
default = 0;
- description = mdDoc "The duration in seconds for which the bucket will retain data (0 is infinite).";
+ description = "The duration in seconds for which the bucket will retain data (0 is infinite).";
};
};
}));
};
auths = mkOption {
- description = mdDoc "API tokens to provision for the user in this organization.";
+ description = "API tokens to provision for the user in this organization.";
default = {};
type = types.attrsOf (types.submodule (authSubmod: let
auth = authSubmod.config._module.args.name;
in {
options = {
id = mkOption {
- description = mdDoc "A unique identifier for this authentication token. Since influx doesn't store names for tokens, this will be hashed and appended to the description to identify the token.";
+ description = "A unique identifier for this authentication token. Since influx doesn't store names for tokens, this will be hashed and appended to the description to identify the token.";
readOnly = true;
default = builtins.substring 0 32 (builtins.hashString "sha256" "${org}:${auth}");
defaultText = "";
@@ -185,7 +184,7 @@ let
};
present = mkOption {
- description = mdDoc "Whether to ensure that this user is present or absent.";
+ description = "Whether to ensure that this user is present or absent.";
type = types.bool;
default = true;
};
@@ -204,23 +203,23 @@ let
tokenFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = mdDoc "The token value. If not given, influx will automatically generate one.";
+ description = "The token value. If not given, influx will automatically generate one.";
};
operator = mkOption {
- description = mdDoc "Grants all permissions in all organizations.";
+ description = "Grants all permissions in all organizations.";
default = false;
type = types.bool;
};
allAccess = mkOption {
- description = mdDoc "Grants all permissions in the associated organization.";
+ description = "Grants all permissions in the associated organization.";
default = false;
type = types.bool;
};
readPermissions = mkOption {
- description = mdDoc ''
+ description = ''
The read permissions to include for this token. Access is usually granted only
for resources in the associated organization.
@@ -239,7 +238,7 @@ let
};
writePermissions = mkOption {
- description = mdDoc ''
+ description = ''
The read permissions to include for this token. Access is usually granted only
for resources in the associated organization.
@@ -258,13 +257,13 @@ let
};
readBuckets = mkOption {
- description = mdDoc "The organization's buckets which should be allowed to be read";
+ description = "The organization's buckets which should be allowed to be read";
default = [];
type = types.listOf types.str;
};
writeBuckets = mkOption {
- description = mdDoc "The organization's buckets which should be allowed to be written";
+ description = "The organization's buckets which should be allowed to be written";
default = [];
type = types.listOf types.str;
};
@@ -277,13 +276,13 @@ in
{
options = {
services.influxdb2 = {
- enable = mkEnableOption (mdDoc "the influxdb2 server");
+ enable = mkEnableOption "the influxdb2 server";
package = mkPackageOption pkgs "influxdb2" { };
settings = mkOption {
default = { };
- description = mdDoc ''configuration options for influxdb2, see for details.'';
+ description = ''configuration options for influxdb2, see for details.'';
type = format.type;
};
@@ -294,40 +293,40 @@ in
organization = mkOption {
type = types.str;
example = "main";
- description = mdDoc "Primary organization name";
+ description = "Primary organization name";
};
bucket = mkOption {
type = types.str;
example = "example";
- description = mdDoc "Primary bucket name";
+ description = "Primary bucket name";
};
username = mkOption {
type = types.str;
default = "admin";
- description = mdDoc "Primary username";
+ description = "Primary username";
};
retention = mkOption {
type = types.ints.unsigned;
default = 0;
- description = mdDoc "The duration in seconds for which the bucket will retain data (0 is infinite).";
+ description = "The duration in seconds for which the bucket will retain data (0 is infinite).";
};
passwordFile = mkOption {
type = types.path;
- description = mdDoc "Password for primary user. Don't use a file from the nix store!";
+ description = "Password for primary user. Don't use a file from the nix store!";
};
tokenFile = mkOption {
type = types.path;
- description = mdDoc "API Token to set for the admin user. Don't use a file from the nix store!";
+ description = "API Token to set for the admin user. Don't use a file from the nix store!";
};
};
organizations = mkOption {
- description = mdDoc "Organizations to provision.";
+ description = "Organizations to provision.";
example = literalExpression ''
{
myorg = {
@@ -348,7 +347,7 @@ in
};
users = mkOption {
- description = mdDoc "Users to provision.";
+ description = "Users to provision.";
default = {};
example = literalExpression ''
{
@@ -362,13 +361,13 @@ in
in {
options = {
present = mkOption {
- description = mdDoc "Whether to ensure that this user is present or absent.";
+ description = "Whether to ensure that this user is present or absent.";
type = types.bool;
default = true;
};
passwordFile = mkOption {
- description = mdDoc "Password for the user. If unset, the user will not be able to log in until a password is set by an operator! Don't use a file from the nix store!";
+ description = "Password for the user. If unset, the user will not be able to log in until a password is set by an operator! Don't use a file from the nix store!";
default = null;
type = types.nullOr types.path;
};
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/lldap.nix b/third_party/nixpkgs/nixos/modules/services/databases/lldap.nix
index e821da8e58..e014a88b3c 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/lldap.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/lldap.nix
@@ -6,7 +6,7 @@ let
in
{
options.services.lldap = with lib; {
- enable = mkEnableOption (mdDoc "lldap");
+ enable = mkEnableOption "lldap, a lightweight authentication server that provides an opinionated, simplified LDAP interface for authentication";
package = mkPackageOption pkgs "lldap" { };
@@ -17,7 +17,7 @@ in
LLDAP_JWT_SECRET_FILE = "/run/lldap/jwt_secret";
LLDAP_LDAP_USER_PASS_FILE = "/run/lldap/user_password";
};
- description = lib.mdDoc ''
+ description = ''
Environment variables passed to the service.
Any config option name prefixed with `LLDAP_` takes priority over the one in the configuration file.
'';
@@ -26,13 +26,13 @@ in
environmentFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Environment file as defined in {manpage}`systemd.exec(5)` passed to the service.
'';
};
settings = mkOption {
- description = mdDoc ''
+ description = ''
Free-form settings written directly to the `lldap_config.toml` file.
Refer to for supported values.
'';
@@ -44,55 +44,55 @@ in
options = {
ldap_host = mkOption {
type = types.str;
- description = mdDoc "The host address that the LDAP server will be bound to.";
+ description = "The host address that the LDAP server will be bound to.";
default = "::";
};
ldap_port = mkOption {
type = types.port;
- description = mdDoc "The port on which to have the LDAP server.";
+ description = "The port on which to have the LDAP server.";
default = 3890;
};
http_host = mkOption {
type = types.str;
- description = mdDoc "The host address that the HTTP server will be bound to.";
+ description = "The host address that the HTTP server will be bound to.";
default = "::";
};
http_port = mkOption {
type = types.port;
- description = mdDoc "The port on which to have the HTTP server, for user login and administration.";
+ description = "The port on which to have the HTTP server, for user login and administration.";
default = 17170;
};
http_url = mkOption {
type = types.str;
- description = mdDoc "The public URL of the server, for password reset links.";
+ description = "The public URL of the server, for password reset links.";
default = "http://localhost";
};
ldap_base_dn = mkOption {
type = types.str;
- description = mdDoc "Base DN for LDAP.";
+ description = "Base DN for LDAP.";
example = "dc=example,dc=com";
};
ldap_user_dn = mkOption {
type = types.str;
- description = mdDoc "Admin username";
+ description = "Admin username";
default = "admin";
};
ldap_user_email = mkOption {
type = types.str;
- description = mdDoc "Admin email.";
+ description = "Admin email.";
default = "admin@example.com";
};
database_url = mkOption {
type = types.str;
- description = mdDoc "Database URL.";
+ description = "Database URL.";
default = "sqlite://./users.db?mode=rwc";
example = "postgres://postgres-user:password@postgres-server/my-database";
};
@@ -107,10 +107,25 @@ in
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
+ # lldap defaults to a hardcoded `jwt_secret` value if none is provided, which is bad, because
+ # an attacker could create a valid admin jwt access token fairly trivially.
+ # Because there are 3 different ways `jwt_secret` can be provided, we check if any one of them is present,
+ # and if not, bootstrap a secret in `/var/lib/lldap/jwt_secret_file` and give that to lldap.
+ script = lib.optionalString (!cfg.settings ? jwt_secret) ''
+ if [[ -z "$LLDAP_JWT_SECRET_FILE" ]] && [[ -z "$LLDAP_JWT_SECRET" ]]; then
+ if [[ ! -e "./jwt_secret_file" ]]; then
+ ${lib.getExe pkgs.openssl} rand -base64 -out ./jwt_secret_file 32
+ fi
+ export LLDAP_JWT_SECRET_FILE="./jwt_secret_file"
+ fi
+ '' + ''
+ ${lib.getExe cfg.package} run --config-file ${format.generate "lldap_config.toml" cfg.settings}
+ '';
serviceConfig = {
- ExecStart = "${lib.getExe cfg.package} run --config-file ${format.generate "lldap_config.toml" cfg.settings}";
StateDirectory = "lldap";
+ StateDirectoryMode = "0750";
WorkingDirectory = "%S/lldap";
+ UMask = "0027";
User = "lldap";
Group = "lldap";
DynamicUser = true;
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/memcached.nix b/third_party/nixpkgs/nixos/modules/services/databases/memcached.nix
index 542c80ab2e..e38931b6b7 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/memcached.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/memcached.nix
@@ -17,44 +17,44 @@ in
options = {
services.memcached = {
- enable = mkEnableOption (lib.mdDoc "Memcached");
+ enable = mkEnableOption "Memcached";
user = mkOption {
type = types.str;
default = "memcached";
- description = lib.mdDoc "The user to run Memcached as";
+ description = "The user to run Memcached as";
};
listen = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc "The IP address to bind to.";
+ description = "The IP address to bind to.";
};
port = mkOption {
type = types.port;
default = 11211;
- description = lib.mdDoc "The port to bind to.";
+ description = "The port to bind to.";
};
- enableUnixSocket = mkEnableOption (lib.mdDoc "unix socket at /run/memcached/memcached.sock");
+ enableUnixSocket = mkEnableOption "Unix Domain Socket at /run/memcached/memcached.sock instead of listening on an IP address and port. The `listen` and `port` options are ignored.";
maxMemory = mkOption {
type = types.ints.unsigned;
default = 64;
- description = lib.mdDoc "The maximum amount of memory to use for storage, in megabytes.";
+ description = "The maximum amount of memory to use for storage, in megabytes.";
};
maxConnections = mkOption {
type = types.ints.unsigned;
default = 1024;
- description = lib.mdDoc "The maximum number of simultaneous connections.";
+ description = "The maximum number of simultaneous connections.";
};
extraOptions = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "A list of extra options that will be added as a suffix when running memcached.";
+ description = "A list of extra options that will be added as a suffix when running memcached.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/monetdb.nix b/third_party/nixpkgs/nixos/modules/services/databases/monetdb.nix
index 1dddeda095..5025eb3036 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/monetdb.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/monetdb.nix
@@ -12,39 +12,39 @@ in {
options = {
services.monetdb = {
- enable = mkEnableOption (lib.mdDoc "the MonetDB database server");
+ enable = mkEnableOption "the MonetDB database server";
package = mkPackageOption pkgs "monetdb" { };
user = mkOption {
type = types.str;
default = "monetdb";
- description = lib.mdDoc "User account under which MonetDB runs.";
+ description = "User account under which MonetDB runs.";
};
group = mkOption {
type = types.str;
default = "monetdb";
- description = lib.mdDoc "Group under which MonetDB runs.";
+ description = "Group under which MonetDB runs.";
};
dataDir = mkOption {
type = types.path;
default = "/var/lib/monetdb";
- description = lib.mdDoc "Data directory for the dbfarm.";
+ description = "Data directory for the dbfarm.";
};
port = mkOption {
type = types.ints.u16;
default = 50000;
- description = lib.mdDoc "Port to listen on.";
+ description = "Port to listen on.";
};
listenAddress = mkOption {
type = types.str;
default = "127.0.0.1";
example = "0.0.0.0";
- description = lib.mdDoc "Address to listen on.";
+ description = "Address to listen on.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/mongodb.nix b/third_party/nixpkgs/nixos/modules/services/databases/mongodb.nix
index f10364bc76..8b8a664107 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/mongodb.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/mongodb.nix
@@ -29,56 +29,56 @@ in
services.mongodb = {
- enable = mkEnableOption (lib.mdDoc "the MongoDB server");
+ enable = mkEnableOption "the MongoDB server";
package = mkPackageOption pkgs "mongodb" { };
user = mkOption {
type = types.str;
default = "mongodb";
- description = lib.mdDoc "User account under which MongoDB runs";
+ description = "User account under which MongoDB runs";
};
bind_ip = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc "IP to bind to";
+ description = "IP to bind to";
};
quiet = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "quieter output";
+ description = "quieter output";
};
enableAuth = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable client authentication. Creates a default superuser with username root!";
+ description = "Enable client authentication. Creates a default superuser with username root!";
};
initialRootPassword = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "Password for the root user if auth is enabled.";
+ description = "Password for the root user if auth is enabled.";
};
dbpath = mkOption {
type = types.str;
default = "/var/db/mongodb";
- description = lib.mdDoc "Location where MongoDB stores its files";
+ description = "Location where MongoDB stores its files";
};
pidFile = mkOption {
type = types.str;
default = "/run/mongodb.pid";
- description = lib.mdDoc "Location of MongoDB pid file";
+ description = "Location of MongoDB pid file";
};
replSetName = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
If this instance is part of a replica set, set its name here.
Otherwise, leave empty to run as single node.
'';
@@ -90,13 +90,13 @@ in
example = ''
storage.journal.enabled: false
'';
- description = lib.mdDoc "MongoDB extra configuration in YAML format";
+ description = "MongoDB extra configuration in YAML format";
};
initialScript = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
A file containing MongoDB statements to execute on first startup.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/mysql.nix b/third_party/nixpkgs/nixos/modules/services/databases/mysql.nix
index a6d71cca88..4b2e83e71e 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/mysql.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/mysql.nix
@@ -34,12 +34,12 @@ in
services.mysql = {
- enable = mkEnableOption (lib.mdDoc "MySQL server");
+ enable = mkEnableOption "MySQL server";
package = mkOption {
type = types.package;
example = literalExpression "pkgs.mariadb";
- description = lib.mdDoc ''
+ description = ''
Which MySQL derivation to use. MariaDB packages are supported too.
'';
};
@@ -47,7 +47,7 @@ in
user = mkOption {
type = types.str;
default = "mysql";
- description = lib.mdDoc ''
+ description = ''
User account under which MySQL runs.
::: {.note}
@@ -61,7 +61,7 @@ in
group = mkOption {
type = types.str;
default = "mysql";
- description = lib.mdDoc ''
+ description = ''
Group account under which MySQL runs.
::: {.note}
@@ -75,7 +75,7 @@ in
dataDir = mkOption {
type = types.path;
example = "/var/lib/mysql";
- description = lib.mdDoc ''
+ description = ''
The data directory for MySQL.
::: {.note}
@@ -91,7 +91,7 @@ in
defaultText = ''
A configuration file automatically generated by NixOS.
'';
- description = lib.mdDoc ''
+ description = ''
Override the configuration file used by MySQL. By default,
NixOS generates one automatically from {option}`services.mysql.settings`.
'';
@@ -110,7 +110,7 @@ in
settings = mkOption {
type = format.type;
default = {};
- description = lib.mdDoc ''
+ description = ''
MySQL configuration. Refer to
,
,
@@ -144,14 +144,14 @@ in
options = {
name = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The name of the database to create.
'';
};
schema = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
The initial schema of the database; if null (the default),
an empty database is created.
'';
@@ -159,7 +159,7 @@ in
};
});
default = [];
- description = lib.mdDoc ''
+ description = ''
List of database names and their initial schemas that should be used to create databases on the first startup
of MySQL. The schema attribute is optional: If not specified, an empty database is created.
'';
@@ -174,13 +174,13 @@ in
initialScript = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc "A file containing SQL statements to be executed on the first startup. Can be used for granting certain permissions on the database.";
+ description = "A file containing SQL statements to be executed on the first startup. Can be used for granting certain permissions on the database.";
};
ensureDatabases = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
Ensures that the specified databases exist.
This option will never delete existing databases, especially not when the value of this
option is changed. This means that databases created once through this option or
@@ -197,14 +197,14 @@ in
options = {
name = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Name of the user to ensure.
'';
};
ensurePermissions = mkOption {
type = types.attrsOf types.str;
default = {};
- description = lib.mdDoc ''
+ description = ''
Permissions to ensure for the user, specified as attribute set.
The attribute names specify the database and tables to grant the permissions for,
separated by a dot. You may use wildcards here.
@@ -226,7 +226,7 @@ in
};
});
default = [];
- description = lib.mdDoc ''
+ description = ''
Ensures that the specified users exist and have at least the ensured permissions.
The MySQL users will be identified using Unix socket authentication. This authenticates the Unix user with the
same name only, and that without the need for a password.
@@ -256,39 +256,39 @@ in
role = mkOption {
type = types.enum [ "master" "slave" "none" ];
default = "none";
- description = lib.mdDoc "Role of the MySQL server instance.";
+ description = "Role of the MySQL server instance.";
};
serverId = mkOption {
type = types.int;
default = 1;
- description = lib.mdDoc "Id of the MySQL server instance. This number must be unique for each instance.";
+ description = "Id of the MySQL server instance. This number must be unique for each instance.";
};
masterHost = mkOption {
type = types.str;
- description = lib.mdDoc "Hostname of the MySQL master server.";
+ description = "Hostname of the MySQL master server.";
};
slaveHost = mkOption {
type = types.str;
- description = lib.mdDoc "Hostname of the MySQL slave server.";
+ description = "Hostname of the MySQL slave server.";
};
masterUser = mkOption {
type = types.str;
- description = lib.mdDoc "Username of the MySQL replication user.";
+ description = "Username of the MySQL replication user.";
};
masterPassword = mkOption {
type = types.str;
- description = lib.mdDoc "Password of the MySQL replication user.";
+ description = "Password of the MySQL replication user.";
};
masterPort = mkOption {
type = types.port;
default = 3306;
- description = lib.mdDoc "Port number on which the MySQL master server runs.";
+ description = "Port number on which the MySQL master server runs.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/neo4j.nix b/third_party/nixpkgs/nixos/modules/services/databases/neo4j.nix
index 45630e2d44..4369ec2007 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/neo4j.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/neo4j.nix
@@ -121,7 +121,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Neo4j Community Edition.
'';
};
@@ -129,7 +129,7 @@ in {
constrainLoadCsv = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Sets the root directory for file URLs used with the Cypher
`LOAD CSV` clause to be that defined by
{option}`directories.imports`. It restricts
@@ -144,7 +144,7 @@ in {
defaultListenAddress = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc ''
+ description = ''
Default network interface to listen for incoming connections. To
listen for connections on all interfaces, use "0.0.0.0".
@@ -158,7 +158,7 @@ in {
extraServerConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra configuration for Neo4j Community server. Refer to the
[complete reference](https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/)
of Neo4j configuration settings.
@@ -170,7 +170,7 @@ in {
readOnly = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Only allow read operations from this Neo4j instance.
'';
};
@@ -178,7 +178,7 @@ in {
workerCount = mkOption {
type = types.ints.between 0 44738;
default = 0;
- description = lib.mdDoc ''
+ description = ''
Number of Neo4j worker threads, where the default of
`0` indicates a worker count equal to the number of
available processors.
@@ -189,7 +189,7 @@ in {
enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Enable the BOLT connector for Neo4j. Setting this option to
`false` will stop Neo4j from listening for incoming
connections on the BOLT port (7687 by default).
@@ -199,7 +199,7 @@ in {
listenAddress = mkOption {
type = types.str;
default = ":7687";
- description = lib.mdDoc ''
+ description = ''
Neo4j listen address for BOLT traffic. The listen address is
expressed in the format `:`.
'';
@@ -208,7 +208,7 @@ in {
sslPolicy = mkOption {
type = types.str;
default = "legacy";
- description = lib.mdDoc ''
+ description = ''
Neo4j SSL policy for BOLT traffic.
The legacy policy is a special policy which is not defined in
@@ -226,7 +226,7 @@ in {
tlsLevel = mkOption {
type = types.enum [ "REQUIRED" "OPTIONAL" "DISABLED" ];
default = "OPTIONAL";
- description = lib.mdDoc ''
+ description = ''
SSL/TSL requirement level for BOLT traffic.
'';
};
@@ -237,7 +237,7 @@ in {
type = types.path;
default = "${cfg.directories.home}/certificates";
defaultText = literalExpression ''"''${config.${opt.directories.home}}/certificates"'';
- description = lib.mdDoc ''
+ description = ''
Directory for storing certificates to be used by Neo4j for
TLS connections.
@@ -260,7 +260,7 @@ in {
type = types.path;
default = "${cfg.directories.home}/data";
defaultText = literalExpression ''"''${config.${opt.directories.home}}/data"'';
- description = lib.mdDoc ''
+ description = ''
Path of the data directory. You must not configure more than one
Neo4j installation to use the same data directory.
@@ -273,7 +273,7 @@ in {
home = mkOption {
type = types.path;
default = "/var/lib/neo4j";
- description = lib.mdDoc ''
+ description = ''
Path of the Neo4j home directory. Other default directories are
subdirectories of this path. This directory will be created if
non-existent, and its ownership will be {command}`chown` to
@@ -285,7 +285,7 @@ in {
type = types.path;
default = "${cfg.directories.home}/import";
defaultText = literalExpression ''"''${config.${opt.directories.home}}/import"'';
- description = lib.mdDoc ''
+ description = ''
The root directory for file URLs used with the Cypher
`LOAD CSV` clause. Only meaningful when
{option}`constrainLoadCvs` is set to
@@ -301,7 +301,7 @@ in {
type = types.path;
default = "${cfg.directories.home}/plugins";
defaultText = literalExpression ''"''${config.${opt.directories.home}}/plugins"'';
- description = lib.mdDoc ''
+ description = ''
Path of the database plugin directory. Compiled Java JAR files that
contain database procedures will be loaded if they are placed in
this directory.
@@ -317,7 +317,7 @@ in {
enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Enable the HTTP connector for Neo4j. Setting this option to
`false` will stop Neo4j from listening for incoming
connections on the HTTPS port (7474 by default).
@@ -327,7 +327,7 @@ in {
listenAddress = mkOption {
type = types.str;
default = ":7474";
- description = lib.mdDoc ''
+ description = ''
Neo4j listen address for HTTP traffic. The listen address is
expressed in the format `:`.
'';
@@ -338,7 +338,7 @@ in {
enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Enable the HTTPS connector for Neo4j. Setting this option to
`false` will stop Neo4j from listening for incoming
connections on the HTTPS port (7473 by default).
@@ -348,7 +348,7 @@ in {
listenAddress = mkOption {
type = types.str;
default = ":7473";
- description = lib.mdDoc ''
+ description = ''
Neo4j listen address for HTTPS traffic. The listen address is
expressed in the format `:`.
'';
@@ -357,7 +357,7 @@ in {
sslPolicy = mkOption {
type = types.str;
default = "legacy";
- description = lib.mdDoc ''
+ description = ''
Neo4j SSL policy for HTTPS traffic.
The legacy policy is a special policy which is not defined in the
@@ -373,7 +373,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable a remote shell server which Neo4j Shell clients can log in to.
Only applicable to {command}`neo4j-shell`.
'';
@@ -387,7 +387,7 @@ in {
allowKeyGeneration = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Allows the generation of a private key and associated self-signed
certificate. Only performed when both objects cannot be found for
this policy. It is recommended to turn this off again after keys
@@ -406,7 +406,7 @@ in {
type = types.path;
default = "${cfg.directories.certificates}/${name}";
defaultText = literalExpression ''"''${config.${opt.directories.certificates}}/''${name}"'';
- description = lib.mdDoc ''
+ description = ''
The mandatory base directory for cryptographic objects of this
policy. This path is only automatically generated when this
option as well as {option}`directories.certificates` are
@@ -423,7 +423,7 @@ in {
ciphers = mkOption {
type = types.nullOr (types.listOf types.str);
default = null;
- description = lib.mdDoc ''
+ description = ''
Restrict the allowed ciphers of this policy to those defined
here. The default ciphers are those of the JVM platform.
'';
@@ -432,7 +432,7 @@ in {
clientAuth = mkOption {
type = types.enum [ "NONE" "OPTIONAL" "REQUIRE" ];
default = "REQUIRE";
- description = lib.mdDoc ''
+ description = ''
The client authentication stance for this policy.
'';
};
@@ -440,7 +440,7 @@ in {
privateKey = mkOption {
type = types.str;
default = "private.key";
- description = lib.mdDoc ''
+ description = ''
The name of private PKCS #8 key file for this policy to be found
in the {option}`baseDirectory`, or the absolute path to
the key file. It is mandatory that a key can be found or generated.
@@ -450,7 +450,7 @@ in {
publicCertificate = mkOption {
type = types.str;
default = "public.crt";
- description = lib.mdDoc ''
+ description = ''
The name of public X.509 certificate (chain) file in PEM format
for this policy to be found in the {option}`baseDirectory`,
or the absolute path to the certificate file. It is mandatory
@@ -466,7 +466,7 @@ in {
type = types.path;
default = "${config.baseDirectory}/revoked";
defaultText = literalExpression ''"''${config.${options.baseDirectory}}/revoked"'';
- description = lib.mdDoc ''
+ description = ''
Path to directory of CRLs (Certificate Revocation Lists) in
PEM format. Must be an absolute path. The existence of this
directory is mandatory and will need to be created manually when:
@@ -481,7 +481,7 @@ in {
tlsVersions = mkOption {
type = types.listOf types.str;
default = [ "TLSv1.2" ];
- description = lib.mdDoc ''
+ description = ''
Restrict the TLS protocol versions of this policy to those
defined here.
'';
@@ -490,7 +490,7 @@ in {
trustAll = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Makes this policy trust all remote parties. Enabling this is not
recommended and the policy's trusted directory will be ignored.
Use of this mode is discouraged. It would offer encryption but
@@ -502,7 +502,7 @@ in {
type = types.path;
default = "${config.baseDirectory}/trusted";
defaultText = literalExpression ''"''${config.${options.baseDirectory}}/trusted"'';
- description = lib.mdDoc ''
+ description = ''
Path to directory of X.509 certificates in PEM format for
trusted parties. Must be an absolute path. The existence of this
directory is mandatory and will need to be created manually when:
@@ -522,7 +522,7 @@ in {
type = types.listOf types.path;
internal = true;
readOnly = true;
- description = lib.mdDoc ''
+ description = ''
Directories of this policy that will be created automatically
when the certificates directory is left at its default value.
This includes all options of type path that are left at their
@@ -538,7 +538,7 @@ in {
}));
default = {};
- description = lib.mdDoc ''
+ description = ''
Defines the SSL policies for use with Neo4j connectors. Each attribute
of this set defines a policy, with the attribute name defining the name
of the policy and its namespace. Refer to the operations manual section
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/openldap.nix b/third_party/nixpkgs/nixos/modules/services/databases/openldap.nix
index df36e37976..feb974cdf6 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/openldap.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/openldap.nix
@@ -31,7 +31,7 @@ let
attrs = mkOption {
type = types.attrsOf ldapValueType;
default = {};
- description = lib.mdDoc "Attributes of the parent entry.";
+ description = "Attributes of the parent entry.";
};
children = mkOption {
# Hide the child attributes, to avoid infinite recursion in e.g. documentation
@@ -40,7 +40,7 @@ let
hiddenOptions = lib.mapAttrs (name: attr: attr // { visible = false; }) options;
in types.attrsOf (types.submodule { options = hiddenOptions; });
default = {};
- description = lib.mdDoc "Child entries of the current entry, with recursively the same structure.";
+ description = "Child entries of the current entry, with recursively the same structure.";
example = lib.literalExpression ''
{
"cn=schema" = {
@@ -59,7 +59,7 @@ let
includes = mkOption {
type = types.listOf types.path;
default = [];
- description = lib.mdDoc ''
+ description = ''
LDIF files to include after the parent's attributes but before its children.
'';
};
@@ -88,7 +88,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the ldap server.";
+ description = "Whether to enable the ldap server.";
};
package = mkPackageOption pkgs "openldap" {
@@ -102,25 +102,25 @@ in {
user = mkOption {
type = types.str;
default = "openldap";
- description = lib.mdDoc "User account under which slapd runs.";
+ description = "User account under which slapd runs.";
};
group = mkOption {
type = types.str;
default = "openldap";
- description = lib.mdDoc "Group account under which slapd runs.";
+ description = "Group account under which slapd runs.";
};
urlList = mkOption {
type = types.listOf types.str;
default = [ "ldap:///" ];
- description = lib.mdDoc "URL list slapd should listen on.";
+ description = "URL list slapd should listen on.";
example = [ "ldaps:///" ];
};
settings = mkOption {
type = ldapAttrsType;
- description = lib.mdDoc "Configuration for OpenLDAP, in OLC format";
+ description = "Configuration for OpenLDAP, in OLC format";
example = lib.literalExpression ''
{
attrs.olcLogLevel = [ "stats" ];
@@ -168,7 +168,7 @@ in {
configDir = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Use this config directory instead of generating one from the
`settings` option. Overrides all NixOS settings.
'';
@@ -178,7 +178,7 @@ in {
mutableConfig = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to allow writable on-line configuration. If
`true`, the NixOS settings will only be used to
initialize the OpenLDAP configuration if it does not exist, and are
@@ -189,7 +189,7 @@ in {
declarativeContents = mkOption {
type = with types; attrsOf lines;
default = {};
- description = lib.mdDoc ''
+ description = ''
Declarative contents for the LDAP database, in LDIF format by suffix.
All data will be erased when starting the LDAP server. Modifications
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/opentsdb.nix b/third_party/nixpkgs/nixos/modules/services/databases/opentsdb.nix
index 25f413db80..e104c42f8b 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/opentsdb.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/opentsdb.nix
@@ -15,14 +15,14 @@ in {
services.opentsdb = {
- enable = mkEnableOption (lib.mdDoc "OpenTSDB");
+ enable = mkEnableOption "OpenTSDB";
package = mkPackageOption pkgs "opentsdb" { };
user = mkOption {
type = types.str;
default = "opentsdb";
- description = lib.mdDoc ''
+ description = ''
User account under which OpenTSDB runs.
'';
};
@@ -30,7 +30,7 @@ in {
group = mkOption {
type = types.str;
default = "opentsdb";
- description = lib.mdDoc ''
+ description = ''
Group account under which OpenTSDB runs.
'';
};
@@ -38,7 +38,7 @@ in {
port = mkOption {
type = types.port;
default = 4242;
- description = lib.mdDoc ''
+ description = ''
Which port OpenTSDB listens on.
'';
};
@@ -49,7 +49,7 @@ in {
tsd.core.auto_create_metrics = true
tsd.http.request.enable_chunked = true
'';
- description = lib.mdDoc ''
+ description = ''
The contents of OpenTSDB's configuration file
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/pgbouncer.nix b/third_party/nixpkgs/nixos/modules/services/databases/pgbouncer.nix
index 157d49c131..32538789fb 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/pgbouncer.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/pgbouncer.nix
@@ -77,14 +77,14 @@ in {
# NixOS settings
- enable = mkEnableOption (lib.mdDoc "PostgreSQL connection pooler");
+ enable = mkEnableOption "PostgreSQL connection pooler";
package = mkPackageOption pkgs "pgbouncer" { };
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to automatically open the specified TCP port in the firewall.
'';
};
@@ -94,7 +94,7 @@ in {
logFile = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Specifies a log file in addition to journald.
'';
};
@@ -103,7 +103,7 @@ in {
type = types.nullOr types.commas;
example = "*";
default = null;
- description = lib.mdDoc ''
+ description = ''
Specifies a list (comma-separated) of addresses where to listen for TCP connections.
You may also use * meaning “listen on all addresses”.
When not set, only Unix socket connections are accepted.
@@ -115,7 +115,7 @@ in {
listenPort = mkOption {
type = types.port;
default = 6432;
- description = lib.mdDoc ''
+ description = ''
Which port to listen on. Applies to both TCP and Unix sockets.
'';
};
@@ -123,7 +123,7 @@ in {
poolMode = mkOption {
type = types.enum [ "session" "transaction" "statement" ];
default = "session";
- description = lib.mdDoc ''
+ description = ''
Specifies when a server connection can be reused by other clients.
session
@@ -139,7 +139,7 @@ in {
maxClientConn = mkOption {
type = types.int;
default = 100;
- description = lib.mdDoc ''
+ description = ''
Maximum number of client connections allowed.
When this setting is increased, then the file descriptor limits in the operating system
@@ -160,7 +160,7 @@ in {
defaultPoolSize = mkOption {
type = types.int;
default = 20;
- description = lib.mdDoc ''
+ description = ''
How many server connections to allow per user/database pair.
Can be overridden in the per-database configuration.
'';
@@ -169,7 +169,7 @@ in {
maxDbConnections = mkOption {
type = types.int;
default = 0;
- description = lib.mdDoc ''
+ description = ''
Do not allow more than this many server connections per database (regardless of user).
This considers the PgBouncer database that the client has connected to,
not the PostgreSQL database of the outgoing connection.
@@ -189,7 +189,7 @@ in {
maxUserConnections = mkOption {
type = types.int;
default = 0;
- description = lib.mdDoc ''
+ description = ''
Do not allow more than this many server connections per user (regardless of database).
This considers the PgBouncer user that is associated with a pool,
which is either the user specified for the server connection
@@ -211,7 +211,7 @@ in {
type = types.nullOr types.commas;
example = "extra_float_digits";
default = null;
- description = lib.mdDoc ''
+ description = ''
By default, PgBouncer allows only parameters it can keep track of in startup packets:
client_encoding, datestyle, timezone and standard_conforming_strings.
@@ -236,7 +236,7 @@ in {
bardb = "host=localhost dbname=bazdb";
foodb = "host=host1.example.com port=5432";
};
- description = lib.mdDoc ''
+ description = ''
Detailed information about PostgreSQL database definitions:
'';
@@ -249,7 +249,7 @@ in {
example = {
user1 = "pool_mode=session";
};
- description = lib.mdDoc ''
+ description = ''
Optional.
Detailed information about PostgreSQL user definitions:
@@ -265,7 +265,7 @@ in {
"1" = "host=host1.example.com";
"2" = "host=/tmp/pgbouncer-2 port=5555";
};
- description = lib.mdDoc ''
+ description = ''
Optional.
Detailed information about PostgreSQL database definitions:
@@ -277,7 +277,7 @@ in {
authType = mkOption {
type = types.enum [ "cert" "md5" "scram-sha-256" "plain" "trust" "any" "hba" "pam" ];
default = "md5";
- description = lib.mdDoc ''
+ description = ''
How to authenticate users.
cert
@@ -312,7 +312,7 @@ in {
type = types.nullOr types.path;
default = null;
example = "/secrets/pgbouncer_hba";
- description = lib.mdDoc ''
+ description = ''
HBA configuration file to use when authType is hba.
See HBA file format details:
@@ -324,7 +324,7 @@ in {
type = types.nullOr types.path;
default = null;
example = "/secrets/pgbouncer_authfile";
- description = lib.mdDoc ''
+ description = ''
The name of the file to load user names and passwords from.
See section Authentication file format details:
@@ -339,7 +339,7 @@ in {
type = types.nullOr types.str;
default = null;
example = "pgbouncer";
- description = lib.mdDoc ''
+ description = ''
If authUser is set, then any user not specified in authFile will be queried
through the authQuery query from pg_shadow in the database, using authUser.
The password of authUser will be taken from authFile.
@@ -354,7 +354,7 @@ in {
type = types.nullOr types.str;
default = null;
example = "SELECT usename, passwd FROM pg_shadow WHERE usename=$1";
- description = lib.mdDoc ''
+ description = ''
Query to load user's password from database.
Direct access to pg_shadow requires admin rights.
@@ -369,7 +369,7 @@ in {
type = types.nullOr types.str;
default = null;
example = "authdb";
- description = lib.mdDoc ''
+ description = ''
Database name in the [database] section to be used for authentication purposes.
This option can be either global or overriden in the connection string if this parameter is specified.
'';
@@ -382,7 +382,7 @@ in {
sslmode = mkOption {
type = types.enum [ "disable" "allow" "prefer" "require" "verify-ca" "verify-full" ];
default = "disable";
- description = lib.mdDoc ''
+ description = ''
TLS mode to use for connections from clients.
TLS connections are disabled by default.
@@ -409,22 +409,22 @@ in {
certFile = mkOption {
type = types.path;
example = "/secrets/pgbouncer.key";
- description = lib.mdDoc "Path to certificate for private key. Clients can validate it";
+ description = "Path to certificate for private key. Clients can validate it";
};
keyFile = mkOption {
type = types.path;
example = "/secrets/pgbouncer.crt";
- description = lib.mdDoc "Path to private key for PgBouncer to accept client connections";
+ description = "Path to private key for PgBouncer to accept client connections";
};
caFile = mkOption {
type = types.path;
example = "/secrets/pgbouncer.crt";
- description = lib.mdDoc "Path to root certificate file to validate client certificates";
+ description = "Path to root certificate file to validate client certificates";
};
};
});
default = null;
- description = lib.mdDoc ''
+ description = ''
'';
};
@@ -435,7 +435,7 @@ in {
sslmode = mkOption {
type = types.enum [ "disable" "allow" "prefer" "require" "verify-ca" "verify-full" ];
default = "disable";
- description = lib.mdDoc ''
+ description = ''
TLS mode to use for connections to PostgreSQL servers.
TLS connections are disabled by default.
@@ -461,22 +461,22 @@ in {
certFile = mkOption {
type = types.path;
example = "/secrets/pgbouncer_server.key";
- description = lib.mdDoc "Certificate for private key. PostgreSQL server can validate it.";
+ description = "Certificate for private key. PostgreSQL server can validate it.";
};
keyFile = mkOption {
type = types.path;
example = "/secrets/pgbouncer_server.crt";
- description = lib.mdDoc "Private key for PgBouncer to authenticate against PostgreSQL server.";
+ description = "Private key for PgBouncer to authenticate against PostgreSQL server.";
};
caFile = mkOption {
type = types.path;
example = "/secrets/pgbouncer_server.crt";
- description = lib.mdDoc "Root certificate file to validate PostgreSQL server certificates.";
+ description = "Root certificate file to validate PostgreSQL server certificates.";
};
};
});
default = null;
- description = lib.mdDoc ''
+ description = ''
'';
};
@@ -488,28 +488,28 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Toggles syslog on/off.
'';
};
syslogIdent = mkOption {
type = types.str;
default = "pgbouncer";
- description = lib.mdDoc ''
+ description = ''
Under what name to send logs to syslog.
'';
};
syslogFacility = mkOption {
type = types.enum [ "auth" "authpriv" "daemon" "user" "local0" "local1" "local2" "local3" "local4" "local5" "local6" "local7" ];
default = "daemon";
- description = lib.mdDoc ''
+ description = ''
Under what facility to send logs to syslog.
'';
};
};
});
default = null;
- description = lib.mdDoc ''
+ description = ''
'';
};
@@ -517,7 +517,7 @@ in {
verbose = lib.mkOption {
type = lib.types.int;
default = 0;
- description = lib.mdDoc ''
+ description = ''
Increase verbosity. Mirrors the “-v” switch on the command line.
'';
};
@@ -526,7 +526,7 @@ in {
adminUsers = mkOption {
type = types.nullOr types.commas;
default = null;
- description = lib.mdDoc ''
+ description = ''
Comma-separated list of database users that are allowed to connect and run all commands on the console.
Ignored when authType is any, in which case any user name is allowed in as admin.
'';
@@ -535,7 +535,7 @@ in {
statsUsers = mkOption {
type = types.nullOr types.commas;
default = null;
- description = lib.mdDoc ''
+ description = ''
Comma-separated list of database users that are allowed to connect and run read-only queries on the console.
That means all SHOW commands except SHOW FDS.
'';
@@ -545,7 +545,7 @@ in {
openFilesLimit = lib.mkOption {
type = lib.types.int;
default = 65536;
- description = lib.mdDoc ''
+ description = ''
Maximum number of open files.
'';
};
@@ -553,7 +553,7 @@ in {
user = mkOption {
type = types.str;
default = "pgbouncer";
- description = lib.mdDoc ''
+ description = ''
The user pgbouncer is run as.
'';
};
@@ -561,7 +561,7 @@ in {
group = mkOption {
type = types.str;
default = "pgbouncer";
- description = lib.mdDoc ''
+ description = ''
The group pgbouncer is run as.
'';
};
@@ -569,7 +569,7 @@ in {
homeDir = mkOption {
type = types.path;
default = "/var/lib/pgbouncer";
- description = lib.mdDoc ''
+ description = ''
Specifies the home directory.
'';
};
@@ -577,7 +577,7 @@ in {
# Extra settings
extraConfig = mkOption {
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Any additional text to be appended to config.ini
.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/pgmanage.nix b/third_party/nixpkgs/nixos/modules/services/databases/pgmanage.nix
index 4b963aee46..c405162ed8 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/pgmanage.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/pgmanage.nix
@@ -44,7 +44,7 @@ let
in {
options.services.pgmanage = {
- enable = mkEnableOption (lib.mdDoc "PostgreSQL Administration for the web");
+ enable = mkEnableOption "PostgreSQL Administration for the web";
package = mkPackageOption pkgs "pgmanage" { };
@@ -55,7 +55,7 @@ in {
nuc-server = "hostaddr=192.168.0.100 port=5432 dbname=postgres";
mini-server = "hostaddr=127.0.0.1 port=5432 dbname=postgres sslmode=require";
};
- description = lib.mdDoc ''
+ description = ''
pgmanage requires at least one PostgreSQL server be defined.
Detailed information about PostgreSQL connection strings is available at:
@@ -71,7 +71,7 @@ in {
allowCustomConnections = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
This tells pgmanage whether or not to allow anyone to use a custom
connection from the login screen.
'';
@@ -80,7 +80,7 @@ in {
port = mkOption {
type = types.port;
default = 8080;
- description = lib.mdDoc ''
+ description = ''
This tells pgmanage what port to listen on for browser requests.
'';
};
@@ -88,7 +88,7 @@ in {
localOnly = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
This tells pgmanage whether or not to set the listening socket to local
addresses only.
'';
@@ -97,7 +97,7 @@ in {
superOnly = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
This tells pgmanage whether or not to only allow super users to
login. The recommended value is true and will restrict users who are not
super users from logging in to any PostgreSQL instance through
@@ -109,7 +109,7 @@ in {
loginGroup = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
This tells pgmanage to only allow users in a certain PostgreSQL group to
login to pgmanage. Note that a connection will be made to PostgreSQL in
order to test if the user is a member of the login group.
@@ -119,7 +119,7 @@ in {
loginTimeout = mkOption {
type = types.int;
default = 3600;
- description = lib.mdDoc ''
+ description = ''
Number of seconds of inactivity before user is automatically logged
out.
'';
@@ -128,7 +128,7 @@ in {
sqlRoot = mkOption {
type = types.str;
default = "/var/lib/pgmanage";
- description = lib.mdDoc ''
+ description = ''
This tells pgmanage where to put the SQL file history. All tabs are saved
to this location so that if you get disconnected from pgmanage you
don't lose your work.
@@ -140,16 +140,16 @@ in {
options = {
cert = mkOption {
type = types.str;
- description = lib.mdDoc "TLS certificate";
+ description = "TLS certificate";
};
key = mkOption {
type = types.str;
- description = lib.mdDoc "TLS key";
+ description = "TLS key";
};
};
});
default = null;
- description = lib.mdDoc ''
+ description = ''
These options tell pgmanage where the TLS Certificate and Key files
reside. If you use these options then you'll only be able to access
pgmanage through a secure TLS connection. These options are only
@@ -165,7 +165,7 @@ in {
logLevel = mkOption {
type = types.enum ["error" "warn" "notice" "info"];
default = "error";
- description = lib.mdDoc ''
+ description = ''
Verbosity of logs
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/postgresql.md b/third_party/nixpkgs/nixos/modules/services/databases/postgresql.md
index 7d141f12b5..8a587832cd 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/postgresql.md
+++ b/third_party/nixpkgs/nixos/modules/services/databases/postgresql.md
@@ -15,9 +15,11 @@ PostgreSQL is an advanced, free relational database.
## Configuring {#module-services-postgres-configuring}
To enable PostgreSQL, add the following to your {file}`configuration.nix`:
-```
-services.postgresql.enable = true;
-services.postgresql.package = pkgs.postgresql_15;
+```nix
+{
+ services.postgresql.enable = true;
+ services.postgresql.package = pkgs.postgresql_15;
+}
```
Note that you are required to specify the desired version of PostgreSQL (e.g. `pkgs.postgresql_15`). Since upgrading your PostgreSQL version requires a database dump and reload (see below), NixOS cannot provide a default value for [](#opt-services.postgresql.package) such as the most recent release of PostgreSQL.
@@ -35,8 +37,10 @@ alice=>
-->
By default, PostgreSQL stores its databases in {file}`/var/lib/postgresql/$psqlSchema`. You can override this using [](#opt-services.postgresql.dataDir), e.g.
-```
-services.postgresql.dataDir = "/data/postgresql";
+```nix
+{
+ services.postgresql.dataDir = "/data/postgresql";
+}
```
## Initializing {#module-services-postgres-initializing}
@@ -95,23 +99,26 @@ databases from `ensureDatabases` and `extraUser1` from `ensureUsers`
are already created.
```nix
+ {
systemd.services.postgresql.postStart = lib.mkAfter ''
$PSQL service1 -c 'GRANT SELECT ON ALL TABLES IN SCHEMA public TO "extraUser1"'
$PSQL service1 -c 'GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO "extraUser1"'
# ....
'';
+ }
```
##### in intermediate oneshot service {#module-services-postgres-initializing-extra-permissions-superuser-oneshot}
```nix
+ {
systemd.services."migrate-service1-db1" = {
serviceConfig.Type = "oneshot";
requiredBy = "service1.service";
before = "service1.service";
after = "postgresql.service";
serviceConfig.User = "postgres";
- environment.PSQL = "psql --port=${toString services.postgresql.port}";
+ environment.PSQL = "psql --port=${toString services.postgresql.settings.port}";
path = [ postgresql ];
script = ''
$PSQL service1 -c 'GRANT SELECT ON ALL TABLES IN SCHEMA public TO "extraUser1"'
@@ -119,6 +126,7 @@ are already created.
# ....
'';
};
+ }
```
#### as service user {#module-services-postgres-initializing-extra-permissions-service-user}
@@ -130,25 +138,28 @@ are already created.
##### in service `preStart` {#module-services-postgres-initializing-extra-permissions-service-user-pre-start}
```nix
- environment.PSQL = "psql --port=${toString services.postgresql.port}";
+ {
+ environment.PSQL = "psql --port=${toString services.postgresql.settings.port}";
path = [ postgresql ];
systemd.services."service1".preStart = ''
$PSQL -c 'GRANT SELECT ON ALL TABLES IN SCHEMA public TO "extraUser1"'
$PSQL -c 'GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO "extraUser1"'
# ....
'';
+ }
```
##### in intermediate oneshot service {#module-services-postgres-initializing-extra-permissions-service-user-oneshot}
```nix
+ {
systemd.services."migrate-service1-db1" = {
serviceConfig.Type = "oneshot";
requiredBy = "service1.service";
before = "service1.service";
after = "postgresql.service";
serviceConfig.User = "service1";
- environment.PSQL = "psql --port=${toString services.postgresql.port}";
+ environment.PSQL = "psql --port=${toString services.postgresql.settings.port}";
path = [ postgresql ];
script = ''
$PSQL -c 'GRANT SELECT ON ALL TABLES IN SCHEMA public TO "extraUser1"'
@@ -156,6 +167,7 @@ are already created.
# ....
'';
};
+ }
```
## Upgrading {#module-services-postgres-upgrading}
@@ -174,7 +186,7 @@ $ nix-instantiate --eval -A postgresql_13.psqlSchema
"13"
```
For an upgrade, a script like this can be used to simplify the process:
-```
+```nix
{ config, pkgs, ... }:
{
environment.systemPackages = [
@@ -256,16 +268,18 @@ postgresql_15.pkgs.pg_partman postgresql_15.pkgs.pgroonga
```
To add plugins via NixOS configuration, set `services.postgresql.extraPlugins`:
-```
-services.postgresql.package = pkgs.postgresql_12;
-services.postgresql.extraPlugins = ps: with ps; [
- pg_repack
- postgis
-];
+```nix
+{
+ services.postgresql.package = pkgs.postgresql_12;
+ services.postgresql.extraPlugins = ps: with ps; [
+ pg_repack
+ postgis
+ ];
+}
```
You can build custom PostgreSQL-with-plugins (to be used outside of NixOS) using function `.withPackages`. For example, creating a custom PostgreSQL package in an overlay can look like:
-```
+```nix
self: super: {
postgresql_custom = self.postgresql_12.withPackages (ps: [
ps.pg_repack
@@ -275,9 +289,9 @@ self: super: {
```
Here's a recipe on how to override a particular plugin through an overlay:
-```
+```nix
self: super: {
- postgresql_15 = super.postgresql_15.override { this = self.postgresql_15; } // {
+ postgresql_15 = super.postgresql_15// {
pkgs = super.postgresql_15.pkgs // {
pg_repack = super.postgresql_15.pkgs.pg_repack.overrideAttrs (_: {
name = "pg_repack-v20181024";
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/postgresql.nix b/third_party/nixpkgs/nixos/modules/services/databases/postgresql.nix
index ed59157357..8a386b4848 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/postgresql.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/postgresql.nix
@@ -14,7 +14,7 @@ let
# package = pkgs.postgresql_;
# };
# works.
- base = if cfg.enableJIT && !cfg.package.jitSupport then cfg.package.withJIT else cfg.package;
+ base = if cfg.enableJIT then cfg.package.withJIT else cfg.package;
in
if cfg.extraPlugins == []
then base
@@ -27,7 +27,7 @@ let
else toString value;
# The main PostgreSQL configuration file.
- configFile = pkgs.writeTextDir "postgresql.conf" (concatStringsSep "\n" (mapAttrsToList (n: v: "${n} = ${toStr v}") cfg.settings));
+ configFile = pkgs.writeTextDir "postgresql.conf" (concatStringsSep "\n" (mapAttrsToList (n: v: "${n} = ${toStr v}") (filterAttrs (const (x: x != null)) cfg.settings)));
configFileCheck = pkgs.runCommand "postgresql-configfile-check" {} ''
${cfg.package}/bin/postgres -D${configFile} -C config_file >/dev/null
@@ -41,6 +41,9 @@ in
{
imports = [
(mkRemovedOptionModule [ "services" "postgresql" "extraConfig" ] "Use services.postgresql.settings instead.")
+
+ (mkRenamedOptionModule [ "services" "postgresql" "logLinePrefix" ] [ "services" "postgresql" "settings" "log_line_prefix" ])
+ (mkRenamedOptionModule [ "services" "postgresql" "port" ] [ "services" "postgresql" "settings" "port" ])
];
###### interface
@@ -49,33 +52,25 @@ in
services.postgresql = {
- enable = mkEnableOption (lib.mdDoc "PostgreSQL Server");
+ enable = mkEnableOption "PostgreSQL Server";
- enableJIT = mkEnableOption (lib.mdDoc "JIT support");
+ enableJIT = mkEnableOption "JIT support";
package = mkPackageOption pkgs "postgresql" {
example = "postgresql_15";
};
- port = mkOption {
- type = types.port;
- default = 5432;
- description = lib.mdDoc ''
- The port on which PostgreSQL listens.
- '';
- };
-
checkConfig = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Check the syntax of the configuration file at compile time";
+ description = "Check the syntax of the configuration file at compile time";
};
dataDir = mkOption {
type = types.path;
defaultText = literalExpression ''"/var/lib/postgresql/''${config.services.postgresql.package.psqlSchema}"'';
example = "/var/lib/postgresql/15";
- description = lib.mdDoc ''
+ description = ''
The data directory for PostgreSQL. If left as the default value
this directory will automatically be created before the PostgreSQL server starts, otherwise
the sysadmin is responsible for ensuring the directory exists with appropriate ownership
@@ -86,7 +81,7 @@ in
authentication = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Defines how users authenticate themselves to the server. See the
[PostgreSQL documentation for pg_hba.conf](https://www.postgresql.org/docs/current/auth-pg-hba-conf.html)
for details on the expected format of this option. By default,
@@ -106,7 +101,7 @@ in
map-name-0 system-username-0 database-username-0
map-name-1 system-username-1 database-username-1
'';
- description = lib.mdDoc ''
+ description = ''
Defines the mapping from system users to database users.
See the [auth doc](https://postgresql.org/docs/current/auth-username-maps.html).
@@ -117,7 +112,7 @@ in
type = with types; listOf str;
default = [];
example = [ "--data-checksums" "--allow-group-access" ];
- description = lib.mdDoc ''
+ description = ''
Additional arguments passed to `initdb` during data dir
initialisation.
'';
@@ -131,7 +126,7 @@ in
alter user postgres with password 'myPassword';
''';'';
- description = lib.mdDoc ''
+ description = ''
A file containing SQL statements to execute on first startup.
'';
};
@@ -139,7 +134,7 @@ in
ensureDatabases = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
Ensures that the specified databases exist.
This option will never delete existing databases, especially not when the value of this
option is changed. This means that databases created once through this option or
@@ -156,42 +151,15 @@ in
options = {
name = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Name of the user to ensure.
'';
};
- ensurePermissions = mkOption {
- type = types.attrsOf types.str;
- default = {};
- visible = false; # This option has been deprecated.
- description = lib.mdDoc ''
- This option is DEPRECATED and should not be used in nixpkgs anymore,
- use `ensureDBOwnership` instead. It can also break with newer
- versions of PostgreSQL (≥ 15).
-
- Permissions to ensure for the user, specified as an attribute set.
- The attribute names specify the database and tables to grant the permissions for.
- The attribute values specify the permissions to grant. You may specify one or
- multiple comma-separated SQL privileges here.
-
- For more information on how to specify the target
- and on which privileges exist, see the
- [GRANT syntax](https://www.postgresql.org/docs/current/sql-grant.html).
- The attributes are used as `GRANT ''${attrValue} ON ''${attrName}`.
- '';
- example = literalExpression ''
- {
- "DATABASE \"nextcloud\"" = "ALL PRIVILEGES";
- "ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
- }
- '';
- };
-
ensureDBOwnership = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Grants the user ownership to a database with the same name.
This database must be defined manually in
[](#opt-services.postgresql.ensureDatabases).
@@ -199,7 +167,7 @@ in
};
ensureClauses = mkOption {
- description = lib.mdDoc ''
+ description = ''
An attrset of clauses to grant to the user. Under the hood this uses the
[ALTER USER syntax](https://www.postgresql.org/docs/current/sql-alteruser.html) for each attrName where
the attrValue is true in the attrSet:
@@ -224,7 +192,7 @@ in
in {
superuser = mkOption {
type = types.nullOr types.bool;
- description = lib.mdDoc ''
+ description = ''
Grants the user, created by the ensureUser attr, superuser permissions. From the postgres docs:
A database superuser bypasses all permission checks,
@@ -241,7 +209,7 @@ in
};
createrole = mkOption {
type = types.nullOr types.bool;
- description = lib.mdDoc ''
+ description = ''
Grants the user, created by the ensureUser attr, createrole permissions. From the postgres docs:
A role must be explicitly given permission to create more
@@ -260,7 +228,7 @@ in
};
createdb = mkOption {
type = types.nullOr types.bool;
- description = lib.mdDoc ''
+ description = ''
Grants the user, created by the ensureUser attr, createdb permissions. From the postgres docs:
A role must be explicitly given permission to create
@@ -275,7 +243,7 @@ in
};
"inherit" = mkOption {
type = types.nullOr types.bool;
- description = lib.mdDoc ''
+ description = ''
Grants the user created inherit permissions. From the postgres docs:
A role is given permission to inherit the privileges of
@@ -290,7 +258,7 @@ in
};
login = mkOption {
type = types.nullOr types.bool;
- description = lib.mdDoc ''
+ description = ''
Grants the user, created by the ensureUser attr, login permissions. From the postgres docs:
Only roles that have the LOGIN attribute can be used as
@@ -312,7 +280,7 @@ in
};
replication = mkOption {
type = types.nullOr types.bool;
- description = lib.mdDoc ''
+ description = ''
Grants the user, created by the ensureUser attr, replication permissions. From the postgres docs:
A role must explicitly be given permission to initiate
@@ -328,7 +296,7 @@ in
};
bypassrls = mkOption {
type = types.nullOr types.bool;
- description = lib.mdDoc ''
+ description = ''
Grants the user, created by the ensureUser attr, replication permissions. From the postgres docs:
A role must be explicitly given permission to bypass
@@ -348,7 +316,7 @@ in
};
});
default = [];
- description = lib.mdDoc ''
+ description = ''
Ensures that the specified users exist.
The PostgreSQL users will be identified using peer authentication. This authenticates the Unix user with the
same name only, and that without the need for a password.
@@ -372,37 +340,57 @@ in
enableTCPIP = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether PostgreSQL should listen on all network interfaces.
If disabled, the database can only be accessed via its Unix
domain socket or via TCP connections to localhost.
'';
};
- logLinePrefix = mkOption {
- type = types.str;
- default = "[%p] ";
- example = "%m [%p] ";
- description = lib.mdDoc ''
- A printf-style string that is output at the beginning of each log line.
- Upstream default is `'%m [%p] '`, i.e. it includes the timestamp. We do
- not include the timestamp, because journal has it anyway.
- '';
- };
-
extraPlugins = mkOption {
type = with types; coercedTo (listOf path) (path: _ignorePg: path) (functionTo (listOf path));
default = _: [];
example = literalExpression "ps: with ps; [ postgis pg_repack ]";
- description = lib.mdDoc ''
+ description = ''
List of PostgreSQL plugins.
'';
};
settings = mkOption {
- type = with types; attrsOf (oneOf [ bool float int str ]);
+ type = with types; submodule {
+ freeformType = attrsOf (oneOf [ bool float int str ]);
+ options = {
+ shared_preload_libraries = mkOption {
+ type = nullOr (coercedTo (listOf str) (concatStringsSep ", ") str);
+ default = null;
+ example = literalExpression ''[ "auto_explain" "anon" ]'';
+ description = ''
+ List of libraries to be preloaded.
+ '';
+ };
+
+ log_line_prefix = mkOption {
+ type = types.str;
+ default = "[%p] ";
+ example = "%m [%p] ";
+ description = ''
+ A printf-style string that is output at the beginning of each log line.
+ Upstream default is `'%m [%p] '`, i.e. it includes the timestamp. We do
+ not include the timestamp, because journal has it anyway.
+ '';
+ };
+
+ port = mkOption {
+ type = types.port;
+ default = 5432;
+ description = ''
+ The port on which PostgreSQL listens.
+ '';
+ };
+ };
+ };
default = {};
- description = lib.mdDoc ''
+ description = ''
PostgreSQL configuration. Refer to
for an overview of `postgresql.conf`.
@@ -426,7 +414,7 @@ in
recoveryConfig = mkOption {
type = types.nullOr types.lines;
default = null;
- description = lib.mdDoc ''
+ description = ''
Contents of the {file}`recovery.conf` file.
'';
};
@@ -436,7 +424,7 @@ in
default = "postgres";
internal = true;
readOnly = true;
- description = lib.mdDoc ''
+ description = ''
PostgreSQL superuser account to use for various operations. Internal since changing
this value would lead to breakage while setting up databases.
'';
@@ -460,25 +448,13 @@ in
Offender: ${name} has not been found among databases.
'';
}) cfg.ensureUsers;
- # `ensurePermissions` is now deprecated, let's avoid it.
- warnings = lib.optional (any ({ ensurePermissions, ... }: ensurePermissions != {}) cfg.ensureUsers) "
- `services.postgresql.ensureUsers.*.ensurePermissions` is used in your expressions,
- this option is known to be broken with newer PostgreSQL versions,
- consider migrating to `services.postgresql.ensureUsers.*.ensureDBOwnership` or
- consult the release notes or manual for more migration guidelines.
-
- This option will be removed in NixOS 24.05 unless it sees significant
- maintenance improvements.
- ";
services.postgresql.settings =
{
hba_file = "${pkgs.writeText "pg_hba.conf" cfg.authentication}";
ident_file = "${pkgs.writeText "pg_ident.conf" cfg.identMap}";
log_destination = "stderr";
- log_line_prefix = cfg.logLinePrefix;
listen_addresses = if cfg.enableTCPIP then "*" else "localhost";
- port = cfg.port;
jit = mkDefault (if cfg.enableJIT then "on" else "off");
};
@@ -561,7 +537,7 @@ in
# Wait for PostgreSQL to be ready to accept connections.
postStart =
''
- PSQL="psql --port=${toString cfg.port}"
+ PSQL="psql --port=${toString cfg.settings.port}"
while ! $PSQL -d postgres -c "" 2> /dev/null; do
if ! kill -0 "$MAINPID"; then exit 1; fi
@@ -583,11 +559,6 @@ in
concatMapStrings
(user:
let
- userPermissions = concatStringsSep "\n"
- (mapAttrsToList
- (database: permission: ''$PSQL -tAc 'GRANT ${permission} ON ${database} TO "${user.name}"' '')
- user.ensurePermissions
- );
dbOwnershipStmt = optionalString
user.ensureDBOwnership
''$PSQL -tAc 'ALTER DATABASE "${user.name}" OWNER TO "${user.name}";' '';
@@ -599,7 +570,6 @@ in
userClauses = ''$PSQL -tAc 'ALTER ROLE "${user.name}" ${concatStringsSep " " clauseSqlStatements}' '';
in ''
$PSQL -tAc "SELECT 1 FROM pg_roles WHERE rolname='${user.name}'" | grep -q 1 || $PSQL -tAc 'CREATE USER "${user.name}"'
- ${userPermissions}
${userClauses}
${dbOwnershipStmt}
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/redis.nix b/third_party/nixpkgs/nixos/modules/services/databases/redis.nix
index 2e644895a2..1da2fa9f11 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/redis.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/redis.nix
@@ -56,22 +56,22 @@ in {
services.redis = {
package = mkPackageOption pkgs "redis" { };
- vmOverCommit = mkEnableOption (lib.mdDoc ''
+ vmOverCommit = mkEnableOption ''
setting of vm.overcommit_memory to 1
(Suggested for Background Saving: )
- '');
+ '';
servers = mkOption {
type = with types; attrsOf (submodule ({ config, name, ... }: {
options = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
Redis server.
Note that the NixOS module for Redis disables kernel support
for Transparent Huge Pages (THP),
because this features causes major performance problems for Redis,
e.g. (https://redis.io/topics/latency)
- '');
+ '';
user = mkOption {
type = types.str;
@@ -79,14 +79,14 @@ in {
defaultText = literalExpression ''
if name == "" then "redis" else "redis-''${name}"
'';
- description = lib.mdDoc "The username and groupname for redis-server.";
+ description = "The username and groupname for redis-server.";
};
port = mkOption {
type = types.port;
default = if name == "" then 6379 else 0;
defaultText = literalExpression ''if name == "" then 6379 else 0'';
- description = lib.mdDoc ''
+ description = ''
The TCP port to accept connections.
If port 0 is specified Redis will not listen on a TCP socket.
'';
@@ -95,7 +95,7 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to open ports in the firewall for the server.
'';
};
@@ -103,14 +103,14 @@ in {
extraParams = mkOption {
type = with types; listOf str;
default = [];
- description = lib.mdDoc "Extra parameters to append to redis-server invocation";
+ description = "Extra parameters to append to redis-server invocation";
example = [ "--sentinel" ];
};
bind = mkOption {
type = with types; nullOr str;
default = "127.0.0.1";
- description = lib.mdDoc ''
+ description = ''
The IP interface to bind to.
`null` means "all interfaces".
'';
@@ -123,13 +123,13 @@ in {
defaultText = literalExpression ''
if name == "" then "/run/redis/redis.sock" else "/run/redis-''${name}/redis.sock"
'';
- description = lib.mdDoc "The path to the socket to bind to.";
+ description = "The path to the socket to bind to.";
};
unixSocketPerm = mkOption {
type = types.int;
default = 660;
- description = lib.mdDoc "Change permissions for the socket";
+ description = "Change permissions for the socket";
example = 600;
};
@@ -137,38 +137,38 @@ in {
type = types.str;
default = "notice"; # debug, verbose, notice, warning
example = "debug";
- description = lib.mdDoc "Specify the server verbosity level, options: debug, verbose, notice, warning.";
+ description = "Specify the server verbosity level, options: debug, verbose, notice, warning.";
};
logfile = mkOption {
type = types.str;
default = "/dev/null";
- description = lib.mdDoc "Specify the log file name. Also 'stdout' can be used to force Redis to log on the standard output.";
+ description = "Specify the log file name. Also 'stdout' can be used to force Redis to log on the standard output.";
example = "/var/log/redis.log";
};
syslog = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Enable logging to the system logger.";
+ description = "Enable logging to the system logger.";
};
databases = mkOption {
type = types.int;
default = 16;
- description = lib.mdDoc "Set the number of databases.";
+ description = "Set the number of databases.";
};
maxclients = mkOption {
type = types.int;
default = 10000;
- description = lib.mdDoc "Set the max number of connected clients at the same time.";
+ description = "Set the max number of connected clients at the same time.";
};
save = mkOption {
type = with types; listOf (listOf int);
default = [ [900 1] [300 10] [60 10000] ];
- description = mdDoc ''
+ description = ''
The schedule in which data is persisted to disk, represented as a list of lists where the first element represent the amount of seconds and the second the number of changes.
If set to the empty list (`[]`) then RDB persistence will be disabled (useful if you are using AOF or don't want any persistence).
@@ -180,27 +180,27 @@ in {
options = {
ip = mkOption {
type = str;
- description = lib.mdDoc "IP of the Redis master";
+ description = "IP of the Redis master";
example = "192.168.1.100";
};
port = mkOption {
type = port;
- description = lib.mdDoc "port of the Redis master";
+ description = "port of the Redis master";
default = 6379;
};
};
}));
default = null;
- description = lib.mdDoc "IP and port to which this redis instance acts as a slave.";
+ description = "IP and port to which this redis instance acts as a slave.";
example = { ip = "192.168.1.100"; port = 6379; };
};
masterAuth = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''If the master is password protected (using the requirePass configuration)
+ description = ''If the master is password protected (using the requirePass configuration)
it is possible to tell the slave to authenticate before starting the replication synchronization
process, otherwise the master will refuse the slave request.
(STORED PLAIN TEXT, WORLD-READABLE IN NIX STORE)'';
@@ -209,7 +209,7 @@ in {
requirePass = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Password for database (STORED PLAIN TEXT, WORLD-READABLE IN NIX STORE).
Use requirePassFile to store it outside of the nix store in a dedicated file.
'';
@@ -219,40 +219,40 @@ in {
requirePassFile = mkOption {
type = with types; nullOr path;
default = null;
- description = lib.mdDoc "File with password for the database.";
+ description = "File with password for the database.";
example = "/run/keys/redis-password";
};
appendOnly = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "By default data is only periodically persisted to disk, enable this option to use an append-only file for improved persistence.";
+ description = "By default data is only periodically persisted to disk, enable this option to use an append-only file for improved persistence.";
};
appendFsync = mkOption {
type = types.str;
default = "everysec"; # no, always, everysec
- description = lib.mdDoc "How often to fsync the append-only log, options: no, always, everysec.";
+ description = "How often to fsync the append-only log, options: no, always, everysec.";
};
slowLogLogSlowerThan = mkOption {
type = types.int;
default = 10000;
- description = lib.mdDoc "Log queries whose execution take longer than X in milliseconds.";
+ description = "Log queries whose execution take longer than X in milliseconds.";
example = 1000;
};
slowLogMaxLen = mkOption {
type = types.int;
default = 128;
- description = lib.mdDoc "Maximum number of items to keep in slow log.";
+ description = "Maximum number of items to keep in slow log.";
};
settings = mkOption {
# TODO: this should be converted to freeformType
type = with types; attrsOf (oneOf [ bool int str (listOf str) ]);
default = {};
- description = lib.mdDoc ''
+ description = ''
Redis configuration. Refer to
for details on supported values.
@@ -292,7 +292,7 @@ in {
(mkIf (config.requirePass != null) { requirepass = config.requirePass; })
];
}));
- description = lib.mdDoc "Configuration of multiple `redis-server` instances.";
+ description = "Configuration of multiple `redis-server` instances.";
default = {};
};
};
@@ -338,7 +338,7 @@ in {
after = [ "network.target" ];
serviceConfig = {
- ExecStart = "${cfg.package}/bin/redis-server /var/lib/${redisName name}/redis.conf ${escapeShellArgs conf.extraParams}";
+ ExecStart = "${cfg.package}/bin/${cfg.package.serverBin or "redis-server"} /var/lib/${redisName name}/redis.conf ${escapeShellArgs conf.extraParams}";
ExecStartPre = "+"+pkgs.writeShellScript "${redisName name}-prep-conf" (let
redisConfVar = "/var/lib/${redisName name}/redis.conf";
redisConfRun = "/run/${redisName name}/nixos.conf";
@@ -391,7 +391,8 @@ in {
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" "AF_UNIX" ];
RestrictNamespaces = true;
LockPersonality = true;
- MemoryDenyWriteExecute = true;
+ # we need to disable MemoryDenyWriteExecute for keydb
+ MemoryDenyWriteExecute = cfg.package.pname != "keydb";
RestrictRealtime = true;
RestrictSUIDSGID = true;
PrivateMounts = true;
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/rethinkdb.nix b/third_party/nixpkgs/nixos/modules/services/databases/rethinkdb.nix
index f5391b48e8..c764d6c21c 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/rethinkdb.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/rethinkdb.nix
@@ -15,7 +15,7 @@ in
services.rethinkdb = {
- enable = mkEnableOption (lib.mdDoc "RethinkDB server");
+ enable = mkEnableOption "RethinkDB server";
#package = mkOption {
# default = pkgs.rethinkdb;
@@ -24,22 +24,22 @@ in
user = mkOption {
default = "rethinkdb";
- description = lib.mdDoc "User account under which RethinkDB runs.";
+ description = "User account under which RethinkDB runs.";
};
group = mkOption {
default = "rethinkdb";
- description = lib.mdDoc "Group which rethinkdb user belongs to.";
+ description = "Group which rethinkdb user belongs to.";
};
dbpath = mkOption {
default = "/var/db/rethinkdb";
- description = lib.mdDoc "Location where RethinkDB stores its data, 1 data directory per instance.";
+ description = "Location where RethinkDB stores its data, 1 data directory per instance.";
};
pidpath = mkOption {
default = "/run/rethinkdb";
- description = lib.mdDoc "Location where each instance's pid file is located.";
+ description = "Location where each instance's pid file is located.";
};
#cfgpath = mkOption {
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/surrealdb.nix b/third_party/nixpkgs/nixos/modules/services/databases/surrealdb.nix
index 55216d022d..08a6cca043 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/surrealdb.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/surrealdb.nix
@@ -8,13 +8,13 @@ in {
options = {
services.surrealdb = {
- enable = mkEnableOption (lib.mdDoc "SurrealDB, a scalable, distributed, collaborative, document-graph database, for the realtime web");
+ enable = mkEnableOption "SurrealDB, a scalable, distributed, collaborative, document-graph database, for the realtime web";
package = mkPackageOption pkgs "surrealdb" { };
dbPath = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The path that surrealdb will write data to. Use null for in-memory.
Can be one of "memory", "file://:path", "tikv://:addr".
'';
@@ -24,7 +24,7 @@ in {
host = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The host that surrealdb will connect to.
'';
default = "127.0.0.1";
@@ -33,7 +33,7 @@ in {
port = mkOption {
type = types.port;
- description = lib.mdDoc ''
+ description = ''
The port that surrealdb will connect to.
'';
default = 8000;
@@ -44,7 +44,7 @@ in {
type = types.listOf types.str;
default = [];
example = [ "--allow-all" "--auth" "--user root" "--pass root" ];
- description = lib.mdDoc ''
+ description = ''
Specify a list of additional command line flags,
which get escaped and are then passed to surrealdb.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/tigerbeetle.md b/third_party/nixpkgs/nixos/modules/services/databases/tigerbeetle.md
index 47394d4430..12d920e7bc 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/tigerbeetle.md
+++ b/third_party/nixpkgs/nixos/modules/services/databases/tigerbeetle.md
@@ -7,8 +7,10 @@
TigerBeetle is a distributed financial accounting database designed for mission critical safety and performance.
To enable TigerBeetle, add the following to your {file}`configuration.nix`:
-```
+```nix
+{
services.tigerbeetle.enable = true;
+}
```
When first started, the TigerBeetle service will create its data file at {file}`/var/lib/tigerbeetle` unless the file already exists, in which case it will just use the existing file.
@@ -20,13 +22,15 @@ By default, TigerBeetle will only listen on a local interface.
To configure it to listen on a different interface (and to configure it to connect to other replicas, if you're creating more than one), you'll have to set the `addresses` option.
Note that the TigerBeetle module won't open any firewall ports automatically, so if you configure it to listen on an external interface, you'll need to ensure that connections can reach it:
-```
+```nix
+{
services.tigerbeetle = {
enable = true;
addresses = [ "0.0.0.0:3001" ];
};
networking.firewall.allowedTCPPorts = [ 3001 ];
+}
```
A complete list of options for TigerBeetle can be found [here](#opt-services.tigerbeetle.enable).
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/tigerbeetle.nix b/third_party/nixpkgs/nixos/modules/services/databases/tigerbeetle.nix
index b90a070317..a9c7a24250 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/tigerbeetle.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/tigerbeetle.nix
@@ -11,14 +11,14 @@ in
options = {
services.tigerbeetle = with lib; {
- enable = mkEnableOption (mdDoc "TigerBeetle server");
+ enable = mkEnableOption "TigerBeetle server";
package = mkPackageOption pkgs "tigerbeetle" { };
clusterId = mkOption {
type = types.either types.ints.unsigned (types.strMatching "[0-9]+");
default = 0;
- description = lib.mdDoc ''
+ description = ''
The 128-bit cluster ID used to create the replica data file (if needed).
Since Nix only supports integers up to 64 bits, you need to pass a string to this if the cluster ID can't fit in 64 bits.
Otherwise, you can pass the cluster ID as either an integer or a string.
@@ -28,7 +28,7 @@ in
replicaIndex = mkOption {
type = types.ints.unsigned;
default = 0;
- description = lib.mdDoc ''
+ description = ''
The index (starting at 0) of the replica in the cluster.
'';
};
@@ -36,7 +36,7 @@ in
replicaCount = mkOption {
type = types.ints.unsigned;
default = 1;
- description = lib.mdDoc ''
+ description = ''
The number of replicas participating in replication of the cluster.
'';
};
@@ -44,7 +44,7 @@ in
cacheGridSize = mkOption {
type = types.strMatching "[0-9]+(K|M|G)B";
default = "1GB";
- description = lib.mdDoc ''
+ description = ''
The grid cache size.
The grid cache acts like a page cache for TigerBeetle.
It is recommended to set this as large as possible.
@@ -54,7 +54,7 @@ in
addresses = mkOption {
type = types.listOf types.nonEmptyStr;
default = [ "3001" ];
- description = lib.mdDoc ''
+ description = ''
The addresses of all replicas in the cluster.
This should be a list of IPv4/IPv6 addresses with port numbers.
Either the address or port number (but not both) may be omitted, in which case a default of 127.0.0.1 or 3001 will be used.
diff --git a/third_party/nixpkgs/nixos/modules/services/databases/victoriametrics.nix b/third_party/nixpkgs/nixos/modules/services/databases/victoriametrics.nix
index 0ad2028c95..923163a804 100644
--- a/third_party/nixpkgs/nixos/modules/services/databases/victoriametrics.nix
+++ b/third_party/nixpkgs/nixos/modules/services/databases/victoriametrics.nix
@@ -2,26 +2,26 @@
let cfg = config.services.victoriametrics; in
{
options.services.victoriametrics = with lib; {
- enable = mkEnableOption (lib.mdDoc "victoriametrics");
+ enable = mkEnableOption "VictoriaMetrics, a time series database, long-term remote storage for Prometheus";
package = mkPackageOption pkgs "victoriametrics" { };
listenAddress = mkOption {
default = ":8428";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The listen address for the http interface.
'';
};
retentionPeriod = mkOption {
type = types.int;
default = 1;
- description = lib.mdDoc ''
+ description = ''
Retention period in months.
'';
};
extraOptions = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
Extra options to pass to VictoriaMetrics. See the README:
or {command}`victoriametrics -help` for more
diff --git a/third_party/nixpkgs/nixos/modules/services/desktop-managers/lomiri.nix b/third_party/nixpkgs/nixos/modules/services/desktop-managers/lomiri.nix
new file mode 100644
index 0000000000..e11867b691
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/services/desktop-managers/lomiri.nix
@@ -0,0 +1,171 @@
+{ config, pkgs, lib, ... }:
+
+let
+ cfg = config.services.desktopManager.lomiri;
+in {
+ options.services.desktopManager.lomiri = {
+ enable = lib.mkEnableOption ''
+ the Lomiri graphical shell (formerly known as Unity8)
+ '';
+ };
+
+ config = lib.mkIf cfg.enable {
+ environment = {
+ systemPackages = (with pkgs; [
+ glib # XDG MIME-related tools identify it as GNOME, add gio for MIME identification to work
+ libayatana-common
+ ubports-click
+ ]) ++ (with pkgs.lomiri; [
+ content-hub
+ hfd-service
+ history-service
+ libusermetrics
+ lomiri
+ lomiri-download-manager
+ lomiri-schemas # exposes some required dbus interfaces
+ lomiri-session # wrappers to properly launch the session
+ lomiri-sounds
+ lomiri-system-settings
+ lomiri-terminal-app
+ lomiri-thumbnailer
+ lomiri-url-dispatcher
+ lomiri-wallpapers
+ mediascanner2 # TODO possibly needs to be kicked off by graphical-session.target
+ morph-browser
+ qtmir # not having its desktop file for Xwayland available causes any X11 application to crash the session
+ suru-icon-theme
+ telephony-service
+ ]);
+ };
+
+ networking.networkmanager.enable = lib.mkDefault true;
+
+ systemd.packages = with pkgs.lomiri; [
+ hfd-service
+ lomiri-download-manager
+ ];
+
+ services.dbus.packages = with pkgs.lomiri; [
+ hfd-service
+ libusermetrics
+ lomiri-download-manager
+ ];
+
+ fonts.packages = with pkgs; [
+ # Applications tend to default to Ubuntu font
+ ubuntu_font_family
+ ];
+
+ # Copy-pasted basic stuff
+ hardware.opengl.enable = lib.mkDefault true;
+ fonts.enableDefaultPackages = lib.mkDefault true;
+ programs.dconf.enable = lib.mkDefault true;
+
+ # Xwayland is partly hardcoded in Mir so it can't really be fully turned off, and it must be on PATH for X11 apps *and Lomiri's web browser* to work.
+ # Until Mir/Lomiri can be properly used without it, force it on so everything behaves as expected.
+ programs.xwayland.enable = lib.mkForce true;
+
+ services.accounts-daemon.enable = true;
+
+ services.ayatana-indicators = {
+ enable = true;
+ packages = (with pkgs; [
+ ayatana-indicator-datetime
+ ayatana-indicator-messages
+ ayatana-indicator-session
+ ]) ++ (with pkgs.lomiri; [
+ telephony-service
+ ] ++ lib.optionals config.networking.networkmanager.enable [
+ lomiri-indicator-network
+ ]);
+ };
+
+ services.udisks2.enable = true;
+ services.upower.enable = true;
+ services.geoclue2.enable = true;
+
+ services.gnome.evolution-data-server = {
+ enable = true;
+ plugins = with pkgs; [
+ # TODO: lomiri.address-book-service
+ ];
+ };
+
+ services.telepathy.enable = true;
+
+ services.displayManager = {
+ defaultSession = lib.mkDefault "lomiri";
+ sessionPackages = with pkgs.lomiri; [ lomiri-session ];
+ };
+
+ services.xserver = {
+ enable = lib.mkDefault true;
+ displayManager.lightdm = {
+ enable = lib.mkDefault true;
+ greeters.lomiri.enable = lib.mkDefault true;
+ };
+ };
+
+ environment.pathsToLink = [
+ # Configs for inter-app data exchange system
+ "/share/content-hub/peers"
+ # Configs for inter-app URL requests
+ "/share/lomiri-url-dispatcher/urls"
+ # Splash screens & other images for desktop apps launched via lomiri-app-launch
+ "/share/lomiri-app-launch"
+ # TODO Try to get maliit stuff working
+ "/share/maliit/plugins"
+ # At least the network indicator is still under the unity name, due to leftover Unity-isms
+ "/share/unity"
+ # Data
+ "/share/locale" # TODO LUITK hardcoded default locale path, fix individual apps to not rely on it
+ "/share/sounds"
+ "/share/wallpapers"
+ ];
+
+ systemd.user.services = {
+ # Unconditionally run service that collects system-installed URL handlers before LUD
+ # TODO also run user-installed one?
+ "lomiri-url-dispatcher-update-system-dir" = {
+ description = "Lomiri URL dispatcher system directory updater";
+ wantedBy = [ "lomiri-url-dispatcher.service" ];
+ before = [ "lomiri-url-dispatcher.service" ];
+ serviceConfig = {
+ Type = "oneshot";
+ ExecStart = "${pkgs.lomiri.lomiri-url-dispatcher}/libexec/lomiri-url-dispatcher/lomiri-update-directory /run/current-system/sw/share/lomiri-url-dispatcher/urls/";
+ };
+ };
+ };
+
+ systemd.services = {
+ "dbus-com.lomiri.UserMetrics" = {
+ serviceConfig = {
+ Type = "dbus";
+ BusName = "com.lomiri.UserMetrics";
+ User = "usermetrics";
+ StandardOutput = "syslog";
+ SyslogIdentifier = "com.lomiri.UserMetrics";
+ ExecStart = "${pkgs.lomiri.libusermetrics}/libexec/libusermetrics/usermetricsservice";
+ } // lib.optionalAttrs (!config.security.apparmor.enable) {
+ # Due to https://gitlab.com/ubports/development/core/libusermetrics/-/issues/8, auth must be disabled when not using AppArmor, lest the next database usage breaks
+ Environment = "USERMETRICS_NO_AUTH=1";
+ };
+ };
+ };
+
+ users.users.usermetrics = {
+ group = "usermetrics";
+ home = "/var/lib/usermetrics";
+ createHome = true;
+ isSystemUser = true;
+ };
+
+ users.groups.usermetrics = { };
+
+ # TODO content-hub cannot pass files between applications without asking AA for permissions. And alot of the Lomiri stack is designed with AA availability in mind. This might be a requirement to be closer to upstream?
+ # But content-hub currently fails to pass files between applications even with AA enabled, and we can get away without AA in many places. Let's see how this develops before requiring this for good.
+ # security.apparmor.enable = true;
+ };
+
+ meta.maintainers = lib.teams.lomiri.members;
+}
diff --git a/third_party/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma6.nix b/third_party/nixpkgs/nixos/modules/services/desktop-managers/plasma6.nix
similarity index 78%
rename from third_party/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma6.nix
rename to third_party/nixpkgs/nixos/modules/services/desktop-managers/plasma6.nix
index bc246b1af2..856d36b8a3 100644
--- a/third_party/nixpkgs/nixos/modules/services/x11/desktop-managers/plasma6.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktop-managers/plasma6.nix
@@ -5,24 +5,28 @@
utils,
...
}: let
- xcfg = config.services.xserver;
- cfg = xcfg.desktopManager.plasma6;
+ cfg = config.services.desktopManager.plasma6;
inherit (pkgs) kdePackages;
inherit (lib) literalExpression mkDefault mkIf mkOption mkPackageOptionMD types;
+
+ activationScript = ''
+ # will be rebuilt automatically
+ rm -fv $HOME/.cache/ksycoca*
+ '';
in {
options = {
- services.xserver.desktopManager.plasma6 = {
+ services.desktopManager.plasma6 = {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable the Plasma 6 (KDE 6) desktop environment.";
+ description = "Enable the Plasma 6 (KDE 6) desktop environment.";
};
enableQt5Integration = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Enable Qt 5 integration (theming, etc). Disable for a pure Qt 6 system.";
+ description = "Enable Qt 5 integration (theming, etc). Disable for a pure Qt 6 system.";
};
notoPackage = mkPackageOptionMD pkgs "Noto fonts - used for UI by default" {
@@ -32,13 +36,19 @@ in {
};
environment.plasma6.excludePackages = mkOption {
- description = lib.mdDoc "List of default packages to exclude from the configuration";
+ description = "List of default packages to exclude from the configuration";
type = types.listOf types.package;
default = [];
example = literalExpression "[ pkgs.kdePackages.elisa ]";
};
};
+ imports = [
+ (lib.mkRenamedOptionModule [ "services" "xserver" "desktopManager" "plasma6" "enable" ] [ "services" "desktopManager" "plasma6" "enable" ])
+ (lib.mkRenamedOptionModule [ "services" "xserver" "desktopManager" "plasma6" "enableQt5Integration" ] [ "services" "desktopManager" "plasma6" "enableQt5Integration" ])
+ (lib.mkRenamedOptionModule [ "services" "xserver" "desktopManager" "plasma6" "notoPackage" ] [ "services" "desktopManager" "plasma6" "notoPackage" ])
+ ];
+
config = mkIf cfg.enable {
assertions = [
{
@@ -127,6 +137,7 @@ in {
spectacle
systemsettings
+ kcmutils
# Gear
baloo
@@ -155,10 +166,21 @@ in {
in
requiredPackages
++ utils.removePackagesByName optionalPackages config.environment.plasma6.excludePackages
- ++ lib.optionals config.services.xserver.desktopManager.plasma6.enableQt5Integration [
+ ++ lib.optionals config.services.desktopManager.plasma6.enableQt5Integration [
breeze.qt5
plasma-integration.qt5
pkgs.plasma5Packages.kwayland-integration
+ (
+ # Only symlink the KIO plugins, so we don't accidentally pull any services
+ # like KCMs or kcookiejar
+ let
+ kioPluginPath = "${pkgs.plasma5Packages.qtbase.qtPluginPrefix}/kf5/kio";
+ inherit (pkgs.plasma5Packages) kio;
+ in pkgs.runCommand "kio5-plugins-only" {} ''
+ mkdir -p $out/${kioPluginPath}
+ ln -s ${kio}/${kioPluginPath}/* $out/${kioPluginPath}
+ ''
+ )
kio-extras-kf5
]
# Optional hardware support features
@@ -169,7 +191,7 @@ in {
++ lib.optional config.powerManagement.enable powerdevil
++ lib.optional config.services.colord.enable colord-kde
++ lib.optional config.services.hardware.bolt.enable plasma-thunderbolt
- ++ lib.optionals config.services.samba.enable [kdenetwork-filesharing pkgs.samba]
+ ++ lib.optional config.services.samba.enable kdenetwork-filesharing
++ lib.optional config.services.xserver.wacom.enable wacomtablet
++ lib.optional config.services.flatpak.enable flatpak-kcm;
@@ -179,7 +201,7 @@ in {
"/libexec" # for drkonqi
];
- environment.etc."X11/xkb".source = xcfg.xkb.dir;
+ environment.etc."X11/xkb".source = config.services.xserver.xkb.dir;
# Add ~/.config/kdedefaults to XDG_CONFIG_DIRS for shells, since Plasma sets that.
# FIXME: maybe we should append to XDG_CONFIG_DIRS in /etc/set-environment instead?
@@ -204,6 +226,7 @@ in {
serif = ["Noto Serif"];
};
+ programs.gnupg.agent.pinentryPackage = mkDefault pkgs.pinentry-qt;
programs.ssh.askPassword = mkDefault "${kdePackages.ksshaskpass.out}/bin/ksshaskpass";
# Enable helpful DBus services.
@@ -233,13 +256,14 @@ in {
xdg.portal.configPackages = mkDefault [kdePackages.xdg-desktop-portal-kde];
services.pipewire.enable = mkDefault true;
- services.xserver.displayManager = {
+ services.displayManager = {
sessionPackages = [kdePackages.plasma-workspace];
defaultSession = mkDefault "plasma";
};
- services.xserver.displayManager.sddm = {
+ services.displayManager.sddm = {
package = kdePackages.sddm;
theme = mkDefault "breeze";
+ wayland.compositor = "kwin";
extraPackages = with kdePackages; [
breeze-icons
kirigami
@@ -272,5 +296,15 @@ in {
};
programs.kdeconnect.package = kdePackages.kdeconnect-kde;
+ programs.partition-manager.package = kdePackages.partitionmanager;
+
+ # FIXME: ugly hack. See #292632 for details.
+ system.userActivationScripts.rebuildSycoca = activationScript;
+ systemd.user.services.nixos-rebuild-sycoca = {
+ description = "Rebuild KDE system configuration cache";
+ wantedBy = [ "graphical-session-pre.target" ];
+ serviceConfig.Type = "oneshot";
+ script = activationScript;
+ };
};
}
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/accountsservice.nix b/third_party/nixpkgs/nixos/modules/services/desktops/accountsservice.nix
index af62850acd..ae2ecb5ffe 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/accountsservice.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/accountsservice.nix
@@ -19,7 +19,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable AccountsService, a DBus service for accessing
the list of user accounts and information attached to those accounts.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/ayatana-indicators.nix b/third_party/nixpkgs/nixos/modules/services/desktops/ayatana-indicators.nix
index abc687bbd4..613a2f03ea 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/ayatana-indicators.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/ayatana-indicators.nix
@@ -9,15 +9,15 @@ let
in
{
options.services.ayatana-indicators = {
- enable = lib.mkEnableOption (lib.mdDoc ''
+ enable = lib.mkEnableOption ''
Ayatana Indicators, a continuation of Canonical's Application Indicators
- '');
+ '';
packages = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [ ];
example = lib.literalExpression "with pkgs; [ ayatana-indicator-messages ]";
- description = lib.mdDoc ''
+ description = ''
List of packages containing Ayatana Indicator services
that should be brought up by the SystemD "ayatana-indicators" user target.
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/bamf.nix b/third_party/nixpkgs/nixos/modules/services/desktops/bamf.nix
index 3e40a70553..13de3a4432 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/bamf.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/bamf.nix
@@ -13,7 +13,7 @@ with lib;
options = {
services.bamf = {
- enable = mkEnableOption (lib.mdDoc "bamf");
+ enable = mkEnableOption "bamf";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/blueman.nix b/third_party/nixpkgs/nixos/modules/services/desktops/blueman.nix
index fad2f21bce..28c2daa719 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/blueman.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/blueman.nix
@@ -9,7 +9,7 @@ in {
###### interface
options = {
services.blueman = {
- enable = mkEnableOption (lib.mdDoc "blueman");
+ enable = mkEnableOption "blueman, a bluetooth manager";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/cpupower-gui.nix b/third_party/nixpkgs/nixos/modules/services/desktops/cpupower-gui.nix
index 47071aebce..f66afc0a3d 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/cpupower-gui.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/cpupower-gui.nix
@@ -11,7 +11,7 @@ in {
type = lib.types.bool;
default = false;
example = true;
- description = lib.mdDoc ''
+ description = ''
Enables dbus/systemd service needed by cpupower-gui.
These services are responsible for retrieving and modifying cpu power
saving settings.
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/deepin/app-services.nix b/third_party/nixpkgs/nixos/modules/services/desktops/deepin/app-services.nix
index a6c33af03e..4702274df3 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/deepin/app-services.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/deepin/app-services.nix
@@ -14,7 +14,7 @@ with lib;
services.deepin.app-services = {
- enable = mkEnableOption (lib.mdDoc "service collection of DDE applications, including dconfig-center");
+ enable = mkEnableOption "service collection of DDE applications, including dconfig-center";
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/deepin/dde-api.nix b/third_party/nixpkgs/nixos/modules/services/desktops/deepin/dde-api.nix
index 459876febf..36f9881fc7 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/deepin/dde-api.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/deepin/dde-api.nix
@@ -14,10 +14,10 @@ with lib;
services.deepin.dde-api = {
- enable = mkEnableOption (lib.mdDoc ''
- some dbus interfaces that is used for screen zone detecting,
+ enable = mkEnableOption ''
+ the DDE API, which provides some dbus interfaces that is used for screen zone detecting,
thumbnail generating, and sound playing in Deepin Desktop Environment
- '');
+ '';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/deepin/dde-daemon.nix b/third_party/nixpkgs/nixos/modules/services/desktops/deepin/dde-daemon.nix
index 356d323bcb..ed4cd15bc2 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/deepin/dde-daemon.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/deepin/dde-daemon.nix
@@ -14,7 +14,7 @@ with lib;
services.deepin.dde-daemon = {
- enable = mkEnableOption (lib.mdDoc "daemon for handling the deepin session settings");
+ enable = mkEnableOption "daemon for handling the deepin session settings";
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/dleyna-renderer.nix b/third_party/nixpkgs/nixos/modules/services/desktops/dleyna-renderer.nix
index daf65180b3..7f88605f62 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/dleyna-renderer.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/dleyna-renderer.nix
@@ -10,7 +10,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable dleyna-renderer service, a DBus service
for handling DLNA renderers.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/dleyna-server.nix b/third_party/nixpkgs/nixos/modules/services/desktops/dleyna-server.nix
index 9cbcd2a9cd..9a131a5e70 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/dleyna-server.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/dleyna-server.nix
@@ -10,7 +10,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable dleyna-server service, a DBus service
for handling DLNA servers.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/espanso.nix b/third_party/nixpkgs/nixos/modules/services/desktops/espanso.nix
index cbc4803479..4ef6724dda 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/espanso.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/espanso.nix
@@ -6,7 +6,7 @@ in {
meta = { maintainers = with lib.maintainers; [ numkem ]; };
options = {
- services.espanso = { enable = options.mkEnableOption (lib.mdDoc "Espanso"); };
+ services.espanso = { enable = options.mkEnableOption "Espanso"; };
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/flatpak.md b/third_party/nixpkgs/nixos/modules/services/desktops/flatpak.md
index af71d85b5a..5299b32a03 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/flatpak.md
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/flatpak.md
@@ -8,17 +8,21 @@ Flatpak is a system for building, distributing, and running sandboxed desktop
applications on Linux.
To enable Flatpak, add the following to your {file}`configuration.nix`:
-```
+```nix
+{
services.flatpak.enable = true;
+}
```
For the sandboxed apps to work correctly, desktop integration portals need to
be installed. If you run GNOME, this will be handled automatically for you;
in other cases, you will need to add something like the following to your
{file}`configuration.nix`:
-```
+```nix
+{
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
xdg.portal.config.common.default = "gtk";
+}
```
Then, you will need to add a repository, for example,
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/flatpak.nix b/third_party/nixpkgs/nixos/modules/services/desktops/flatpak.nix
index 4c26e68740..cda0a17d04 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/flatpak.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/flatpak.nix
@@ -14,7 +14,7 @@ in {
###### interface
options = {
services.flatpak = {
- enable = mkEnableOption (lib.mdDoc "flatpak");
+ enable = mkEnableOption "flatpak";
};
};
@@ -32,6 +32,8 @@ in {
security.polkit.enable = true;
+ fonts.fontDir.enable = true;
+
services.dbus.packages = [ pkgs.flatpak ];
systemd.packages = [ pkgs.flatpak ];
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/geoclue2.nix b/third_party/nixpkgs/nixos/modules/services/desktops/geoclue2.nix
index 2a68bb0b55..72a26933b2 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/geoclue2.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/geoclue2.nix
@@ -16,19 +16,19 @@ let
options = {
desktopID = mkOption {
type = types.str;
- description = lib.mdDoc "Desktop ID of the application.";
+ description = "Desktop ID of the application.";
};
isAllowed = mkOption {
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether the application will be allowed access to location information.
'';
};
isSystem = mkOption {
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether the application is a system component or not.
'';
};
@@ -36,7 +36,7 @@ let
users = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
List of UIDs of all users for which this application is allowed location
info access, Defaults to an empty string to allow it for all users.
'';
@@ -67,7 +67,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable GeoClue 2 daemon, a DBus service
that provides location information for accessing.
'';
@@ -76,7 +76,7 @@ in
enableDemoAgent = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to use the GeoClue demo agent. This should be
overridden by desktop environments that provide their own
agent.
@@ -86,7 +86,7 @@ in
enableNmea = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to fetch location from NMEA sources on local network.
'';
};
@@ -94,7 +94,7 @@ in
enable3G = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable 3G source.
'';
};
@@ -102,7 +102,7 @@ in
enableCDMA = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable CDMA source.
'';
};
@@ -110,7 +110,7 @@ in
enableModemGPS = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Modem-GPS source.
'';
};
@@ -118,7 +118,7 @@ in
enableWifi = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable WiFi source.
'';
};
@@ -127,7 +127,7 @@ in
type = types.str;
default = "https://location.services.mozilla.com/v1/geolocate?key=geoclue";
example = "https://www.googleapis.com/geolocation/v1/geolocate?key=YOUR_KEY";
- description = lib.mdDoc ''
+ description = ''
The url to the wifi GeoLocation Service.
'';
};
@@ -135,7 +135,7 @@ in
submitData = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to submit data to a GeoLocation Service.
'';
};
@@ -143,7 +143,7 @@ in
submissionUrl = mkOption {
type = types.str;
default = "https://location.services.mozilla.com/v1/submit?key=geoclue";
- description = lib.mdDoc ''
+ description = ''
The url to submit data to a GeoLocation Service.
'';
};
@@ -151,7 +151,7 @@ in
submissionNick = mkOption {
type = types.str;
default = "geoclue";
- description = lib.mdDoc ''
+ description = ''
A nickname to submit network data with.
Must be 2-32 characters long.
'';
@@ -167,7 +167,7 @@ in
users = [ "300" ];
};
'';
- description = lib.mdDoc ''
+ description = ''
Specify extra settings per application.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/at-spi2-core.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/at-spi2-core.nix
index d0320c1e63..446f363fce 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/at-spi2-core.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/at-spi2-core.nix
@@ -27,7 +27,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable at-spi2-core, a service for the Assistive Technologies
available on the GNOME platform.
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/evolution-data-server.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/evolution-data-server.nix
index a8db7dce8f..34a91170d4 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/evolution-data-server.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/evolution-data-server.nix
@@ -27,20 +27,20 @@ with lib;
options = {
services.gnome.evolution-data-server = {
- enable = mkEnableOption (lib.mdDoc "Evolution Data Server, a collection of services for storing addressbooks and calendars");
+ enable = mkEnableOption "Evolution Data Server, a collection of services for storing addressbooks and calendars";
plugins = mkOption {
type = types.listOf types.package;
default = [ ];
- description = lib.mdDoc "Plugins for Evolution Data Server.";
+ description = "Plugins for Evolution Data Server.";
};
};
programs.evolution = {
- enable = mkEnableOption (lib.mdDoc "Evolution, a Personal information management application that provides integrated mail, calendaring and address book functionality");
+ enable = mkEnableOption "Evolution, a Personal information management application that provides integrated mail, calendaring and address book functionality";
plugins = mkOption {
type = types.listOf types.package;
default = [ ];
example = literalExpression "[ pkgs.evolution-ews ]";
- description = lib.mdDoc "Plugins for Evolution.";
+ description = "Plugins for Evolution.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/glib-networking.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/glib-networking.nix
index 6b54f46f0c..1039605391 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/glib-networking.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/glib-networking.nix
@@ -24,7 +24,7 @@ with lib;
services.gnome.glib-networking = {
- enable = mkEnableOption (lib.mdDoc "network extensions for GLib");
+ enable = mkEnableOption "network extensions for GLib";
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-browser-connector.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-browser-connector.nix
index 4f680eabbe..34fc24f7d5 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-browser-connector.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-browser-connector.nix
@@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
let
- inherit (lib) mdDoc mkEnableOption mkIf mkRenamedOptionModule teams;
+ inherit (lib) mkEnableOption mkIf mkRenamedOptionModule teams;
in
{
@@ -23,10 +23,10 @@ in
];
options = {
- services.gnome.gnome-browser-connector.enable = mkEnableOption (mdDoc ''
+ services.gnome.gnome-browser-connector.enable = mkEnableOption ''
native host connector for the GNOME Shell browser extension, a DBus service
allowing to install GNOME Shell extensions from a web browser
- '');
+ '';
};
config = mkIf config.services.gnome.gnome-browser-connector.enable {
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-initial-setup.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-initial-setup.nix
index 6eaf861e49..ceda493374 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-initial-setup.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-initial-setup.nix
@@ -62,7 +62,7 @@ in
services.gnome.gnome-initial-setup = {
- enable = mkEnableOption (lib.mdDoc "GNOME Initial Setup, a Simple, easy, and safe way to prepare a new system");
+ enable = mkEnableOption "GNOME Initial Setup, a Simple, easy, and safe way to prepare a new system";
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-keyring.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-keyring.nix
index 6c7e713b32..d821da164b 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-keyring.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-keyring.nix
@@ -27,7 +27,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable GNOME Keyring daemon, a service designed to
take care of the user's security credentials,
such as user names and passwords.
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-online-accounts.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-online-accounts.nix
index ed5e000cae..01f7e3695c 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-online-accounts.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-online-accounts.nix
@@ -27,7 +27,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable GNOME Online Accounts daemon, a service that provides
a single sign-on framework for the GNOME desktop.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-online-miners.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-online-miners.nix
index 7cf1bfa1b0..5f9039f68c 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-online-miners.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-online-miners.nix
@@ -27,7 +27,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable GNOME Online Miners, a service that
crawls through your online content.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-remote-desktop.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-remote-desktop.nix
index 0a5b67eb27..b5573d2fc2 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-remote-desktop.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-remote-desktop.nix
@@ -19,7 +19,7 @@ with lib;
###### interface
options = {
services.gnome.gnome-remote-desktop = {
- enable = mkEnableOption (lib.mdDoc "Remote Desktop support using Pipewire");
+ enable = mkEnableOption "Remote Desktop support using Pipewire";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-settings-daemon.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-settings-daemon.nix
index ca739b06a5..9c68c9b76e 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-settings-daemon.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-settings-daemon.nix
@@ -34,7 +34,7 @@ in
services.gnome.gnome-settings-daemon = {
- enable = mkEnableOption (lib.mdDoc "GNOME Settings Daemon");
+ enable = mkEnableOption "GNOME Settings Daemon";
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-user-share.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-user-share.nix
index 0c88d13b34..38256af309 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-user-share.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/gnome-user-share.nix
@@ -24,7 +24,7 @@ with lib;
services.gnome.gnome-user-share = {
- enable = mkEnableOption (lib.mdDoc "GNOME User Share, a user-level file sharing service for GNOME");
+ enable = mkEnableOption "GNOME User Share, a user-level file sharing service for GNOME";
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/rygel.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/rygel.nix
index 9c0faaa488..8932d438cf 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/rygel.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/rygel.nix
@@ -21,7 +21,7 @@ with lib;
services.gnome.rygel = {
enable = mkOption {
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Rygel UPnP Mediaserver.
You will need to also allow UPnP connections in firewall, see the following [comment](https://github.com/NixOS/nixpkgs/pull/45045#issuecomment-416030795).
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/sushi.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/sushi.nix
index 446851f434..3133a3a0d9 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/sushi.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/sushi.nix
@@ -27,7 +27,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Sushi, a quick previewer for nautilus.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/tracker-miners.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/tracker-miners.nix
index a3c58f3742..9351007d30 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/tracker-miners.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/tracker-miners.nix
@@ -27,7 +27,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Tracker miners, indexing services for Tracker
search engine and metadata storage system.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/tracker.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/tracker.nix
index e6404c84a2..fef399d011 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gnome/tracker.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gnome/tracker.nix
@@ -30,7 +30,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Tracker services, a search engine,
search tool and metadata storage system.
'';
@@ -40,7 +40,7 @@ in
type = types.listOf types.package;
default = [ ];
internal = true;
- description = lib.mdDoc ''
+ description = ''
List of packages containing tracker3 subcommands.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gsignond.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gsignond.nix
index cf80fd7545..465acd73fa 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gsignond.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gsignond.nix
@@ -20,7 +20,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable gSignOn daemon, a DBus service
which performs user authentication on behalf of its clients.
'';
@@ -29,7 +29,7 @@ in
plugins = mkOption {
type = types.listOf types.package;
default = [];
- description = lib.mdDoc ''
+ description = ''
What plugins to use with the gSignOn daemon.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/gvfs.nix b/third_party/nixpkgs/nixos/modules/services/desktops/gvfs.nix
index a4770d703f..09ac06d9f6 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/gvfs.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/gvfs.nix
@@ -29,7 +29,7 @@ in
services.gvfs = {
- enable = mkEnableOption (lib.mdDoc "GVfs, a userspace virtual filesystem");
+ enable = mkEnableOption "GVfs, a userspace virtual filesystem";
# gvfs can be built with multiple configurations
package = mkPackageOption pkgs [ "gnome" "gvfs" ] { };
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/malcontent.nix b/third_party/nixpkgs/nixos/modules/services/desktops/malcontent.nix
index 27b4577f4c..1fbeb17e6a 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/malcontent.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/malcontent.nix
@@ -12,7 +12,7 @@ with lib;
services.malcontent = {
- enable = mkEnableOption (lib.mdDoc "Malcontent, parental control support for applications");
+ enable = mkEnableOption "Malcontent, parental control support for applications";
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/neard.nix b/third_party/nixpkgs/nixos/modules/services/desktops/neard.nix
index 9130b8d3d2..5459d2e5a1 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/neard.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/neard.nix
@@ -7,7 +7,7 @@ with lib;
###### interface
options = {
services.neard = {
- enable = mkEnableOption (lib.mdDoc "neard, NFC daemon");
+ enable = mkEnableOption "neard, an NFC daemon";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/pipewire/pipewire.nix b/third_party/nixpkgs/nixos/modules/services/desktops/pipewire/pipewire.nix
index 8f3ad78d50..5c6eba889e 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/pipewire/pipewire.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/pipewire/pipewire.nix
@@ -1,14 +1,21 @@
# PipeWire service.
{ config, lib, pkgs, ... }:
-with lib;
-
let
+ inherit (builtins) attrNames concatMap length;
+ inherit (lib) maintainers teams;
+ inherit (lib.attrsets) attrByPath attrsToList concatMapAttrs filterAttrs;
+ inherit (lib.lists) flatten optional optionals;
+ inherit (lib.modules) mkIf mkRemovedOptionModule;
+ inherit (lib.options) literalExpression mkEnableOption mkOption mkPackageOption;
+ inherit (lib.strings) concatMapStringsSep hasPrefix optionalString;
+ inherit (lib.types) attrsOf bool listOf package;
+
json = pkgs.formats.json {};
mapToFiles = location: config: concatMapAttrs (name: value: { "share/pipewire/${location}.conf.d/${name}.conf" = json.generate "${name}" value; }) config;
extraConfigPkgFromFiles = locations: filesSet: pkgs.runCommand "pipewire-extra-config" { } ''
- mkdir -p ${lib.concatMapStringsSep " " (l: "$out/share/pipewire/${l}.conf.d") locations}
- ${lib.concatMapStringsSep ";" ({name, value}: "ln -s ${value} $out/${name}") (lib.attrsToList filesSet)}
+ mkdir -p ${concatMapStringsSep " " (l: "$out/share/pipewire/${l}.conf.d") locations}
+ ${concatMapStringsSep ";" ({name, value}: "ln -s ${value} $out/${name}") (attrsToList filesSet)}
'';
cfg = config.services.pipewire;
enable32BitAlsaPlugins = cfg.alsa.support32Bit
@@ -40,15 +47,15 @@ let
name = "pipewire-configs";
paths = configPackages
++ [ extraConfigPkg ]
- ++ lib.optionals cfg.wireplumber.enable cfg.wireplumber.configPackages;
+ ++ optionals cfg.wireplumber.enable cfg.wireplumber.configPackages;
pathsToLink = [ "/share/pipewire" ];
};
- requiredLv2Packages = lib.flatten
+ requiredLv2Packages = flatten
(
- lib.concatMap
+ concatMap
(p:
- lib.attrByPath ["passthru" "requiredLv2Packages"] [] p
+ attrByPath ["passthru" "requiredLv2Packages"] [] p
)
configPackages
);
@@ -59,50 +66,58 @@ let
pathsToLink = [ "/lib/lv2" ];
};
in {
- meta.maintainers = teams.freedesktop.members ++ [ lib.maintainers.k900 ];
+ meta.maintainers = teams.freedesktop.members ++ [ maintainers.k900 ];
###### interface
options = {
services.pipewire = {
- enable = mkEnableOption (lib.mdDoc "PipeWire service");
+ enable = mkEnableOption "PipeWire service";
package = mkPackageOption pkgs "pipewire" { };
socketActivation = mkOption {
default = true;
- type = types.bool;
- description = lib.mdDoc ''
+ type = bool;
+ description = ''
Automatically run PipeWire when connections are made to the PipeWire socket.
'';
};
audio = {
- enable = lib.mkOption {
- type = lib.types.bool;
+ enable = mkOption {
+ type = bool;
# this is for backwards compatibility
default = cfg.alsa.enable || cfg.jack.enable || cfg.pulse.enable;
- defaultText = lib.literalExpression "config.services.pipewire.alsa.enable || config.services.pipewire.jack.enable || config.services.pipewire.pulse.enable";
- description = lib.mdDoc "Whether to use PipeWire as the primary sound server";
+ defaultText = literalExpression "config.services.pipewire.alsa.enable || config.services.pipewire.jack.enable || config.services.pipewire.pulse.enable";
+ description = "Whether to use PipeWire as the primary sound server";
};
};
alsa = {
- enable = mkEnableOption (lib.mdDoc "ALSA support");
- support32Bit = mkEnableOption (lib.mdDoc "32-bit ALSA support on 64-bit systems");
+ enable = mkEnableOption "ALSA support";
+ support32Bit = mkEnableOption "32-bit ALSA support on 64-bit systems";
};
jack = {
- enable = mkEnableOption (lib.mdDoc "JACK audio emulation");
+ enable = mkEnableOption "JACK audio emulation";
+ };
+
+ raopOpenFirewall = mkOption {
+ type = bool;
+ default = false;
+ description = ''
+ Opens UDP/6001-6002, required by RAOP/Airplay for timing and control data.
+ '';
};
pulse = {
- enable = mkEnableOption (lib.mdDoc "PulseAudio server emulation");
+ enable = mkEnableOption "PulseAudio server emulation";
};
- systemWide = lib.mkOption {
- type = lib.types.bool;
+ systemWide = mkOption {
+ type = bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If true, a system-wide PipeWire service and socket is enabled
allowing all users in the "pipewire" group to use it simultaneously.
If false, then user units are used instead, restricting access to
@@ -116,7 +131,7 @@ in {
extraConfig = {
pipewire = mkOption {
- type = lib.types.attrsOf json.type;
+ type = attrsOf json.type;
default = {};
example = {
"10-clock-rate" = {
@@ -130,7 +145,7 @@ in {
};
};
};
- description = lib.mdDoc ''
+ description = ''
Additional configuration for the PipeWire server.
Every item in this attrset becomes a separate drop-in file in `/etc/pipewire/pipewire.conf.d`.
@@ -149,7 +164,7 @@ in {
'';
};
client = mkOption {
- type = lib.types.attrsOf json.type;
+ type = attrsOf json.type;
default = {};
example = {
"10-no-resample" = {
@@ -158,7 +173,7 @@ in {
};
};
};
- description = lib.mdDoc ''
+ description = ''
Additional configuration for the PipeWire client library, used by most applications.
Every item in this attrset becomes a separate drop-in file in `/etc/pipewire/client.conf.d`.
@@ -169,7 +184,7 @@ in {
'';
};
client-rt = mkOption {
- type = lib.types.attrsOf json.type;
+ type = attrsOf json.type;
default = {};
example = {
"10-alsa-linear-volume" = {
@@ -178,7 +193,7 @@ in {
};
};
};
- description = lib.mdDoc ''
+ description = ''
Additional configuration for the PipeWire client library, used by real-time applications and legacy ALSA clients.
Every item in this attrset becomes a separate drop-in file in `/etc/pipewire/client-rt.conf.d`.
@@ -190,7 +205,7 @@ in {
'';
};
jack = mkOption {
- type = lib.types.attrsOf json.type;
+ type = attrsOf json.type;
default = {};
example = {
"20-hide-midi" = {
@@ -199,7 +214,7 @@ in {
};
};
};
- description = lib.mdDoc ''
+ description = ''
Additional configuration for the PipeWire JACK server and client library.
Every item in this attrset becomes a separate drop-in file in `/etc/pipewire/jack.conf.d`.
@@ -210,7 +225,7 @@ in {
'';
};
pipewire-pulse = mkOption {
- type = lib.types.attrsOf json.type;
+ type = attrsOf json.type;
default = {};
example = {
"15-force-s16-info" = {
@@ -224,7 +239,7 @@ in {
}];
};
};
- description = lib.mdDoc ''
+ description = ''
Additional configuration for the PipeWire PulseAudio server.
Every item in this attrset becomes a separate drop-in file in `/etc/pipewire/pipewire-pulse.conf.d`.
@@ -240,25 +255,51 @@ in {
};
};
- configPackages = lib.mkOption {
- type = lib.types.listOf lib.types.package;
+ configPackages = mkOption {
+ type = listOf package;
default = [];
- description = lib.mdDoc ''
+ example = literalExpression ''[
+ (pkgs.writeTextDir "share/pipewire/pipewire.conf.d/10-loopback.conf" '''
+ context.modules = [
+ { name = libpipewire-module-loopback
+ args = {
+ node.description = "Scarlett Focusrite Line 1"
+ capture.props = {
+ audio.position = [ FL ]
+ stream.dont-remix = true
+ node.target = "alsa_input.usb-Focusrite_Scarlett_Solo_USB_Y7ZD17C24495BC-00.analog-stereo"
+ node.passive = true
+ }
+ playback.props = {
+ node.name = "SF_mono_in_1"
+ media.class = "Audio/Source"
+ audio.position = [ MONO ]
+ }
+ }
+ }
+ ]
+ ''')
+ ]'';
+ description = ''
List of packages that provide PipeWire configuration, in the form of
`share/pipewire/*/*.conf` files.
+
+ LV2 dependencies will be picked up from config packages automatically
+ via `passthru.requiredLv2Packages`.
'';
};
- extraLv2Packages = lib.mkOption {
- type = lib.types.listOf lib.types.package;
+ extraLv2Packages = mkOption {
+ type = listOf package;
default = [];
- example = lib.literalExpression "[ pkgs.lsp-plugins ]";
- description = lib.mdDoc ''
+ example = literalExpression "[ pkgs.lsp-plugins ]";
+ description = ''
List of packages that provide LV2 plugins in `lib/lv2` that should
be made available to PipeWire for [filter chains][wiki-filter-chain].
Config packages have their required LV2 plugins added automatically,
- so they don't need to be specified here.
+ so they don't need to be specified here. Config packages need to set
+ `passthru.requiredLv2Packages` for this to work.
[wiki-filter-chain]: https://docs.pipewire.org/page_module_filter_chain.html
'';
@@ -267,11 +308,11 @@ in {
};
imports = [
- (lib.mkRemovedOptionModule ["services" "pipewire" "config"] ''
+ (mkRemovedOptionModule ["services" "pipewire" "config"] ''
Overriding default PipeWire configuration through NixOS options never worked correctly and is no longer supported.
Please create drop-in configuration files via `services.pipewire.extraConfig` instead.
'')
- (lib.mkRemovedOptionModule ["services" "pipewire" "media-session"] ''
+ (mkRemovedOptionModule ["services" "pipewire" "media-session"] ''
pipewire-media-session is no longer supported upstream and has been removed.
Please switch to `services.pipewire.wireplumber` instead.
'')
@@ -294,12 +335,12 @@ in {
message = "Using PipeWire's ALSA/PulseAudio compatibility layers requires running PipeWire as the sound server. Set `services.pipewire.audio.enable` to true.";
}
{
- assertion = builtins.length
- (builtins.attrNames
+ assertion = length
+ (attrNames
(
- lib.filterAttrs
+ filterAttrs
(name: value:
- lib.hasPrefix "pipewire/" name || name == "pipewire"
+ hasPrefix "pipewire/" name || name == "pipewire"
)
config.environment.etc
)) == 1;
@@ -308,7 +349,7 @@ in {
];
environment.systemPackages = [ cfg.package ]
- ++ lib.optional cfg.jack.enable jack-libs;
+ ++ optional cfg.jack.enable jack-libs;
systemd.packages = [ cfg.package ];
@@ -324,16 +365,16 @@ in {
systemd.user.sockets.pipewire.enable = !cfg.systemWide;
systemd.user.services.pipewire.enable = !cfg.systemWide;
- systemd.services.pipewire.environment.LV2_PATH = lib.mkIf cfg.systemWide "${lv2Plugins}/lib/lv2";
- systemd.user.services.pipewire.environment.LV2_PATH = lib.mkIf (!cfg.systemWide) "${lv2Plugins}/lib/lv2";
+ systemd.services.pipewire.environment.LV2_PATH = mkIf cfg.systemWide "${lv2Plugins}/lib/lv2";
+ systemd.user.services.pipewire.environment.LV2_PATH = mkIf (!cfg.systemWide) "${lv2Plugins}/lib/lv2";
# Mask pw-pulse if it's not wanted
systemd.user.services.pipewire-pulse.enable = cfg.pulse.enable;
systemd.user.sockets.pipewire-pulse.enable = cfg.pulse.enable;
- systemd.sockets.pipewire.wantedBy = lib.mkIf cfg.socketActivation [ "sockets.target" ];
- systemd.user.sockets.pipewire.wantedBy = lib.mkIf cfg.socketActivation [ "sockets.target" ];
- systemd.user.sockets.pipewire-pulse.wantedBy = lib.mkIf cfg.socketActivation [ "sockets.target" ];
+ systemd.sockets.pipewire.wantedBy = mkIf cfg.socketActivation [ "sockets.target" ];
+ systemd.user.sockets.pipewire.wantedBy = mkIf cfg.socketActivation [ "sockets.target" ];
+ systemd.user.sockets.pipewire-pulse.wantedBy = mkIf cfg.socketActivation [ "sockets.target" ];
services.udev.packages = [ cfg.package ];
@@ -365,16 +406,18 @@ in {
};
environment.sessionVariables.LD_LIBRARY_PATH =
- lib.mkIf cfg.jack.enable [ "${cfg.package.jack}/lib" ];
+ mkIf cfg.jack.enable [ "${cfg.package.jack}/lib" ];
- users = lib.mkIf cfg.systemWide {
+ networking.firewall.allowedUDPPorts = mkIf cfg.raopOpenFirewall [ 6001 6002 ];
+
+ users = mkIf cfg.systemWide {
users.pipewire = {
uid = config.ids.uids.pipewire;
group = "pipewire";
extraGroups = [
"audio"
"video"
- ] ++ lib.optional config.security.rtkit.enable "rtkit";
+ ] ++ optional config.security.rtkit.enable "rtkit";
description = "PipeWire system service user";
isSystemUser = true;
home = "/var/lib/pipewire";
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/pipewire/wireplumber.nix b/third_party/nixpkgs/nixos/modules/services/desktops/pipewire/wireplumber.nix
index 99aea8facb..6ab62eb03c 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/pipewire/wireplumber.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/pipewire/wireplumber.nix
@@ -1,48 +1,71 @@
{ config, lib, pkgs, ... }:
let
+ inherit (builtins) attrNames concatMap length;
+ inherit (lib) maintainers;
+ inherit (lib.attrsets) attrByPath filterAttrs;
+ inherit (lib.lists) flatten optional;
+ inherit (lib.modules) mkIf;
+ inherit (lib.options) literalExpression mkOption;
+ inherit (lib.strings) hasPrefix;
+ inherit (lib.types) bool listOf package;
+
pwCfg = config.services.pipewire;
cfg = pwCfg.wireplumber;
pwUsedForAudio = pwCfg.audio.enable;
in
{
- meta.maintainers = [ lib.maintainers.k900 ];
+ meta.maintainers = [ maintainers.k900 ];
options = {
services.pipewire.wireplumber = {
- enable = lib.mkOption {
- type = lib.types.bool;
- default = config.services.pipewire.enable;
- defaultText = lib.literalExpression "config.services.pipewire.enable";
- description = lib.mdDoc "Whether to enable WirePlumber, a modular session / policy manager for PipeWire";
+ enable = mkOption {
+ type = bool;
+ default = pwCfg.enable;
+ defaultText = literalExpression "config.services.pipewire.enable";
+ description = "Whether to enable WirePlumber, a modular session / policy manager for PipeWire";
};
- package = lib.mkOption {
- type = lib.types.package;
+ package = mkOption {
+ type = package;
default = pkgs.wireplumber;
- defaultText = lib.literalExpression "pkgs.wireplumber";
- description = lib.mdDoc "The WirePlumber derivation to use.";
+ defaultText = literalExpression "pkgs.wireplumber";
+ description = "The WirePlumber derivation to use.";
};
- configPackages = lib.mkOption {
- type = lib.types.listOf lib.types.package;
+ configPackages = mkOption {
+ type = listOf package;
default = [ ];
- description = lib.mdDoc ''
+ example = literalExpression ''[
+ (pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/10-bluez.conf" '''
+ monitor.bluez.properties = {
+ bluez5.roles = [ a2dp_sink a2dp_source bap_sink bap_source hsp_hs hsp_ag hfp_hf hfp_ag ]
+ bluez5.codecs = [ sbc sbc_xq aac ]
+ bluez5.enable-sbc-xq = true
+ bluez5.hfphsp-backend = "native"
+ }
+ ''')
+ ]'';
+ description = ''
List of packages that provide WirePlumber configuration, in the form of
- `share/wireplumber/*/*.lua` files.
+ `share/wireplumber/*/*.conf` files.
+
+ LV2 dependencies will be picked up from config packages automatically
+ via `passthru.requiredLv2Packages`.
'';
};
- extraLv2Packages = lib.mkOption {
- type = lib.types.listOf lib.types.package;
+ extraLv2Packages = mkOption {
+ type = listOf package;
default = [];
- example = lib.literalExpression "[ pkgs.lsp-plugins ]";
- description = lib.mdDoc ''
+ example = literalExpression "[ pkgs.lsp-plugins ]";
+ description = ''
List of packages that provide LV2 plugins in `lib/lv2` that should
be made available to WirePlumber for [filter chains][wiki-filter-chain].
Config packages have their required LV2 plugins added automatically,
- so they don't need to be specified here.
+ so they don't need to be specified here. Config packages need to set
+ `passthru.requiredLv2Packages` for this to work.
[wiki-filter-chain]: https://docs.pipewire.org/page_module_filter_chain.html
'';
@@ -52,24 +75,30 @@ in
config =
let
- pwNotForAudioConfigPkg = pkgs.writeTextDir "share/wireplumber/main.lua.d/80-pw-not-for-audio.lua" ''
- -- PipeWire is not used for audio, so prevent it from grabbing audio devices
- alsa_monitor.enable = function() end
+ pwNotForAudioConfigPkg = pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/90-nixos-no-audio.conf" ''
+ # PipeWire is not used for audio, so WirePlumber should not be handling it
+ wireplumber.profiles = {
+ main = {
+ hardware.audio = disabled
+ hardware.bluetooth = disabled
+ }
+ }
'';
- systemwideConfigPkg = pkgs.writeTextDir "share/wireplumber/main.lua.d/80-systemwide.lua" ''
- -- When running system-wide, these settings need to be disabled (they
- -- use functions that aren't available on the system dbus).
- alsa_monitor.properties["alsa.reserve"] = false
- default_access.properties["enable-flatpak-portal"] = false
- '';
- systemwideBluetoothConfigPkg = pkgs.writeTextDir "share/wireplumber/bluetooth.lua.d/80-systemwide.lua" ''
- -- When running system-wide, logind-integration needs to be disabled.
- bluez_monitor.properties["with-logind"] = false
+
+ systemwideConfigPkg = pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/90-nixos-systemwide.conf" ''
+ # When running system-wide, we don't have logind to call ReserveDevice,
+ # And bluetooth logind integration needs to be disabled
+ wireplumber.profiles = {
+ main = {
+ support.reserve-device = disabled
+ monitor.bluez.seat-monitoring = disabled
+ }
+ }
'';
configPackages = cfg.configPackages
- ++ lib.optional (!pwUsedForAudio) pwNotForAudioConfigPkg
- ++ lib.optionals config.services.pipewire.systemWide [ systemwideConfigPkg systemwideBluetoothConfigPkg ];
+ ++ optional (!pwUsedForAudio) pwNotForAudioConfigPkg
+ ++ optional pwCfg.systemWide systemwideConfigPkg;
configs = pkgs.buildEnv {
name = "wireplumber-configs";
@@ -77,11 +106,11 @@ in
pathsToLink = [ "/share/wireplumber" ];
};
- requiredLv2Packages = lib.flatten
+ requiredLv2Packages = flatten
(
- lib.concatMap
+ concatMap
(p:
- lib.attrByPath ["passthru" "requiredLv2Packages"] [] p
+ attrByPath ["passthru" "requiredLv2Packages"] [] p
)
configPackages
);
@@ -92,23 +121,23 @@ in
pathsToLink = [ "/lib/lv2" ];
};
in
- lib.mkIf cfg.enable {
+ mkIf cfg.enable {
assertions = [
{
assertion = !config.hardware.bluetooth.hsphfpd.enable;
message = "Using WirePlumber conflicts with hsphfpd, as it provides the same functionality. `hardware.bluetooth.hsphfpd.enable` needs be set to false";
}
{
- assertion = builtins.length
- (builtins.attrNames
+ assertion = length
+ (attrNames
(
- lib.filterAttrs
+ filterAttrs
(name: value:
- lib.hasPrefix "wireplumber/" name || name == "wireplumber"
+ hasPrefix "wireplumber/" name || name == "wireplumber"
)
config.environment.etc
)) == 1;
- message = "Using `environment.etc.\"wireplumber<...>\"` directly is no longer supported in 24.05. Use `services.wireplumber.configPackages` instead.";
+ message = "Using `environment.etc.\"wireplumber<...>\"` directly is no longer supported in 24.05. Use `services.pipewire.wireplumber.configPackages` instead.";
}
];
@@ -118,19 +147,19 @@ in
systemd.packages = [ cfg.package ];
- systemd.services.wireplumber.enable = config.services.pipewire.systemWide;
- systemd.user.services.wireplumber.enable = !config.services.pipewire.systemWide;
+ systemd.services.wireplumber.enable = pwCfg.systemWide;
+ systemd.user.services.wireplumber.enable = !pwCfg.systemWide;
systemd.services.wireplumber.wantedBy = [ "pipewire.service" ];
systemd.user.services.wireplumber.wantedBy = [ "pipewire.service" ];
- systemd.services.wireplumber.environment = lib.mkIf config.services.pipewire.systemWide {
+ systemd.services.wireplumber.environment = mkIf pwCfg.systemWide {
# Force WirePlumber to use system dbus.
DBUS_SESSION_BUS_ADDRESS = "unix:path=/run/dbus/system_bus_socket";
LV2_PATH = "${lv2Plugins}/lib/lv2";
};
systemd.user.services.wireplumber.environment.LV2_PATH =
- lib.mkIf (!config.services.pipewire.systemWide) "${lv2Plugins}/lib/lv2";
+ mkIf (!pwCfg.systemWide) "${lv2Plugins}/lib/lv2";
};
}
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/profile-sync-daemon.nix b/third_party/nixpkgs/nixos/modules/services/desktops/profile-sync-daemon.nix
index e307c67350..6206295272 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/profile-sync-daemon.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/profile-sync-daemon.nix
@@ -9,7 +9,7 @@ in {
enable = mkOption {
type = bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the Profile Sync daemon.
'';
};
@@ -17,7 +17,7 @@ in {
type = str;
default = "1h";
example = "1h 30min";
- description = lib.mdDoc ''
+ description = ''
The amount of time to wait before syncing browser profiles back to the
disk.
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/seatd.nix b/third_party/nixpkgs/nixos/modules/services/desktops/seatd.nix
index 51977dfd21..fb20750f04 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/seatd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/seatd.nix
@@ -2,28 +2,28 @@
let
cfg = config.services.seatd;
- inherit (lib) mkEnableOption mkOption mdDoc types;
+ inherit (lib) mkEnableOption mkOption types;
in
{
meta.maintainers = with lib.maintainers; [ sinanmohd ];
options.services.seatd = {
- enable = mkEnableOption (mdDoc "seatd");
+ enable = mkEnableOption "seatd";
user = mkOption {
type = types.str;
default = "root";
- description = mdDoc "User to own the seatd socket";
+ description = "User to own the seatd socket";
};
group = mkOption {
type = types.str;
default = "seat";
- description = mdDoc "Group to own the seatd socket";
+ description = "Group to own the seatd socket";
};
logLevel = mkOption {
type = types.enum [ "debug" "info" "error" "silent" ];
default = "info";
- description = mdDoc "Logging verbosity";
+ description = "Logging verbosity";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/system-config-printer.nix b/third_party/nixpkgs/nixos/modules/services/desktops/system-config-printer.nix
index caebfabf14..55f27b0e65 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/system-config-printer.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/system-config-printer.nix
@@ -10,7 +10,7 @@ with lib;
services.system-config-printer = {
- enable = mkEnableOption (lib.mdDoc "system-config-printer, a service for CUPS administration used by printing interfaces");
+ enable = mkEnableOption "system-config-printer, a service for CUPS administration used by printing interfaces";
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/system76-scheduler.nix b/third_party/nixpkgs/nixos/modules/services/desktops/system76-scheduler.nix
index 267b528cc5..b021ae6bfb 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/system76-scheduler.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/system76-scheduler.nix
@@ -4,7 +4,7 @@ let
cfg = config.services.system76-scheduler;
inherit (builtins) concatStringsSep map toString attrNames;
- inherit (lib) boolToString types mkOption literalExpression mdDoc optional mkIf mkMerge;
+ inherit (lib) boolToString types mkOption literalExpression optional mkIf mkMerge;
inherit (types) nullOr listOf bool int ints float str enum;
withDefaults = optionSpecs: defaults:
@@ -16,49 +16,49 @@ let
latencyProfile = withDefaults {
latency = {
type = int;
- description = mdDoc "`sched_latency_ns`.";
+ description = "`sched_latency_ns`.";
};
nr-latency = {
type = int;
- description = mdDoc "`sched_nr_latency`.";
+ description = "`sched_nr_latency`.";
};
wakeup-granularity = {
type = float;
- description = mdDoc "`sched_wakeup_granularity_ns`.";
+ description = "`sched_wakeup_granularity_ns`.";
};
bandwidth-size = {
type = int;
- description = mdDoc "`sched_cfs_bandwidth_slice_us`.";
+ description = "`sched_cfs_bandwidth_slice_us`.";
};
preempt = {
type = enum [ "none" "voluntary" "full" ];
- description = mdDoc "Preemption mode.";
+ description = "Preemption mode.";
};
};
schedulerProfile = withDefaults {
nice = {
type = nullOr (ints.between (-20) 19);
- description = mdDoc "Niceness.";
+ description = "Niceness.";
};
class = {
type = nullOr (enum [ "idle" "batch" "other" "rr" "fifo" ]);
example = literalExpression "\"batch\"";
- description = mdDoc "CPU scheduler class.";
+ description = "CPU scheduler class.";
};
prio = {
type = nullOr (ints.between 1 99);
example = literalExpression "49";
- description = mdDoc "CPU scheduler priority.";
+ description = "CPU scheduler priority.";
};
ioClass = {
type = nullOr (enum [ "idle" "best-effort" "realtime" ]);
example = literalExpression "\"best-effort\"";
- description = mdDoc "IO scheduler class.";
+ description = "IO scheduler class.";
};
ioPrio = {
type = nullOr (ints.between 0 7);
example = literalExpression "4";
- description = mdDoc "IO scheduler priority.";
+ description = "IO scheduler priority.";
};
matchers = {
type = nullOr (listOf str);
@@ -69,7 +69,7 @@ let
"emacs"
]
'';
- description = mdDoc "Process matchers.";
+ description = "Process matchers.";
};
};
@@ -91,19 +91,19 @@ let
in {
options = {
services.system76-scheduler = {
- enable = lib.mkEnableOption (lib.mdDoc "system76-scheduler");
+ enable = lib.mkEnableOption "system76-scheduler";
package = mkOption {
type = types.package;
default = config.boot.kernelPackages.system76-scheduler;
defaultText = literalExpression "config.boot.kernelPackages.system76-scheduler";
- description = mdDoc "Which System76-Scheduler package to use.";
+ description = "Which System76-Scheduler package to use.";
};
useStockConfig = mkOption {
type = bool;
default = true;
- description = mdDoc ''
+ description = ''
Use the (reasonable and featureful) stock configuration.
When this option is `true`, `services.system76-scheduler.settings`
@@ -116,7 +116,7 @@ in {
enable = mkOption {
type = bool;
default = true;
- description = mdDoc "Tweak CFS latency parameters when going on/off battery";
+ description = "Tweak CFS latency parameters when going on/off battery";
};
default = latencyProfile {
@@ -139,26 +139,26 @@ in {
enable = mkOption {
type = bool;
default = true;
- description = mdDoc "Tweak scheduling of individual processes in real time.";
+ description = "Tweak scheduling of individual processes in real time.";
};
useExecsnoop = mkOption {
type = bool;
default = true;
- description = mdDoc "Use execsnoop (otherwise poll the precess list periodically).";
+ description = "Use execsnoop (otherwise poll the precess list periodically).";
};
refreshInterval = mkOption {
type = int;
default = 60;
- description = mdDoc "Process list poll interval, in seconds";
+ description = "Process list poll interval, in seconds";
};
foregroundBoost = {
enable = mkOption {
type = bool;
default = true;
- description = mdDoc ''
+ description = ''
Boost foreground process priorities.
(And de-boost background ones). Note that this option needs cooperation
@@ -181,7 +181,7 @@ in {
enable = mkOption {
type = bool;
default = true;
- description = mdDoc "Boost Pipewire client priorities.";
+ description = "Boost Pipewire client priorities.";
};
profile = schedulerProfile {
nice = -6;
@@ -209,7 +209,7 @@ in {
};
}
'';
- description = mdDoc "Process profile assignments.";
+ description = "Process profile assignments.";
};
exceptions = mkOption {
@@ -221,7 +221,7 @@ in {
"schedtool"
]
'';
- description = mdDoc "Processes that are left alone.";
+ description = "Processes that are left alone.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/telepathy.nix b/third_party/nixpkgs/nixos/modules/services/desktops/telepathy.nix
index cdc6eb26de..b5f6a5fcbc 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/telepathy.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/telepathy.nix
@@ -19,7 +19,7 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Telepathy service, a communications framework
that enables real-time communication via pluggable protocol backends.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/tumbler.nix b/third_party/nixpkgs/nixos/modules/services/desktops/tumbler.nix
index 203071ec66..f5341df2f7 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/tumbler.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/tumbler.nix
@@ -28,7 +28,7 @@ in
services.tumbler = {
- enable = mkEnableOption (lib.mdDoc "Tumbler, A D-Bus thumbnailer service");
+ enable = mkEnableOption "Tumbler, A D-Bus thumbnailer service";
};
diff --git a/third_party/nixpkgs/nixos/modules/services/desktops/zeitgeist.nix b/third_party/nixpkgs/nixos/modules/services/desktops/zeitgeist.nix
index 0eb2a4c9c3..f170e90a2a 100644
--- a/third_party/nixpkgs/nixos/modules/services/desktops/zeitgeist.nix
+++ b/third_party/nixpkgs/nixos/modules/services/desktops/zeitgeist.nix
@@ -14,7 +14,7 @@ with lib;
options = {
services.zeitgeist = {
- enable = mkEnableOption (lib.mdDoc "zeitgeist");
+ enable = mkEnableOption "zeitgeist, a service which logs the users' activities and events";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/development/athens.md b/third_party/nixpkgs/nixos/modules/services/development/athens.md
index 77663db509..2795930b0a 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/athens.md
+++ b/third_party/nixpkgs/nixos/modules/services/development/athens.md
@@ -18,7 +18,7 @@ A complete list of options for the Athens module may be found
## Basic usage for a caching proxy configuration {#opt-services-development-athens-caching-proxy}
A very basic configuration for Athens that acts as a caching and forwarding HTTP proxy is:
-```
+```nix
{
services.athens = {
enable = true;
@@ -28,7 +28,7 @@ A very basic configuration for Athens that acts as a caching and forwarding HTTP
If you want to prevent Athens from writing to disk, you can instead configure it to cache modules only in memory:
-```
+```nix
{
services.athens = {
enable = true;
@@ -39,10 +39,10 @@ If you want to prevent Athens from writing to disk, you can instead configure it
To use the local proxy in Go builds, you can set the proxy as environment variable:
-```
+```nix
{
environment.variables = {
- GOPROXY = "http://localhost:3000"
+ GOPROXY = "http://localhost:3000";
};
}
```
diff --git a/third_party/nixpkgs/nixos/modules/services/development/athens.nix b/third_party/nixpkgs/nixos/modules/services/development/athens.nix
index 34f8964a3b..55ec065f16 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/athens.nix
+++ b/third_party/nixpkgs/nixos/modules/services/development/athens.nix
@@ -157,13 +157,13 @@ in
};
options.services.athens = {
- enable = mkEnableOption (lib.mdDoc "Go module datastore and proxy");
+ enable = mkEnableOption "Go module datastore and proxy";
package = mkOption {
default = pkgs.athens;
defaultText = literalExpression "pkgs.athens";
example = "pkgs.athens";
- description = lib.mdDoc "Which athens derivation to use";
+ description = "Which athens derivation to use";
type = types.package;
};
@@ -172,7 +172,7 @@ in
default = pkgs.go;
defaultText = literalExpression "pkgs.go";
example = "pkgs.go_1_21";
- description = lib.mdDoc ''
+ description = ''
The Go package used by Athens at runtime.
Athens primarily runs two Go commands:
@@ -183,14 +183,14 @@ in
goEnv = mkOption {
type = types.enum [ "development" "production" ];
- description = lib.mdDoc "Specifies the type of environment to run. One of 'development' or 'production'.";
+ description = "Specifies the type of environment to run. One of 'development' or 'production'.";
default = "development";
example = "production";
};
goBinaryEnvVars = mkOption {
type = types.attrs;
- description = lib.mdDoc "Environment variables to pass to the Go binary.";
+ description = "Environment variables to pass to the Go binary.";
example = ''
{ "GOPROXY" = "direct", "GODEBUG" = "true" }
'';
@@ -199,14 +199,14 @@ in
goGetWorkers = mkOption {
type = types.int;
- description = lib.mdDoc "Number of workers concurrently downloading modules.";
+ description = "Number of workers concurrently downloading modules.";
default = 10;
example = 32;
};
goGetDir = mkOption {
type = types.nullOr types.path;
- description = lib.mdDoc ''
+ description = ''
Temporary directory that Athens will use to
fetch modules from VCS prior to persisting
them to a storage backend.
@@ -220,13 +220,13 @@ in
protocolWorkers = mkOption {
type = types.int;
- description = lib.mdDoc "Number of workers concurrently serving protocol paths.";
+ description = "Number of workers concurrently serving protocol paths.";
default = 30;
};
logLevel = mkOption {
type = types.nullOr (types.enum [ "panic" "fatal" "error" "warning" "info" "debug" "trace" ]);
- description = lib.mdDoc ''
+ description = ''
Log level for Athens.
Supports all logrus log levels (https://github.com/Sirupsen/logrus#level-logging)".
'';
@@ -236,7 +236,7 @@ in
cloudRuntime = mkOption {
type = types.enum [ "GCP" "none" ];
- description = lib.mdDoc ''
+ description = ''
Specifies the Cloud Provider on which the Proxy/registry is running.
'';
default = "none";
@@ -245,20 +245,20 @@ in
enablePprof = mkOption {
type = types.bool;
- description = lib.mdDoc "Enable pprof endpoints.";
+ description = "Enable pprof endpoints.";
default = false;
};
pprofPort = mkOption {
type = types.port;
- description = lib.mdDoc "Port number for pprof endpoints.";
+ description = "Port number for pprof endpoints.";
default = 3301;
example = 443;
};
filterFile = mkOption {
type = types.nullOr types.path;
- description = lib.mdDoc ''Filename for the include exclude filter.'';
+ description = ''Filename for the include exclude filter.'';
default = null;
example = literalExpression ''
pkgs.writeText "filterFile" '''
@@ -271,34 +271,34 @@ in
robotsFile = mkOption {
type = types.nullOr types.path;
- description = lib.mdDoc ''Provides /robots.txt for net crawlers.'';
+ description = ''Provides /robots.txt for net crawlers.'';
default = null;
example = literalExpression ''pkgs.writeText "robots.txt" "# my custom robots.txt ..."'';
};
timeout = mkOption {
type = types.int;
- description = lib.mdDoc "Timeout for external network calls in seconds.";
+ description = "Timeout for external network calls in seconds.";
default = 300;
example = 3;
};
storageType = mkOption {
type = types.enum [ "memory" "disk" "mongo" "gcp" "minio" "s3" "azureblob" "external" ];
- description = lib.mdDoc "Specifies the type of storage backend to use.";
+ description = "Specifies the type of storage backend to use.";
default = "disk";
};
tlsCertFile = mkOption {
type = types.nullOr types.path;
- description = lib.mdDoc "Path to the TLS certificate file.";
+ description = "Path to the TLS certificate file.";
default = null;
example = "/etc/ssl/certs/athens.crt";
};
tlsKeyFile = mkOption {
type = types.nullOr types.path;
- description = lib.mdDoc "Path to the TLS key file.";
+ description = "Path to the TLS key file.";
default = null;
example = "/etc/ssl/certs/athens.key";
};
@@ -306,7 +306,7 @@ in
port = mkOption {
type = types.port;
default = 3000;
- description = lib.mdDoc ''
+ description = ''
Port number Athens listens on.
'';
example = 443;
@@ -314,7 +314,7 @@ in
unixSocket = mkOption {
type = types.nullOr types.path;
- description = lib.mdDoc ''
+ description = ''
Path to the unix socket file.
If set, Athens will listen on the unix socket instead of TCP socket.
'';
@@ -324,7 +324,7 @@ in
globalEndpoint = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Endpoint for a package registry in case of a proxy cache miss.
'';
default = "";
@@ -333,7 +333,7 @@ in
basicAuthUser = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
Username for basic auth.
'';
default = null;
@@ -342,7 +342,7 @@ in
basicAuthPass = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
Password for basic auth. Warning: this is stored in plain text in the config file.
'';
default = null;
@@ -351,7 +351,7 @@ in
forceSSL = mkOption {
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Force SSL redirects for incoming requests.
'';
default = false;
@@ -359,7 +359,7 @@ in
validatorHook = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
Endpoint to validate modules against.
Not used if empty.
@@ -370,7 +370,7 @@ in
pathPrefix = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
Sets basepath for all routes.
'';
default = null;
@@ -379,7 +379,7 @@ in
netrcPath = mkOption {
type = types.nullOr types.path;
- description = lib.mdDoc ''
+ description = ''
Path to the .netrc file.
'';
default = null;
@@ -388,7 +388,7 @@ in
githubToken = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
Creates .netrc file with the given token to be used for GitHub.
Warning: this is stored in plain text in the config file.
'';
@@ -398,7 +398,7 @@ in
hgrcPath = mkOption {
type = types.nullOr types.path;
- description = lib.mdDoc ''
+ description = ''
Path to the .hgrc file.
'';
default = null;
@@ -407,7 +407,7 @@ in
traceExporter = mkOption {
type = types.nullOr (types.enum [ "jaeger" "datadog" ]);
- description = lib.mdDoc ''
+ description = ''
Trace exporter to use.
'';
default = null;
@@ -415,7 +415,7 @@ in
traceExporterURL = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
URL endpoint that traces will be sent to.
'';
default = null;
@@ -424,13 +424,13 @@ in
statsExporter = mkOption {
type = types.nullOr (types.enum [ "prometheus" ]);
- description = lib.mdDoc "Stats exporter to use.";
+ description = "Stats exporter to use.";
default = null;
};
sumDBs = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
List of fully qualified URLs that Athens will proxy
that the go command can use a checksum verifier.
'';
@@ -439,7 +439,7 @@ in
noSumPatterns = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
List of patterns that Athens sum db proxy will return a 403 for.
'';
default = [ ];
@@ -448,7 +448,7 @@ in
downloadMode = mkOption {
type = types.oneOf [ (types.enum [ "sync" "async" "redirect" "async_redirect" "none" ]) (types.strMatching "^file:.*$|^custom:.*$") ];
- description = lib.mdDoc ''
+ description = ''
Defines how Athens behaves when a module@version
is not found in storage. There are 7 options:
1. "sync": download the module synchronously and
@@ -472,7 +472,7 @@ in
networkMode = mkOption {
type = types.enum [ "strict" "offline" "fallback" ];
- description = lib.mdDoc ''
+ description = ''
Configures how Athens will return the results
of the /list endpoint as it can be assembled from both its own
storage and the upstream VCS.
@@ -492,13 +492,13 @@ in
downloadURL = mkOption {
type = types.str;
- description = lib.mdDoc "URL used if DownloadMode is set to redirect.";
+ description = "URL used if DownloadMode is set to redirect.";
default = "https://proxy.golang.org";
};
singleFlightType = mkOption {
type = types.enum [ "memory" "etcd" "redis" "redis-sentinel" "gcp" "azureblob" ];
- description = lib.mdDoc ''
+ description = ''
Determines what mechanism Athens uses to manage concurrency flowing into the Athens backend.
'';
default = "memory";
@@ -506,7 +506,7 @@ in
indexType = mkOption {
type = types.enum [ "none" "memory" "mysql" "postgres" ];
- description = lib.mdDoc ''
+ description = ''
Type of index backend Athens will use.
'';
default = "none";
@@ -514,7 +514,7 @@ in
shutdownTimeout = mkOption {
type = types.int;
- description = lib.mdDoc ''
+ description = ''
Number of seconds to wait for the server to shutdown gracefully.
'';
default = 60;
@@ -525,7 +525,7 @@ in
etcd = {
endpoints = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc "URLs that determine all distributed etcd servers.";
+ description = "URLs that determine all distributed etcd servers.";
default = [ ];
example = [ "localhost:2379" ];
};
@@ -533,13 +533,13 @@ in
redis = {
endpoint = mkOption {
type = types.str;
- description = lib.mdDoc "URL of the redis server.";
+ description = "URL of the redis server.";
default = "";
example = "localhost:6379";
};
password = mkOption {
type = types.str;
- description = lib.mdDoc "Password for the redis server. Warning: this is stored in plain text in the config file.";
+ description = "Password for the redis server. Warning: this is stored in plain text in the config file.";
default = "";
example = "swordfish";
};
@@ -547,19 +547,19 @@ in
lockConfig = {
ttl = mkOption {
type = types.int;
- description = lib.mdDoc "TTL for the lock in seconds.";
+ description = "TTL for the lock in seconds.";
default = 900;
example = 1;
};
timeout = mkOption {
type = types.int;
- description = lib.mdDoc "Timeout for the lock in seconds.";
+ description = "Timeout for the lock in seconds.";
default = 15;
example = 1;
};
maxRetries = mkOption {
type = types.int;
- description = lib.mdDoc "Maximum number of retries for the lock.";
+ description = "Maximum number of retries for the lock.";
default = 10;
example = 1;
};
@@ -569,19 +569,19 @@ in
redisSentinel = {
endpoints = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc "URLs that determine all distributed redis servers.";
+ description = "URLs that determine all distributed redis servers.";
default = [ ];
example = [ "localhost:26379" ];
};
masterName = mkOption {
type = types.str;
- description = lib.mdDoc "Name of the sentinel master server.";
+ description = "Name of the sentinel master server.";
default = "";
example = "redis-1";
};
sentinelPassword = mkOption {
type = types.str;
- description = lib.mdDoc "Password for the sentinel server. Warning: this is stored in plain text in the config file.";
+ description = "Password for the sentinel server. Warning: this is stored in plain text in the config file.";
default = "";
example = "swordfish";
};
@@ -589,19 +589,19 @@ in
lockConfig = {
ttl = mkOption {
type = types.int;
- description = lib.mdDoc "TTL for the lock in seconds.";
+ description = "TTL for the lock in seconds.";
default = 900;
example = 1;
};
timeout = mkOption {
type = types.int;
- description = lib.mdDoc "Timeout for the lock in seconds.";
+ description = "Timeout for the lock in seconds.";
default = 15;
example = 1;
};
maxRetries = mkOption {
type = types.int;
- description = lib.mdDoc "Maximum number of retries for the lock.";
+ description = "Maximum number of retries for the lock.";
default = 10;
example = 1;
};
@@ -613,7 +613,7 @@ in
cdn = {
endpoint = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "hostname of the CDN server.";
+ description = "hostname of the CDN server.";
example = "cdn.example.com";
default = null;
};
@@ -622,7 +622,7 @@ in
disk = {
rootPath = mkOption {
type = types.nullOr types.path;
- description = lib.mdDoc "Athens disk root folder.";
+ description = "Athens disk root folder.";
default = "/var/lib/athens";
};
};
@@ -630,19 +630,19 @@ in
gcp = {
projectID = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "GCP project ID.";
+ description = "GCP project ID.";
example = "my-project";
default = null;
};
bucket = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "GCP backend storage bucket.";
+ description = "GCP backend storage bucket.";
example = "my-bucket";
default = null;
};
jsonKey = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Base64 encoded GCP service account key. Warning: this is stored in plain text in the config file.";
+ description = "Base64 encoded GCP service account key. Warning: this is stored in plain text in the config file.";
default = null;
};
};
@@ -650,36 +650,36 @@ in
minio = {
endpoint = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Endpoint of the minio storage backend.";
+ description = "Endpoint of the minio storage backend.";
example = "minio.example.com:9001";
default = null;
};
key = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Access key id for the minio storage backend.";
+ description = "Access key id for the minio storage backend.";
example = "minio";
default = null;
};
secret = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Secret key for the minio storage backend. Warning: this is stored in plain text in the config file.";
+ description = "Secret key for the minio storage backend. Warning: this is stored in plain text in the config file.";
example = "minio123";
default = null;
};
enableSSL = mkOption {
type = types.bool;
- description = lib.mdDoc "Enable SSL for the minio storage backend.";
+ description = "Enable SSL for the minio storage backend.";
default = false;
};
bucket = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Bucket name for the minio storage backend.";
+ description = "Bucket name for the minio storage backend.";
example = "gomods";
default = null;
};
region = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Region for the minio storage backend.";
+ description = "Region for the minio storage backend.";
example = "us-east-1";
default = null;
};
@@ -688,25 +688,25 @@ in
mongo = {
url = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "URL of the mongo database.";
+ description = "URL of the mongo database.";
example = "mongodb://localhost:27017";
default = null;
};
defaultDBName = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Name of the mongo database.";
+ description = "Name of the mongo database.";
example = "athens";
default = null;
};
certPath = mkOption {
type = types.nullOr types.path;
- description = lib.mdDoc "Path to the certificate file for the mongo database.";
+ description = "Path to the certificate file for the mongo database.";
example = "/etc/ssl/mongo.pem";
default = null;
};
insecure = mkOption {
type = types.bool;
- description = lib.mdDoc "Allow insecure connections to the mongo database.";
+ description = "Allow insecure connections to the mongo database.";
default = false;
};
};
@@ -714,55 +714,55 @@ in
s3 = {
region = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Region of the S3 storage backend.";
+ description = "Region of the S3 storage backend.";
example = "eu-west-3";
default = null;
};
key = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Access key id for the S3 storage backend.";
+ description = "Access key id for the S3 storage backend.";
example = "minio";
default = null;
};
secret = mkOption {
type = types.str;
- description = lib.mdDoc "Secret key for the S3 storage backend. Warning: this is stored in plain text in the config file.";
+ description = "Secret key for the S3 storage backend. Warning: this is stored in plain text in the config file.";
default = "";
};
token = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Token for the S3 storage backend. Warning: this is stored in plain text in the config file.";
+ description = "Token for the S3 storage backend. Warning: this is stored in plain text in the config file.";
default = null;
};
bucket = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Bucket name for the S3 storage backend.";
+ description = "Bucket name for the S3 storage backend.";
example = "gomods";
default = null;
};
forcePathStyle = mkOption {
type = types.bool;
- description = lib.mdDoc "Force path style for the S3 storage backend.";
+ description = "Force path style for the S3 storage backend.";
default = false;
};
useDefaultConfiguration = mkOption {
type = types.bool;
- description = lib.mdDoc "Use default configuration for the S3 storage backend.";
+ description = "Use default configuration for the S3 storage backend.";
default = false;
};
credentialsEndpoint = mkOption {
type = types.str;
- description = lib.mdDoc "Credentials endpoint for the S3 storage backend.";
+ description = "Credentials endpoint for the S3 storage backend.";
default = "";
};
awsContainerCredentialsRelativeURI = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Container relative url (used by fargate).";
+ description = "Container relative url (used by fargate).";
default = null;
};
endpoint = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Endpoint for the S3 storage backend.";
+ description = "Endpoint for the S3 storage backend.";
default = null;
};
};
@@ -770,17 +770,17 @@ in
azureblob = {
accountName = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Account name for the Azure Blob storage backend.";
+ description = "Account name for the Azure Blob storage backend.";
default = null;
};
accountKey = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Account key for the Azure Blob storage backend. Warning: this is stored in plain text in the config file.";
+ description = "Account key for the Azure Blob storage backend. Warning: this is stored in plain text in the config file.";
default = null;
};
containerName = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Container name for the Azure Blob storage backend.";
+ description = "Container name for the Azure Blob storage backend.";
default = null;
};
};
@@ -788,7 +788,7 @@ in
external = {
url = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "URL of the backend storage layer.";
+ description = "URL of the backend storage layer.";
example = "https://athens.example.com";
default = null;
};
@@ -799,43 +799,43 @@ in
mysql = {
protocol = mkOption {
type = types.str;
- description = lib.mdDoc "Protocol for the MySQL database.";
+ description = "Protocol for the MySQL database.";
default = "tcp";
};
host = mkOption {
type = types.str;
- description = lib.mdDoc "Host for the MySQL database.";
+ description = "Host for the MySQL database.";
default = "localhost";
};
port = mkOption {
type = types.int;
- description = lib.mdDoc "Port for the MySQL database.";
+ description = "Port for the MySQL database.";
default = 3306;
};
user = mkOption {
type = types.str;
- description = lib.mdDoc "User for the MySQL database.";
+ description = "User for the MySQL database.";
default = "root";
};
password = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Password for the MySQL database. Warning: this is stored in plain text in the config file.";
+ description = "Password for the MySQL database. Warning: this is stored in plain text in the config file.";
default = null;
};
database = mkOption {
type = types.str;
- description = lib.mdDoc "Database name for the MySQL database.";
+ description = "Database name for the MySQL database.";
default = "athens";
};
params = {
parseTime = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Parse time for the MySQL database.";
+ description = "Parse time for the MySQL database.";
default = "true";
};
timeout = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Timeout for the MySQL database.";
+ description = "Timeout for the MySQL database.";
default = "30s";
};
};
@@ -844,38 +844,38 @@ in
postgres = {
host = mkOption {
type = types.str;
- description = lib.mdDoc "Host for the Postgres database.";
+ description = "Host for the Postgres database.";
default = "localhost";
};
port = mkOption {
type = types.int;
- description = lib.mdDoc "Port for the Postgres database.";
+ description = "Port for the Postgres database.";
default = 5432;
};
user = mkOption {
type = types.str;
- description = lib.mdDoc "User for the Postgres database.";
+ description = "User for the Postgres database.";
default = "postgres";
};
password = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Password for the Postgres database. Warning: this is stored in plain text in the config file.";
+ description = "Password for the Postgres database. Warning: this is stored in plain text in the config file.";
default = null;
};
database = mkOption {
type = types.str;
- description = lib.mdDoc "Database name for the Postgres database.";
+ description = "Database name for the Postgres database.";
default = "athens";
};
params = {
connect_timeout = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "Connect timeout for the Postgres database.";
+ description = "Connect timeout for the Postgres database.";
default = "30s";
};
sslmode = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc "SSL mode for the Postgres database.";
+ description = "SSL mode for the Postgres database.";
default = "disable";
};
};
@@ -884,7 +884,7 @@ in
extraConfig = mkOption {
type = types.attrs;
- description = lib.mdDoc ''
+ description = ''
Extra configuration options for the athens config file.
'';
default = { };
diff --git a/third_party/nixpkgs/nixos/modules/services/development/blackfire.md b/third_party/nixpkgs/nixos/modules/services/development/blackfire.md
index e2e7e4780c..5a7fbe68f7 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/blackfire.md
+++ b/third_party/nixpkgs/nixos/modules/services/development/blackfire.md
@@ -7,7 +7,7 @@
[Blackfire](https://blackfire.io) is a proprietary tool for profiling applications. There are several languages supported by the product but currently only PHP support is packaged in Nixpkgs. The back-end consists of a module that is loaded into the language runtime (called *probe*) and a service (*agent*) that the probe connects to and that sends the profiles to the server.
To use it, you will need to enable the agent and the probe on your server. The exact method will depend on the way you use PHP but here is an example of NixOS configuration for PHP-FPM:
-```
+```nix
let
php = pkgs.php.withExtensions ({ enabled, all }: enabled ++ (with all; [
blackfire
diff --git a/third_party/nixpkgs/nixos/modules/services/development/blackfire.nix b/third_party/nixpkgs/nixos/modules/services/development/blackfire.nix
index 3c98d7a281..9b76cfbca0 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/blackfire.nix
+++ b/third_party/nixpkgs/nixos/modules/services/development/blackfire.nix
@@ -16,9 +16,9 @@ in {
options = {
services.blackfire-agent = {
- enable = lib.mkEnableOption (lib.mdDoc "Blackfire profiler agent");
+ enable = lib.mkEnableOption "Blackfire profiler agent";
settings = lib.mkOption {
- description = lib.mdDoc ''
+ description = ''
See https://blackfire.io/docs/up-and-running/configuration/agent
'';
type = lib.types.submodule {
@@ -27,7 +27,7 @@ in {
options = {
server-id = lib.mkOption {
type = lib.types.str;
- description = lib.mdDoc ''
+ description = ''
Sets the server id used to authenticate with Blackfire
You can find your personal server-id at https://blackfire.io/my/settings/credentials
@@ -36,7 +36,7 @@ in {
server-token = lib.mkOption {
type = lib.types.str;
- description = lib.mdDoc ''
+ description = ''
Sets the server token used to authenticate with Blackfire
You can find your personal server-token at https://blackfire.io/my/settings/credentials
diff --git a/third_party/nixpkgs/nixos/modules/services/development/bloop.nix b/third_party/nixpkgs/nixos/modules/services/development/bloop.nix
index 27da76a744..c1180a8bbd 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/bloop.nix
+++ b/third_party/nixpkgs/nixos/modules/services/development/bloop.nix
@@ -17,7 +17,7 @@ in {
"-J-XX:MaxInlineLevel=20"
"-J-XX:+UseParallelGC"
];
- description = lib.mdDoc ''
+ description = ''
Specifies additional command line argument to pass to bloop
java process.
'';
@@ -26,7 +26,7 @@ in {
install = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to install a user service for the Bloop server.
The service must be manually started for each user with
diff --git a/third_party/nixpkgs/nixos/modules/services/development/distccd.nix b/third_party/nixpkgs/nixos/modules/services/development/distccd.nix
index c33bf436bf..916c090503 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/distccd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/development/distccd.nix
@@ -8,13 +8,13 @@ in
{
options = {
services.distccd = {
- enable = mkEnableOption (lib.mdDoc "distccd");
+ enable = mkEnableOption "distccd, a distributed C/C++ compiler";
allowedClients = mkOption {
type = types.listOf types.str;
default = [ "127.0.0.1" ];
example = [ "127.0.0.1" "192.168.0.0/24" "10.0.0.0/24" ];
- description = lib.mdDoc ''
+ description = ''
Client IPs which are allowed to connect to distccd in CIDR notation.
Anyone who can connect to the distccd server can run arbitrary
@@ -26,7 +26,7 @@ in
jobTimeout = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
Maximum duration, in seconds, of a single compilation request.
'';
};
@@ -34,7 +34,7 @@ in
logLevel = mkOption {
type = types.nullOr (types.enum [ "critical" "error" "warning" "notice" "info" "debug" ]);
default = "warning";
- description = lib.mdDoc ''
+ description = ''
Set the minimum severity of error that will be included in the log
file. Useful if you only want to see error messages rather than an
entry for each connection.
@@ -44,7 +44,7 @@ in
maxJobs = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
Maximum number of tasks distccd should execute at any time.
'';
};
@@ -53,7 +53,7 @@ in
nice = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
Niceness of the compilation tasks.
'';
};
@@ -61,7 +61,7 @@ in
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Opens the specified TCP port for distcc.
'';
};
@@ -71,17 +71,17 @@ in
port = mkOption {
type = types.port;
default = 3632;
- description = lib.mdDoc ''
+ description = ''
The TCP port which distccd will listen on.
'';
};
stats = {
- enable = mkEnableOption (lib.mdDoc "statistics reporting via HTTP server");
+ enable = mkEnableOption "statistics reporting via HTTP server";
port = mkOption {
type = types.port;
default = 3633;
- description = lib.mdDoc ''
+ description = ''
The TCP port which the distccd statistics HTTP server will listen
on.
'';
@@ -91,7 +91,7 @@ in
zeroconf = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to register via mDNS/DNS-SD
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/development/gemstash.nix b/third_party/nixpkgs/nixos/modules/services/development/gemstash.nix
index eb7ccb98bd..367930dadf 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/gemstash.nix
+++ b/third_party/nixpkgs/nixos/modules/services/development/gemstash.nix
@@ -24,19 +24,19 @@ let
in
{
options.services.gemstash = {
- enable = mkEnableOption (lib.mdDoc "gemstash service");
+ enable = mkEnableOption "gemstash, a cache for rubygems.org and a private gem server";
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to open the firewall for the port in {option}`services.gemstash.bind`.
'';
};
settings = mkOption {
default = {};
- description = lib.mdDoc ''
+ description = ''
Configuration for Gemstash. The details can be found at in
[gemstash documentation](https://github.com/rubygems/gemstash/blob/master/man/gemstash-configuration.5.md).
Each key set here is automatically prefixed with ":" to match the gemstash expectations.
@@ -47,22 +47,22 @@ in
base_path = mkOption {
type = types.path;
default = "/var/lib/gemstash";
- description = lib.mdDoc "Path to store the gem files and the sqlite database. If left unchanged, the directory will be created.";
+ description = "Path to store the gem files and the sqlite database. If left unchanged, the directory will be created.";
};
bind = mkOption {
type = types.str;
default = "tcp://0.0.0.0:9292";
- description = lib.mdDoc "Host and port combination for the server to listen on.";
+ description = "Host and port combination for the server to listen on.";
};
db_adapter = mkOption {
type = types.nullOr (types.enum [ "sqlite3" "postgres" "mysql" "mysql2" ]);
default = null;
- description = lib.mdDoc "Which database type to use. For choices other than sqlite3, the dbUrl has to be specified as well.";
+ description = "Which database type to use. For choices other than sqlite3, the dbUrl has to be specified as well.";
};
db_url = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "The database to connect to when using postgres, mysql, or mysql2.";
+ description = "The database to connect to when using postgres, mysql, or mysql2.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/development/hoogle.nix b/third_party/nixpkgs/nixos/modules/services/development/hoogle.nix
index 88dd01fd8a..1747ef3912 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/hoogle.nix
+++ b/third_party/nixpkgs/nixos/modules/services/development/hoogle.nix
@@ -14,12 +14,12 @@ let
in {
options.services.hoogle = {
- enable = mkEnableOption (lib.mdDoc "Haskell documentation server");
+ enable = mkEnableOption "Haskell documentation server";
port = mkOption {
type = types.port;
default = 8080;
- description = lib.mdDoc ''
+ description = ''
Port number Hoogle will be listening to.
'';
};
@@ -29,7 +29,7 @@ in {
default = hp: [];
defaultText = literalExpression "hp: []";
example = literalExpression "hp: with hp; [ text lens ]";
- description = lib.mdDoc ''
+ description = ''
The Haskell packages to generate documentation for.
The option value is a function that takes the package set specified in
@@ -39,7 +39,7 @@ in {
};
haskellPackages = mkOption {
- description = lib.mdDoc "Which haskell package set to use.";
+ description = "Which haskell package set to use.";
type = types.attrs;
default = pkgs.haskellPackages;
defaultText = literalExpression "pkgs.haskellPackages";
@@ -47,15 +47,25 @@ in {
home = mkOption {
type = types.str;
- description = lib.mdDoc "Url for hoogle logo";
+ description = "Url for hoogle logo";
default = "https://hoogle.haskell.org";
};
host = mkOption {
type = types.str;
- description = lib.mdDoc "Set the host to bind on.";
+ description = "Set the host to bind on.";
default = "127.0.0.1";
};
+
+ extraOptions = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ example = [ "--no-security-headers" ];
+ description = ''
+ Additional command-line arguments to pass to
+ {command}`hoogle server`
+ '';
+ };
};
config = mkIf cfg.enable {
@@ -66,7 +76,10 @@ in {
serviceConfig = {
Restart = "always";
- ExecStart = ''${hoogleEnv}/bin/hoogle server --local --port ${toString cfg.port} --home ${cfg.home} --host ${cfg.host}'';
+ ExecStart = ''
+ ${hoogleEnv}/bin/hoogle server --local --port ${toString cfg.port} --home ${cfg.home} --host ${cfg.host} \
+ ${concatStringsSep " " cfg.extraOptions}
+ '';
DynamicUser = true;
diff --git a/third_party/nixpkgs/nixos/modules/services/development/jupyter/default.nix b/third_party/nixpkgs/nixos/modules/services/development/jupyter/default.nix
index da8c7547fd..561ea86ea1 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/jupyter/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/development/jupyter/default.nix
@@ -24,12 +24,12 @@ in {
meta.maintainers = with maintainers; [ aborsu ];
options.services.jupyter = {
- enable = mkEnableOption (lib.mdDoc "Jupyter development server");
+ enable = mkEnableOption "Jupyter development server";
ip = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc ''
+ description = ''
IP address Jupyter will be listening on.
'';
};
@@ -43,7 +43,7 @@ in {
type = types.str;
default = "jupyter-notebook";
example = "jupyter-lab";
- description = lib.mdDoc ''
+ description = ''
Which command the service runs. Note that not all jupyter packages
have all commands, e.g. jupyter-lab isn't present in the default package.
'';
@@ -52,7 +52,7 @@ in {
port = mkOption {
type = types.port;
default = 8888;
- description = lib.mdDoc ''
+ description = ''
Port number Jupyter will be listening on.
'';
};
@@ -60,7 +60,7 @@ in {
notebookDir = mkOption {
type = types.str;
default = "~/";
- description = lib.mdDoc ''
+ description = ''
Root directory for notebooks.
'';
};
@@ -68,7 +68,7 @@ in {
user = mkOption {
type = types.str;
default = "jupyter";
- description = lib.mdDoc ''
+ description = ''
Name of the user used to run the jupyter service.
For security reason, jupyter should really not be run as root.
If not set (jupyter), the service will create a jupyter user with appropriate settings.
@@ -79,7 +79,7 @@ in {
group = mkOption {
type = types.str;
default = "jupyter";
- description = lib.mdDoc ''
+ description = ''
Name of the group used to run the jupyter service.
Use this if you want to create a group of users that are able to view the notebook directory's content.
'';
@@ -88,7 +88,7 @@ in {
password = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Password to use with notebook.
Can be generated using:
In [1]: from notebook.auth import passwd
@@ -105,7 +105,7 @@ in {
notebookConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Raw jupyter config.
'';
};
@@ -142,7 +142,7 @@ in {
};
}
'';
- description = lib.mdDoc ''
+ description = ''
Declarative kernel config.
Kernels can be declared in any language that supports and has the required
diff --git a/third_party/nixpkgs/nixos/modules/services/development/jupyter/kernel-options.nix b/third_party/nixpkgs/nixos/modules/services/development/jupyter/kernel-options.nix
index 6e406152de..8a91125e6c 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/jupyter/kernel-options.nix
+++ b/third_party/nixpkgs/nixos/modules/services/development/jupyter/kernel-options.nix
@@ -15,7 +15,7 @@ with lib;
"Python 3"
"Python 3 for Data Science"
'';
- description = lib.mdDoc ''
+ description = ''
Name that will be shown to the user.
'';
};
@@ -29,7 +29,7 @@ with lib;
"-f"
"{connection_file}"
];
- description = lib.mdDoc ''
+ description = ''
Command and arguments to start the kernel.
'';
};
@@ -37,7 +37,7 @@ with lib;
language = mkOption {
type = types.str;
example = "python";
- description = lib.mdDoc ''
+ description = ''
Language of the environment. Typically the name of the binary.
'';
};
@@ -46,7 +46,7 @@ with lib;
type = types.attrsOf types.str;
default = { };
example = { OMP_NUM_THREADS = "1"; };
- description = lib.mdDoc ''
+ description = ''
Environment variables to set for the kernel.
'';
};
@@ -55,7 +55,7 @@ with lib;
type = types.nullOr types.path;
default = null;
example = literalExpression ''"''${env.sitePackages}/ipykernel/resources/logo-32x32.png"'';
- description = lib.mdDoc ''
+ description = ''
Path to 32x32 logo png.
'';
};
@@ -63,7 +63,7 @@ with lib;
type = types.nullOr types.path;
default = null;
example = literalExpression ''"''${env.sitePackages}/ipykernel/resources/logo-64x64.png"'';
- description = lib.mdDoc ''
+ description = ''
Path to 64x64 logo png.
'';
};
@@ -72,7 +72,7 @@ with lib;
type = types.attrsOf types.path;
default = { };
example = literalExpression ''"{ examples = ''${env.sitePack}/IRkernel/kernelspec/kernel.js"; }'';
- description = lib.mdDoc ''
+ description = ''
Extra paths to link in kernel directory
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/development/jupyterhub/default.nix b/third_party/nixpkgs/nixos/modules/services/development/jupyterhub/default.nix
index cebc35a504..d9a37ad915 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/jupyterhub/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/development/jupyterhub/default.nix
@@ -30,12 +30,12 @@ in {
meta.maintainers = with maintainers; [ costrouc ];
options.services.jupyterhub = {
- enable = mkEnableOption (lib.mdDoc "Jupyterhub development server");
+ enable = mkEnableOption "Jupyterhub development server";
authentication = mkOption {
type = types.str;
default = "jupyterhub.auth.PAMAuthenticator";
- description = lib.mdDoc ''
+ description = ''
Jupyterhub authentication to use
There are many authenticators available including: oauth, pam,
@@ -46,7 +46,7 @@ in {
spawner = mkOption {
type = types.str;
default = "systemdspawner.SystemdSpawner";
- description = lib.mdDoc ''
+ description = ''
Jupyterhub spawner to use
There are many spawners available including: local process,
@@ -57,7 +57,7 @@ in {
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra contents appended to the jupyterhub configuration
Jupyterhub configuration is a normal python file using
@@ -84,7 +84,7 @@ in {
jupyterhub-systemdspawner
])
'';
- description = lib.mdDoc ''
+ description = ''
Python environment to run jupyterhub
Customizing will affect the packages available in the hub and
@@ -106,7 +106,7 @@ in {
jupyterlab
])
'';
- description = lib.mdDoc ''
+ description = ''
Python environment to run jupyterlab
Customizing will affect the packages available in the
@@ -146,7 +146,7 @@ in {
};
}
'';
- description = lib.mdDoc ''
+ description = ''
Declarative kernel config
Kernels can be declared in any language that supports and has
@@ -159,7 +159,7 @@ in {
port = mkOption {
type = types.port;
default = 8000;
- description = lib.mdDoc ''
+ description = ''
Port number Jupyterhub will be listening on
'';
};
@@ -167,7 +167,7 @@ in {
host = mkOption {
type = types.str;
default = "0.0.0.0";
- description = lib.mdDoc ''
+ description = ''
Bind IP JupyterHub will be listening on
'';
};
@@ -175,7 +175,7 @@ in {
stateDirectory = mkOption {
type = types.str;
default = "jupyterhub";
- description = lib.mdDoc ''
+ description = ''
Directory for jupyterhub state (token + database)
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/development/livebook.md b/third_party/nixpkgs/nixos/modules/services/development/livebook.md
index 5315f2c275..aac9c58d08 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/livebook.md
+++ b/third_party/nixpkgs/nixos/modules/services/development/livebook.md
@@ -9,7 +9,7 @@ Enabling the `livebook` service creates a user
[`systemd`](https://www.freedesktop.org/wiki/Software/systemd/) unit
which runs the server.
-```
+```nix
{ ... }:
{
@@ -51,6 +51,8 @@ some features require additional packages. For example, the machine
learning Kinos require `gcc` and `gnumake`. To add these, use
`extraPackages`:
-```
-services.livebook.extraPackages = with pkgs; [ gcc gnumake ];
+```nix
+{
+ services.livebook.extraPackages = with pkgs; [ gcc gnumake ];
+}
```
diff --git a/third_party/nixpkgs/nixos/modules/services/development/livebook.nix b/third_party/nixpkgs/nixos/modules/services/development/livebook.nix
index df0e6e01e9..c7a6e35375 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/livebook.nix
+++ b/third_party/nixpkgs/nixos/modules/services/development/livebook.nix
@@ -17,7 +17,7 @@ in
environment = mkOption {
type = with types; attrsOf (nullOr (oneOf [ bool int str ]));
default = { };
- description = lib.mdDoc ''
+ description = ''
Environment variables to set.
Livebook is configured through the use of environment variables. The
@@ -47,7 +47,7 @@ in
environmentFile = mkOption {
type = with types; nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Additional dnvironment file as defined in {manpage}`systemd.exec(5)`.
Secrets like {env}`LIVEBOOK_PASSWORD` (which is used to specify the
@@ -75,7 +75,7 @@ in
extraPackages = mkOption {
type = with types; listOf package;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
Extra packages to make available to the Livebook service.
'';
example = literalExpression "with pkgs; [ gcc gnumake ]";
diff --git a/third_party/nixpkgs/nixos/modules/services/development/lorri.nix b/third_party/nixpkgs/nixos/modules/services/development/lorri.nix
index df3d814d74..4aba3836e3 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/lorri.nix
+++ b/third_party/nixpkgs/nixos/modules/services/development/lorri.nix
@@ -9,7 +9,7 @@ in {
enable = lib.mkOption {
default = false;
type = lib.types.bool;
- description = lib.mdDoc ''
+ description = ''
Enables the daemon for `lorri`, a nix-shell replacement for project
development. The socket-activated daemon starts on the first request
issued by the `lorri` command.
@@ -18,7 +18,7 @@ in {
package = lib.mkOption {
default = pkgs.lorri;
type = lib.types.package;
- description = lib.mdDoc ''
+ description = ''
The lorri package to use.
'';
defaultText = lib.literalExpression "pkgs.lorri";
diff --git a/third_party/nixpkgs/nixos/modules/services/development/nixseparatedebuginfod.nix b/third_party/nixpkgs/nixos/modules/services/development/nixseparatedebuginfod.nix
index daf85153d3..a2ec0d2c80 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/nixseparatedebuginfod.nix
+++ b/third_party/nixpkgs/nixos/modules/services/development/nixseparatedebuginfod.nix
@@ -90,7 +90,9 @@ in
users.groups.nixseparatedebuginfod = { };
- nix.settings.extra-allowed-users = [ "nixseparatedebuginfod" ];
+ nix.settings = lib.optionalAttrs (lib.versionAtLeast config.nix.package.version "2.4") {
+ extra-allowed-users = [ "nixseparatedebuginfod" ];
+ };
environment.variables.DEBUGINFOD_URLS = "http://${url}";
diff --git a/third_party/nixpkgs/nixos/modules/services/development/rstudio-server/default.nix b/third_party/nixpkgs/nixos/modules/services/development/rstudio-server/default.nix
index fc3756edf0..0126e105b3 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/rstudio-server/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/development/rstudio-server/default.nix
@@ -21,12 +21,12 @@ in
meta.maintainers = with maintainers; [ jbedo cfhammill ];
options.services.rstudio-server = {
- enable = mkEnableOption (lib.mdDoc "RStudio server");
+ enable = mkEnableOption "RStudio server";
serverWorkingDir = mkOption {
type = types.str;
default = "/var/lib/rstudio-server";
- description = lib.mdDoc ''
+ description = ''
Default working directory for server (server-working-dir in rserver.conf).
'';
};
@@ -34,7 +34,7 @@ in
listenAddr = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc ''
+ description = ''
Address to listen on (www-address in rserver.conf).
'';
};
@@ -46,7 +46,7 @@ in
rserverExtraConfig = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra contents for rserver.conf.
'';
};
@@ -54,7 +54,7 @@ in
rsessionExtraConfig = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra contents for resssion.conf.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/development/zammad.nix b/third_party/nixpkgs/nixos/modules/services/development/zammad.nix
index c084d6541a..0659c48e81 100644
--- a/third_party/nixpkgs/nixos/modules/services/development/zammad.nix
+++ b/third_party/nixpkgs/nixos/modules/services/development/zammad.nix
@@ -29,14 +29,14 @@ in
options = {
services.zammad = {
- enable = mkEnableOption (lib.mdDoc "Zammad, a web-based, open source user support/ticketing solution");
+ enable = mkEnableOption "Zammad, a web-based, open source user support/ticketing solution";
package = mkPackageOption pkgs "zammad" { };
dataDir = mkOption {
type = types.path;
default = "/var/lib/zammad";
- description = lib.mdDoc ''
+ description = ''
Path to a folder that will contain Zammad working directory.
'';
};
@@ -45,38 +45,38 @@ in
type = types.str;
default = "127.0.0.1";
example = "192.168.23.42";
- description = lib.mdDoc "Host address.";
+ description = "Host address.";
};
openPorts = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to open firewall ports for Zammad";
+ description = "Whether to open firewall ports for Zammad";
};
port = mkOption {
type = types.port;
default = 3000;
- description = lib.mdDoc "Web service port.";
+ description = "Web service port.";
};
websocketPort = mkOption {
type = types.port;
default = 6042;
- description = lib.mdDoc "Websocket service port.";
+ description = "Websocket service port.";
};
redis = {
createLocally = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to create a local redis automatically.";
+ description = "Whether to create a local redis automatically.";
};
name = mkOption {
type = types.str;
default = "zammad";
- description = lib.mdDoc ''
+ description = ''
Name of the redis server. Only used if `createLocally` is set to true.
'';
};
@@ -84,7 +84,7 @@ in
host = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc ''
+ description = ''
Redis server address.
'';
};
@@ -92,7 +92,7 @@ in
port = mkOption {
type = types.port;
default = 6379;
- description = lib.mdDoc "Port of the redis server.";
+ description = "Port of the redis server.";
};
};
@@ -101,7 +101,7 @@ in
type = types.enum [ "PostgreSQL" "MySQL" ];
default = "PostgreSQL";
example = "MySQL";
- description = lib.mdDoc "Database engine to use.";
+ description = "Database engine to use.";
};
host = mkOption {
@@ -116,7 +116,7 @@ in
MySQL = "localhost";
}.''${config.services.zammad.database.type};
'';
- description = lib.mdDoc ''
+ description = ''
Database host address.
'';
};
@@ -124,13 +124,13 @@ in
port = mkOption {
type = types.nullOr types.port;
default = null;
- description = lib.mdDoc "Database port. Use `null` for default port.";
+ description = "Database port. Use `null` for default port.";
};
name = mkOption {
type = types.str;
default = "zammad";
- description = lib.mdDoc ''
+ description = ''
Database name.
'';
};
@@ -138,14 +138,14 @@ in
user = mkOption {
type = types.nullOr types.str;
default = "zammad";
- description = lib.mdDoc "Database user.";
+ description = "Database user.";
};
passwordFile = mkOption {
type = types.nullOr types.path;
default = null;
example = "/run/keys/zammad-dbpassword";
- description = lib.mdDoc ''
+ description = ''
A file containing the password for {option}`services.zammad.database.user`.
'';
};
@@ -153,7 +153,7 @@ in
createLocally = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to create a local database automatically.";
+ description = "Whether to create a local database automatically.";
};
settings = mkOption {
@@ -163,7 +163,7 @@ in
{
}
'';
- description = lib.mdDoc ''
+ description = ''
The {file}`database.yml` configuration file as key value set.
See \
for list of configuration parameters.
@@ -175,7 +175,7 @@ in
type = types.nullOr types.path;
default = null;
example = "/run/keys/secret_key_base";
- description = lib.mdDoc ''
+ description = ''
The path to a file containing the
`secret_key_base` secret.
diff --git a/third_party/nixpkgs/nixos/modules/services/display-managers/default.nix b/third_party/nixpkgs/nixos/modules/services/display-managers/default.nix
new file mode 100644
index 0000000000..de3feb500f
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/services/display-managers/default.nix
@@ -0,0 +1,260 @@
+{ config, lib, pkgs, ... }:
+
+let
+ cfg = config.services.displayManager;
+
+ installedSessions = pkgs.runCommand "desktops"
+ { # trivial derivation
+ preferLocalBuild = true;
+ allowSubstitutes = false;
+ }
+ ''
+ mkdir -p "$out/share/"{xsessions,wayland-sessions}
+
+ ${lib.concatMapStrings (pkg: ''
+ for n in ${lib.concatStringsSep " " pkg.providedSessions}; do
+ if ! test -f ${pkg}/share/wayland-sessions/$n.desktop -o \
+ -f ${pkg}/share/xsessions/$n.desktop; then
+ echo "Couldn't find provided session name, $n.desktop, in session package ${pkg.name}:"
+ echo " ${pkg}"
+ return 1
+ fi
+ done
+
+ if test -d ${pkg}/share/xsessions; then
+ ${pkgs.buildPackages.xorg.lndir}/bin/lndir ${pkg}/share/xsessions $out/share/xsessions
+ fi
+ if test -d ${pkg}/share/wayland-sessions; then
+ ${pkgs.buildPackages.xorg.lndir}/bin/lndir ${pkg}/share/wayland-sessions $out/share/wayland-sessions
+ fi
+ '') cfg.sessionPackages}
+ '';
+
+ dmDefault = config.services.xserver.desktopManager.default;
+ # fallback default for cases when only default wm is set
+ dmFallbackDefault = if dmDefault != null then dmDefault else "none";
+ wmDefault = config.services.xserver.windowManager.default;
+ defaultSessionFromLegacyOptions = dmFallbackDefault + lib.optionalString (wmDefault != null && wmDefault != "none") "+${wmDefault}";
+in
+{
+ options = {
+ services.displayManager = {
+ enable = lib.mkEnableOption "systemd's display-manager service";
+
+ preStart = lib.mkOption {
+ type = lib.types.lines;
+ default = "";
+ example = "rm -f /var/log/my-display-manager.log";
+ description = "Script executed before the display manager is started.";
+ };
+
+ execCmd = lib.mkOption {
+ type = lib.types.str;
+ example = lib.literalExpression ''"''${pkgs.lightdm}/bin/lightdm"'';
+ description = "Command to start the display manager.";
+ };
+
+ environment = lib.mkOption {
+ type = with lib.types; attrsOf unspecified;
+ default = {};
+ description = "Additional environment variables needed by the display manager.";
+ };
+
+ hiddenUsers = lib.mkOption {
+ type = with lib.types; listOf str;
+ default = [ "nobody" ];
+ description = ''
+ A list of users which will not be shown in the display manager.
+ '';
+ };
+
+ logToFile = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ description = ''
+ Whether the display manager redirects the output of the
+ session script to {file}`~/.xsession-errors`.
+ '';
+ };
+
+ logToJournal = lib.mkOption {
+ type = lib.types.bool;
+ default = true;
+ description = ''
+ Whether the display manager redirects the output of the
+ session script to the systemd journal.
+ '';
+ };
+
+ # Configuration for automatic login. Common for all DM.
+ autoLogin = lib.mkOption {
+ type = lib.types.submodule ({ config, options, ... }: {
+ options = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = config.user != null;
+ defaultText = lib.literalExpression "config.${options.user} != null";
+ description = ''
+ Automatically log in as {option}`autoLogin.user`.
+ '';
+ };
+
+ user = lib.mkOption {
+ type = with lib.types; nullOr str;
+ default = null;
+ description = ''
+ User to be used for the automatic login.
+ '';
+ };
+ };
+ });
+
+ default = {};
+ description = ''
+ Auto login configuration attrset.
+ '';
+ };
+
+ defaultSession = lib.mkOption {
+ type = lib.types.nullOr lib.types.str // {
+ description = "session name";
+ check = d:
+ lib.assertMsg (d != null -> (lib.types.str.check d && lib.elem d config.services.displayManager.sessionData.sessionNames)) ''
+ Default graphical session, '${d}', not found.
+ Valid names for 'services.displayManager.defaultSession' are:
+ ${lib.concatStringsSep "\n " cfg.displayManager.sessionData.sessionNames}
+ '';
+ };
+ default =
+ if dmDefault != null || wmDefault != null then
+ defaultSessionFromLegacyOptions
+ else
+ null;
+ defaultText = lib.literalMD ''
+ Taken from display manager settings or window manager settings, if either is set.
+ '';
+ example = "gnome";
+ description = ''
+ Graphical session to pre-select in the session chooser (only effective for GDM, LightDM and SDDM).
+
+ On GDM, LightDM and SDDM, it will also be used as a session for auto-login.
+ '';
+ };
+
+ sessionData = lib.mkOption {
+ description = "Data exported for display managers’ convenience";
+ internal = true;
+ default = {};
+ };
+
+ sessionPackages = lib.mkOption {
+ type = lib.types.listOf (lib.types.package // {
+ description = "package with provided sessions";
+ check = p: lib.assertMsg
+ (lib.types.package.check p && p ? providedSessions
+ && p.providedSessions != [] && lib.all lib.isString p.providedSessions)
+ ''
+ Package, '${p.name}', did not specify any session names, as strings, in
+ 'passthru.providedSessions'. This is required when used as a session package.
+
+ The session names can be looked up in:
+ ${p}/share/xsessions
+ ${p}/share/wayland-sessions
+ '';
+ });
+ default = [];
+ description = ''
+ A list of packages containing x11 or wayland session files to be passed to the display manager.
+ '';
+ };
+ };
+ };
+
+ imports = [
+ (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "autoLogin" ] [ "services" "displayManager" "autoLogin" ])
+ (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "defaultSession" ] [ "services" "displayManager" "defaultSession" ])
+ (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "hiddenUsers" ] [ "services" "displayManager" "hiddenUsers" ])
+ (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "environment" ] [ "services" "displayManager" "environment" ])
+ (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "execCmd" ] [ "services" "displayManager" "execCmd" ])
+ (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "logToFile" ] [ "services" "displayManager" "logToFile" ])
+ (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "logToJournal" ] [ "services" "displayManager" "logToJournal" ])
+ (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "preStart" ] [ "services" "displayManager" "preStart" ])
+ (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "sessionData" ] [ "services" "displayManager" "sessionData" ])
+ (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "sessionPackages" ] [ "services" "displayManager" "sessionPackages" ])
+ ];
+
+ config = lib.mkIf cfg.enable {
+ assertions = [
+ { assertion = cfg.autoLogin.enable -> cfg.autoLogin.user != null;
+ message = ''
+ services.displayManager.autoLogin.enable requires services.displayManager.autoLogin.user to be set
+ '';
+ }
+ ];
+
+ warnings =
+ lib.mkIf (dmDefault != null || wmDefault != null) [
+ ''
+ The following options are deprecated:
+ ${lib.concatStringsSep "\n " (map ({c, t}: t) (lib.filter ({c, t}: c != null) [
+ { c = dmDefault; t = "- services.xserver.desktopManager.default"; }
+ { c = wmDefault; t = "- services.xserver.windowManager.default"; }
+ ]))}
+ Please use
+ services.displayManager.defaultSession = "${defaultSessionFromLegacyOptions}";
+ instead.
+ ''
+ ];
+
+ # Make xsessions and wayland sessions available in XDG_DATA_DIRS
+ # as some programs have behavior that depends on them being present
+ environment.sessionVariables.XDG_DATA_DIRS = lib.mkIf (cfg.sessionPackages != [ ]) [
+ "${cfg.sessionData.desktops}/share"
+ ];
+
+ services.displayManager.sessionData = {
+ desktops = installedSessions;
+ sessionNames = lib.concatMap (p: p.providedSessions) config.services.displayManager.sessionPackages;
+ # We do not want to force users to set defaultSession when they have only single DE.
+ autologinSession =
+ if cfg.defaultSession != null then
+ cfg.defaultSession
+ else if cfg.sessionData.sessionNames != [] then
+ lib.head cfg.sessionData.sessionNames
+ else
+ null;
+ };
+
+ # so that the service won't be enabled when only startx is used
+ systemd.services.display-manager.enable =
+ let dmConf = config.services.xserver.displayManager;
+ noDmUsed = !(dmConf.gdm.enable
+ || cfg.sddm.enable
+ || dmConf.xpra.enable
+ || dmConf.lightdm.enable);
+ in lib.mkIf noDmUsed (lib.mkDefault false);
+
+ systemd.services.display-manager = {
+ description = "Display Manager";
+ after = [ "acpid.service" "systemd-logind.service" "systemd-user-sessions.service" ];
+ restartIfChanged = false;
+
+ environment = lib.optionalAttrs config.hardware.opengl.setLdLibraryPath {
+ LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.addOpenGLRunpath.driverLink ];
+ } // cfg.environment;
+
+ preStart = cfg.preStart;
+ script = lib.mkIf (config.systemd.services.display-manager.enable == true) cfg.execCmd;
+
+ # Stop restarting if the display manager stops (crashes) 2 times
+ # in one minute. Starting X typically takes 3-4s.
+ startLimitIntervalSec = 30;
+ startLimitBurst = 3;
+ serviceConfig = {
+ Restart = "always";
+ RestartSec = "200ms";
+ SyslogIdentifier = "display-manager";
+ };
+ };
+ };
+}
diff --git a/third_party/nixpkgs/nixos/modules/services/display-managers/greetd.nix b/third_party/nixpkgs/nixos/modules/services/display-managers/greetd.nix
index c2d345152d..c07b225fc4 100644
--- a/third_party/nixpkgs/nixos/modules/services/display-managers/greetd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/display-managers/greetd.nix
@@ -8,7 +8,7 @@ let
in
{
options.services.greetd = {
- enable = mkEnableOption (lib.mdDoc "greetd");
+ enable = mkEnableOption "greetd, a minimal and flexible login manager daemon";
package = mkPackageOption pkgs [ "greetd" "greetd" ] { };
@@ -21,7 +21,7 @@ in
};
}
'';
- description = lib.mdDoc ''
+ description = ''
greetd configuration ([documentation](https://man.sr.ht/~kennylevinsen/greetd/))
as a Nix attribute set.
'';
@@ -30,7 +30,7 @@ in
vt = mkOption {
type = types.int;
default = 1;
- description = lib.mdDoc ''
+ description = ''
The virtual console (tty) that greetd should use. This option also disables getty on that tty.
'';
};
@@ -39,7 +39,7 @@ in
type = types.bool;
default = !(cfg.settings ? initial_session);
defaultText = literalExpression "!(config.services.greetd.settings ? initial_session)";
- description = lib.mdDoc ''
+ description = ''
Whether to restart greetd when it terminates (e.g. on failure).
This is usually desirable so a user can always log in, but should be disabled when using 'settings.initial_session' (autologin),
because every greetd restart will trigger the autologin again.
@@ -60,7 +60,12 @@ in
# This prevents nixos-rebuild from killing greetd by activating getty again
systemd.services."autovt@${tty}".enable = false;
+ # Enable desktop session data
+ services.displayManager.enable = lib.mkDefault true;
+
systemd.services.greetd = {
+ aliases = [ "display-manager.service" ];
+
unitConfig = {
Wants = [
"systemd-user-sessions.service"
diff --git a/third_party/nixpkgs/nixos/modules/services/x11/display-managers/sddm.nix b/third_party/nixpkgs/nixos/modules/services/display-managers/sddm.nix
similarity index 51%
rename from third_party/nixpkgs/nixos/modules/services/x11/display-managers/sddm.nix
rename to third_party/nixpkgs/nixos/modules/services/display-managers/sddm.nix
index 5b7f4bc58d..aaf1f0dcfc 100644
--- a/third_party/nixpkgs/nixos/modules/services/x11/display-managers/sddm.nix
+++ b/third_party/nixpkgs/nixos/modules/services/display-managers/sddm.nix
@@ -1,27 +1,32 @@
{ config, lib, pkgs, ... }:
-with lib;
let
xcfg = config.services.xserver;
- dmcfg = xcfg.displayManager;
- cfg = dmcfg.sddm;
+ dmcfg = config.services.displayManager;
+ cfg = config.services.displayManager.sddm;
xEnv = config.systemd.services.display-manager.environment;
- sddm = cfg.package.override(old: {
+ sddm = cfg.package.override (old: {
withWayland = cfg.wayland.enable;
- extraPackages = old.extraPackages or [] ++ cfg.extraPackages;
+ extraPackages = old.extraPackages or [ ] ++ cfg.extraPackages;
});
iniFmt = pkgs.formats.ini { };
+ inherit (lib)
+ concatMapStrings concatStringsSep getExe
+ attrNames getAttr optionalAttrs optionalString
+ mkRemovedOptionModule mkRenamedOptionModule mkIf mkEnableOption mkOption mkPackageOption types
+ ;
+
xserverWrapper = pkgs.writeShellScript "xserver-wrapper" ''
${concatMapStrings (n: "export ${n}=\"${getAttr n xEnv}\"\n") (attrNames xEnv)}
- exec systemd-cat -t xserver-wrapper ${dmcfg.xserverBin} ${toString dmcfg.xserverArgs} "$@"
+ exec systemd-cat -t xserver-wrapper ${xcfg.displayManager.xserverBin} ${toString xcfg.displayManager.xserverArgs} "$@"
'';
Xsetup = pkgs.writeShellScript "Xsetup" ''
${cfg.setupScript}
- ${dmcfg.setupCommands}
+ ${xcfg.displayManager.setupCommands}
'';
Xstop = pkgs.writeShellScript "Xstop" ''
@@ -35,15 +40,24 @@ let
Numlock = if cfg.autoNumlock then "on" else "none"; # on, off none
# Implementation is done via pkgs/applications/display-managers/sddm/sddm-default-session.patch
- DefaultSession = optionalString (dmcfg.defaultSession != null) "${dmcfg.defaultSession}.desktop";
+ DefaultSession = optionalString (config.services.displayManager.defaultSession != null) "${config.services.displayManager.defaultSession}.desktop";
DisplayServer = if cfg.wayland.enable then "wayland" else "x11";
+ } // optionalAttrs (cfg.wayland.compositor == "kwin") {
+ GreeterEnvironment = concatStringsSep " " [
+ "LANG=C.UTF-8"
+ "QT_WAYLAND_SHELL_INTEGRATION=layer-shell"
+ ];
+ InputMethod = ""; # needed if we are using --inputmethod with kwin
};
Theme = {
Current = cfg.theme;
ThemeDir = "/run/current-system/sw/share/sddm/themes";
FacesDir = "/run/current-system/sw/share/sddm/faces";
+ } // optionalAttrs (cfg.theme == "breeze") {
+ CursorTheme = "breeze_cursors";
+ CursorSize = 24;
};
Users = {
@@ -52,7 +66,7 @@ let
HideShells = "/run/current-system/sw/bin/nologin";
};
- X11 = {
+ X11 = optionalAttrs xcfg.enable {
MinimumVT = if xcfg.tty != null then xcfg.tty else 7;
ServerPath = toString xserverWrapper;
XephyrPath = "${pkgs.xorg.xorgserver.out}/bin/Xephyr";
@@ -69,7 +83,7 @@ let
SessionDir = "${dmcfg.sessionData.desktops}/share/wayland-sessions";
CompositorCommand = lib.optionalString cfg.wayland.enable cfg.wayland.compositorCommand;
};
- } // lib.optionalAttrs dmcfg.autoLogin.enable {
+ } // optionalAttrs dmcfg.autoLogin.enable {
Autologin = {
User = dmcfg.autoLogin.user;
Session = autoLoginSessionName;
@@ -83,40 +97,81 @@ let
autoLoginSessionName =
"${dmcfg.sessionData.autologinSession}.desktop";
+ compositorCmds = {
+ kwin = concatStringsSep " " [
+ "${lib.getBin pkgs.kdePackages.kwin}/bin/kwin_wayland"
+ "--no-global-shortcuts"
+ "--no-kactivities"
+ "--no-lockscreen"
+ "--locale1"
+ ];
+ # This is basically the upstream default, but with Weston referenced by full path
+ # and the configuration generated from NixOS options.
+ weston =
+ let
+ westonIni = (pkgs.formats.ini { }).generate "weston.ini" {
+ libinput = {
+ enable-tap = xcfg.libinput.mouse.tapping;
+ left-handed = xcfg.libinput.mouse.leftHanded;
+ };
+ keyboard = {
+ keymap_model = xcfg.xkb.model;
+ keymap_layout = xcfg.xkb.layout;
+ keymap_variant = xcfg.xkb.variant;
+ keymap_options = xcfg.xkb.options;
+ };
+ };
+ in
+ "${getExe pkgs.weston} --shell=kiosk -c ${westonIni}";
+ };
+
in
{
imports = [
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "autoLogin" "minimumUid" ] [ "services" "displayManager" "sddm" "autoLogin" "minimumUid" ])
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "autoLogin" "relogin" ] [ "services" "displayManager" "sddm" "autoLogin" "relogin" ])
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "autoNumlock" ] [ "services" "displayManager" "sddm" "autoNumlock" ])
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "enable" ] [ "services" "displayManager" "sddm" "enable" ])
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "enableHidpi" ] [ "services" "displayManager" "sddm" "enableHidpi" ])
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "extraPackages" ] [ "services" "displayManager" "sddm" "extraPackages" ])
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "package" ] [ "services" "displayManager" "sddm" "package" ])
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "settings" ] [ "services" "displayManager" "sddm" "settings" ])
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "setupScript" ] [ "services" "displayManager" "sddm" "setupScript" ])
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "stopScript" ] [ "services" "displayManager" "sddm" "stopScript" ])
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "theme" ] [ "services" "displayManager" "sddm" "theme" ])
+ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "wayland" "enable" ] [ "services" "displayManager" "sddm" "wayland" "enable" ])
+
(mkRemovedOptionModule
- [ "services" "xserver" "displayManager" "sddm" "themes" ]
- "Set the option `services.xserver.displayManager.sddm.package' instead.")
+ [ "services" "displayManager" "sddm" "themes" ]
+ "Set the option `services.displayManager.sddm.package' instead.")
(mkRenamedOptionModule
- [ "services" "xserver" "displayManager" "sddm" "autoLogin" "enable" ]
- [ "services" "xserver" "displayManager" "autoLogin" "enable" ])
+ [ "services" "displayManager" "sddm" "autoLogin" "enable" ]
+ [ "services" "displayManager" "autoLogin" "enable" ])
(mkRenamedOptionModule
- [ "services" "xserver" "displayManager" "sddm" "autoLogin" "user" ]
- [ "services" "xserver" "displayManager" "autoLogin" "user" ])
+ [ "services" "displayManager" "sddm" "autoLogin" "user" ]
+ [ "services" "displayManager" "autoLogin" "user" ])
(mkRemovedOptionModule
- [ "services" "xserver" "displayManager" "sddm" "extraConfig" ]
- "Set the option `services.xserver.displayManager.sddm.settings' instead.")
+ [ "services" "displayManager" "sddm" "extraConfig" ]
+ "Set the option `services.displayManager.sddm.settings' instead.")
];
options = {
- services.xserver.displayManager.sddm = {
+ services.displayManager.sddm = {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable sddm as the display manager.
'';
};
- package = mkPackageOption pkgs [ "plasma5Packages" "sddm" ] {};
+ package = mkPackageOption pkgs [ "plasma5Packages" "sddm" ] { };
enableHidpi = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable automatic HiDPI mode.
'';
};
@@ -130,7 +185,7 @@ in
Session = "plasma.desktop";
};
};
- description = lib.mdDoc ''
+ description = ''
Extra settings merged in and overwriting defaults in sddm.conf.
'';
};
@@ -138,16 +193,16 @@ in
theme = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Greeter theme to use.
'';
};
extraPackages = mkOption {
type = types.listOf types.package;
- default = [];
+ default = [ ];
defaultText = "[]";
- description = lib.mdDoc ''
+ description = ''
Extra Qt plugins / QML libraries to add to the environment.
'';
};
@@ -155,7 +210,7 @@ in
autoNumlock = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable numlock at login.
'';
};
@@ -168,7 +223,7 @@ in
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
'';
- description = lib.mdDoc ''
+ description = ''
A script to execute when starting the display server. DEPRECATED, please
use {option}`services.xserver.displayManager.setupCommands`.
'';
@@ -177,7 +232,7 @@ in
stopScript = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
A script to execute when stopping the display server.
'';
};
@@ -187,7 +242,7 @@ in
relogin = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If true automatic login will kick in again on session exit (logout), otherwise it
will only log in automatically when the display-manager is started.
'';
@@ -196,7 +251,7 @@ in
minimumUid = mkOption {
type = types.ints.u16;
default = 1000;
- description = lib.mdDoc ''
+ description = ''
Minimum user ID for auto-login user.
'';
};
@@ -206,25 +261,17 @@ in
wayland = {
enable = mkEnableOption "experimental Wayland support";
+ compositor = mkOption {
+ description = "The compositor to use: ${lib.concatStringsSep ", " (builtins.attrNames compositorCmds)}";
+ type = types.enum (builtins.attrNames compositorCmds);
+ default = "weston";
+ };
+
compositorCommand = mkOption {
type = types.str;
internal = true;
-
- # This is basically the upstream default, but with Weston referenced by full path
- # and the configuration generated from NixOS options.
- default = let westonIni = (pkgs.formats.ini {}).generate "weston.ini" {
- libinput = {
- enable-tap = xcfg.libinput.mouse.tapping;
- left-handed = xcfg.libinput.mouse.leftHanded;
- };
- keyboard = {
- keymap_model = xcfg.xkb.model;
- keymap_layout = xcfg.xkb.layout;
- keymap_variant = xcfg.xkb.variant;
- keymap_options = xcfg.xkb.options;
- };
- }; in "${pkgs.weston}/bin/weston --shell=kiosk -c ${westonIni}";
- description = lib.mdDoc "Command used to start the selected compositor";
+ default = compositorCmds.${cfg.wayland.compositor};
+ description = "Command used to start the selected compositor";
};
};
};
@@ -234,20 +281,23 @@ in
assertions = [
{
- assertion = xcfg.enable;
+ assertion = xcfg.enable || cfg.wayland.enable;
message = ''
- SDDM requires services.xserver.enable to be true
+ SDDM requires either services.xserver.enable or services.displayManager.sddm.wayland.enable to be true
'';
}
{
- assertion = dmcfg.autoLogin.enable -> autoLoginSessionName != null;
+ assertion = config.services.displayManager.autoLogin.enable -> autoLoginSessionName != null;
message = ''
- SDDM auto-login requires that services.xserver.displayManager.defaultSession is set.
+ SDDM auto-login requires that services.displayManager.defaultSession is set.
'';
}
];
- services.xserver.displayManager.job.execCmd = "exec /run/current-system/sw/bin/sddm";
+ services.displayManager = {
+ enable = true;
+ execCmd = "exec /run/current-system/sw/bin/sddm";
+ };
security.pam.services = {
sddm.text = ''
@@ -293,30 +343,40 @@ in
uid = config.ids.uids.sddm;
};
- environment.etc."sddm.conf".source = cfgFile;
- environment.pathsToLink = [
- "/share/sddm"
- ];
+ environment = {
+ etc."sddm.conf".source = cfgFile;
+ pathsToLink = [
+ "/share/sddm"
+ ];
+ systemPackages = [ sddm ];
+ };
users.groups.sddm.gid = config.ids.gids.sddm;
- environment.systemPackages = [ sddm ];
- services.dbus.packages = [ sddm ];
- systemd.tmpfiles.packages = [ sddm ];
+ services = {
+ dbus.packages = [ sddm ];
+ xserver = {
+ # To enable user switching, allow sddm to allocate TTYs/displays dynamically.
+ tty = null;
+ display = null;
+ };
+ };
- # We're not using the upstream unit, so copy these: https://github.com/sddm/sddm/blob/develop/services/sddm.service.in
- systemd.services.display-manager.after = [
- "systemd-user-sessions.service"
- "getty@tty7.service"
- "plymouth-quit.service"
- "systemd-logind.service"
- ];
- systemd.services.display-manager.conflicts = [
- "getty@tty7.service"
- ];
+ systemd = {
+ tmpfiles.packages = [ sddm ];
- # To enable user switching, allow sddm to allocate TTYs/displays dynamically.
- services.xserver.tty = null;
- services.xserver.display = null;
+ # We're not using the upstream unit, so copy these: https://github.com/sddm/sddm/blob/develop/services/sddm.service.in
+ services.display-manager = {
+ after = [
+ "systemd-user-sessions.service"
+ "getty@tty7.service"
+ "plymouth-quit.service"
+ "systemd-logind.service"
+ ];
+ conflicts = [
+ "getty@tty7.service"
+ ];
+ };
+ };
};
}
diff --git a/third_party/nixpkgs/nixos/modules/services/editors/emacs.md b/third_party/nixpkgs/nixos/modules/services/editors/emacs.md
index 02f47b098d..885f927422 100644
--- a/third_party/nixpkgs/nixos/modules/services/editors/emacs.md
+++ b/third_party/nixpkgs/nixos/modules/services/editors/emacs.md
@@ -178,7 +178,7 @@ file {file}`configuration.nix` to make it contain:
::: {.example #module-services-emacs-configuration-nix}
### Custom Emacs in `configuration.nix`
-```
+```nix
{
environment.systemPackages = [
# [...]
@@ -203,7 +203,7 @@ adding it to your {file}`~/.config/nixpkgs/config.nix` (see
::: {.example #module-services-emacs-config-nix}
### Custom Emacs in `~/.config/nixpkgs/config.nix`
-```
+```nix
{
packageOverrides = super: let self = super.pkgs; in {
myemacs = import ./emacs.nix { pkgs = self; };
@@ -228,7 +228,7 @@ only use {command}`emacsclient`), you can change your file
::: {.example #ex-emacsGtk3Nix}
### Custom Emacs build
-```
+```nix
{ pkgs ? import {} }:
let
myEmacs = (pkgs.emacs.override {
@@ -242,7 +242,7 @@ let
rm $out/share/applications/emacs.desktop
'';
});
-in [...]
+in [ /* ... */ ]
```
:::
@@ -262,8 +262,10 @@ with the user's login session.
To install and enable the {command}`systemd` user service for Emacs
daemon, add the following to your {file}`configuration.nix`:
-```
-services.emacs.enable = true;
+```nix
+{
+ services.emacs.enable = true;
+}
```
The {var}`services.emacs.package` option allows a custom
@@ -323,9 +325,11 @@ In general, {command}`systemd` user services are globally enabled
by symlinks in {file}`/etc/systemd/user`. In the case where
Emacs daemon is not wanted for all users, it is possible to install the
service but not globally enable it:
-```
-services.emacs.enable = false;
-services.emacs.install = true;
+```nix
+{
+ services.emacs.enable = false;
+ services.emacs.install = true;
+}
```
To enable the {command}`systemd` user service for just the
diff --git a/third_party/nixpkgs/nixos/modules/services/editors/emacs.nix b/third_party/nixpkgs/nixos/modules/services/editors/emacs.nix
index ff6fd85d8a..35f257cee1 100644
--- a/third_party/nixpkgs/nixos/modules/services/editors/emacs.nix
+++ b/third_party/nixpkgs/nixos/modules/services/editors/emacs.nix
@@ -22,7 +22,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable a user service for the Emacs daemon. Use `emacsclient` to connect to the
daemon. If `true`, {var}`services.emacs.install` is
considered `true`, whatever its value.
@@ -32,7 +32,7 @@ in
install = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to install a user service for the Emacs daemon. Once
the service is started, use emacsclient to connect to the
daemon.
@@ -49,7 +49,7 @@ in
defaultEditor = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
When enabled, configures emacsclient to be the default editor
using the EDITOR environment variable.
'';
@@ -59,7 +59,7 @@ in
type = types.bool;
default = config.services.xserver.enable;
defaultText = literalExpression "config.services.xserver.enable";
- description = lib.mdDoc ''
+ description = ''
Start emacs with the graphical session instead of any session. Without this, emacs clients will not be able to create frames in the graphical session.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/editors/haste.nix b/third_party/nixpkgs/nixos/modules/services/editors/haste.nix
index a46415d436..f2a40e62e7 100644
--- a/third_party/nixpkgs/nixos/modules/services/editors/haste.nix
+++ b/third_party/nixpkgs/nixos/modules/services/editors/haste.nix
@@ -10,11 +10,11 @@ let
in
{
options.services.haste-server = {
- enable = mkEnableOption (lib.mdDoc "haste-server");
- openFirewall = mkEnableOption (lib.mdDoc "firewall passthrough for haste-server");
+ enable = mkEnableOption "haste-server";
+ openFirewall = mkEnableOption "firewall passthrough for haste-server";
settings = mkOption {
- description = lib.mdDoc ''
+ description = ''
Configuration for haste-server.
For documentation see [project readme](https://github.com/toptal/haste-server#settings)
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/editors/infinoted.nix b/third_party/nixpkgs/nixos/modules/services/editors/infinoted.nix
index 976163d4d0..2a7f1d45c2 100644
--- a/third_party/nixpkgs/nixos/modules/services/editors/infinoted.nix
+++ b/third_party/nixpkgs/nixos/modules/services/editors/infinoted.nix
@@ -6,14 +6,14 @@ let
cfg = config.services.infinoted;
in {
options.services.infinoted = {
- enable = mkEnableOption (lib.mdDoc "infinoted");
+ enable = mkEnableOption "infinoted";
package = mkPackageOption pkgs "libinfinity" { };
keyFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Private key to use for TLS
'';
};
@@ -21,7 +21,7 @@ in {
certificateFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Server certificate to use for TLS
'';
};
@@ -29,7 +29,7 @@ in {
certificateChain = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Chain of CA-certificates to which our `certificateFile` is relative.
Optional for TLS.
'';
@@ -38,7 +38,7 @@ in {
securityPolicy = mkOption {
type = types.enum ["no-tls" "allow-tls" "require-tls"];
default = "require-tls";
- description = lib.mdDoc ''
+ description = ''
How strictly to enforce clients connection with TLS.
'';
};
@@ -46,7 +46,7 @@ in {
port = mkOption {
type = types.port;
default = 6523;
- description = lib.mdDoc ''
+ description = ''
Port to listen on
'';
};
@@ -54,7 +54,7 @@ in {
rootDirectory = mkOption {
type = types.path;
default = "/var/lib/infinoted/documents/";
- description = lib.mdDoc ''
+ description = ''
Root of the directory structure to serve
'';
};
@@ -62,7 +62,7 @@ in {
plugins = mkOption {
type = types.listOf types.str;
default = [ "note-text" "note-chat" "logging" "autosave" ];
- description = lib.mdDoc ''
+ description = ''
Plugins to enable
'';
};
@@ -70,7 +70,7 @@ in {
passwordFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
File to read server-wide password from
'';
};
@@ -81,7 +81,7 @@ in {
[autosave]
interval=10
'';
- description = lib.mdDoc ''
+ description = ''
Additional configuration to append to infinoted.conf
'';
};
@@ -89,7 +89,7 @@ in {
user = mkOption {
type = types.str;
default = "infinoted";
- description = lib.mdDoc ''
+ description = ''
What to call the dedicated user under which infinoted is run
'';
};
@@ -97,7 +97,7 @@ in {
group = mkOption {
type = types.str;
default = "infinoted";
- description = lib.mdDoc ''
+ description = ''
What to call the primary group of the dedicated user under which infinoted is run
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/finance/odoo.nix b/third_party/nixpkgs/nixos/modules/services/finance/odoo.nix
index aa9bd0014d..45fb9c7c23 100644
--- a/third_party/nixpkgs/nixos/modules/services/finance/odoo.nix
+++ b/third_party/nixpkgs/nixos/modules/services/finance/odoo.nix
@@ -9,7 +9,7 @@ in
{
options = {
services.odoo = {
- enable = mkEnableOption (lib.mdDoc "odoo");
+ enable = mkEnableOption "odoo, an open source ERP and CRM system";
package = mkPackageOption pkgs "odoo" { };
@@ -17,13 +17,13 @@ in
type = with types; listOf package;
default = [];
example = literalExpression "[ pkgs.odoo_enterprise ]";
- description = lib.mdDoc "Odoo addons.";
+ description = "Odoo addons.";
};
settings = mkOption {
type = format.type;
default = {};
- description = lib.mdDoc ''
+ description = ''
Odoo configuration settings. For more details see
'';
example = literalExpression ''
@@ -36,7 +36,7 @@ in
domain = mkOption {
type = with types; nullOr str;
- description = lib.mdDoc "Domain to host Odoo with nginx";
+ description = "Domain to host Odoo with nginx";
default = null;
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/games/archisteamfarm.nix b/third_party/nixpkgs/nixos/modules/services/games/archisteamfarm.nix
index 4bb7234f43..33898f8387 100644
--- a/third_party/nixpkgs/nixos/modules/services/games/archisteamfarm.nix
+++ b/third_party/nixpkgs/nixos/modules/services/games/archisteamfarm.nix
@@ -31,7 +31,7 @@ in
options.services.archisteamfarm = {
enable = lib.mkOption {
type = lib.types.bool;
- description = lib.mdDoc ''
+ description = ''
If enabled, starts the ArchisSteamFarm service.
For configuring the SteamGuard token you will need to use the web-ui, which is enabled by default over on 127.0.0.1:1242.
You cannot configure ASF in any way outside of nix, since all the config files get wiped on restart and replaced with the programnatically set ones by nix.
@@ -43,7 +43,7 @@ in
type = lib.types.submodule {
options = {
enable = lib.mkEnableOption "" // {
- description = lib.mdDoc "Whether to start the web-ui. This is the preferred way of configuring things such as the steam guard token.";
+ description = "Whether to start the web-ui. This is the preferred way of configuring things such as the steam guard token.";
};
package = lib.mkPackageOption pkgs [ "ArchiSteamFarm" "ui" ] {
@@ -61,7 +61,7 @@ in
example = {
enable = false;
};
- description = lib.mdDoc "The Web-UI hosted on 127.0.0.1:1242.";
+ description = "The Web-UI hosted on 127.0.0.1:1242.";
};
package = lib.mkPackageOption pkgs "ArchiSteamFarm" {
@@ -76,14 +76,14 @@ in
dataDir = lib.mkOption {
type = lib.types.path;
default = "/var/lib/archisteamfarm";
- description = lib.mdDoc ''
+ description = ''
The ASF home directory used to store all data.
If left as the default value this directory will automatically be created before the ASF server starts, otherwise the sysadmin is responsible for ensuring the directory exists with appropriate ownership and permissions.'';
};
settings = lib.mkOption {
type = format.type;
- description = lib.mdDoc ''
+ description = ''
The ASF.json file, all the options are documented [here](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Configuration#global-config).
Do note that `AutoRestart` and `UpdateChannel` is always to `false` respectively `0` because NixOS takes care of updating everything.
`Headless` is also always set to `true` because there is no way to provide inputs via a systemd service.
@@ -98,12 +98,12 @@ in
ipcPasswordFile = lib.mkOption {
type = with lib.types; nullOr path;
default = null;
- description = lib.mdDoc "Path to a file containing the password. The file must be readable by the `archisteamfarm` user/group.";
+ description = "Path to a file containing the password. The file must be readable by the `archisteamfarm` user/group.";
};
ipcSettings = lib.mkOption {
type = format.type;
- description = lib.mdDoc ''
+ description = ''
Settings to write to IPC.config.
All options can be found [here](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/IPC#custom-configuration).
'';
@@ -124,13 +124,13 @@ in
options = {
username = lib.mkOption {
type = lib.types.str;
- description = lib.mdDoc "Name of the user to log in. Default is attribute name.";
+ description = "Name of the user to log in. Default is attribute name.";
default = "";
};
passwordFile = lib.mkOption {
type = with lib.types; nullOr path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to a file containing the password. The file must be readable by the `archisteamfarm` user/group.
Omit or set to null to provide the password a different way, such as through the web-ui.
'';
@@ -138,18 +138,18 @@ in
enabled = lib.mkOption {
type = lib.types.bool;
default = true;
- description = lib.mdDoc "Whether to enable the bot on startup.";
+ description = "Whether to enable the bot on startup.";
};
settings = lib.mkOption {
type = lib.types.attrs;
- description = lib.mdDoc ''
+ description = ''
Additional settings that are documented [here](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Configuration#bot-config).
'';
default = { };
};
};
});
- description = lib.mdDoc ''
+ description = ''
Bots name and configuration.
'';
example = {
@@ -255,7 +255,7 @@ in
ln -fs ${ipc-config} config/IPC.config
''}
- ${lib.optionalString (cfg.ipcSettings != {}) ''
+ ${lib.optionalString (cfg.bots != {}) ''
ln -fs ${createBotsScript}/* config/
''}
diff --git a/third_party/nixpkgs/nixos/modules/services/games/armagetronad.nix b/third_party/nixpkgs/nixos/modules/services/games/armagetronad.nix
new file mode 100644
index 0000000000..71c8528a9f
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/services/games/armagetronad.nix
@@ -0,0 +1,268 @@
+{ config, lib, pkgs, ... }:
+let
+ inherit (lib) mkEnableOption mkIf mkOption mkMerge literalExpression;
+ inherit (lib) mapAttrsToList filterAttrs unique recursiveUpdate types;
+
+ mkValueStringArmagetron = with lib; v:
+ if isInt v then toString v
+ else if isFloat v then toString v
+ else if isString v then v
+ else if true == v then "1"
+ else if false == v then "0"
+ else if null == v then ""
+ else throw "unsupported type: ${builtins.typeOf v}: ${(lib.generators.toPretty {} v)}";
+
+ settingsFormat = pkgs.formats.keyValue {
+ mkKeyValue = lib.generators.mkKeyValueDefault
+ {
+ mkValueString = mkValueStringArmagetron;
+ } " ";
+ listsAsDuplicateKeys = true;
+ };
+
+ cfg = config.services.armagetronad;
+ enabledServers = lib.filterAttrs (n: v: v.enable) cfg.servers;
+ nameToId = serverName: "armagetronad-${serverName}";
+ getStateDirectory = serverName: "armagetronad/${serverName}";
+ getServerRoot = serverName: "/var/lib/${getStateDirectory serverName}";
+in
+{
+ options = {
+ services.armagetronad = {
+ servers = mkOption {
+ description = "Armagetron server definitions.";
+ default = { };
+ type = types.attrsOf (types.submodule {
+ options = {
+ enable = mkEnableOption "armagetronad";
+
+ package = lib.mkPackageOptionMD pkgs "armagetronad-dedicated" {
+ example = ''
+ pkgs.armagetronad."0.2.9-sty+ct+ap".dedicated
+ '';
+ extraDescription = ''
+ Ensure that you use a derivation which contains the path `bin/armagetronad-dedicated`.
+ '';
+ };
+
+ host = mkOption {
+ type = types.str;
+ default = "0.0.0.0";
+ description = "Host to listen on. Used for SERVER_IP.";
+ };
+
+ port = mkOption {
+ type = types.port;
+ default = 4534;
+ description = "Port to listen on. Used for SERVER_PORT.";
+ };
+
+ dns = mkOption {
+ type = types.nullOr types.str;
+ default = null;
+ description = "DNS address to use for this server. Optional.";
+ };
+
+ openFirewall = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Set to true to open the configured UDP port for Armagetron Advanced.";
+ };
+
+ name = mkOption {
+ type = types.str;
+ description = "The name of this server.";
+ };
+
+ settings = mkOption {
+ type = settingsFormat.type;
+ default = { };
+ description = ''
+ Armagetron Advanced server rules configuration. Refer to:
+
+ or `armagetronad-dedicated --doc` for a list.
+
+ This attrset is used to populate `settings_custom.cfg`; see:
+
+ '';
+ example = literalExpression ''
+ {
+ CYCLE_RUBBER = 40;
+ }
+ '';
+ };
+
+ roundSettings = mkOption {
+ type = settingsFormat.type;
+ default = { };
+ description = ''
+ Armagetron Advanced server per-round configuration. Refer to:
+
+ or `armagetronad-dedicated --doc` for a list.
+
+ This attrset is used to populate `everytime.cfg`; see:
+
+ '';
+ example = literalExpression ''
+ {
+ SAY = [
+ "Hosted on NixOS"
+ "https://nixos.org"
+ "iD Tech High Rubber rul3z!! Happy New Year 2008!!1"
+ ];
+ }
+ '';
+ };
+ };
+ });
+ };
+ };
+ };
+
+ config = mkIf (enabledServers != { }) {
+ systemd.tmpfiles.settings = mkMerge (mapAttrsToList
+ (serverName: serverCfg:
+ let
+ serverId = nameToId serverName;
+ serverRoot = getServerRoot serverName;
+ serverInfo = (
+ {
+ SERVER_IP = serverCfg.host;
+ SERVER_PORT = serverCfg.port;
+ SERVER_NAME = serverCfg.name;
+ } // (lib.optionalAttrs (serverCfg.dns != null) { SERVER_DNS = serverCfg.dns; })
+ );
+ customSettings = serverCfg.settings;
+ everytimeSettings = serverCfg.roundSettings;
+
+ serverInfoCfg = settingsFormat.generate "server_info.${serverName}.cfg" serverInfo;
+ customSettingsCfg = settingsFormat.generate "settings_custom.${serverName}.cfg" customSettings;
+ everytimeSettingsCfg = settingsFormat.generate "everytime.${serverName}.cfg" everytimeSettings;
+ in
+ {
+ "10-armagetronad-${serverId}" = {
+ "${serverRoot}/data" = {
+ d = {
+ group = serverId;
+ user = serverId;
+ mode = "0750";
+ };
+ };
+ "${serverRoot}/settings" = {
+ d = {
+ group = serverId;
+ user = serverId;
+ mode = "0750";
+ };
+ };
+ "${serverRoot}/var" = {
+ d = {
+ group = serverId;
+ user = serverId;
+ mode = "0750";
+ };
+ };
+ "${serverRoot}/resource" = {
+ d = {
+ group = serverId;
+ user = serverId;
+ mode = "0750";
+ };
+ };
+ "${serverRoot}/input" = {
+ "f+" = {
+ group = serverId;
+ user = serverId;
+ mode = "0640";
+ };
+ };
+ "${serverRoot}/settings/server_info.cfg" = {
+ "L+" = {
+ argument = "${serverInfoCfg}";
+ };
+ };
+ "${serverRoot}/settings/settings_custom.cfg" = {
+ "L+" = {
+ argument = "${customSettingsCfg}";
+ };
+ };
+ "${serverRoot}/settings/everytime.cfg" = {
+ "L+" = {
+ argument = "${everytimeSettingsCfg}";
+ };
+ };
+ };
+ }
+ )
+ enabledServers
+ );
+
+ systemd.services = mkMerge (mapAttrsToList
+ (serverName: serverCfg:
+ let
+ serverId = nameToId serverName;
+ in
+ {
+ "armagetronad-${serverName}" = {
+ description = "Armagetron Advanced Dedicated Server for ${serverName}";
+ wants = [ "basic.target" ];
+ after = [ "basic.target" "network.target" "multi-user.target" ];
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig =
+ let
+ serverRoot = getServerRoot serverName;
+ in
+ {
+ Type = "simple";
+ StateDirectory = getStateDirectory serverName;
+ ExecStart = "${lib.getExe serverCfg.package} --daemon --input ${serverRoot}/input --userdatadir ${serverRoot}/data --userconfigdir ${serverRoot}/settings --vardir ${serverRoot}/var --autoresourcedir ${serverRoot}/resource";
+ Restart = "on-failure";
+ CapabilityBoundingSet = "";
+ LockPersonality = true;
+ NoNewPrivileges = true;
+ PrivateDevices = true;
+ PrivateTmp = true;
+ PrivateUsers = true;
+ ProtectClock = true;
+ ProtectControlGroups = true;
+ ProtectHome = true;
+ ProtectHostname = true;
+ ProtectKernelLogs = true;
+ ProtectKernelModules = true;
+ ProtectKernelTunables = true;
+ ProtectProc = "invisible";
+ ProtectSystem = "strict";
+ RestrictNamespaces = true;
+ RestrictSUIDSGID = true;
+ User = serverId;
+ Group = serverId;
+ };
+ };
+ })
+ enabledServers
+ );
+
+ networking.firewall.allowedUDPPorts =
+ unique (mapAttrsToList (serverName: serverCfg: serverCfg.port) (filterAttrs (serverName: serverCfg: serverCfg.openFirewall) enabledServers));
+
+ users.users = mkMerge (mapAttrsToList
+ (serverName: serverCfg:
+ {
+ ${nameToId serverName} = {
+ group = nameToId serverName;
+ description = "Armagetron Advanced dedicated user for server ${serverName}";
+ isSystemUser = true;
+ };
+ })
+ enabledServers
+ );
+
+ users.groups = mkMerge (mapAttrsToList
+ (serverName: serverCfg:
+ {
+ ${nameToId serverName} = { };
+ })
+ enabledServers
+ );
+ };
+}
diff --git a/third_party/nixpkgs/nixos/modules/services/games/crossfire-server.nix b/third_party/nixpkgs/nixos/modules/services/games/crossfire-server.nix
index b19a86253c..314b4bad9a 100644
--- a/third_party/nixpkgs/nixos/modules/services/games/crossfire-server.nix
+++ b/third_party/nixpkgs/nixos/modules/services/games/crossfire-server.nix
@@ -10,7 +10,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If enabled, the Crossfire game server will be started at boot.
'';
};
@@ -27,7 +27,7 @@ in {
type = types.str;
default = "${cfg.package}/share/crossfire";
defaultText = literalExpression ''"''${config.services.crossfire.package}/share/crossfire"'';
- description = lib.mdDoc ''
+ description = ''
Where to load readonly data from -- maps, archetypes, treasure tables,
and the like. If you plan to edit the data on the live server (rather
than overlaying the crossfire-maps and crossfire-arch packages and
@@ -39,7 +39,7 @@ in {
stateDir = mkOption {
type = types.str;
default = "/var/lib/crossfire";
- description = lib.mdDoc ''
+ description = ''
Where to store runtime data (save files, persistent items, etc).
If left at the default, this will be automatically created on server
@@ -52,14 +52,14 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to open ports in the firewall for the server.
'';
};
configFiles = mkOption {
type = types.attrsOf types.str;
- description = lib.mdDoc ''
+ description = ''
Text to append to the corresponding configuration files. Note that the
files given in the example are *not* the complete set of files available
to customize; look in /etc/crossfire after enabling the server to see
diff --git a/third_party/nixpkgs/nixos/modules/services/games/deliantra-server.nix b/third_party/nixpkgs/nixos/modules/services/games/deliantra-server.nix
index b405f338fe..401a453ba9 100644
--- a/third_party/nixpkgs/nixos/modules/services/games/deliantra-server.nix
+++ b/third_party/nixpkgs/nixos/modules/services/games/deliantra-server.nix
@@ -10,7 +10,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If enabled, the Deliantra game server will be started at boot.
'';
};
@@ -27,7 +27,7 @@ in {
type = types.str;
default = "${pkgs.deliantra-data}";
defaultText = literalExpression ''"''${pkgs.deliantra-data}"'';
- description = lib.mdDoc ''
+ description = ''
Where to store readonly data (maps, archetypes, sprites, etc).
Note that if you plan to use the live map editor (rather than editing
the maps offline and then nixos-rebuilding), THIS MUST BE WRITEABLE --
@@ -39,7 +39,7 @@ in {
stateDir = mkOption {
type = types.str;
default = "/var/lib/deliantra";
- description = lib.mdDoc ''
+ description = ''
Where to store runtime data (save files, persistent items, etc).
If left at the default, this will be automatically created on server
@@ -52,14 +52,14 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to open ports in the firewall for the server.
'';
};
configFiles = mkOption {
type = types.attrsOf types.str;
- description = lib.mdDoc ''
+ description = ''
Contents of the server configuration files. These will be appended to
the example configurations the server comes with and overwrite any
default settings defined therein.
diff --git a/third_party/nixpkgs/nixos/modules/services/games/factorio.nix b/third_party/nixpkgs/nixos/modules/services/games/factorio.nix
index 14bb80c2d1..3dce60163a 100644
--- a/third_party/nixpkgs/nixos/modules/services/games/factorio.nix
+++ b/third_party/nixpkgs/nixos/modules/services/games/factorio.nix
@@ -45,11 +45,11 @@ in
{
options = {
services.factorio = {
- enable = mkEnableOption (lib.mdDoc name);
+ enable = mkEnableOption name;
port = mkOption {
type = types.port;
default = 34197;
- description = lib.mdDoc ''
+ description = ''
The port to which the service should bind.
'';
};
@@ -57,7 +57,7 @@ in
bind = mkOption {
type = types.str;
default = "0.0.0.0";
- description = lib.mdDoc ''
+ description = ''
The address to which the service should bind.
'';
};
@@ -66,7 +66,7 @@ in
type = types.listOf types.str;
default = [];
example = [ "username" ];
- description = lib.mdDoc ''
+ description = ''
List of player names which will be admin.
'';
};
@@ -74,14 +74,14 @@ in
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to automatically open the specified UDP port in the firewall.
'';
};
saveName = mkOption {
type = types.str;
default = "default";
- description = lib.mdDoc ''
+ description = ''
The name of the savegame that will be used by the server.
When not present in /var/lib/''${config.services.factorio.stateDirName}/saves,
@@ -91,7 +91,7 @@ in
loadLatestSave = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Load the latest savegame on startup. This overrides saveName, in that the latest
save will always be used even if a saved game of the given name exists. It still
controls the 'canonical' name of the savegame.
@@ -108,7 +108,7 @@ in
type = types.path;
default = configFile;
defaultText = literalExpression "configFile";
- description = lib.mdDoc ''
+ description = ''
The server's configuration file.
The default file generated by this module contains lines essential to
@@ -119,7 +119,7 @@ in
extraSettingsFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
File, which is dynamically applied to server-settings.json before
startup.
@@ -136,7 +136,7 @@ in
stateDirName = mkOption {
type = types.str;
default = "factorio";
- description = lib.mdDoc ''
+ description = ''
Name of the directory under /var/lib holding the server's data.
The configuration and map will be stored here.
@@ -145,7 +145,7 @@ in
mods = mkOption {
type = types.listOf types.package;
default = [];
- description = lib.mdDoc ''
+ description = ''
Mods the server should install and activate.
The derivations in this list must "build" the mod by simply copying
@@ -157,7 +157,7 @@ in
mods-dat = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Mods settings can be changed by specifying a dat file, in the [mod
settings file
format](https://wiki.factorio.com/Mod_settings_file_format).
@@ -166,14 +166,14 @@ in
game-name = mkOption {
type = types.nullOr types.str;
default = "Factorio Game";
- description = lib.mdDoc ''
+ description = ''
Name of the game as it will appear in the game listing.
'';
};
description = mkOption {
type = types.nullOr types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Description of the game that will appear in the listing.
'';
};
@@ -181,28 +181,28 @@ in
type = types.attrs;
default = {};
example = { admins = [ "username" ];};
- description = lib.mdDoc ''
+ description = ''
Extra game configuration that will go into server-settings.json
'';
};
public = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Game will be published on the official Factorio matching server.
'';
};
lan = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Game will be broadcast on LAN.
'';
};
username = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Your factorio.com login credentials. Required for games with visibility public.
This option is insecure. Use extraSettingsFile instead.
@@ -214,7 +214,7 @@ in
password = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Your factorio.com login credentials. Required for games with visibility public.
This option is insecure. Use extraSettingsFile instead.
@@ -223,14 +223,14 @@ in
token = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Authentication token. May be used instead of 'password' above.
'';
};
game-password = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Game password.
This option is insecure. Use extraSettingsFile instead.
@@ -239,7 +239,7 @@ in
requireUserVerification = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
When set to true, the server will only allow clients that have a valid factorio.com account.
'';
};
@@ -247,14 +247,14 @@ in
type = types.nullOr types.int;
default = null;
example = 10;
- description = lib.mdDoc ''
+ description = ''
Autosave interval in minutes.
'';
};
nonBlockingSaving = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Highly experimental feature, enable only at your own risk of losing your saves.
On UNIX systems, server will fork itself to create an autosave.
Autosaving on connected Windows clients will be disabled regardless of autosave_only_on_server option.
diff --git a/third_party/nixpkgs/nixos/modules/services/games/freeciv.nix b/third_party/nixpkgs/nixos/modules/services/games/freeciv.nix
index bba27ae4cb..e4c05af3ca 100644
--- a/third_party/nixpkgs/nixos/modules/services/games/freeciv.nix
+++ b/third_party/nixpkgs/nixos/modules/services/games/freeciv.nix
@@ -25,9 +25,9 @@ in
{
options = {
services.freeciv = {
- enable = mkEnableOption (lib.mdDoc ''freeciv'');
+ enable = mkEnableOption ''freeciv'';
settings = mkOption {
- description = lib.mdDoc ''
+ description = ''
Parameters of freeciv-server.
'';
default = {};
@@ -36,9 +36,9 @@ in
options.Announce = mkOption {
type = types.enum ["IPv4" "IPv6" "none"];
default = "none";
- description = lib.mdDoc "Announce game in LAN using given protocol.";
+ description = "Announce game in LAN using given protocol.";
};
- options.auth = mkEnableOption (lib.mdDoc "server authentication");
+ options.auth = mkEnableOption "server authentication";
options.Database = mkOption {
type = types.nullOr types.str;
apply = pkgs.writeText "auth.conf";
@@ -47,25 +47,25 @@ in
backend="sqlite"
database="/var/lib/freeciv/auth.sqlite"
'';
- description = lib.mdDoc "Enable database connection with given configuration.";
+ description = "Enable database connection with given configuration.";
};
options.debug = mkOption {
type = types.ints.between 0 3;
default = 0;
- description = lib.mdDoc "Set debug log level.";
+ description = "Set debug log level.";
};
- options.exit-on-end = mkEnableOption (lib.mdDoc "exit instead of restarting when a game ends");
- options.Guests = mkEnableOption (lib.mdDoc "guests to login if auth is enabled");
- options.Newusers = mkEnableOption (lib.mdDoc "new users to login if auth is enabled");
+ options.exit-on-end = mkEnableOption "exit instead of restarting when a game ends";
+ options.Guests = mkEnableOption "guests to login if auth is enabled";
+ options.Newusers = mkEnableOption "new users to login if auth is enabled";
options.port = mkOption {
type = types.port;
default = 5556;
- description = lib.mdDoc "Listen for clients on given port";
+ description = "Listen for clients on given port";
};
options.quitidle = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc "Quit if no players for given time in seconds.";
+ description = "Quit if no players for given time in seconds.";
};
options.read = mkOption {
type = types.lines;
@@ -73,12 +73,12 @@ in
default = ''
/fcdb lua sqlite_createdb()
'';
- description = lib.mdDoc "Startup script.";
+ description = "Startup script.";
};
options.saves = mkOption {
type = types.nullOr types.str;
default = "/var/lib/freeciv/saves/";
- description = lib.mdDoc ''
+ description = ''
Save games to given directory,
a sub-directory named after the starting date of the service
will me inserted to preserve older saves.
@@ -86,7 +86,7 @@ in
};
};
};
- openFirewall = mkEnableOption (lib.mdDoc "opening the firewall for the port listening for clients");
+ openFirewall = mkEnableOption "opening the firewall for the port listening for clients";
};
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/services/games/mchprs.nix b/third_party/nixpkgs/nixos/modules/services/games/mchprs.nix
index 71e546049c..50db7cf66b 100644
--- a/third_party/nixpkgs/nixos/modules/services/games/mchprs.nix
+++ b/third_party/nixpkgs/nixos/modules/services/games/mchprs.nix
@@ -22,12 +22,12 @@ in
{
options = {
services.mchprs = {
- enable = mkEnableOption "MCHPRS";
+ enable = mkEnableOption "MCHPRS, a Minecraft server";
declarativeSettings = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Whether to use a declarative configuration for MCHPRS.
'';
};
@@ -35,7 +35,7 @@ in
declarativeWhitelist = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Whether to use a declarative whitelist.
The options {option}`services.mchprs.whitelist.list`
will be applied if and only if set to `true`.
@@ -45,7 +45,7 @@ in
dataDir = mkOption {
type = types.path;
default = "/var/lib/mchprs";
- description = mdDoc ''
+ description = ''
Directory to store MCHPRS database and other state/data files.
'';
};
@@ -53,7 +53,7 @@ in
openFirewall = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Whether to open ports in the firewall for the server.
Only has effect when
{option}`services.mchprs.declarativeSettings` is `true`.
@@ -64,7 +64,7 @@ in
type = types.str;
default = "infinity";
example = "7d";
- description = mdDoc ''
+ description = ''
Automatically restart the server after
{option}`services.mchprs.maxRuntime`.
The time span format is described here:
@@ -83,7 +83,7 @@ in
port = mkOption {
type = types.port;
default = 25565;
- description = mdDoc ''
+ description = ''
Port for the server.
Only has effect when
{option}`services.mchprs.declarativeSettings` is `true`.
@@ -93,7 +93,7 @@ in
address = mkOption {
type = types.str;
default = "0.0.0.0";
- description = mdDoc ''
+ description = ''
Address for the server.
Please use enclosing square brackets when using ipv6.
Only has effect when
@@ -104,7 +104,7 @@ in
motd = mkOption {
type = types.str;
default = "Minecraft High Performance Redstone Server";
- description = mdDoc ''
+ description = ''
Message of the day.
Only has effect when
{option}`services.mchprs.declarativeSettings` is `true`.
@@ -114,7 +114,7 @@ in
chat_format = mkOption {
type = types.str;
default = "<{username}> {message}";
- description = mdDoc ''
+ description = ''
How to format chat message interpolating `username`
and `message` with curly braces.
Only has effect when
@@ -125,7 +125,7 @@ in
max_players = mkOption {
type = types.ints.positive;
default = 99999;
- description = mdDoc ''
+ description = ''
Maximum number of simultaneous players.
Only has effect when
{option}`services.mchprs.declarativeSettings` is `true`.
@@ -135,7 +135,7 @@ in
view_distance = mkOption {
type = types.ints.positive;
default = 8;
- description = mdDoc ''
+ description = ''
Maximal distance (in chunks) between players and loaded chunks.
Only has effect when
{option}`services.mchprs.declarativeSettings` is `true`.
@@ -145,7 +145,7 @@ in
bungeecord = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Enable compatibility with
[BungeeCord](https://github.com/SpigotMC/BungeeCord).
Only has effect when
@@ -156,7 +156,7 @@ in
schemati = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Mimic the verification and directory layout used by the
Open Redstone Engineers
[Schemati plugin](https://github.com/OpenRedstoneEngineers/Schemati).
@@ -168,7 +168,7 @@ in
block_in_hitbox = mkOption {
type = types.bool;
default = true;
- description = mdDoc ''
+ description = ''
Allow placing blocks inside of players
(hitbox logic is simplified).
Only has effect when
@@ -179,7 +179,7 @@ in
auto_redpiler = mkOption {
type = types.bool;
default = true;
- description = mdDoc ''
+ description = ''
Use redpiler automatically.
Only has effect when
{option}`services.mchprs.declarativeSettings` is `true`.
@@ -189,7 +189,7 @@ in
};
default = { };
- description = mdDoc ''
+ description = ''
Configuration for MCHPRS via `Config.toml`.
See https://github.com/MCHPR/MCHPRS/blob/master/README.md for documentation.
'';
@@ -199,7 +199,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Whether or not the whitelist (in `whitelist.json`) shoud be enabled.
Only has effect when {option}`services.mchprs.declarativeSettings` is `true`.
'';
@@ -221,7 +221,7 @@ in
username2 = "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy";
};
'';
- description = mdDoc ''
+ description = ''
Whitelisted players, only has an effect when
{option}`services.mchprs.declarativeWhitelist` is
`true` and the whitelist is enabled
diff --git a/third_party/nixpkgs/nixos/modules/services/games/minecraft-server.nix b/third_party/nixpkgs/nixos/modules/services/games/minecraft-server.nix
index 116fc533df..00af8dce66 100644
--- a/third_party/nixpkgs/nixos/modules/services/games/minecraft-server.nix
+++ b/third_party/nixpkgs/nixos/modules/services/games/minecraft-server.nix
@@ -54,7 +54,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If enabled, start a Minecraft Server. The server
data will be loaded from and saved to
{option}`services.minecraft-server.dataDir`.
@@ -64,7 +64,7 @@ in {
declarative = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to use a declarative Minecraft server configuration.
Only if set to `true`, the options
{option}`services.minecraft-server.whitelist` and
@@ -76,7 +76,7 @@ in {
eula = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether you agree to
[
Mojangs EULA](https://account.mojang.com/documents/minecraft_eula). This option must be set to
@@ -87,7 +87,7 @@ in {
dataDir = mkOption {
type = types.path;
default = "/var/lib/minecraft";
- description = lib.mdDoc ''
+ description = ''
Directory to store Minecraft database and other state/data files.
'';
};
@@ -95,7 +95,7 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to open ports in the firewall for the server.
'';
};
@@ -108,7 +108,7 @@ in {
};
in types.attrsOf minecraftUUID;
default = {};
- description = lib.mdDoc ''
+ description = ''
Whitelisted players, only has an effect when
{option}`services.minecraft-server.declarative` is
`true` and the whitelist is enabled
@@ -141,7 +141,7 @@ in {
"rcon.password" = "hunter2";
}
'';
- description = lib.mdDoc ''
+ description = ''
Minecraft server properties for the server.properties file. Only has
an effect when {option}`services.minecraft-server.declarative`
is set to `true`. See
@@ -161,7 +161,7 @@ in {
example = "-Xms4092M -Xmx4092M -XX:+UseG1GC -XX:+CMSIncrementalPacing "
+ "-XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 "
+ "-XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10";
- description = lib.mdDoc "JVM options for the Minecraft server.";
+ description = "JVM options for the Minecraft server.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/games/minetest-server.nix b/third_party/nixpkgs/nixos/modules/services/games/minetest-server.nix
index 8dc3601534..7fa687d2c7 100644
--- a/third_party/nixpkgs/nixos/modules/services/games/minetest-server.nix
+++ b/third_party/nixpkgs/nixos/modules/services/games/minetest-server.nix
@@ -56,13 +56,13 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "If enabled, starts a Minetest Server.";
+ description = "If enabled, starts a Minetest Server.";
};
gameId = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Id of the game to use. To list available games run
`minetestserver --gameid list`.
@@ -73,7 +73,7 @@ in
world = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Name of the world to use. To list available worlds run
`minetestserver --world list`.
@@ -84,7 +84,7 @@ in
configPath = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to the config to use.
If set to null, the config of the running user will be used:
@@ -95,7 +95,7 @@ in
config = mkOption {
type = types.attrsOf types.anything;
default = {};
- description = lib.mdDoc ''
+ description = ''
Settings to add to the minetest config file.
This option is ignored if `configPath` is set.
@@ -105,7 +105,7 @@ in
logPath = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to logfile for logging.
If set to null, logging will be output to stdout which means
@@ -116,7 +116,7 @@ in
port = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
Port number to bind to.
If set to null, the default 30000 will be used.
@@ -126,7 +126,7 @@ in
extraArgs = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
Additional command line flags to pass to the minetest executable.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/games/openarena.nix b/third_party/nixpkgs/nixos/modules/services/games/openarena.nix
index 14e485b06a..a80c427dba 100644
--- a/third_party/nixpkgs/nixos/modules/services/games/openarena.nix
+++ b/third_party/nixpkgs/nixos/modules/services/games/openarena.nix
@@ -7,19 +7,19 @@ in
{
options = {
services.openarena = {
- enable = mkEnableOption (lib.mdDoc "OpenArena");
+ enable = mkEnableOption "OpenArena game server";
package = lib.mkPackageOption pkgs "openarena" { };
openPorts = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to open firewall ports for OpenArena";
+ description = "Whether to open firewall ports for OpenArena";
};
extraFlags = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "Extra flags to pass to {command}`oa_ded`";
+ description = "Extra flags to pass to {command}`oa_ded`";
example = [
"+set dedicated 2"
"+set sv_hostname 'My NixOS OpenArena Server'"
diff --git a/third_party/nixpkgs/nixos/modules/services/games/quake3-server.nix b/third_party/nixpkgs/nixos/modules/services/games/quake3-server.nix
index 41688d5617..7b1a50c313 100644
--- a/third_party/nixpkgs/nixos/modules/services/games/quake3-server.nix
+++ b/third_party/nixpkgs/nixos/modules/services/games/quake3-server.nix
@@ -40,13 +40,13 @@ let
in {
options = {
services.quake3-server = {
- enable = mkEnableOption (lib.mdDoc "Quake 3 dedicated server");
+ enable = mkEnableOption "Quake 3 dedicated server";
package = lib.mkPackageOption pkgs "ioquake3" { };
port = mkOption {
type = types.port;
default = 27960;
- description = lib.mdDoc ''
+ description = ''
UDP Port the server should listen on.
'';
};
@@ -54,7 +54,7 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open the firewall.
'';
};
@@ -66,7 +66,7 @@ in {
seta rconPassword "superSecret" // sets RCON password for remote console
seta sv_hostname "My Quake 3 server" // name that appears in server list
'';
- description = lib.mdDoc ''
+ description = ''
Extra configuration options. Note that options changed via RCON will not be persisted. To list all possible
options, use "cvarlist 1" via RCON.
'';
@@ -77,7 +77,7 @@ in {
default = defaultBaseq3;
defaultText = literalMD "Manually downloaded Quake 3 installation directory.";
example = "/var/lib/q3ds";
- description = lib.mdDoc ''
+ description = ''
Path to the baseq3 files (pak*.pk3). If this is on the nix store (type = package) all .pk3 files should be saved
in the top-level directory. If this is on another filesystem (e.g /var/lib/baseq3) the .pk3 files are searched in
$baseq3/.q3a/baseq3/
diff --git a/third_party/nixpkgs/nixos/modules/services/games/teeworlds.nix b/third_party/nixpkgs/nixos/modules/services/games/teeworlds.nix
index 04b611fb3c..1958fd4141 100644
--- a/third_party/nixpkgs/nixos/modules/services/games/teeworlds.nix
+++ b/third_party/nixpkgs/nixos/modules/services/games/teeworlds.nix
@@ -93,20 +93,20 @@ in
{
options = {
services.teeworlds = {
- enable = mkEnableOption (lib.mdDoc "Teeworlds Server");
+ enable = mkEnableOption "Teeworlds Server";
package = mkPackageOptionMD pkgs "teeworlds-server" { };
openPorts = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to open firewall ports for Teeworlds.";
+ description = "Whether to open firewall ports for Teeworlds.";
};
name = mkOption {
type = types.str;
default = "unnamed server";
- description = lib.mdDoc ''
+ description = ''
Name of the server.
'';
};
@@ -115,7 +115,7 @@ in
type = types.bool;
example = true;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether the server registers as a public server in the global server list. This is disabled by default for privacy reasons.
'';
};
@@ -123,7 +123,7 @@ in
motd = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The server's message of the day text.
'';
};
@@ -131,7 +131,7 @@ in
password = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Password to connect to the server.
'';
};
@@ -139,7 +139,7 @@ in
rconPassword = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Password to access the remote console. If not set, a randomly generated one is displayed in the server log.
'';
};
@@ -147,7 +147,7 @@ in
port = mkOption {
type = types.port;
default = 8303;
- description = lib.mdDoc ''
+ description = ''
Port the server will listen on.
'';
};
@@ -155,7 +155,7 @@ in
extraOptions = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
Extra configuration lines for the {file}`teeworlds.cfg`. See [Teeworlds Documentation](https://www.teeworlds.com/?page=docs&wiki=server_settings).
'';
example = [ "sv_map dm1" "sv_gametype dm" ];
@@ -165,7 +165,7 @@ in
bindAddr = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The address the server will bind to.
'';
};
@@ -173,7 +173,7 @@ in
enableHighBandwidth = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable high bandwidth mode on LAN servers. This will double the amount of bandwidth required for running the server.
'';
};
@@ -181,7 +181,7 @@ in
hostName = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Hostname for the server.
'';
};
@@ -190,7 +190,7 @@ in
type = types.enum [ "spectator" "spectator/kick" "kick" ];
example = "spectator";
default = "spectator/kick";
- description = lib.mdDoc ''
+ description = ''
Specify what to do when a client goes inactive (see [](#opt-services.teeworlds.server.inactiveTime)).
- `spectator`: send the client into spectator mode
@@ -204,7 +204,7 @@ in
kickInactiveSpectators = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to kick inactive spectators.
'';
};
@@ -212,7 +212,7 @@ in
inactiveTime = mkOption {
type = types.ints.unsigned;
default = 3;
- description = lib.mdDoc ''
+ description = ''
The amount of minutes a client has to idle before it is considered inactive.
'';
};
@@ -220,7 +220,7 @@ in
maxClients = mkOption {
type = types.ints.unsigned;
default = 12;
- description = lib.mdDoc ''
+ description = ''
The maximum amount of clients that can be connected to the server at the same time.
'';
};
@@ -228,7 +228,7 @@ in
maxClientsPerIP = mkOption {
type = types.ints.unsigned;
default = 12;
- description = lib.mdDoc ''
+ description = ''
The maximum amount of clients with the same IP address that can be connected to the server at the same time.
'';
};
@@ -236,7 +236,7 @@ in
skillLevel = mkOption {
type = types.enum [ "casual" "normal" "competitive" ];
default = "normal";
- description = lib.mdDoc ''
+ description = ''
The skill level shown in the server browser.
'';
};
@@ -244,7 +244,7 @@ in
enableSpamProtection = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable chat spam protection.
'';
};
@@ -255,7 +255,7 @@ in
type = types.str;
example = "ctf";
default = "dm";
- description = lib.mdDoc ''
+ description = ''
The game type to use on the server.
The default gametypes are `dm`, `tdm`, `ctf`, `lms`, and `lts`.
@@ -266,7 +266,7 @@ in
type = types.str;
example = "ctf5";
default = "dm1";
- description = lib.mdDoc ''
+ description = ''
The map to use on the server.
'';
};
@@ -274,7 +274,7 @@ in
swapTeams = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to swap teams each round.
'';
};
@@ -282,7 +282,7 @@ in
enableReadyMode = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable "ready mode"; where players can pause/unpause the game
and start the game in warmup, using their ready state.
'';
@@ -291,7 +291,7 @@ in
playerSlots = mkOption {
type = types.ints.unsigned;
default = 8;
- description = lib.mdDoc ''
+ description = ''
The amount of slots to reserve for players (as opposed to spectators).
'';
};
@@ -299,7 +299,7 @@ in
enablePowerups = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to allow powerups such as the ninja.
'';
};
@@ -308,7 +308,7 @@ in
type = types.ints.unsigned;
example = 400;
default = 20;
- description = lib.mdDoc ''
+ description = ''
The score limit needed to win a round.
'';
};
@@ -316,7 +316,7 @@ in
restrictSpectators = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to restrict access to information such as health, ammo and armour in spectator mode.
'';
};
@@ -324,7 +324,7 @@ in
enableTeamDamage = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable team damage; whether to allow team mates to inflict damage on one another.
'';
};
@@ -332,7 +332,7 @@ in
timeLimit = mkOption {
type = types.ints.unsigned;
default = 0;
- description = lib.mdDoc ''
+ description = ''
Time limit of the game. In cases of equal points, there will be sudden death.
Setting this to 0 disables a time limit.
'';
@@ -341,7 +341,7 @@ in
tournamentMode = mkOption {
type = types.enum [ "disable" "enable" "restrictSpectators" ];
default = "disable";
- description = lib.mdDoc ''
+ description = ''
Whether to enable tournament mode. In tournament mode, players join as spectators.
If this is set to `restrictSpectators`, tournament mode is enabled but spectator chat is restricted.
'';
@@ -350,7 +350,7 @@ in
enableVoteKick = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable voting to kick players.
'';
};
@@ -358,7 +358,7 @@ in
voteKickBanTime = mkOption {
type = types.ints.unsigned;
default = 5;
- description = lib.mdDoc ''
+ description = ''
The amount of minutes that a player is banned for if they get kicked by a vote.
'';
};
@@ -366,7 +366,7 @@ in
voteKickMinimumPlayers = mkOption {
type = types.ints.unsigned;
default = 5;
- description = lib.mdDoc ''
+ description = ''
The minimum amount of players required to start a kick vote.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/games/terraria.nix b/third_party/nixpkgs/nixos/modules/services/games/terraria.nix
index ccdd779165..57417b614f 100644
--- a/third_party/nixpkgs/nixos/modules/services/games/terraria.nix
+++ b/third_party/nixpkgs/nixos/modules/services/games/terraria.nix
@@ -36,7 +36,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If enabled, starts a Terraria server. The server can be connected to via `tmux -S ''${config.${opt.dataDir}}/terraria.sock attach`
for administration by users who are a part of the `terraria` group (use `C-b d` shortcut to detach again).
'';
@@ -45,7 +45,7 @@ in
port = mkOption {
type = types.port;
default = 7777;
- description = lib.mdDoc ''
+ description = ''
Specifies the port to listen on.
'';
};
@@ -53,7 +53,7 @@ in
maxPlayers = mkOption {
type = types.ints.u8;
default = 255;
- description = lib.mdDoc ''
+ description = ''
Sets the max number of players (between 1 and 255).
'';
};
@@ -61,7 +61,7 @@ in
password = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Sets the server password. Leave `null` for no password.
'';
};
@@ -69,7 +69,7 @@ in
messageOfTheDay = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Set the server message of the day text.
'';
};
@@ -77,7 +77,7 @@ in
worldPath = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
The path to the world file (`.wld`) which should be loaded.
If no world exists at this path, one will be created with the size
specified by `autoCreatedWorldSize`.
@@ -87,7 +87,7 @@ in
autoCreatedWorldSize = mkOption {
type = types.enum [ "small" "medium" "large" ];
default = "medium";
- description = lib.mdDoc ''
+ description = ''
Specifies the size of the auto-created world if `worldPath` does not
point to an existing world.
'';
@@ -96,7 +96,7 @@ in
banListPath = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
The path to the ban list.
'';
};
@@ -104,26 +104,26 @@ in
secure = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Adds additional cheat protection to the server.";
+ description = "Adds additional cheat protection to the server.";
};
noUPnP = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Disables automatic Universal Plug and Play.";
+ description = "Disables automatic Universal Plug and Play.";
};
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to open ports in the firewall";
+ description = "Whether to open ports in the firewall";
};
dataDir = mkOption {
type = types.str;
default = "/var/lib/terraria";
example = "/srv/terraria";
- description = lib.mdDoc "Path to variable state data directory for terraria.";
+ description = "Path to variable state data directory for terraria.";
};
};
};
@@ -148,16 +148,13 @@ in
serviceConfig = {
User = "terraria";
+ Group = "terraria";
Type = "forking";
GuessMainPID = true;
+ UMask = 007;
ExecStart = "${getBin pkgs.tmux}/bin/tmux -S ${cfg.dataDir}/terraria.sock new -d ${pkgs.terraria-server}/bin/TerrariaServer ${concatStringsSep " " flags}";
ExecStop = "${stopScript} $MAINPID";
};
-
- postStart = ''
- ${pkgs.coreutils}/bin/chmod 660 ${cfg.dataDir}/terraria.sock
- ${pkgs.coreutils}/bin/chgrp terraria ${cfg.dataDir}/terraria.sock
- '';
};
networking.firewall = mkIf cfg.openFirewall {
diff --git a/third_party/nixpkgs/nixos/modules/services/games/xonotic.nix b/third_party/nixpkgs/nixos/modules/services/games/xonotic.nix
index c84347ddc9..2b79e11838 100644
--- a/third_party/nixpkgs/nixos/modules/services/games/xonotic.nix
+++ b/third_party/nixpkgs/nixos/modules/services/games/xonotic.nix
@@ -36,14 +36,14 @@ in
{
options.services.xonotic = {
- enable = lib.mkEnableOption (lib.mdDoc "Xonotic dedicated server");
+ enable = lib.mkEnableOption "Xonotic dedicated server";
package = lib.mkPackageOption pkgs "xonotic-dedicated" {};
openFirewall = lib.mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open the firewall for TCP and UDP on the specified port.
'';
};
@@ -52,13 +52,13 @@ in
type = lib.types.path;
readOnly = true;
default = "/var/lib/xonotic";
- description = lib.mdDoc ''
+ description = ''
Data directory.
'';
};
settings = lib.mkOption {
- description = lib.mdDoc ''
+ description = ''
Generates the `server.cfg` file. Refer to [upstream's example][0] for
details.
@@ -75,7 +75,7 @@ in
type = lib.types.int;
default = 0;
example = [ (-1) 1 ];
- description = lib.mdDoc ''
+ description = ''
Controls whether the server will be publicly listed.
'';
};
@@ -83,7 +83,7 @@ in
options.hostname = lib.mkOption {
type = lib.types.singleLineStr;
default = "Xonotic $g_xonoticversion Server";
- description = lib.mdDoc ''
+ description = ''
The name that will appear in the server list. `$g_xonoticversion`
gets replaced with the current version.
'';
@@ -92,7 +92,7 @@ in
options.sv_motd = lib.mkOption {
type = lib.types.singleLineStr;
default = "";
- description = lib.mdDoc ''
+ description = ''
Text displayed when players join the server.
'';
};
@@ -100,7 +100,7 @@ in
options.sv_termsofservice_url = lib.mkOption {
type = lib.types.singleLineStr;
default = "";
- description = lib.mdDoc ''
+ description = ''
URL for the Terms of Service for playing on your server.
'';
};
@@ -108,7 +108,7 @@ in
options.maxplayers = lib.mkOption {
type = lib.types.int;
default = 16;
- description = lib.mdDoc ''
+ description = ''
Number of player slots on the server, including spectators.
'';
};
@@ -116,7 +116,7 @@ in
options.net_address = lib.mkOption {
type = lib.types.singleLineStr;
default = "0.0.0.0";
- description = lib.mdDoc ''
+ description = ''
The address Xonotic will listen on.
'';
};
@@ -124,7 +124,7 @@ in
options.port = lib.mkOption {
type = lib.types.port;
default = 26000;
- description = lib.mdDoc ''
+ description = ''
The port Xonotic will listen on.
'';
};
@@ -136,7 +136,7 @@ in
appendConfig = lib.mkOption {
type = with lib.types; nullOr lines;
default = null;
- description = lib.mdDoc ''
+ description = ''
Literal text to insert at the end of `server.cfg`.
'';
};
@@ -145,7 +145,7 @@ in
prependConfig = lib.mkOption {
type = with lib.types; nullOr lines;
default = null;
- description = lib.mdDoc ''
+ description = ''
Literal text to insert at the start of `server.cfg`.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/acpid.nix b/third_party/nixpkgs/nixos/modules/services/hardware/acpid.nix
index 821f4ef205..581b6cb401 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/acpid.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/acpid.nix
@@ -48,12 +48,12 @@ in
services.acpid = {
- enable = mkEnableOption (lib.mdDoc "the ACPI daemon");
+ enable = mkEnableOption "the ACPI daemon";
logEvents = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Log all event activity.";
+ description = "Log all event activity.";
};
handlers = mkOption {
@@ -62,17 +62,17 @@ in
event = mkOption {
type = types.str;
example = literalExpression ''"button/power.*" "button/lid.*" "ac_adapter.*" "button/mute.*" "button/volumedown.*" "cd/play.*" "cd/next.*"'';
- description = lib.mdDoc "Event type.";
+ description = "Event type.";
};
action = mkOption {
type = types.lines;
- description = lib.mdDoc "Shell commands to execute when the event is triggered.";
+ description = "Shell commands to execute when the event is triggered.";
};
};
});
- description = lib.mdDoc ''
+ description = ''
Event handlers.
::: {.note}
@@ -104,19 +104,19 @@ in
powerEventCommands = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Shell commands to execute on a button/power.* event.";
+ description = "Shell commands to execute on a button/power.* event.";
};
lidEventCommands = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Shell commands to execute on a button/lid.* event.";
+ description = "Shell commands to execute on a button/lid.* event.";
};
acEventCommands = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Shell commands to execute on an ac_adapter.* event.";
+ description = "Shell commands to execute on an ac_adapter.* event.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/actkbd.nix b/third_party/nixpkgs/nixos/modules/services/hardware/actkbd.nix
index 1718d179bf..335e9b2fdf 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/actkbd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/actkbd.nix
@@ -20,25 +20,25 @@ let
keys = mkOption {
type = types.listOf types.int;
- description = lib.mdDoc "List of keycodes to match.";
+ description = "List of keycodes to match.";
};
events = mkOption {
type = types.listOf (types.enum ["key" "rep" "rel"]);
default = [ "key" ];
- description = lib.mdDoc "List of events to match.";
+ description = "List of events to match.";
};
attributes = mkOption {
type = types.listOf types.str;
default = [ "exec" ];
- description = lib.mdDoc "List of attributes.";
+ description = "List of attributes.";
};
command = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc "What to run.";
+ description = "What to run.";
};
};
@@ -57,7 +57,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the {command}`actkbd` key mapping daemon.
Turning this on will start an {command}`actkbd`
@@ -78,7 +78,7 @@ in
[ { keys = [ 113 ]; events = [ "key" ]; command = "''${pkgs.alsa-utils}/bin/amixer -q set Master toggle"; }
]
'';
- description = lib.mdDoc ''
+ description = ''
Key bindings for {command}`actkbd`.
See {command}`actkbd` {file}`README` for documentation.
@@ -90,7 +90,7 @@ in
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Literal contents to append to the end of actkbd configuration file.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/argonone.nix b/third_party/nixpkgs/nixos/modules/services/hardware/argonone.nix
index e67c262506..b767388128 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/argonone.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/argonone.nix
@@ -5,12 +5,12 @@ let
in
{
options.services.hardware.argonone = {
- enable = lib.mkEnableOption (lib.mdDoc "the driver for Argon One Raspberry Pi case fan and power button");
+ enable = lib.mkEnableOption "the driver for Argon One Raspberry Pi case fan and power button";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.argononed;
defaultText = lib.literalExpression "pkgs.argononed";
- description = lib.mdDoc ''
+ description = ''
The package implementing the Argon One driver
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/asusd.nix b/third_party/nixpkgs/nixos/modules/services/hardware/asusd.nix
index ff9a751e5b..2dfe761a21 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/asusd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/asusd.nix
@@ -6,14 +6,14 @@ in
{
options = {
services.asusd = {
- enable = lib.mkEnableOption (lib.mdDoc "the asusd service for ASUS ROG laptops");
+ enable = lib.mkEnableOption "the asusd service for ASUS ROG laptops";
package = lib.mkPackageOption pkgs "asusctl" { };
enableUserService = lib.mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Activate the asusd-user service.
'';
};
@@ -21,7 +21,7 @@ in
animeConfig = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The content of /etc/asusd/anime.ron.
See https://asus-linux.org/asusctl/#anime-control.
'';
@@ -30,7 +30,7 @@ in
asusdConfig = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The content of /etc/asusd/asusd.ron.
See https://asus-linux.org/asusctl/.
'';
@@ -39,7 +39,7 @@ in
auraConfig = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The content of /etc/asusd/aura.ron.
See https://asus-linux.org/asusctl/#led-keyboard-control.
'';
@@ -48,7 +48,7 @@ in
profileConfig = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The content of /etc/asusd/profile.ron.
See https://asus-linux.org/asusctl/#profiles.
'';
@@ -57,7 +57,7 @@ in
fanCurvesConfig = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The content of /etc/asusd/fan_curves.ron.
See https://asus-linux.org/asusctl/#fan-curves.
'';
@@ -66,7 +66,7 @@ in
userLedModesConfig = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The content of /etc/asusd/asusd-user-ledmodes.ron.
See https://asus-linux.org/asusctl/#led-keyboard-control.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/auto-cpufreq.nix b/third_party/nixpkgs/nixos/modules/services/hardware/auto-cpufreq.nix
index 9c69ba8920..f61fa38be1 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/auto-cpufreq.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/auto-cpufreq.nix
@@ -9,10 +9,10 @@ let
in {
options = {
services.auto-cpufreq = {
- enable = mkEnableOption (lib.mdDoc "auto-cpufreq daemon");
+ enable = mkEnableOption "auto-cpufreq daemon";
settings = mkOption {
- description = lib.mdDoc ''
+ description = ''
Configuration for `auto-cpufreq`.
The available options can be found in [the example configuration file](https://github.com/AdnanHodzic/auto-cpufreq/blob/v${pkgs.auto-cpufreq.version}/auto-cpufreq.conf-example).
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/auto-epp.nix b/third_party/nixpkgs/nixos/modules/services/hardware/auto-epp.nix
index 84b6a337d2..b568dec26f 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/auto-epp.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/auto-epp.nix
@@ -8,7 +8,7 @@ let
in {
options = {
services.auto-epp = {
- enable = lib.mkEnableOption (lib.mdDoc "auto-epp for amd active pstate");
+ enable = lib.mkEnableOption "auto-epp for amd active pstate";
package = lib.mkPackageOptionMD pkgs "auto-epp" {};
@@ -20,7 +20,7 @@ in {
epp_state_for_AC = mkOption {
type = types.str;
default = "balance_performance";
- description = lib.mdDoc ''
+ description = ''
energy_performance_preference when on plugged in
::: {.note}
@@ -33,7 +33,7 @@ in {
epp_state_for_BAT = mkOption {
type = types.str;
default = "power";
- description = lib.mdDoc ''
+ description = ''
`energy_performance_preference` when on battery
::: {.note}
@@ -46,7 +46,7 @@ in {
};
};
default = {};
- description = lib.mdDoc ''
+ description = ''
Settings for the auto-epp application.
See upstream example:
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/bluetooth.nix b/third_party/nixpkgs/nixos/modules/services/hardware/bluetooth.nix
index 51ec12f965..a73cc97057 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/bluetooth.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/bluetooth.nix
@@ -36,14 +36,14 @@ in
options = {
hardware.bluetooth = {
- enable = mkEnableOption (lib.mdDoc "support for Bluetooth");
+ enable = mkEnableOption "support for Bluetooth";
- hsphfpd.enable = mkEnableOption (lib.mdDoc "support for hsphfpd[-prototype] implementation");
+ hsphfpd.enable = mkEnableOption "support for hsphfpd[-prototype] implementation";
powerOnBoot = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to power up the default Bluetooth controller on boot.";
+ description = "Whether to power up the default Bluetooth controller on boot.";
};
package = mkPackageOption pkgs "bluez" { };
@@ -51,7 +51,7 @@ in
disabledPlugins = mkOption {
type = types.listOf types.str;
default = [ ];
- description = lib.mdDoc "Built-in plugins to disable";
+ description = "Built-in plugins to disable";
};
settings = mkOption {
@@ -62,7 +62,7 @@ in
ControllerMode = "bredr";
};
};
- description = lib.mdDoc "Set configuration for system-wide bluetooth (/etc/bluetooth/main.conf).";
+ description = "Set configuration for system-wide bluetooth (/etc/bluetooth/main.conf).";
};
input = mkOption {
@@ -74,7 +74,7 @@ in
ClassicBondedOnly = true;
};
};
- description = lib.mdDoc "Set configuration for the input service (/etc/bluetooth/input.conf).";
+ description = "Set configuration for the input service (/etc/bluetooth/input.conf).";
};
network = mkOption {
@@ -85,7 +85,7 @@ in
DisableSecurity = true;
};
};
- description = lib.mdDoc "Set configuration for the network service (/etc/bluetooth/network.conf).";
+ description = "Set configuration for the network service (/etc/bluetooth/network.conf).";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/bolt.nix b/third_party/nixpkgs/nixos/modules/services/hardware/bolt.nix
index 3bdf67cc17..729273f94f 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/bolt.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/bolt.nix
@@ -11,7 +11,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Bolt, a userspace daemon to enable
security levels for Thunderbolt 3 on GNU/Linux.
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/brltty.nix b/third_party/nixpkgs/nixos/modules/services/hardware/brltty.nix
index f96760e92c..bdec5d79be 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/brltty.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/brltty.nix
@@ -25,7 +25,7 @@ in {
services.brltty.enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the BRLTTY daemon.";
+ description = "Whether to enable the BRLTTY daemon.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/ddccontrol.nix b/third_party/nixpkgs/nixos/modules/services/hardware/ddccontrol.nix
index 0f1e8bf0d2..f0b5a9c819 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/ddccontrol.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/ddccontrol.nix
@@ -13,7 +13,7 @@ in
options = {
services.ddccontrol = {
- enable = lib.mkEnableOption (lib.mdDoc "ddccontrol for controlling displays");
+ enable = lib.mkEnableOption "ddccontrol for controlling displays";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/fancontrol.nix b/third_party/nixpkgs/nixos/modules/services/hardware/fancontrol.nix
index 993c37b236..f9fc8593f8 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/fancontrol.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/fancontrol.nix
@@ -9,11 +9,11 @@ let
in
{
options.hardware.fancontrol = {
- enable = mkEnableOption (lib.mdDoc "software fan control (requires fancontrol.config)");
+ enable = mkEnableOption "software fan control (requires fancontrol.config)";
config = mkOption {
type = types.lines;
- description = lib.mdDoc "Required fancontrol configuration file content. See {manpage}`pwmconfig(8)` from the lm_sensors package.";
+ description = "Required fancontrol configuration file content. See {manpage}`pwmconfig(8)` from the lm_sensors package.";
example = ''
# Configuration file generated by pwmconfig
INTERVAL=10
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/freefall.nix b/third_party/nixpkgs/nixos/modules/services/hardware/freefall.nix
index 2985739bc2..4ac7c54d4d 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/freefall.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/freefall.nix
@@ -13,7 +13,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to protect HP/Dell laptop hard drives (not SSDs) in free fall.
'';
};
@@ -23,7 +23,7 @@ in {
devices = mkOption {
type = types.listOf types.str;
default = [ "/dev/sda" ];
- description = lib.mdDoc ''
+ description = ''
Device paths to all internal spinning hard drives.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/fwupd.nix b/third_party/nixpkgs/nixos/modules/services/hardware/fwupd.nix
index 8a9e38d054..bdbd0ac244 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/fwupd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/fwupd.nix
@@ -14,11 +14,11 @@ let
customEtc = {
"fwupd/fwupd.conf" = {
- source = format.generate "fwupd.conf" {
+ source = format.generate "fwupd.conf" ({
fwupd = cfg.daemonSettings;
} // lib.optionalAttrs (lib.length (lib.attrNames cfg.uefiCapsuleSettings) != 0) {
uefi_capsule = cfg.uefiCapsuleSettings;
- };
+ });
# fwupd tries to chmod the file if it doesn't have the right permissions
mode = "0640";
};
@@ -64,7 +64,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable fwupd, a DBus service that allows
applications to update firmware.
'';
@@ -74,7 +74,7 @@ in {
type = types.listOf types.path;
default = [];
example = literalExpression "[ /etc/nixos/fwupd/myfirmware.pem ]";
- description = lib.mdDoc ''
+ description = ''
Installing a public key allows firmware signed with a matching private key to be recognized as trusted, which may require less authentication to install than for untrusted files. By default trusted firmware can be upgraded (but not downgraded) without the user or administrator password. Only very few keys are installed by default.
'';
};
@@ -83,7 +83,7 @@ in {
type = with types; listOf str;
default = [];
example = [ "lvfs-testing" ];
- description = lib.mdDoc ''
+ description = ''
Enables extra remotes in fwupd. See `/etc/fwupd/remotes.d`.
'';
};
@@ -98,7 +98,7 @@ in {
type = types.listOf types.str;
default = [];
example = [ "2082b5e0-7a64-478a-b1b2-e3404fab6dad" ];
- description = lib.mdDoc ''
+ description = ''
List of device GUIDs to be disabled.
'';
};
@@ -107,7 +107,7 @@ in {
type = types.listOf types.str;
default = [];
example = [ "udev" ];
- description = lib.mdDoc ''
+ description = ''
List of plugins to be disabled.
'';
};
@@ -116,7 +116,7 @@ in {
type = types.path;
default = config.boot.loader.efi.efiSysMountPoint;
defaultText = lib.literalExpression "config.boot.loader.efi.efiSysMountPoint";
- description = lib.mdDoc ''
+ description = ''
The EFI system partition (ESP) path used if UDisks is not available
or if this partition is not mounted at /boot/efi, /boot, or /efi
'';
@@ -126,7 +126,7 @@ in {
internal = true;
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Create virtual test devices and remote for validating daemon flows.
This is only intended for CI testing and development purposes.
'';
@@ -134,7 +134,7 @@ in {
};
};
default = {};
- description = lib.mdDoc ''
+ description = ''
Configurations for the fwupd daemon.
'';
};
@@ -144,7 +144,7 @@ in {
freeformType = format.type.nestedTypes.elemType;
};
default = {};
- description = lib.mdDoc ''
+ description = ''
UEFI capsule configurations for the fwupd daemon.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/handheld-daemon.nix b/third_party/nixpkgs/nixos/modules/services/hardware/handheld-daemon.nix
index e8a7a39f44..6c9d5aa3e2 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/handheld-daemon.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/handheld-daemon.nix
@@ -13,7 +13,7 @@ in
user = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The user to run Handheld Daemon with.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/hddfancontrol.nix b/third_party/nixpkgs/nixos/modules/services/hardware/hddfancontrol.nix
index 746154e7aa..e8cab0e22b 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/hddfancontrol.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/hddfancontrol.nix
@@ -8,12 +8,12 @@ in
{
options = {
- services.hddfancontrol.enable = lib.mkEnableOption (lib.mdDoc "hddfancontrol daemon");
+ services.hddfancontrol.enable = lib.mkEnableOption "hddfancontrol daemon";
services.hddfancontrol.disks = lib.mkOption {
type = with types; listOf path;
default = [];
- description = lib.mdDoc ''
+ description = ''
Drive(s) to get temperature from
'';
example = ["/dev/sda"];
@@ -22,7 +22,7 @@ in
services.hddfancontrol.pwmPaths = lib.mkOption {
type = with types; listOf path;
default = [];
- description = lib.mdDoc ''
+ description = ''
PWM filepath(s) to control fan speed (under /sys)
'';
example = ["/sys/class/hwmon/hwmon2/pwm1"];
@@ -31,7 +31,7 @@ in
services.hddfancontrol.smartctl = lib.mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Probe temperature using smartctl instead of hddtemp or hdparm
'';
};
@@ -39,7 +39,7 @@ in
services.hddfancontrol.extraArgs = lib.mkOption {
type = with types; listOf str;
default = [];
- description = lib.mdDoc ''
+ description = ''
Extra commandline arguments for hddfancontrol
'';
example = ["--pwm-start-value=32"
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/illum.nix b/third_party/nixpkgs/nixos/modules/services/hardware/illum.nix
index 46172fb7b5..7f7a850002 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/illum.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/illum.nix
@@ -13,7 +13,7 @@ in {
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Enable illum, a daemon for controlling screen brightness with brightness buttons.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/interception-tools.nix b/third_party/nixpkgs/nixos/modules/services/hardware/interception-tools.nix
index 4f86bd470e..e69c05841e 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/interception-tools.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/interception-tools.nix
@@ -9,14 +9,14 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the interception tools service.";
+ description = "Whether to enable the interception tools service.";
};
plugins = mkOption {
type = types.listOf types.package;
default = [ pkgs.interception-tools-plugins.caps2esc ];
defaultText = literalExpression "[ pkgs.interception-tools-plugins.caps2esc ]";
- description = lib.mdDoc ''
+ description = ''
A list of interception tools plugins that will be made available to use
inside the udevmon configuration.
'';
@@ -36,7 +36,7 @@ in {
EVENTS:
EV_KEY: [KEY_X, KEY_Y]
'';
- description = lib.mdDoc ''
+ description = ''
String of udevmon YAML configuration, or path to a udevmon YAML
configuration file.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/iptsd.nix b/third_party/nixpkgs/nixos/modules/services/hardware/iptsd.nix
index 8af0a6d6bb..3a299c2428 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/iptsd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/iptsd.nix
@@ -6,11 +6,11 @@ let
configFile = format.generate "iptsd.conf" cfg.config;
in {
options.services.iptsd = {
- enable = lib.mkEnableOption (lib.mdDoc "the userspace daemon for Intel Precise Touch & Stylus");
+ enable = lib.mkEnableOption "the userspace daemon for Intel Precise Touch & Stylus";
config = lib.mkOption {
default = { };
- description = lib.mdDoc ''
+ description = ''
Configuration for IPTSD. See the
[reference configuration](https://github.com/linux-surface/iptsd/blob/master/etc/iptsd.conf)
for available options and defaults.
@@ -21,19 +21,19 @@ in {
Touch = {
DisableOnPalm = lib.mkOption {
default = false;
- description = lib.mdDoc "Ignore all touch inputs if a palm was registered on the display.";
+ description = "Ignore all touch inputs if a palm was registered on the display.";
type = lib.types.bool;
};
DisableOnStylus = lib.mkOption {
default = false;
- description = lib.mdDoc "Ignore all touch inputs if a stylus is in proximity.";
+ description = "Ignore all touch inputs if a stylus is in proximity.";
type = lib.types.bool;
};
};
Stylus = {
Disable = lib.mkOption {
default = false;
- description = lib.mdDoc "Disables the stylus. No stylus data will be processed.";
+ description = "Disables the stylus. No stylus data will be processed.";
type = lib.types.bool;
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/irqbalance.nix b/third_party/nixpkgs/nixos/modules/services/hardware/irqbalance.nix
index 8ba0a73d89..c79e0eb83e 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/irqbalance.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/irqbalance.nix
@@ -9,7 +9,7 @@ let
in
{
- options.services.irqbalance.enable = mkEnableOption (lib.mdDoc "irqbalance daemon");
+ options.services.irqbalance.enable = mkEnableOption "irqbalance daemon";
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/joycond.nix b/third_party/nixpkgs/nixos/modules/services/hardware/joycond.nix
index 060303b520..106c19243c 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/joycond.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/joycond.nix
@@ -8,7 +8,7 @@ with lib;
{
options.services.joycond = {
- enable = mkEnableOption (lib.mdDoc "support for Nintendo Pro Controllers and Joycons");
+ enable = mkEnableOption "support for Nintendo Pro Controllers and Joycons";
package = mkPackageOption pkgs "joycond" { };
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/kanata.nix b/third_party/nixpkgs/nixos/modules/services/hardware/kanata.nix
index 05e76d8432..333b2d2a88 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/kanata.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/kanata.nix
@@ -11,7 +11,7 @@ let
type = types.listOf types.str;
default = [ ];
example = [ "/dev/input/by-id/usb-0000_0000-event-kbd" ];
- description = mdDoc ''
+ description = ''
Paths to keyboard devices.
An empty list, the default value, lets kanata detect which
@@ -39,7 +39,7 @@ let
;; tap within 100ms for capslk, hold more than 100ms for lctl
cap (tap-hold 100 100 caps lctl))
'';
- description = mdDoc ''
+ description = ''
Configuration other than `defcfg`.
See [example config files](https://github.com/jtroo/kanata)
@@ -50,7 +50,7 @@ let
type = types.lines;
default = "";
example = "danger-enable-cmd yes";
- description = mdDoc ''
+ description = ''
Configuration of `defcfg` other than `linux-dev` (generated
from the devices option) and
`linux-continue-if-no-devs-found` (hardcoded to be yes).
@@ -62,13 +62,13 @@ let
extraArgs = mkOption {
type = types.listOf types.str;
default = [ ];
- description = mdDoc "Extra command line arguments passed to kanata.";
+ description = "Extra command line arguments passed to kanata.";
};
port = mkOption {
type = types.nullOr types.port;
default = null;
example = 6666;
- description = mdDoc ''
+ description = ''
Port to run the TCP server on. `null` will not run the server.
'';
};
@@ -151,7 +151,7 @@ let
in
{
options.services.kanata = {
- enable = mkEnableOption (mdDoc "kanata");
+ enable = mkEnableOption "kanata, a tool to improve keyboard comfort and usability with advanced customization";
package = mkPackageOption pkgs "kanata" {
example = "kanata-with-cmd";
extraDescription = ''
@@ -164,7 +164,7 @@ in
keyboards = mkOption {
type = types.attrsOf (types.submodule keyboard);
default = { };
- description = mdDoc "Keyboard configurations.";
+ description = "Keyboard configurations.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/keyd.nix b/third_party/nixpkgs/nixos/modules/services/hardware/keyd.nix
index 77297401a5..2aee7817c6 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/keyd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/keyd.nix
@@ -9,7 +9,7 @@ let
type = types.listOf types.str;
default = [ "*" ];
example = [ "*" "-0123:0456" ];
- description = lib.mdDoc ''
+ description = ''
Device identifiers, as shown by {manpage}`keyd(1)`.
'';
};
@@ -30,7 +30,7 @@ let
l = "right";
};
};
- description = lib.mdDoc ''
+ description = ''
Configuration, except `ids` section, that is written to {file}`/etc/keyd/.conf`.
Appropriate names can be used to write non-alpha keys, for example "equal" instead of "=" sign (see ).
See how to configure.
@@ -44,7 +44,7 @@ let
[control+shift]
h = left
'';
- description = lib.mdDoc ''
+ description = ''
Extra configuration that is appended to the end of the file.
**Do not** write `ids` section here, use a separate option for it.
You can use this option to define compound layers that must always be defined after the layer they are comprised.
@@ -62,7 +62,7 @@ in
];
options.services.keyd = {
- enable = mkEnableOption (lib.mdDoc "keyd, a key remapping daemon");
+ enable = mkEnableOption "keyd, a key remapping daemon";
keyboards = mkOption {
type = types.attrsOf (types.submodule keyboardOptions);
@@ -87,7 +87,7 @@ in
};
}
'';
- description = mdDoc ''
+ description = ''
Configuration for one or more device IDs. Corresponding files in the /etc/keyd/ directory are created according to the name of the keys (like `default` or `externalKeyboard`).
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/lcd.nix b/third_party/nixpkgs/nixos/modules/services/hardware/lcd.nix
index 8d682d137f..d52d5f3919 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/lcd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/lcd.nix
@@ -36,32 +36,32 @@ in with lib; {
serverHost = mkOption {
type = str;
default = "localhost";
- description = lib.mdDoc "Host on which LCDd is listening.";
+ description = "Host on which LCDd is listening.";
};
serverPort = mkOption {
type = int;
default = 13666;
- description = lib.mdDoc "Port on which LCDd is listening.";
+ description = "Port on which LCDd is listening.";
};
server = {
enable = mkOption {
type = bool;
default = false;
- description = lib.mdDoc "Enable the LCD panel server (LCDd)";
+ description = "Enable the LCD panel server (LCDd)";
};
openPorts = mkOption {
type = bool;
default = false;
- description = lib.mdDoc "Open the ports in the firewall";
+ description = "Open the ports in the firewall";
};
usbPermissions = mkOption {
type = bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Set group-write permissions on a USB device.
A USB connected LCD panel will most likely require having its
@@ -83,25 +83,25 @@ in with lib; {
usbVid = mkOption {
type = str;
default = "";
- description = lib.mdDoc "The vendor ID of the USB device to claim.";
+ description = "The vendor ID of the USB device to claim.";
};
usbPid = mkOption {
type = str;
default = "";
- description = lib.mdDoc "The product ID of the USB device to claim.";
+ description = "The product ID of the USB device to claim.";
};
usbGroup = mkOption {
type = str;
default = "dialout";
- description = lib.mdDoc "The group to use for settings permissions. This group must exist or you will have to create it.";
+ description = "The group to use for settings permissions. This group must exist or you will have to create it.";
};
extraConfig = mkOption {
type = lines;
default = "";
- description = lib.mdDoc "Additional configuration added verbatim to the server config.";
+ description = "Additional configuration added verbatim to the server config.";
};
};
@@ -109,19 +109,19 @@ in with lib; {
enable = mkOption {
type = bool;
default = false;
- description = lib.mdDoc "Enable the LCD panel client (LCDproc)";
+ description = "Enable the LCD panel client (LCDproc)";
};
extraConfig = mkOption {
type = lines;
default = "";
- description = lib.mdDoc "Additional configuration added verbatim to the client config.";
+ description = "Additional configuration added verbatim to the client config.";
};
restartForever = mkOption {
type = bool;
default = true;
- description = lib.mdDoc "Try restarting the client forever.";
+ description = "Try restarting the client forever.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/lirc.nix b/third_party/nixpkgs/nixos/modules/services/hardware/lirc.nix
index 5b1a8d10c7..8103dbeb2d 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/lirc.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/lirc.nix
@@ -11,7 +11,7 @@ in {
options = {
services.lirc = {
- enable = mkEnableOption (lib.mdDoc "LIRC daemon");
+ enable = mkEnableOption "the LIRC daemon, to receive and send infrared signals";
options = mkOption {
type = types.lines;
@@ -19,18 +19,18 @@ in {
[lircd]
nodaemon = False
'';
- description = lib.mdDoc "LIRC default options described in man:lircd(8) ({file}`lirc_options.conf`)";
+ description = "LIRC default options described in man:lircd(8) ({file}`lirc_options.conf`)";
};
configs = mkOption {
type = types.listOf types.lines;
- description = lib.mdDoc "Configurations for lircd to load, see man:lircd.conf(5) for details ({file}`lircd.conf`)";
+ description = "Configurations for lircd to load, see man:lircd.conf(5) for details ({file}`lircd.conf`)";
};
extraArguments = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "Extra arguments to lircd.";
+ description = "Extra arguments to lircd.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/cdi-generate.nix b/third_party/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/cdi-generate.nix
index a90d234f65..1aaa2d07b9 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/cdi-generate.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/cdi-generate.nix
@@ -1,37 +1,58 @@
-{ config, lib, pkgs }: let
+{
+ addDriverRunpath,
+ glibc,
+ jq,
+ lib,
+ nvidia-container-toolkit,
+ nvidia-driver,
+ runtimeShell,
+ writeScriptBin,
+}:
+let
mountOptions = { options = ["ro" "nosuid" "nodev" "bind"]; };
mounts = [
- { hostPath = "${lib.getBin config.hardware.nvidia.package}/bin/nvidia-cuda-mps-control";
+ # FIXME: Making /usr mounts optional
+ { hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-control";
containerPath = "/usr/bin/nvidia-cuda-mps-control"; }
- { hostPath = "${lib.getBin config.hardware.nvidia.package}/bin/nvidia-cuda-mps-server";
+ { hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-server";
containerPath = "/usr/bin/nvidia-cuda-mps-server"; }
- { hostPath = "${lib.getBin config.hardware.nvidia.package}/bin/nvidia-debugdump";
+ { hostPath = lib.getExe' nvidia-driver "nvidia-debugdump";
containerPath = "/usr/bin/nvidia-debugdump"; }
- { hostPath = "${lib.getBin config.hardware.nvidia.package}/bin/nvidia-powerd";
+ { hostPath = lib.getExe' nvidia-driver "nvidia-powerd";
containerPath = "/usr/bin/nvidia-powerd"; }
- { hostPath = "${lib.getBin config.hardware.nvidia.package}/bin/nvidia-smi";
+ { hostPath = lib.getExe' nvidia-driver "nvidia-smi";
containerPath = "/usr/bin/nvidia-smi"; }
- { hostPath = "${pkgs.nvidia-container-toolkit}/bin/nvidia-ctk";
+ { hostPath = lib.getExe' nvidia-container-toolkit "nvidia-ctk";
containerPath = "/usr/bin/nvidia-ctk"; }
- { hostPath = "${pkgs.glibc}/lib";
- containerPath = "${pkgs.glibc}/lib"; }
- { hostPath = "${pkgs.glibc}/lib64";
- containerPath = "${pkgs.glibc}/lib64"; }
+ { hostPath = "${lib.getLib glibc}/lib";
+ containerPath = "${lib.getLib glibc}/lib"; }
+
+ # FIXME: use closureinfo
+ {
+ hostPath = addDriverRunpath.driverLink;
+ containerPath = addDriverRunpath.driverLink;
+ }
+ { hostPath = "${lib.getLib glibc}/lib";
+ containerPath = "${lib.getLib glibc}/lib"; }
+ { hostPath = "${lib.getLib glibc}/lib64";
+ containerPath = "${lib.getLib glibc}/lib64"; }
];
jqAddMountExpression = ".containerEdits.mounts[.containerEdits.mounts | length] |= . +";
mountsToJq = lib.concatMap
(mount:
- ["${pkgs.jq}/bin/jq '${jqAddMountExpression} ${builtins.toJSON (mount // mountOptions)}'"])
+ ["${lib.getExe jq} '${jqAddMountExpression} ${builtins.toJSON (mount // mountOptions)}'"])
mounts;
-in ''
-#! ${pkgs.runtimeShell}
+in
+writeScriptBin "nvidia-cdi-generator"
+''
+#! ${runtimeShell}
function cdiGenerate {
- ${pkgs.nvidia-container-toolkit}/bin/nvidia-ctk cdi generate \
+ ${lib.getExe' nvidia-container-toolkit "nvidia-ctk"} cdi generate \
--format json \
- --ldconfig-path ${pkgs.glibc.bin}/bin/ldconfig \
- --library-search-path ${config.hardware.nvidia.package}/lib \
- --nvidia-ctk-path ${pkgs.nvidia-container-toolkit}/bin/nvidia-ctk
+ --ldconfig-path ${lib.getExe' glibc "ldconfig"} \
+ --library-search-path ${lib.getLib nvidia-driver}/lib \
+ --nvidia-ctk-path ${lib.getExe' nvidia-container-toolkit "nvidia-ctk"}
}
cdiGenerate | \
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/default.nix b/third_party/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/default.nix
index 3c96e9c41b..5aa3c72ee0 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/default.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/default.nix
@@ -9,7 +9,7 @@
internal = true;
visible = false;
type = lib.types.bool;
- description = lib.mdDoc ''
+ description = ''
Enable dynamic CDI configuration for NVidia devices by running
nvidia-container-toolkit on boot.
'';
@@ -26,9 +26,11 @@
serviceConfig = {
RuntimeDirectory = "cdi";
RemainAfterExit = true;
- ExecStart = let
- script = (pkgs.writeScriptBin "nvidia-cdi-generator"
- (import ./cdi-generate.nix { inherit config lib pkgs; })); in (lib.getExe script);
+ ExecStart =
+ let
+ script = pkgs.callPackage ./cdi-generate.nix { nvidia-driver = config.hardware.nvidia.package; };
+ in
+ lib.getExe script;
Type = "oneshot";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/nvidia-optimus.nix b/third_party/nixpkgs/nixos/modules/services/hardware/nvidia-optimus.nix
index 5b5273ed78..d53175052c 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/nvidia-optimus.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/nvidia-optimus.nix
@@ -11,7 +11,7 @@ let kernel = config.boot.kernelPackages; in
hardware.nvidiaOptimus.disable = lib.mkOption {
default = false;
type = lib.types.bool;
- description = lib.mdDoc ''
+ description = ''
Completely disable the NVIDIA graphics card and use the
integrated graphics processor instead.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/openrgb.nix b/third_party/nixpkgs/nixos/modules/services/hardware/openrgb.nix
index 81b199e507..6ae5b4e587 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/openrgb.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/openrgb.nix
@@ -6,7 +6,7 @@ let
cfg = config.services.hardware.openrgb;
in {
options.services.hardware.openrgb = {
- enable = mkEnableOption (lib.mdDoc "OpenRGB server");
+ enable = mkEnableOption "OpenRGB server, for RGB lighting control";
package = mkPackageOption pkgs "openrgb" { };
@@ -20,13 +20,13 @@ in {
else if config.hardware.cpu.amd.updateMicrocode then "amd"
else null;
'';
- description = lib.mdDoc "CPU family of motherboard. Allows for addition motherboard i2c support.";
+ description = "CPU family of motherboard. Allows for addition motherboard i2c support.";
};
server.port = mkOption {
type = types.port;
default = 6742;
- description = lib.mdDoc "Set server port of openrgb.";
+ description = "Set server port of openrgb.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/pcscd.nix b/third_party/nixpkgs/nixos/modules/services/hardware/pcscd.nix
index 77c2d9b53f..17bab2c5bf 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/pcscd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/pcscd.nix
@@ -18,13 +18,13 @@ let
in
{
options.services.pcscd = {
- enable = mkEnableOption (lib.mdDoc "PCSC-Lite daemon");
+ enable = mkEnableOption "PCSC-Lite daemon, to access smart cards using SCard API (PC/SC)";
plugins = mkOption {
type = types.listOf types.package;
defaultText = literalExpression "[ pkgs.ccid ]";
example = literalExpression "[ pkgs.pcsc-cyberjack ]";
- description = lib.mdDoc "Plugin packages to be used for PCSC-Lite.";
+ description = "Plugin packages to be used for PCSC-Lite.";
};
readerConfig = mkOption {
@@ -36,7 +36,7 @@ in
LIBPATH /path/to/serial_reader.so
CHANNELID 1
'';
- description = lib.mdDoc ''
+ description = ''
Configuration for devices that aren't hotpluggable.
See {manpage}`reader.conf(5)` for valid options.
@@ -46,7 +46,7 @@ in
extraArgs = mkOption {
type = types.listOf types.str;
default = [ ];
- description = lib.mdDoc "Extra command line arguments to be passed to the PCSC daemon.";
+ description = "Extra command line arguments to be passed to the PCSC daemon.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/pommed.nix b/third_party/nixpkgs/nixos/modules/services/hardware/pommed.nix
index a71004c176..9cdb2d4d1a 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/pommed.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/pommed.nix
@@ -13,7 +13,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to use the pommed tool to handle Apple laptop
keyboard hotkeys.
'';
@@ -22,7 +22,7 @@ in {
configFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
The path to the {file}`pommed.conf` file. Leave
to null to use the default config file
({file}`/etc/pommed.conf.mactel`). See the
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/power-profiles-daemon.nix b/third_party/nixpkgs/nixos/modules/services/hardware/power-profiles-daemon.nix
index 1d84bf8ac9..05e5b7a00b 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/power-profiles-daemon.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/power-profiles-daemon.nix
@@ -15,7 +15,7 @@ in
enable = lib.mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable power-profiles-daemon, a DBus daemon that allows
changing system behavior based upon user-selected power profiles.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/rasdaemon.nix b/third_party/nixpkgs/nixos/modules/services/hardware/rasdaemon.nix
index a1334684b7..3fe75984b3 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/rasdaemon.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/rasdaemon.nix
@@ -10,18 +10,18 @@ in
{
options.hardware.rasdaemon = {
- enable = mkEnableOption (lib.mdDoc "RAS logging daemon");
+ enable = mkEnableOption "RAS logging daemon";
record = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "record events via sqlite3, required for ras-mc-ctl";
+ description = "record events via sqlite3, required for ras-mc-ctl";
};
mainboard = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Custom mainboard description, see {manpage}`ras-mc-ctl(8)` for more details.";
+ description = "Custom mainboard description, see {manpage}`ras-mc-ctl(8)` for more details.";
example = ''
vendor = ASRock
model = B450M Pro4
@@ -40,7 +40,7 @@ in
labels = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Additional memory module label descriptions to be placed in /etc/ras/dimm_labels.d/labels";
+ description = "Additional memory module label descriptions to be placed in /etc/ras/dimm_labels.d/labels";
example = ''
# vendor and model may be shown by 'ras-mc-ctl --mainboard'
vendor: ASRock
@@ -57,7 +57,7 @@ in
config = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
rasdaemon configuration, currently only used for CE PFA
for details, read rasdaemon.outPath/etc/sysconfig/rasdaemon's comments
'';
@@ -72,11 +72,11 @@ in
extraModules = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "extra kernel modules to load";
+ description = "extra kernel modules to load";
example = [ "i7core_edac" ];
};
- testing = mkEnableOption (lib.mdDoc "error injection infrastructure");
+ testing = mkEnableOption "error injection infrastructure";
};
config = mkIf cfg.enable {
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/ratbagd.nix b/third_party/nixpkgs/nixos/modules/services/hardware/ratbagd.nix
index 5567bcbafd..4398e8d582 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/ratbagd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/ratbagd.nix
@@ -10,7 +10,7 @@ in
options = {
services.ratbagd = {
- enable = mkEnableOption (lib.mdDoc "ratbagd for configuring gaming mice");
+ enable = mkEnableOption "ratbagd for configuring gaming mice";
package = mkPackageOption pkgs "libratbag" { };
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/sane.nix b/third_party/nixpkgs/nixos/modules/services/hardware/sane.nix
index 8f64afe607..5f166bb320 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/sane.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/sane.nix
@@ -48,7 +48,7 @@ in
hardware.sane.enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable support for SANE scanners.
::: {.note}
@@ -61,19 +61,19 @@ in
type = types.package;
default = pkgs.sane-backends;
defaultText = literalExpression "pkgs.sane-backends";
- description = lib.mdDoc "Backends driver package to use.";
+ description = "Backends driver package to use.";
};
hardware.sane.snapshot = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Use a development snapshot of SANE scanner drivers.";
+ description = "Use a development snapshot of SANE scanner drivers.";
};
hardware.sane.extraBackends = mkOption {
type = types.listOf types.path;
default = [];
- description = lib.mdDoc ''
+ description = ''
Packages providing extra SANE backends to enable.
::: {.note}
@@ -89,7 +89,7 @@ in
type = types.listOf types.str;
default = [];
example = [ "v4l" ];
- description = lib.mdDoc ''
+ description = ''
Names of backends which are enabled by default but should be disabled.
See `$SANE_CONFIG_DIR/dll.conf` for the list of possible names.
'';
@@ -98,14 +98,14 @@ in
hardware.sane.configDir = mkOption {
type = types.str;
internal = true;
- description = lib.mdDoc "The value of SANE_CONFIG_DIR.";
+ description = "The value of SANE_CONFIG_DIR.";
};
hardware.sane.netConf = mkOption {
type = types.lines;
default = "";
example = "192.168.0.16";
- description = lib.mdDoc ''
+ description = ''
Network hosts that should be probed for remote scanners.
'';
};
@@ -114,7 +114,7 @@ in
type = types.bool;
default = false;
example = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable drivers for the Fujitsu ScanSnap scanners.
The driver files are unfree and extracted from the Windows driver image.
@@ -133,7 +133,7 @@ in
hardware.sane.openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open ports needed for discovery of scanners on the local network, e.g.
needed for Canon scanners (BJNP protocol).
'';
@@ -142,7 +142,7 @@ in
services.saned.enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable saned network daemon for remote connection to scanners.
saned would be run from `scanner` user; to allow
@@ -155,7 +155,7 @@ in
type = types.lines;
default = "";
example = "192.168.0.0/24";
- description = lib.mdDoc ''
+ description = ''
Extra saned configuration lines.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix b/third_party/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix
index e737a4ce20..8f99981084 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix
@@ -15,7 +15,7 @@ let
name = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The friendly name you give to the network device. If undefined,
the name of attribute will be used.
'';
@@ -25,7 +25,7 @@ let
model = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The model of the network device.
'';
@@ -35,7 +35,7 @@ let
ip = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The ip address of the device. If undefined, you will have to
provide a nodename.
'';
@@ -46,7 +46,7 @@ let
nodename = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The node name of the device. If undefined, you will have to
provide an ip.
'';
@@ -68,8 +68,8 @@ in
options = {
hardware.sane.brscan4.enable =
- mkEnableOption (lib.mdDoc "Brother's brscan4 scan backend") // {
- description = lib.mdDoc ''
+ mkEnableOption "Brother's brscan4 scan backend" // {
+ description = ''
When enabled, will automatically register the "brscan4" sane
backend and bring configuration files to their expected location.
'';
@@ -82,7 +82,7 @@ in
office2 = { model = "MFC-7860DW"; nodename = "BRW0080927AFBCE"; };
};
type = with types; attrsOf (submodule netDeviceOpts);
- description = lib.mdDoc ''
+ description = ''
The list of network devices that will be registered against the brscan4
sane backend.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix b/third_party/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix
index d29e0f542f..5236970337 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix
@@ -15,7 +15,7 @@ let
name = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The friendly name you give to the network device. If undefined,
the name of attribute will be used.
'';
@@ -25,7 +25,7 @@ let
model = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The model of the network device.
'';
@@ -35,7 +35,7 @@ let
ip = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The ip address of the device. If undefined, you will have to
provide a nodename.
'';
@@ -46,7 +46,7 @@ let
nodename = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The node name of the device. If undefined, you will have to
provide an ip.
'';
@@ -68,7 +68,7 @@ in
options = {
hardware.sane.brscan5.enable =
- mkEnableOption (lib.mdDoc "the Brother brscan5 sane backend");
+ mkEnableOption "the Brother brscan5 sane backend";
hardware.sane.brscan5.netDevices = mkOption {
default = {};
@@ -77,7 +77,7 @@ in
office2 = { model = "MFC-7860DW"; nodename = "BRW0080927AFBCE"; };
};
type = with types; attrsOf (submodule netDeviceOpts);
- description = lib.mdDoc ''
+ description = ''
The list of network devices that will be registered against the brscan5
sane backend.
'';
@@ -94,7 +94,7 @@ in
{ source = "${etcFiles}/etc/opt/brother/scanner/brscan5"; };
environment.etc."opt/brother/scanner/models" =
{ source = "${etcFiles}/etc/opt/brother/scanner/brscan5/models"; };
- environment.etc."sane.d/dll.d/brother5.conf".source = "${pkgs.brscan5}/etc/sane.d/dll.d/brother.conf";
+ environment.etc."sane.d/dll.d/brother5.conf".source = "${pkgs.brscan5}/etc/sane.d/dll.d/brother5.conf";
assertions = [
{ assertion = all (x: !(null != x.ip && null != x.nodename)) netDeviceList;
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix b/third_party/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix
index 5b05694abc..d71a17f5ea 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix
@@ -6,8 +6,8 @@ with lib;
options = {
hardware.sane.dsseries.enable =
- mkEnableOption (lib.mdDoc "Brother DSSeries scan backend") // {
- description = lib.mdDoc ''
+ mkEnableOption "Brother DSSeries scan backend" // {
+ description = ''
When enabled, will automatically register the "dsseries" SANE backend.
This supports the Brother DSmobile scanner series, including the
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/spacenavd.nix b/third_party/nixpkgs/nixos/modules/services/hardware/spacenavd.nix
index 36f1324393..69ca6f102e 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/spacenavd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/spacenavd.nix
@@ -8,7 +8,7 @@ in {
options = {
hardware.spacenavd = {
- enable = mkEnableOption (lib.mdDoc "spacenavd to support 3DConnexion devices");
+ enable = mkEnableOption "spacenavd to support 3DConnexion devices";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/supergfxd.nix b/third_party/nixpkgs/nixos/modules/services/hardware/supergfxd.nix
index f7af993d72..62296014a8 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/supergfxd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/supergfxd.nix
@@ -7,12 +7,12 @@ in
{
options = {
services.supergfxd = {
- enable = lib.mkEnableOption (lib.mdDoc "the supergfxd service");
+ enable = lib.mkEnableOption "the supergfxd service";
settings = lib.mkOption {
type = lib.types.nullOr json.type;
default = null;
- description = lib.mdDoc ''
+ description = ''
The content of /etc/supergfxd.conf.
See https://gitlab.com/asus-linux/supergfxctl/#config-options-etcsupergfxdconf.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/tcsd.nix b/third_party/nixpkgs/nixos/modules/services/hardware/tcsd.nix
index f22924d410..e414b9647c 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/tcsd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/tcsd.nix
@@ -40,7 +40,7 @@ in
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to enable tcsd, a Trusted Computing management service
that provides TCG Software Stack (TSS). The tcsd daemon is
the only portal to the Trusted Platform Module (TPM), a hardware
@@ -51,19 +51,19 @@ in
user = mkOption {
default = "tss";
type = types.str;
- description = lib.mdDoc "User account under which tcsd runs.";
+ description = "User account under which tcsd runs.";
};
group = mkOption {
default = "tss";
type = types.str;
- description = lib.mdDoc "Group account under which tcsd runs.";
+ description = "Group account under which tcsd runs.";
};
stateDir = mkOption {
default = "/var/lib/tpm";
type = types.path;
- description = lib.mdDoc ''
+ description = ''
The location of the system persistent storage file.
The system persistent storage file holds keys and data across
restarts of the TCSD and system reboots.
@@ -73,20 +73,20 @@ in
firmwarePCRs = mkOption {
default = "0,1,2,3,4,5,6,7";
type = types.str;
- description = lib.mdDoc "PCR indices used in the TPM for firmware measurements.";
+ description = "PCR indices used in the TPM for firmware measurements.";
};
kernelPCRs = mkOption {
default = "8,9,10,11,12";
type = types.str;
- description = lib.mdDoc "PCR indices used in the TPM for kernel measurements.";
+ description = "PCR indices used in the TPM for kernel measurements.";
};
platformCred = mkOption {
default = "${cfg.stateDir}/platform.cert";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/platform.cert"'';
type = types.path;
- description = lib.mdDoc ''
+ description = ''
Path to the platform credential for your TPM. Your TPM
manufacturer may have provided you with a set of credentials
(certificates) that should be used when creating identities
@@ -100,7 +100,7 @@ in
default = "${cfg.stateDir}/conformance.cert";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/conformance.cert"'';
type = types.path;
- description = lib.mdDoc ''
+ description = ''
Path to the conformance credential for your TPM.
See also the platformCred option'';
};
@@ -109,7 +109,7 @@ in
default = "${cfg.stateDir}/endorsement.cert";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/endorsement.cert"'';
type = types.path;
- description = lib.mdDoc ''
+ description = ''
Path to the endorsement credential for your TPM.
See also the platformCred option'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/thermald.nix b/third_party/nixpkgs/nixos/modules/services/hardware/thermald.nix
index a4839f326c..4f9202d13d 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/thermald.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/thermald.nix
@@ -9,12 +9,12 @@ in
###### interface
options = {
services.thermald = {
- enable = mkEnableOption (lib.mdDoc "thermald, the temperature management daemon");
+ enable = mkEnableOption "thermald, the temperature management daemon";
debug = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable debug logging.
'';
};
@@ -22,13 +22,13 @@ in
ignoreCpuidCheck = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to ignore the cpuid check to allow running on unsupported platforms";
+ description = "Whether to ignore the cpuid check to allow running on unsupported platforms";
};
configFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc "the thermald manual configuration file.";
+ description = "the thermald manual configuration file.";
};
package = mkPackageOption pkgs "thermald" { };
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/thinkfan.nix b/third_party/nixpkgs/nixos/modules/services/hardware/thinkfan.nix
index b62fb5e9f8..37c9fef03d 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/thinkfan.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/thinkfan.nix
@@ -29,7 +29,7 @@ let
options = {
type = mkOption {
type = types.enum [ "hwmon" "atasmart" "tpacpi" "nvml" ];
- description = lib.mdDoc ''
+ description = ''
The ${name} type, can be
`hwmon` for standard ${name}s,
@@ -43,7 +43,7 @@ let
};
query = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The query string used to match one or more ${name}s: can be
a fullpath to the temperature file (single ${name}) or a fullpath
to a driver directory (multiple ${name}s).
@@ -57,7 +57,7 @@ let
indices = mkOption {
type = with types; nullOr (listOf ints.unsigned);
default = null;
- description = lib.mdDoc ''
+ description = ''
A list of ${name}s to pick in case multiple ${name}s match the query.
::: {.note}
@@ -69,7 +69,7 @@ let
correction = mkOption {
type = with types; nullOr (listOf int);
default = null;
- description = lib.mdDoc ''
+ description = ''
A list of values to be added to the temperature of each sensor,
can be used to equalize small discrepancies in temperature ratings.
'';
@@ -106,7 +106,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable thinkfan, a fan control program.
::: {.note}
@@ -120,7 +120,7 @@ in {
smartSupport = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to build thinkfan with S.M.A.R.T. support to read temperatures
directly from hard disks.
'';
@@ -133,7 +133,7 @@ in {
query = "/proc/acpi/ibm/thermal";
}
];
- description = lib.mdDoc ''
+ description = ''
List of temperature sensors thinkfan will monitor.
${syntaxNote "thermal"}
@@ -147,7 +147,7 @@ in {
query = "/proc/acpi/ibm/fan";
}
];
- description = lib.mdDoc ''
+ description = ''
List of fans thinkfan will control.
${syntaxNote "fan"}
@@ -165,7 +165,7 @@ in {
[7 60 85]
["level auto" 80 32767]
];
- description = lib.mdDoc ''
+ description = ''
[LEVEL LOW HIGH]
LEVEL is the fan level to use: it can be an integer (0-7 with thinkpad_acpi),
@@ -181,7 +181,7 @@ in {
type = types.listOf types.str;
default = [ ];
example = [ "-b" "0" ];
- description = lib.mdDoc ''
+ description = ''
A list of extra command line arguments to pass to thinkfan.
Check the thinkfan(1) manpage for available arguments.
'';
@@ -190,7 +190,7 @@ in {
settings = mkOption {
type = types.attrsOf settingsFormat.type;
default = { };
- description = lib.mdDoc ''
+ description = ''
Thinkfan settings. Use this option to configure thinkfan
settings not exposed in a NixOS option or to bypass one.
Before changing this, read the `thinkfan.conf(5)`
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/throttled.nix b/third_party/nixpkgs/nixos/modules/services/hardware/throttled.nix
index 0f1f00348e..143dc83a1d 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/throttled.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/throttled.nix
@@ -7,12 +7,12 @@ let
in {
options = {
services.throttled = {
- enable = mkEnableOption (lib.mdDoc "fix for Intel CPU throttling");
+ enable = mkEnableOption "fix for Intel CPU throttling";
extraConfig = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc "Alternative configuration";
+ description = "Alternative configuration";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/tlp.nix b/third_party/nixpkgs/nixos/modules/services/hardware/tlp.nix
index 0b7f98ab6a..148a88e203 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/tlp.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/tlp.nix
@@ -20,7 +20,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the TLP power management daemon.";
+ description = "Whether to enable the TLP power management daemon.";
};
settings = mkOption {type = with types; attrsOf (oneOf [bool int float str (listOf str)]);
@@ -29,7 +29,7 @@ in
SATA_LINKPWR_ON_BAT = "med_power_with_dipm";
USB_BLACKLIST_PHONE = 1;
};
- description = lib.mdDoc ''
+ description = ''
Options passed to TLP. See https://linrunner.de/tlp for all supported options..
'';
};
@@ -37,7 +37,7 @@ in
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Verbatim additional configuration variables for TLP.
DEPRECATED: use services.tlp.settings instead.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/trezord.nix b/third_party/nixpkgs/nixos/modules/services/hardware/trezord.nix
index b2217fc971..097acb0363 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/trezord.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/trezord.nix
@@ -18,7 +18,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable Trezor bridge daemon, for use with Trezor hardware bitcoin wallets.
'';
};
@@ -26,7 +26,7 @@ in {
emulator.enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable Trezor emulator support.
'';
};
@@ -34,7 +34,7 @@ in {
emulator.port = mkOption {
type = types.port;
default = 21324;
- description = lib.mdDoc ''
+ description = ''
Listening port for the Trezor emulator.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/triggerhappy.nix b/third_party/nixpkgs/nixos/modules/services/hardware/triggerhappy.nix
index 54eac70643..89f8754c0e 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/triggerhappy.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/triggerhappy.nix
@@ -22,18 +22,18 @@ let
keys = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc "List of keys to match. Key names as defined in linux/input-event-codes.h";
+ description = "List of keys to match. Key names as defined in linux/input-event-codes.h";
};
event = mkOption {
type = types.enum ["press" "hold" "release"];
default = "press";
- description = lib.mdDoc "Event to match.";
+ description = "Event to match.";
};
cmd = mkOption {
type = types.str;
- description = lib.mdDoc "What to run.";
+ description = "What to run.";
};
};
@@ -52,7 +52,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the {command}`triggerhappy` hotkey daemon.
'';
};
@@ -61,7 +61,7 @@ in
type = types.str;
default = "nobody";
example = "root";
- description = lib.mdDoc ''
+ description = ''
User account under which {command}`triggerhappy` runs.
'';
};
@@ -72,7 +72,7 @@ in
example = lib.literalExpression ''
[ { keys = ["PLAYPAUSE"]; cmd = "''${pkgs.mpc-cli}/bin/mpc -q toggle"; } ]
'';
- description = lib.mdDoc ''
+ description = ''
Key bindings for {command}`triggerhappy`.
'';
};
@@ -80,7 +80,7 @@ in
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Literal contents to append to the end of {command}`triggerhappy` configuration file.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/tuxedo-rs.nix b/third_party/nixpkgs/nixos/modules/services/hardware/tuxedo-rs.nix
index 0daccfef3a..506454c1ca 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/tuxedo-rs.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/tuxedo-rs.nix
@@ -9,9 +9,9 @@ in
{
options = {
hardware.tuxedo-rs = {
- enable = mkEnableOption (lib.mdDoc "Rust utilities for interacting with hardware from TUXEDO Computers");
+ enable = mkEnableOption "Rust utilities for interacting with hardware from TUXEDO Computers";
- tailor-gui.enable = mkEnableOption (lib.mdDoc "tailor-gui, an alternative to TUXEDO Control Center, written in Rust");
+ tailor-gui.enable = mkEnableOption "tailor-gui, an alternative to TUXEDO Control Center, written in Rust";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/udev.nix b/third_party/nixpkgs/nixos/modules/services/hardware/udev.nix
index 670b9087f1..3db6616442 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/udev.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/udev.nix
@@ -191,7 +191,7 @@ in
boot.hardwareScan = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to try to load kernel modules for all detected hardware.
Usually this does a good job of providing you with the modules
you need, but sometimes it can crash the system or cause other
@@ -200,14 +200,14 @@ in
};
services.udev = {
- enable = mkEnableOption (lib.mdDoc "udev") // {
+ enable = mkEnableOption "udev, a device manager for the Linux kernel" // {
default = true;
};
packages = mkOption {
type = types.listOf types.path;
default = [];
- description = lib.mdDoc ''
+ description = ''
List of packages containing {command}`udev` rules.
All files found in
{file}`«pkg»/etc/udev/rules.d` and
@@ -220,7 +220,7 @@ in
path = mkOption {
type = types.listOf types.path;
default = [];
- description = lib.mdDoc ''
+ description = ''
Packages added to the {env}`PATH` environment variable when
executing programs from Udev rules.
@@ -235,7 +235,7 @@ in
ENV{ID_VENDOR_ID}=="046d", ENV{ID_MODEL_ID}=="0825", ENV{PULSE_IGNORE}="1"
'';
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Additional {command}`udev` rules. They'll be written
into file {file}`99-local.rules`. Thus they are
read and applied after all other rules.
@@ -250,7 +250,7 @@ in
KEYBOARD_KEY_700e2=leftctrl
'';
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Additional {command}`hwdb` files. They'll be written
into file {file}`99-local.hwdb`. Thus they are
read after all other files.
@@ -262,7 +262,7 @@ in
hardware.firmware = mkOption {
type = types.listOf types.package;
default = [];
- description = lib.mdDoc ''
+ description = ''
List of packages containing firmware files. Such files
will be loaded automatically if the kernel asks for them
(i.e., when it has detected specific hardware that requires
@@ -282,7 +282,7 @@ in
networking.usePredictableInterfaceNames = mkOption {
default = true;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to assign [predictable names to network interfaces](https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/).
If enabled, interfaces
are assigned names that contain topology information
@@ -300,7 +300,7 @@ in
packages = mkOption {
type = types.listOf types.path;
default = [];
- description = lib.mdDoc ''
+ description = ''
*This will only be used when systemd is used in stage 1.*
List of packages containing {command}`udev` rules that will be copied to stage 1.
@@ -314,7 +314,7 @@ in
binPackages = mkOption {
type = types.listOf types.path;
default = [];
- description = lib.mdDoc ''
+ description = ''
*This will only be used when systemd is used in stage 1.*
Packages to search for binaries that are referenced by the udev rules in stage 1.
@@ -329,7 +329,7 @@ in
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1D:60:B9:6D:4F", KERNEL=="eth*", NAME="my_fast_network_card"
'';
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
{command}`udev` rules to include in the initrd
*only*. They'll be written into file
{file}`99-local.rules`. Thus they are read and applied
@@ -401,17 +401,19 @@ in
}))
];
- environment.etc =
- {
- "udev/rules.d".source = udevRulesFor {
- name = "udev-rules";
- udevPackages = cfg.packages;
- systemd = config.systemd.package;
- binPackages = cfg.packages;
- inherit udevPath udev;
- };
- "udev/hwdb.bin".source = hwdbBin;
+ environment.etc = {
+ "udev/rules.d".source = udevRulesFor {
+ name = "udev-rules";
+ udevPackages = cfg.packages;
+ systemd = config.systemd.package;
+ binPackages = cfg.packages;
+ inherit udevPath udev;
};
+ "udev/hwdb.bin".source = hwdbBin;
+ } // lib.optionalAttrs config.boot.modprobeConfig.enable {
+ # We don't place this into `extraModprobeConfig` so that stage-1 ramdisk doesn't bloat.
+ "modprobe.d/firmware.conf".text = "options firmware_class path=${config.hardware.firmware}/lib/firmware";
+ };
system.requiredKernelConfig = with config.lib.kernelConfig; [
(isEnabled "UNIX")
@@ -419,21 +421,17 @@ in
(isYes "NET")
];
- # We don't place this into `extraModprobeConfig` so that stage-1 ramdisk doesn't bloat.
- environment.etc."modprobe.d/firmware.conf".text = "options firmware_class path=${config.hardware.firmware}/lib/firmware";
+ system.activationScripts.udevd = lib.mkIf config.boot.kernel.enable ''
+ # The deprecated hotplug uevent helper is not used anymore
+ if [ -e /proc/sys/kernel/hotplug ]; then
+ echo "" > /proc/sys/kernel/hotplug
+ fi
- system.activationScripts.udevd =
- ''
- # The deprecated hotplug uevent helper is not used anymore
- if [ -e /proc/sys/kernel/hotplug ]; then
- echo "" > /proc/sys/kernel/hotplug
- fi
-
- # Allow the kernel to find our firmware.
- if [ -e /sys/module/firmware_class/parameters/path ]; then
- echo -n "${config.hardware.firmware}/lib/firmware" > /sys/module/firmware_class/parameters/path
- fi
- '';
+ # Allow the kernel to find our firmware.
+ if [ -e /sys/module/firmware_class/parameters/path ]; then
+ echo -n "${config.hardware.firmware}/lib/firmware" > /sys/module/firmware_class/parameters/path
+ fi
+ '';
systemd.services.systemd-udevd =
{ restartTriggers = cfg.packages;
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/udisks2.nix b/third_party/nixpkgs/nixos/modules/services/hardware/udisks2.nix
index 5c058f1f0a..46a72b9615 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/udisks2.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/udisks2.nix
@@ -18,12 +18,12 @@ in
services.udisks2 = {
- enable = mkEnableOption (mdDoc "udisks2, a DBus service that allows applications to query and manipulate storage devices");
+ enable = mkEnableOption "udisks2, a DBus service that allows applications to query and manipulate storage devices";
mountOnMedia = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
When enabled, instructs udisks2 to mount removable drives under `/media/` directory, instead of the
default, ACL-controlled `/run/media/$USER/`. Since `/media/` is not mounted as tmpfs by default, it
requires cleanup to get rid of stale mountpoints; enabling this option will take care of this at boot.
@@ -53,7 +53,7 @@ in
};
};
'';
- description = mdDoc ''
+ description = ''
Options passed to udisksd.
See [here](http://manpages.ubuntu.com/manpages/latest/en/man5/udisks2.conf.5.html) and
drive configuration in [here](http://manpages.ubuntu.com/manpages/latest/en/man8/udisks.8.html) for supported options.
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/undervolt.nix b/third_party/nixpkgs/nixos/modules/services/hardware/undervolt.nix
index c4d4c6791a..23bc848b23 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/undervolt.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/undervolt.nix
@@ -34,16 +34,16 @@ let
in
{
options.services.undervolt = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
Undervolting service for Intel CPUs.
- Warning: This service is not endorsed by Intel and may permanently damage your hardware. Use at your own risk!
- '');
+ Warning: This service is not endorsed by Intel and may permanently damage your hardware. Use at your own risk
+ '';
verbose = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable verbose logging.
'';
};
@@ -53,7 +53,7 @@ in
coreOffset = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
The amount of voltage in mV to offset the CPU cores by.
'';
};
@@ -61,7 +61,7 @@ in
gpuOffset = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
The amount of voltage in mV to offset the GPU by.
'';
};
@@ -69,7 +69,7 @@ in
uncoreOffset = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
The amount of voltage in mV to offset uncore by.
'';
};
@@ -77,7 +77,7 @@ in
analogioOffset = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
The amount of voltage in mV to offset analogio by.
'';
};
@@ -85,7 +85,7 @@ in
temp = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
The temperature target in Celsius degrees.
'';
};
@@ -93,7 +93,7 @@ in
tempAc = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
The temperature target on AC power in Celsius degrees.
'';
};
@@ -101,7 +101,7 @@ in
tempBat = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
The temperature target on battery power in Celsius degrees.
'';
};
@@ -109,7 +109,7 @@ in
turbo = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
Changes the Intel Turbo feature status (1 is disabled and 0 is enabled).
'';
};
@@ -117,7 +117,7 @@ in
p1.limit = mkOption {
type = with types; nullOr int;
default = null;
- description = lib.mdDoc ''
+ description = ''
The P1 Power Limit in Watts.
Both limit and window must be set.
'';
@@ -125,7 +125,7 @@ in
p1.window = mkOption {
type = with types; nullOr (oneOf [ float int ]);
default = null;
- description = lib.mdDoc ''
+ description = ''
The P1 Time Window in seconds.
Both limit and window must be set.
'';
@@ -134,7 +134,7 @@ in
p2.limit = mkOption {
type = with types; nullOr int;
default = null;
- description = lib.mdDoc ''
+ description = ''
The P2 Power Limit in Watts.
Both limit and window must be set.
'';
@@ -142,7 +142,7 @@ in
p2.window = mkOption {
type = with types; nullOr (oneOf [ float int ]);
default = null;
- description = lib.mdDoc ''
+ description = ''
The P2 Time Window in seconds.
Both limit and window must be set.
'';
@@ -151,7 +151,7 @@ in
useTimer = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to set a timer that applies the undervolt settings every 30s.
This will cause spam in the journal but might be required for some
hardware under specific conditions.
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/upower.nix b/third_party/nixpkgs/nixos/modules/services/hardware/upower.nix
index 0ae31d99aa..3d0edb0467 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/upower.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/upower.nix
@@ -21,7 +21,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Upower, a DBus service that provides power
management support to applications.
'';
@@ -32,7 +32,7 @@ in
enableWattsUpPro = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable the Watts Up Pro device.
The Watts Up Pro contains a generic FTDI USB device without a specific
@@ -50,7 +50,7 @@ in
noPollBatteries = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Don't poll the kernel for battery level changes.
Some hardware will send us battery level changes through
@@ -62,7 +62,7 @@ in
ignoreLid = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Do we ignore the lid state
Some laptops are broken. The lid state is either inverted, or stuck
@@ -76,7 +76,7 @@ in
usePercentageForPolicy = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Policy for warnings and action based on battery levels
Whether battery percentage based policy should be used. The default
@@ -90,7 +90,7 @@ in
percentageLow = mkOption {
type = types.ints.unsigned;
default = 10;
- description = lib.mdDoc ''
+ description = ''
When `usePercentageForPolicy` is
`true`, the levels at which UPower will consider the
battery low.
@@ -108,7 +108,7 @@ in
percentageCritical = mkOption {
type = types.ints.unsigned;
default = 3;
- description = lib.mdDoc ''
+ description = ''
When `usePercentageForPolicy` is
`true`, the levels at which UPower will consider the
battery critical.
@@ -126,7 +126,7 @@ in
percentageAction = mkOption {
type = types.ints.unsigned;
default = 2;
- description = lib.mdDoc ''
+ description = ''
When `usePercentageForPolicy` is
`true`, the levels at which UPower will take action
for the critical battery level.
@@ -144,7 +144,7 @@ in
timeLow = mkOption {
type = types.ints.unsigned;
default = 1200;
- description = lib.mdDoc ''
+ description = ''
When `usePercentageForPolicy` is
`false`, the time remaining in seconds at which
UPower will consider the battery low.
@@ -158,7 +158,7 @@ in
timeCritical = mkOption {
type = types.ints.unsigned;
default = 300;
- description = lib.mdDoc ''
+ description = ''
When `usePercentageForPolicy` is
`false`, the time remaining in seconds at which
UPower will consider the battery critical.
@@ -172,7 +172,7 @@ in
timeAction = mkOption {
type = types.ints.unsigned;
default = 120;
- description = lib.mdDoc ''
+ description = ''
When `usePercentageForPolicy` is
`false`, the time remaining in seconds at which
UPower will take action for the critical battery level.
@@ -186,7 +186,7 @@ in
criticalPowerAction = mkOption {
type = types.enum [ "PowerOff" "Hibernate" "HybridSleep" ];
default = "HybridSleep";
- description = lib.mdDoc ''
+ description = ''
The action to take when `timeAction` or
`percentageAction` has been reached for the batteries
(UPS or laptop batteries) supplying the computer
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/usbmuxd.nix b/third_party/nixpkgs/nixos/modules/services/hardware/usbmuxd.nix
index d05ad3af8b..891619934e 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/usbmuxd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/usbmuxd.nix
@@ -17,7 +17,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable the usbmuxd ("USB multiplexing daemon") service. This daemon is
in charge of multiplexing connections over USB to an iOS device. This is
needed for transferring data from and to iOS devices (see ifuse). Also
@@ -28,7 +28,7 @@ in
user = mkOption {
type = types.str;
default = defaultUserGroup;
- description = lib.mdDoc ''
+ description = ''
The user usbmuxd should use to run after startup.
'';
};
@@ -36,7 +36,7 @@ in
group = mkOption {
type = types.str;
default = defaultUserGroup;
- description = lib.mdDoc ''
+ description = ''
The group usbmuxd should use to run after startup.
'';
};
@@ -45,7 +45,7 @@ in
type = types.package;
default = pkgs.usbmuxd;
defaultText = literalExpression "pkgs.usbmuxd";
- description = lib.mdDoc "Which package to use for the usbmuxd daemon.";
+ description = "Which package to use for the usbmuxd daemon.";
relatedPackages = [ "usbmuxd" "usbmuxd2" ];
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/usbrelayd.nix b/third_party/nixpkgs/nixos/modules/services/hardware/usbrelayd.nix
index 01d3a5ba8b..31e56ab1d1 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/usbrelayd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/usbrelayd.nix
@@ -5,11 +5,11 @@ let
in
{
options.services.usbrelayd = with types; {
- enable = mkEnableOption (lib.mdDoc "USB Relay MQTT daemon");
+ enable = mkEnableOption "USB Relay MQTT daemon";
broker = mkOption {
type = str;
- description = lib.mdDoc "Hostname or IP address of your MQTT Broker.";
+ description = "Hostname or IP address of your MQTT Broker.";
default = "127.0.0.1";
example = [
"mqtt"
@@ -19,7 +19,7 @@ in
clientName = mkOption {
type = str;
- description = lib.mdDoc "Name, your client connects as.";
+ description = "Name, your client connects as.";
default = "MyUSBRelay";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/hardware/vdr.nix b/third_party/nixpkgs/nixos/modules/services/hardware/vdr.nix
index 689d83f7ee..6adab68025 100644
--- a/third_party/nixpkgs/nixos/modules/services/hardware/vdr.nix
+++ b/third_party/nixpkgs/nixos/modules/services/hardware/vdr.nix
@@ -3,13 +3,13 @@ let
cfg = config.services.vdr;
inherit (lib)
- mkEnableOption mkPackageOption mkOption types mkIf optional mdDoc;
+ mkEnableOption mkPackageOption mkOption types mkIf optional;
in
{
options = {
services.vdr = {
- enable = mkEnableOption (mdDoc "Start VDR");
+ enable = mkEnableOption "VDR, a video disk recorder";
package = mkPackageOption pkgs "vdr" {
example = "wrapVdr.override { plugins = with pkgs.vdrPlugins; [ hello ]; }";
@@ -18,21 +18,21 @@ in
videoDir = mkOption {
type = types.path;
default = "/srv/vdr/video";
- description = mdDoc "Recording directory";
+ description = "Recording directory";
};
extraArguments = mkOption {
type = types.listOf types.str;
default = [ ];
- description = mdDoc "Additional command line arguments to pass to VDR.";
+ description = "Additional command line arguments to pass to VDR.";
};
- enableLirc = mkEnableOption (mdDoc "LIRC");
+ enableLirc = mkEnableOption "LIRC";
user = mkOption {
type = types.str;
default = "vdr";
- description = mdDoc ''
+ description = ''
User under which the VDR service runs.
'';
};
@@ -40,7 +40,7 @@ in
group = mkOption {
type = types.str;
default = "vdr";
- description = mdDoc ''
+ description = ''
Group under which the VDRvdr service runs.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/home-automation/ebusd.nix b/third_party/nixpkgs/nixos/modules/services/home-automation/ebusd.nix
index 519d116e0e..aaf2ca1d77 100644
--- a/third_party/nixpkgs/nixos/modules/services/home-automation/ebusd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/home-automation/ebusd.nix
@@ -15,12 +15,12 @@ let
"--port=${toString cfg.port}"
"--configpath=${cfg.configpath}"
"--scanconfig=${cfg.scanconfig}"
+ "--log=all:${cfg.logs.all}"
"--log=main:${cfg.logs.main}"
"--log=network:${cfg.logs.network}"
"--log=bus:${cfg.logs.bus}"
"--log=update:${cfg.logs.update}"
"--log=other:${cfg.logs.other}"
- "--log=all:${cfg.logs.all}"
] ++ lib.optionals cfg.readonly [
"--readonly"
] ++ lib.optionals cfg.mqtt.enable [
@@ -44,13 +44,13 @@ in
meta.maintainers = with maintainers; [ nathan-gs ];
options.services.ebusd = {
- enable = mkEnableOption (lib.mdDoc "ebusd service");
+ enable = mkEnableOption "ebusd, a daemon for communication with eBUS heating systems";
device = mkOption {
type = types.str;
default = "";
example = "IP:PORT";
- description = lib.mdDoc ''
+ description = ''
Use DEV as eBUS device [/dev/ttyUSB0].
This can be either:
enh:DEVICE or enh:IP:PORT for enhanced device (only adapter v3 and newer),
@@ -64,7 +64,7 @@ in
port = mkOption {
default = 8888;
type = types.port;
- description = lib.mdDoc ''
+ description = ''
The port on which to listen on
'';
};
@@ -72,7 +72,7 @@ in
readonly = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Only read from device, never write to it
'';
};
@@ -80,7 +80,7 @@ in
configpath = mkOption {
type = types.str;
default = "https://cfg.ebusd.eu/";
- description = lib.mdDoc ''
+ description = ''
Read CSV config files from PATH (local folder or HTTPS URL) [https://cfg.ebusd.eu/]
'';
};
@@ -88,7 +88,7 @@ in
scanconfig = mkOption {
type = types.str;
default = "full";
- description = lib.mdDoc ''
+ description = ''
Pick CSV config files matching initial scan ("none" or empty for no initial scan message, "full" for full scan, or a single hex address to scan, default is to send a broadcast ident message).
If combined with --checkconfig, you can add scan message data as arguments for checking a particular scan configuration, e.g. "FF08070400/0AB5454850303003277201". For further details on this option,
see [Automatic configuration](https://github.com/john30/ebusd/wiki/4.7.-Automatic-configuration).
@@ -99,7 +99,7 @@ in
main = mkOption {
type = types.enum [ "error" "notice" "info" "debug"];
default = "info";
- description = lib.mdDoc ''
+ description = ''
Only write log for matching AREAs (main|network|bus|update|other|all) below or equal to LEVEL (error|notice|info|debug) [all:notice].
'';
};
@@ -107,7 +107,7 @@ in
network = mkOption {
type = types.enum [ "error" "notice" "info" "debug"];
default = "info";
- description = lib.mdDoc ''
+ description = ''
Only write log for matching AREAs (main|network|bus|update|other|all) below or equal to LEVEL (error|notice|info|debug) [all:notice].
'';
};
@@ -115,7 +115,7 @@ in
bus = mkOption {
type = types.enum [ "error" "notice" "info" "debug"];
default = "info";
- description = lib.mdDoc ''
+ description = ''
Only write log for matching AREAs (main|network|bus|update|other|all) below or equal to LEVEL (error|notice|info|debug) [all:notice].
'';
};
@@ -123,7 +123,7 @@ in
update = mkOption {
type = types.enum [ "error" "notice" "info" "debug"];
default = "info";
- description = lib.mdDoc ''
+ description = ''
Only write log for matching AREAs (main|network|bus|update|other|all) below or equal to LEVEL (error|notice|info|debug) [all:notice].
'';
};
@@ -131,7 +131,7 @@ in
other = mkOption {
type = types.enum [ "error" "notice" "info" "debug"];
default = "info";
- description = lib.mdDoc ''
+ description = ''
Only write log for matching AREAs (main|network|bus|update|other|all) below or equal to LEVEL (error|notice|info|debug) [all:notice].
'';
};
@@ -139,7 +139,7 @@ in
all = mkOption {
type = types.enum [ "error" "notice" "info" "debug"];
default = "info";
- description = lib.mdDoc ''
+ description = ''
Only write log for matching AREAs (main|network|bus|update|other|all) below or equal to LEVEL (error|notice|info|debug) [all:notice].
'';
};
@@ -150,7 +150,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Adds support for MQTT
'';
};
@@ -158,7 +158,7 @@ in
host = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc ''
+ description = ''
Connect to MQTT broker on HOST.
'';
};
@@ -166,7 +166,7 @@ in
port = mkOption {
default = 1883;
type = types.port;
- description = lib.mdDoc ''
+ description = ''
The port on which to connect to MQTT
'';
};
@@ -174,7 +174,7 @@ in
home-assistant = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Adds the Home Assistant topics to MQTT, read more at [MQTT Integration](https://github.com/john30/ebusd/wiki/MQTT-integration)
'';
};
@@ -182,21 +182,21 @@ in
retain = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Set the retain flag on all topics instead of only selected global ones
'';
};
user = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The MQTT user to use
'';
};
password = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The MQTT password.
'';
};
@@ -206,7 +206,7 @@ in
extraArguments = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
Extra arguments to the ebus daemon
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/home-automation/esphome.nix b/third_party/nixpkgs/nixos/modules/services/home-automation/esphome.nix
index 3c0fd8aed0..faae5ec8ff 100644
--- a/third_party/nixpkgs/nixos/modules/services/home-automation/esphome.nix
+++ b/third_party/nixpkgs/nixos/modules/services/home-automation/esphome.nix
@@ -7,7 +7,6 @@ let
mkEnableOption
mkIf
mkOption
- mdDoc
types
;
@@ -24,38 +23,38 @@ in
meta.maintainers = with maintainers; [ oddlama ];
options.services.esphome = {
- enable = mkEnableOption (mdDoc "esphome");
+ enable = mkEnableOption "esphome, for making custom firmwares for ESP32/ESP8266";
package = lib.mkPackageOption pkgs "esphome" { };
enableUnixSocket = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Listen on a unix socket `/run/esphome/esphome.sock` instead of the TCP port.";
+ description = "Listen on a unix socket `/run/esphome/esphome.sock` instead of the TCP port.";
};
address = mkOption {
type = types.str;
default = "localhost";
- description = mdDoc "esphome address";
+ description = "esphome address";
};
port = mkOption {
type = types.port;
default = 6052;
- description = mdDoc "esphome port";
+ description = "esphome port";
};
openFirewall = mkOption {
default = false;
type = types.bool;
- description = mdDoc "Whether to open the firewall for the specified port.";
+ description = "Whether to open the firewall for the specified port.";
};
allowedDevices = mkOption {
default = ["char-ttyS" "char-ttyUSB"];
example = ["/dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0"];
- description = lib.mdDoc ''
+ description = ''
A list of device nodes to which {command}`esphome` has access to.
Refer to DeviceAllow in systemd.resource-control(5) for more information.
Beware that if a device is referred to by an absolute path instead of a device category,
@@ -67,7 +66,7 @@ in
usePing = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Use ping to check online status of devices instead of mDNS";
+ description = "Use ping to check online status of devices instead of mDNS";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/home-automation/evcc.nix b/third_party/nixpkgs/nixos/modules/services/home-automation/evcc.nix
index f360f525b0..cf4043c946 100644
--- a/third_party/nixpkgs/nixos/modules/services/home-automation/evcc.nix
+++ b/third_party/nixpkgs/nixos/modules/services/home-automation/evcc.nix
@@ -19,19 +19,19 @@ in
meta.maintainers = with lib.maintainers; [ hexa ];
options.services.evcc = with types; {
- enable = mkEnableOption (lib.mdDoc "EVCC, the extensible EV Charge Controller with PV integration");
+ enable = mkEnableOption "EVCC, the extensible EV Charge Controller with PV integration";
extraArgs = mkOption {
type = listOf str;
default = [];
- description = lib.mdDoc ''
+ description = ''
Extra arguments to pass to the evcc executable.
'';
};
settings = mkOption {
type = format.type;
- description = lib.mdDoc ''
+ description = ''
evcc configuration as a Nix attribute set.
Check for possible options in the sample [evcc.dist.yaml](https://github.com/andig/evcc/blob/${package.version}/evcc.dist.yaml].
diff --git a/third_party/nixpkgs/nixos/modules/services/home-automation/home-assistant.nix b/third_party/nixpkgs/nixos/modules/services/home-automation/home-assistant.nix
index 3423eebe9e..d94adfb4aa 100644
--- a/third_party/nixpkgs/nixos/modules/services/home-automation/home-assistant.nix
+++ b/third_party/nixpkgs/nixos/modules/services/home-automation/home-assistant.nix
@@ -95,12 +95,12 @@ in {
options.services.home-assistant = {
# Running home-assistant on NixOS is considered an installation method that is unsupported by the upstream project.
# https://github.com/home-assistant/architecture/blob/master/adr/0012-define-supported-installation-method.md#decision
- enable = mkEnableOption (lib.mdDoc "Home Assistant. Please note that this installation method is unsupported upstream");
+ enable = mkEnableOption "Home Assistant. Please note that this installation method is unsupported upstream";
configDir = mkOption {
default = "/var/lib/hass";
type = types.path;
- description = lib.mdDoc "The config directory, where your {file}`configuration.yaml` is located.";
+ description = "The config directory, where your {file}`configuration.yaml` is located.";
};
defaultIntegrations = mkOption {
@@ -164,7 +164,7 @@ in {
"wled"
]
'';
- description = lib.mdDoc ''
+ description = ''
List of [components](https://www.home-assistant.io/integrations/) that have their dependencies included in the package.
The component name can be found in the URL, for example `https://www.home-assistant.io/integrations/ffmpeg/` would map to `ffmpeg`.
@@ -183,7 +183,7 @@ in {
psycopg2
];
'';
- description = lib.mdDoc ''
+ description = ''
List of packages to add to propagatedBuildInputs.
A popular example is `python3Packages.psycopg2`
@@ -199,7 +199,7 @@ in {
prometheus_sensor
];
'';
- description = lib.mdDoc ''
+ description = ''
List of custom component packages to install.
Available components can be found below `pkgs.home-assistant-custom-components`.
@@ -215,7 +215,7 @@ in {
mini-media-player
];
'';
- description = lib.mdDoc ''
+ description = ''
List of custom lovelace card packages to load as lovelace resources.
Available cards can be found below `pkgs.home-assistant-custom-lovelace-modules`.
@@ -240,7 +240,7 @@ in {
type = types.nullOr types.str;
default = null;
example = "Home";
- description = lib.mdDoc ''
+ description = ''
Name of the location where Home Assistant is running.
'';
};
@@ -249,7 +249,7 @@ in {
type = types.nullOr (types.either types.float types.str);
default = null;
example = 52.3;
- description = lib.mdDoc ''
+ description = ''
Latitude of your location required to calculate the time the sun rises and sets.
'';
};
@@ -258,7 +258,7 @@ in {
type = types.nullOr (types.either types.float types.str);
default = null;
example = 4.9;
- description = lib.mdDoc ''
+ description = ''
Longitude of your location required to calculate the time the sun rises and sets.
'';
};
@@ -267,7 +267,7 @@ in {
type = types.nullOr (types.enum [ "metric" "imperial" ]);
default = null;
example = "metric";
- description = lib.mdDoc ''
+ description = ''
The unit system to use. This also sets temperature_unit, Celsius for Metric and Fahrenheit for Imperial.
'';
};
@@ -276,7 +276,7 @@ in {
type = types.nullOr (types.enum [ "C" "F" ]);
default = null;
example = "C";
- description = lib.mdDoc ''
+ description = ''
Override temperature unit set by unit_system. `C` for Celsius, `F` for Fahrenheit.
'';
};
@@ -288,7 +288,7 @@ in {
config.time.timeZone or null
'';
example = "Europe/Amsterdam";
- description = lib.mdDoc ''
+ description = ''
Pick your time zone from the column TZ of Wikipedia’s [list of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
'';
};
@@ -303,7 +303,7 @@ in {
"::"
];
example = "::1";
- description = lib.mdDoc ''
+ description = ''
Only listen to incoming requests on specific IP/host. The default listed assumes support for IPv4 and IPv6.
'';
};
@@ -311,7 +311,7 @@ in {
server_port = mkOption {
default = 8123;
type = types.port;
- description = lib.mdDoc ''
+ description = ''
The port on which to listen.
'';
};
@@ -330,7 +330,7 @@ in {
else "storage";
'';
example = "yaml";
- description = lib.mdDoc ''
+ description = ''
In what mode should the main Lovelace panel be, `yaml` or `storage` (UI managed).
'';
};
@@ -354,7 +354,7 @@ in {
feedreader.urls = [ "https://nixos.org/blogs.xml" ];
}
'';
- description = lib.mdDoc ''
+ description = ''
Your {file}`configuration.yaml` as a Nix attribute set.
YAML functions like [secrets](https://www.home-assistant.io/docs/configuration/secrets/)
@@ -369,7 +369,7 @@ in {
configWritable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to make {file}`configuration.yaml` writable.
This will allow you to edit it from Home Assistant's web interface.
@@ -396,7 +396,7 @@ in {
} ];
}
'';
- description = lib.mdDoc ''
+ description = ''
Your {file}`ui-lovelace.yaml` as a Nix attribute set.
Setting this option will automatically set `lovelace.mode` to `yaml`.
@@ -407,7 +407,7 @@ in {
lovelaceConfigWritable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to make {file}`ui-lovelace.yaml` writable.
This will allow you to edit it from Home Assistant's web interface.
@@ -439,7 +439,7 @@ in {
];
}
'';
- description = lib.mdDoc ''
+ description = ''
The Home Assistant package to use.
'';
};
@@ -447,7 +447,7 @@ in {
openFirewall = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Whether to open the firewall for the specified port.";
+ description = "Whether to open the firewall for the specified port.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/home-automation/homeassistant-satellite.nix b/third_party/nixpkgs/nixos/modules/services/home-automation/homeassistant-satellite.nix
deleted file mode 100644
index 6ca428f2af..0000000000
--- a/third_party/nixpkgs/nixos/modules/services/home-automation/homeassistant-satellite.nix
+++ /dev/null
@@ -1,225 +0,0 @@
-{ config
-, lib
-, pkgs
-, ...
-}:
-
-let
- cfg = config.services.homeassistant-satellite;
-
- inherit (lib)
- escapeShellArg
- escapeShellArgs
- mkOption
- mdDoc
- mkEnableOption
- mkIf
- mkPackageOption
- types
- ;
-
- inherit (builtins)
- toString
- ;
-
- # override the package with the relevant vad dependencies
- package = cfg.package.overridePythonAttrs (oldAttrs: {
- propagatedBuildInputs = oldAttrs.propagatedBuildInputs
- ++ lib.optional (cfg.vad == "webrtcvad") cfg.package.optional-dependencies.webrtc
- ++ lib.optional (cfg.vad == "silero") cfg.package.optional-dependencies.silerovad
- ++ lib.optional (cfg.pulseaudio.enable) cfg.package.optional-dependencies.pulseaudio;
- });
-
-in
-
-{
- meta.buildDocsInSandbox = false;
-
- options.services.homeassistant-satellite = with types; {
- enable = mkEnableOption (mdDoc "Home Assistant Satellite");
-
- package = mkPackageOption pkgs "homeassistant-satellite" { };
-
- user = mkOption {
- type = str;
- example = "alice";
- description = mdDoc ''
- User to run homeassistant-satellite under.
- '';
- };
-
- group = mkOption {
- type = str;
- default = "users";
- description = mdDoc ''
- Group to run homeassistant-satellite under.
- '';
- };
-
- host = mkOption {
- type = str;
- example = "home-assistant.local";
- description = mdDoc ''
- Hostname on which your Home Assistant instance can be reached.
- '';
- };
-
- port = mkOption {
- type = port;
- example = 8123;
- description = mdDoc ''
- Port on which your Home Assistance can be reached.
- '';
- apply = toString;
- };
-
- protocol = mkOption {
- type = enum [ "http" "https" ];
- default = "http";
- example = "https";
- description = mdDoc ''
- The transport protocol used to connect to Home Assistant.
- '';
- };
-
- tokenFile = mkOption {
- type = path;
- example = "/run/keys/hass-token";
- description = mdDoc ''
- Path to a file containing a long-lived access token for your Home Assistant instance.
- '';
- apply = escapeShellArg;
- };
-
- sounds = {
- awake = mkOption {
- type = nullOr str;
- default = null;
- description = mdDoc ''
- Audio file to play when the wake word is detected.
- '';
- };
-
- done = mkOption {
- type = nullOr str;
- default = null;
- description = mdDoc ''
- Audio file to play when the voice command is done.
- '';
- };
- };
-
- vad = mkOption {
- type = enum [ "disabled" "webrtcvad" "silero" ];
- default = "disabled";
- example = "silero";
- description = mdDoc ''
- Voice activity detection model. With `disabled` sound will be transmitted continously.
- '';
- };
-
- pulseaudio = {
- enable = mkEnableOption "recording/playback via PulseAudio or PipeWire";
-
- socket = mkOption {
- type = nullOr str;
- default = null;
- example = "/run/user/1000/pulse/native";
- description = mdDoc ''
- Path or hostname to connect with the PulseAudio server.
- '';
- };
-
- duckingVolume = mkOption {
- type = nullOr float;
- default = null;
- example = 0.4;
- description = mdDoc ''
- Reduce output volume (between 0 and 1) to this percentage value while recording.
- '';
- };
-
- echoCancellation = mkEnableOption "acoustic echo cancellation";
- };
-
- extraArgs = mkOption {
- type = listOf str;
- default = [ ];
- description = mdDoc ''
- Extra arguments to pass to the commandline.
- '';
- apply = escapeShellArgs;
- };
- };
-
- config = mkIf cfg.enable {
- systemd.services."homeassistant-satellite" = {
- description = "Home Assistant Satellite";
- after = [
- "network-online.target"
- ];
- wants = [
- "network-online.target"
- ];
- wantedBy = [
- "multi-user.target"
- ];
- path = with pkgs; [
- ffmpeg-headless
- ] ++ lib.optionals (!cfg.pulseaudio.enable) [
- alsa-utils
- ];
- serviceConfig = {
- User = cfg.user;
- Group = cfg.group;
- # https://github.com/rhasspy/hassio-addons/blob/master/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/assist_microphone/run
- ExecStart = ''
- ${package}/bin/homeassistant-satellite \
- --host ${cfg.host} \
- --port ${cfg.port} \
- --protocol ${cfg.protocol} \
- --token-file ${cfg.tokenFile} \
- --vad ${cfg.vad} \
- ${lib.optionalString cfg.pulseaudio.enable "--pulseaudio"}${lib.optionalString (cfg.pulseaudio.socket != null) "=${cfg.pulseaudio.socket}"} \
- ${lib.optionalString (cfg.pulseaudio.enable && cfg.pulseaudio.duckingVolume != null) "--ducking-volume=${toString cfg.pulseaudio.duckingVolume}"} \
- ${lib.optionalString (cfg.pulseaudio.enable && cfg.pulseaudio.echoCancellation) "--echo-cancel"} \
- ${lib.optionalString (cfg.sounds.awake != null) "--awake-sound=${toString cfg.sounds.awake}"} \
- ${lib.optionalString (cfg.sounds.done != null) "--done-sound=${toString cfg.sounds.done}"} \
- ${cfg.extraArgs}
- '';
- CapabilityBoundingSet = "";
- DeviceAllow = "";
- DevicePolicy = "closed";
- LockPersonality = true;
- MemoryDenyWriteExecute = false; # onnxruntime/capi/onnxruntime_pybind11_state.so: cannot enable executable stack as shared object requires: Operation not permitted
- PrivateDevices = true;
- PrivateUsers = true;
- ProtectHome = false; # Would deny access to local pulse/pipewire server
- ProtectHostname = true;
- ProtectKernelLogs = true;
- ProtectKernelModules = true;
- ProtectKernelTunables = true;
- ProtectControlGroups = true;
- ProtectProc = "invisible";
- ProcSubset = "all"; # Error in cpuinfo: failed to parse processor information from /proc/cpuinfo
- Restart = "always";
- RestrictAddressFamilies = [
- "AF_INET"
- "AF_INET6"
- "AF_UNIX"
- ];
- RestrictNamespaces = true;
- RestrictRealtime = true;
- SupplementaryGroups = [
- "audio"
- ];
- SystemCallArchitectures = "native";
- SystemCallFilter = [
- "@system-service"
- "~@privileged"
- ];
- UMask = "0077";
- };
- };
- };
-}
diff --git a/third_party/nixpkgs/nixos/modules/services/home-automation/matter-server.nix b/third_party/nixpkgs/nixos/modules/services/home-automation/matter-server.nix
new file mode 100644
index 0000000000..7bf1cfe54d
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/services/home-automation/matter-server.nix
@@ -0,0 +1,125 @@
+{ lib
+, pkgs
+, config
+, ...
+}:
+
+with lib;
+
+let
+ cfg = config.services.matter-server;
+ storageDir = "matter-server";
+ storagePath = "/var/lib/${storageDir}";
+ vendorId = "4939"; # home-assistant vendor ID
+in
+
+{
+ meta.maintainers = with lib.maintainers; [ leonm1 ];
+
+ options.services.matter-server = with types; {
+ enable = mkEnableOption "Matter-server";
+
+ package = mkPackageOptionMD pkgs "python-matter-server" { };
+
+ port = mkOption {
+ type = types.port;
+ default = 5580;
+ description = "Port to expose the matter-server service on.";
+ };
+
+ logLevel = mkOption {
+ type = types.enum [ "critical" "error" "warning" "info" "debug" ];
+ default = "info";
+ description = "Verbosity of logs from the matter-server";
+ };
+
+ extraArgs = mkOption {
+ type = listOf str;
+ default = [];
+ description = ''
+ Extra arguments to pass to the matter-server executable.
+ See https://github.com/home-assistant-libs/python-matter-server?tab=readme-ov-file#running-the-development-server for options.
+ '';
+ };
+ };
+
+ config = mkIf cfg.enable {
+ systemd.services.matter-server = {
+ after = [ "network-online.target" ];
+ before = [ "home-assistant.service" ];
+ wants = [ "network-online.target" ];
+ wantedBy = [ "multi-user.target" ];
+ description = "Matter Server";
+ environment.HOME = storagePath;
+ serviceConfig = {
+ ExecStart = (concatStringsSep " " [
+ "${cfg.package}/bin/matter-server"
+ "--port" (toString cfg.port)
+ "--vendorid" vendorId
+ "--storage-path" storagePath
+ "--log-level" "${cfg.logLevel}"
+ "${escapeShellArgs cfg.extraArgs}"
+ ]);
+ # Start with a clean root filesystem, and allowlist what the container
+ # is permitted to access.
+ TemporaryFileSystem = "/";
+ # Allowlist /nix/store (to allow the binary to find its dependencies)
+ # and dbus.
+ ReadOnlyPaths = "/nix/store /run/dbus";
+ # Let systemd manage `/var/lib/matter-server` for us inside the
+ # ephemeral TemporaryFileSystem.
+ StateDirectory = storageDir;
+ # `python-matter-server` writes to /data even when a storage-path is
+ # specified. This bind-mount points /data at the systemd-managed
+ # /var/lib/matter-server, so all files get dropped into the state
+ # directory.
+ BindPaths = "${storagePath}:/data";
+
+ # Hardening bits
+ AmbientCapabilities = "";
+ CapabilityBoundingSet = "";
+ DevicePolicy = "closed";
+ DynamicUser = true;
+ LockPersonality = true;
+ MemoryDenyWriteExecute = true;
+ NoNewPrivileges = true;
+ PrivateDevices = true;
+ PrivateTmp = true;
+ PrivateUsers = true;
+ ProcSubset = "pid";
+ ProtectClock = true;
+ ProtectControlGroups = true;
+ ProtectHome = true;
+ ProtectHostname = true;
+ ProtectKernelLogs = true;
+ ProtectKernelModules = true;
+ ProtectKernelTunables = true;
+ ProtectProc = "invisible";
+ RestrictAddressFamilies = [
+ "AF_INET"
+ "AF_INET6"
+ "AF_NETLINK"
+ ];
+ RestrictNamespaces = true;
+ RestrictRealtime = true;
+ RestrictSUIDSGID = true;
+ SystemCallFilter = concatStringsSep " " [
+ "~" # Blocklist
+ "@clock"
+ "@cpu-emulation"
+ "@debug"
+ "@module"
+ "@mount"
+ "@obsolete"
+ "@privileged"
+ "@raw-io"
+ "@reboot"
+ "@resources"
+ "@swap"
+ ];
+ UMask = "0077";
+ };
+ };
+ };
+}
+
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/wyoming/faster-whisper.nix b/third_party/nixpkgs/nixos/modules/services/home-automation/wyoming/faster-whisper.nix
similarity index 85%
rename from third_party/nixpkgs/nixos/modules/services/audio/wyoming/faster-whisper.nix
rename to third_party/nixpkgs/nixos/modules/services/home-automation/wyoming/faster-whisper.nix
index dd7f62744c..cbff3ab3e6 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/wyoming/faster-whisper.nix
+++ b/third_party/nixpkgs/nixos/modules/services/home-automation/wyoming/faster-whisper.nix
@@ -10,7 +10,6 @@ let
inherit (lib)
escapeShellArgs
mkOption
- mdDoc
mkEnableOption
mkPackageOption
types
@@ -28,38 +27,29 @@ in
servers = mkOption {
default = {};
- description = mdDoc ''
+ description = ''
Attribute set of faster-whisper instances to spawn.
'';
type = types.attrsOf (types.submodule (
{ ... }: {
options = {
- enable = mkEnableOption (mdDoc "Wyoming faster-whisper server");
+ enable = mkEnableOption "Wyoming faster-whisper server";
model = mkOption {
- # Intersection between available and referenced models here:
- # https://github.com/rhasspy/models/releases/tag/v1.0
- # https://github.com/rhasspy/rhasspy3/blob/wyoming-v1/programs/asr/faster-whisper/server/wyoming_faster_whisper/download.py#L17-L27
- type = enum [
- "tiny"
- "tiny-int8"
- "base"
- "base-int8"
- "small"
- "small-int8"
- "medium-int8"
- ];
+ type = str;
default = "tiny-int8";
- example = "medium-int8";
- description = mdDoc ''
+ example = "Systran/faster-distil-whisper-small.en";
+ description = ''
Name of the voice model to use.
+
+ Check the [2.0.0 release notes](https://github.com/rhasspy/wyoming-faster-whisper/releases/tag/v2.0.0) for possible values.
'';
};
uri = mkOption {
type = strMatching "^(tcp|unix)://.*$";
example = "tcp://0.0.0.0:10300";
- description = mdDoc ''
+ description = ''
URI to bind the wyoming server to.
'';
};
@@ -72,7 +62,7 @@ in
"auto"
];
default = "cpu";
- description = mdDoc ''
+ description = ''
Determines the platform faster-whisper is run on. CPU works everywhere, CUDA requires a compatible NVIDIA GPU.
'';
};
@@ -83,7 +73,7 @@ in
"auto" "af" "am" "ar" "as" "az" "ba" "be" "bg" "bn" "bo" "br" "bs" "ca" "cs" "cy" "da" "de" "el" "en" "es" "et" "eu" "fa" "fi" "fo" "fr" "gl" "gu" "ha" "haw" "he" "hi" "hr" "ht" "hu" "hy" "id" "is" "it" "ja" "jw" "ka" "kk" "km" "kn" "ko" "la" "lb" "ln" "lo" "lt" "lv" "mg" "mi" "mk" "ml" "mn" "mr" "ms" "mt" "my" "ne" "nl" "nn" "no" "oc" "pa" "pl" "ps" "pt" "ro" "ru" "sa" "sd" "si" "sk" "sl" "sn" "so" "sq" "sr" "su" "sv" "sw" "ta" "te" "tg" "th" "tk" "tl" "tr" "tt" "uk" "ur" "uz" "vi" "yi" "yo" "zh"
];
example = "en";
- description = mdDoc ''
+ description = ''
The language used to to parse words and sentences.
'';
};
@@ -92,7 +82,7 @@ in
type = ints.unsigned;
default = 1;
example = 5;
- description = mdDoc ''
+ description = ''
The number of beams to use in beam search.
'';
apply = toString;
@@ -101,7 +91,7 @@ in
extraArgs = mkOption {
type = listOf str;
default = [ ];
- description = mdDoc ''
+ description = ''
Extra arguments to pass to the server commandline.
'';
apply = escapeShellArgs;
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/wyoming/openwakeword.nix b/third_party/nixpkgs/nixos/modules/services/home-automation/wyoming/openwakeword.nix
similarity index 93%
rename from third_party/nixpkgs/nixos/modules/services/audio/wyoming/openwakeword.nix
rename to third_party/nixpkgs/nixos/modules/services/home-automation/wyoming/openwakeword.nix
index 252f70be2b..856a4ef736 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/wyoming/openwakeword.nix
+++ b/third_party/nixpkgs/nixos/modules/services/home-automation/wyoming/openwakeword.nix
@@ -12,7 +12,6 @@ let
concatMapStringsSep
escapeShellArgs
mkOption
- mdDoc
mkEnableOption
mkIf
mkPackageOption
@@ -34,7 +33,7 @@ in
meta.buildDocsInSandbox = false;
options.services.wyoming.openwakeword = with types; {
- enable = mkEnableOption (mdDoc "Wyoming openWakeWord server");
+ enable = mkEnableOption "Wyoming openWakeWord server";
package = mkPackageOption pkgs "wyoming-openwakeword" { };
@@ -42,7 +41,7 @@ in
type = strMatching "^(tcp|unix)://.*$";
default = "tcp://0.0.0.0:10400";
example = "tcp://192.0.2.1:5000";
- description = mdDoc ''
+ description = ''
URI to bind the wyoming server to.
'';
};
@@ -50,7 +49,7 @@ in
customModelsDirectories = mkOption {
type = listOf types.path;
default = [];
- description = lib.mdDoc ''
+ description = ''
Paths to directories with custom wake word models (*.tflite model files).
'';
};
@@ -68,7 +67,7 @@ in
"hey_rhasspy"
"ok_nabu"
];
- description = mdDoc ''
+ description = ''
List of wake word models to preload after startup.
'';
};
@@ -76,7 +75,7 @@ in
threshold = mkOption {
type = float;
default = 0.5;
- description = mdDoc ''
+ description = ''
Activation threshold (0-1), where higher means fewer activations.
See trigger level for the relationship between activations and
@@ -88,7 +87,7 @@ in
triggerLevel = mkOption {
type = int;
default = 1;
- description = mdDoc ''
+ description = ''
Number of activations before a detection is registered.
A higher trigger level means fewer detections.
@@ -99,7 +98,7 @@ in
extraArgs = mkOption {
type = listOf str;
default = [ ];
- description = mdDoc ''
+ description = ''
Extra arguments to pass to the server commandline.
'';
apply = escapeShellArgs;
diff --git a/third_party/nixpkgs/nixos/modules/services/audio/wyoming/piper.nix b/third_party/nixpkgs/nixos/modules/services/home-automation/wyoming/piper.nix
similarity index 92%
rename from third_party/nixpkgs/nixos/modules/services/audio/wyoming/piper.nix
rename to third_party/nixpkgs/nixos/modules/services/home-automation/wyoming/piper.nix
index 2828fdf078..5b5f898d7c 100644
--- a/third_party/nixpkgs/nixos/modules/services/audio/wyoming/piper.nix
+++ b/third_party/nixpkgs/nixos/modules/services/home-automation/wyoming/piper.nix
@@ -10,7 +10,6 @@ let
inherit (lib)
escapeShellArgs
mkOption
- mdDoc
mkEnableOption
mkPackageOption
types
@@ -30,20 +29,20 @@ in
servers = mkOption {
default = {};
- description = mdDoc ''
+ description = ''
Attribute set of piper instances to spawn.
'';
type = types.attrsOf (types.submodule (
{ ... }: {
options = {
- enable = mkEnableOption (mdDoc "Wyoming Piper server");
+ enable = mkEnableOption "Wyoming Piper server";
piper = mkPackageOption pkgs "piper-tts" { };
voice = mkOption {
type = str;
example = "en-us-ryan-medium";
- description = mdDoc ''
+ description = ''
Name of the voice model to use. See the following website for samples:
https://rhasspy.github.io/piper-samples/
'';
@@ -52,7 +51,7 @@ in
uri = mkOption {
type = strMatching "^(tcp|unix)://.*$";
example = "tcp://0.0.0.0:10200";
- description = mdDoc ''
+ description = ''
URI to bind the wyoming server to.
'';
};
@@ -60,7 +59,7 @@ in
speaker = mkOption {
type = ints.unsigned;
default = 0;
- description = mdDoc ''
+ description = ''
ID of a specific speaker in a multi-speaker model.
'';
apply = toString;
@@ -69,7 +68,7 @@ in
noiseScale = mkOption {
type = float;
default = 0.667;
- description = mdDoc ''
+ description = ''
Generator noise value.
'';
apply = toString;
@@ -78,7 +77,7 @@ in
noiseWidth = mkOption {
type = float;
default = 0.333;
- description = mdDoc ''
+ description = ''
Phoneme width noise value.
'';
apply = toString;
@@ -87,7 +86,7 @@ in
lengthScale = mkOption {
type = float;
default = 1.0;
- description = mdDoc ''
+ description = ''
Phoneme length value.
'';
apply = toString;
@@ -96,7 +95,7 @@ in
extraArgs = mkOption {
type = listOf str;
default = [ ];
- description = mdDoc ''
+ description = ''
Extra arguments to pass to the server commandline.
'';
apply = escapeShellArgs;
diff --git a/third_party/nixpkgs/nixos/modules/services/home-automation/wyoming/satellite.nix b/third_party/nixpkgs/nixos/modules/services/home-automation/wyoming/satellite.nix
new file mode 100644
index 0000000000..531d375e70
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/services/home-automation/wyoming/satellite.nix
@@ -0,0 +1,244 @@
+{ config
+, lib
+, pkgs
+, ...
+}:
+
+let
+ cfg = config.services.wyoming.satellite;
+
+ inherit (lib)
+ elem
+ escapeShellArgs
+ getExe
+ literalExpression
+ mkOption
+ mkEnableOption
+ mkIf
+ mkPackageOption
+ optional
+ optionals
+ types
+ ;
+
+ finalPackage = cfg.package.overridePythonAttrs (oldAttrs: {
+ propagatedBuildInputs = oldAttrs.propagatedBuildInputs
+ # for audio enhancements like auto-gain, noise suppression
+ ++ cfg.package.optional-dependencies.webrtc
+ # vad is currently optional, because it is broken on aarch64-linux
+ ++ optionals cfg.vad.enable cfg.package.optional-dependencies.silerovad;
+ });
+in
+
+{
+ meta.buildDocsInSandbox = false;
+
+ options.services.wyoming.satellite = with types; {
+ enable = mkEnableOption "Wyoming Satellite";
+
+ package = mkPackageOption pkgs "wyoming-satellite" { };
+
+ user = mkOption {
+ type = str;
+ example = "alice";
+ description = ''
+ User to run wyoming-satellite under.
+ '';
+ };
+
+ group = mkOption {
+ type = str;
+ default = "users";
+ description = ''
+ Group to run wyoming-satellite under.
+ '';
+ };
+
+ uri = mkOption {
+ type = str;
+ default = "tcp://0.0.0.0:10700";
+ description = ''
+ URI where wyoming-satellite will bind its socket.
+ '';
+ };
+
+ name = mkOption {
+ type = str;
+ default = config.networking.hostName;
+ defaultText = literalExpression ''
+ config.networking.hostName
+ '';
+ description = ''
+ Name of the satellite.
+ '';
+ };
+
+ area = mkOption {
+ type = nullOr str;
+ default = null;
+ example = "Kitchen";
+ description = ''
+ Area to the satellite.
+ '';
+ };
+
+ microphone = {
+ command = mkOption {
+ type = str;
+ default = "arecord -r 16000 -c 1 -f S16_LE -t raw";
+ description = ''
+ Program to run for audio input.
+ '';
+ };
+
+ autoGain = mkOption {
+ type = ints.between 0 31;
+ default = 5;
+ example = 15;
+ description = ''
+ Automatic gain control in dbFS, with 31 being the loudest value. Set to 0 to disable.
+ '';
+ };
+
+ noiseSuppression = mkOption {
+ type = ints.between 0 4;
+ default = 2;
+ example = 3;
+ description = ''
+ Noise suppression level with 4 being the maximum suppression,
+ which may cause audio distortion. Set to 0 to disable.
+ '';
+ };
+ };
+
+ sound = {
+ command = mkOption {
+ type = nullOr str;
+ default = "aplay -r 22050 -c 1 -f S16_LE -t raw";
+ description = ''
+ Program to run for sound output.
+ '';
+ };
+ };
+
+ sounds = {
+ awake = mkOption {
+ type = nullOr path;
+ default = null;
+ description = ''
+ Path to audio file in WAV format to play when wake word is detected.
+ '';
+ };
+
+ done = mkOption {
+ type = nullOr path;
+ default = null;
+ description = ''
+ Path to audio file in WAV format to play when voice command recording has ended.
+ '';
+ };
+ };
+
+ vad = {
+ enable = mkOption {
+ type = bool;
+ default = true;
+ description = ''
+ Whether to enable voice activity detection.
+
+ Enabling will result in only streaming audio, when speech gets
+ detected.
+ '';
+ };
+ };
+
+ extraArgs = mkOption {
+ type = listOf str;
+ default = [ ];
+ description = ''
+ Extra arguments to pass to the executable.
+
+ Check `wyoming-satellite --help` for possible options.
+ '';
+ };
+ };
+
+ config = mkIf cfg.enable {
+ systemd.services."wyoming-satellite" = {
+ description = "Wyoming Satellite";
+ after = [
+ "network-online.target"
+ "sound.target"
+ ];
+ wants = [
+ "network-online.target"
+ "sound.target"
+ ];
+ wantedBy = [
+ "multi-user.target"
+ ];
+ path = with pkgs; [
+ alsa-utils
+ ];
+ script = let
+ optionalParam = param: argument: optionals (!elem argument [ null 0 false ]) [
+ param argument
+ ];
+ in ''
+ export XDG_RUNTIME_DIR=/run/user/$UID
+ ${escapeShellArgs ([
+ (getExe finalPackage)
+ "--uri" cfg.uri
+ "--name" cfg.name
+ "--mic-command" cfg.microphone.command
+ ]
+ ++ optionalParam "--mic-auto-gain" cfg.microphone.autoGain
+ ++ optionalParam "--mic-noise-suppression" cfg.microphone.noiseSuppression
+ ++ optionalParam "--area" cfg.area
+ ++ optionalParam "--snd-command" cfg.sound.command
+ ++ optionalParam "--awake-wav" cfg.sounds.awake
+ ++ optionalParam "--done-wav" cfg.sounds.done
+ ++ optional cfg.vad.enable "--vad"
+ ++ cfg.extraArgs)}
+ '';
+ serviceConfig = {
+ User = cfg.user;
+ Group = cfg.group;
+ # https://github.com/rhasspy/hassio-addons/blob/master/assist_microphone/rootfs/etc/s6-overlay/s6-rc.d/assist_microphone/run
+ CapabilityBoundingSet = "";
+ DeviceAllow = "";
+ DevicePolicy = "closed";
+ LockPersonality = true;
+ MemoryDenyWriteExecute = false; # onnxruntime/capi/onnxruntime_pybind11_state.so: cannot enable executable stack as shared object requires: Operation not permitted
+ PrivateDevices = true;
+ PrivateUsers = true;
+ ProtectHome = false; # Would deny access to local pulse/pipewire server
+ ProtectHostname = true;
+ ProtectKernelLogs = true;
+ ProtectKernelModules = true;
+ ProtectKernelTunables = true;
+ ProtectControlGroups = true;
+ ProtectProc = "invisible";
+ ProcSubset = "all"; # Error in cpuinfo: failed to parse processor information from /proc/cpuinfo
+ Restart = "always";
+ RestrictAddressFamilies = [
+ "AF_INET"
+ "AF_INET6"
+ "AF_UNIX"
+ "AF_NETLINK"
+ ];
+ RestrictNamespaces = true;
+ RestrictRealtime = true;
+ SupplementaryGroups = [
+ "audio"
+ ];
+ SystemCallArchitectures = "native";
+ SystemCallFilter = [
+ "@system-service"
+ "~@privileged"
+ ];
+ UMask = "0077";
+ };
+ };
+ };
+}
diff --git a/third_party/nixpkgs/nixos/modules/services/home-automation/zigbee2mqtt.nix b/third_party/nixpkgs/nixos/modules/services/home-automation/zigbee2mqtt.nix
index a653e49a09..f1d1504873 100644
--- a/third_party/nixpkgs/nixos/modules/services/home-automation/zigbee2mqtt.nix
+++ b/third_party/nixpkgs/nixos/modules/services/home-automation/zigbee2mqtt.nix
@@ -18,12 +18,12 @@ in
];
options.services.zigbee2mqtt = {
- enable = mkEnableOption (lib.mdDoc "zigbee2mqtt service");
+ enable = mkEnableOption "zigbee2mqtt service";
package = mkPackageOption pkgs "zigbee2mqtt" { };
dataDir = mkOption {
- description = lib.mdDoc "Zigbee2mqtt data directory";
+ description = "Zigbee2mqtt data directory";
default = "/var/lib/zigbee2mqtt";
type = types.path;
};
@@ -40,7 +40,7 @@ in
};
}
'';
- description = lib.mdDoc ''
+ description = ''
Your {file}`configuration.yaml` as a Nix attribute set.
Check the [documentation](https://www.zigbee2mqtt.io/information/configuration.html)
for possible options.
diff --git a/third_party/nixpkgs/nixos/modules/services/home-automation/zwave-js.nix b/third_party/nixpkgs/nixos/modules/services/home-automation/zwave-js.nix
index 9821da7ef6..2138719ec6 100644
--- a/third_party/nixpkgs/nixos/modules/services/home-automation/zwave-js.nix
+++ b/third_party/nixpkgs/nixos/modules/services/home-automation/zwave-js.nix
@@ -8,21 +8,21 @@ let
settingsFormat = pkgs.formats.json {};
in {
options.services.zwave-js = {
- enable = mkEnableOption (mdDoc "the zwave-js server on boot");
+ enable = mkEnableOption "the zwave-js server on boot";
package = mkPackageOption pkgs "zwave-js-server" { };
port = mkOption {
type = types.port;
default = 3000;
- description = mdDoc ''
+ description = ''
Port for the server to listen on.
'';
};
serialPort = mkOption {
type = types.path;
- description = mdDoc ''
+ description = ''
Serial port device path for Z-Wave controller.
'';
example = "/dev/ttyUSB0";
@@ -30,7 +30,7 @@ in {
secretsConfigFile = mkOption {
type = types.path;
- description = mdDoc ''
+ description = ''
JSON file containing secret keys. A dummy example:
```
@@ -72,13 +72,13 @@ in {
type = types.path;
default = "/var/cache/zwave-js";
readOnly = true;
- description = lib.mdDoc "Cache directory";
+ description = "Cache directory";
};
};
};
};
default = {};
- description = mdDoc ''
+ description = ''
Configuration settings for the generated config
file.
'';
@@ -88,7 +88,7 @@ in {
type = with lib.types; listOf str;
default = [ ];
example = [ "--mock-driver" ];
- description = lib.mdDoc ''
+ description = ''
Extra flags to pass to command
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/SystemdJournal2Gelf.nix b/third_party/nixpkgs/nixos/modules/services/logging/SystemdJournal2Gelf.nix
index 429dde33b5..7c50e9e2c4 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/SystemdJournal2Gelf.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/SystemdJournal2Gelf.nix
@@ -10,7 +10,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable SystemdJournal2Gelf.
'';
};
@@ -18,7 +18,7 @@ in
graylogServer = mkOption {
type = types.str;
example = "graylog2.example.com:11201";
- description = lib.mdDoc ''
+ description = ''
Host and port of your graylog2 input. This should be a GELF
UDP input.
'';
@@ -27,7 +27,7 @@ in
extraOptions = mkOption {
type = types.separatedString " ";
default = "";
- description = lib.mdDoc ''
+ description = ''
Any extra flags to pass to SystemdJournal2Gelf. Note that
these are basically `journalctl` flags.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/awstats.nix b/third_party/nixpkgs/nixos/modules/services/logging/awstats.nix
index 708775bfcf..a5b0e6347b 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/awstats.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/awstats.nix
@@ -11,21 +11,21 @@ let
type = types.enum [ "mail" "web" ];
default = "web";
example = "mail";
- description = lib.mdDoc ''
+ description = ''
The type of log being collected.
'';
};
domain = mkOption {
type = types.str;
default = name;
- description = lib.mdDoc "The domain name to collect stats for.";
+ description = "The domain name to collect stats for.";
example = "example.com";
};
logFile = mkOption {
type = types.str;
example = "/var/log/nginx/access.log";
- description = lib.mdDoc ''
+ description = ''
The log file to be scanned.
For mail, set this to
@@ -38,7 +38,7 @@ let
logFormat = mkOption {
type = types.str;
default = "1";
- description = lib.mdDoc ''
+ description = ''
The log format being used.
For mail, set this to
@@ -52,7 +52,7 @@ let
type = types.listOf types.str;
default = [];
example = [ "www.example.org" ];
- description = lib.mdDoc ''
+ description = ''
List of aliases the site has.
'';
};
@@ -65,22 +65,22 @@ let
"ValidHTTPCodes" = "404";
}
'';
- description = lib.mdDoc "Extra configuration to be appended to awstats.\${name}.conf.";
+ description = "Extra configuration to be appended to awstats.\${name}.conf.";
};
webService = {
- enable = mkEnableOption (lib.mdDoc "awstats web service");
+ enable = mkEnableOption "awstats web service";
hostname = mkOption {
type = types.str;
default = config.domain;
- description = lib.mdDoc "The hostname the web service appears under.";
+ description = "The hostname the web service appears under.";
};
urlPrefix = mkOption {
type = types.str;
default = "/awstats";
- description = lib.mdDoc "The URL prefix under which the awstats pages appear.";
+ description = "The URL prefix under which the awstats pages appear.";
};
};
};
@@ -95,12 +95,12 @@ in
];
options.services.awstats = {
- enable = mkEnableOption (lib.mdDoc "awstats");
+ enable = mkEnableOption "awstats, a real-time logfile analyzer";
dataDir = mkOption {
type = types.path;
default = "/var/lib/awstats";
- description = lib.mdDoc "The directory where awstats data will be stored.";
+ description = "The directory where awstats data will be stored.";
};
configs = mkOption {
@@ -114,14 +114,14 @@ in
};
}
'';
- description = lib.mdDoc "Attribute set of domains to collect stats for.";
+ description = "Attribute set of domains to collect stats for.";
};
updateAt = mkOption {
type = types.nullOr types.str;
default = null;
example = "hourly";
- description = lib.mdDoc ''
+ description = ''
Specification of the time at which awstats will get updated.
(in the format described by {manpage}`systemd.time(7)`)
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/filebeat.nix b/third_party/nixpkgs/nixos/modules/services/logging/filebeat.nix
index 071e001eb3..57e0c60735 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/filebeat.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/filebeat.nix
@@ -19,14 +19,14 @@ in
services.filebeat = {
- enable = mkEnableOption (lib.mdDoc "filebeat");
+ enable = mkEnableOption "filebeat";
package = mkPackageOption pkgs "filebeat" {
example = "filebeat7";
};
inputs = mkOption {
- description = lib.mdDoc ''
+ description = ''
Inputs specify how Filebeat locates and processes input data.
This is like `services.filebeat.settings.filebeat.inputs`,
@@ -48,7 +48,7 @@ in
type = mkOption {
type = types.str;
default = name;
- description = lib.mdDoc ''
+ description = ''
The input type.
Look for the value after `type:` on
@@ -72,7 +72,7 @@ in
};
modules = mkOption {
- description = lib.mdDoc ''
+ description = ''
Filebeat modules provide a quick way to get started
processing common log formats. They contain default
configurations, Elasticsearch ingest pipeline definitions,
@@ -98,7 +98,7 @@ in
module = mkOption {
type = types.str;
default = name;
- description = lib.mdDoc ''
+ description = ''
The name of the module.
Look for the value after `module:` on
@@ -134,7 +134,7 @@ in
type = with types; listOf str;
default = [ "127.0.0.1:9200" ];
example = [ "myEShost:9200" ];
- description = lib.mdDoc ''
+ description = ''
The list of Elasticsearch nodes to connect to.
The events are distributed to these nodes in round
@@ -154,7 +154,7 @@ in
type = types.listOf json.type;
default = [];
internal = true;
- description = lib.mdDoc ''
+ description = ''
Inputs specify how Filebeat locates and processes
input data. Use [](#opt-services.filebeat.inputs) instead.
@@ -165,7 +165,7 @@ in
type = types.listOf json.type;
default = [];
internal = true;
- description = lib.mdDoc ''
+ description = ''
Filebeat modules provide a quick way to get started
processing common log formats. They contain default
configurations, Elasticsearch ingest pipeline
@@ -194,7 +194,7 @@ in
};
'';
- description = lib.mdDoc ''
+ description = ''
Configuration for filebeat. See
for supported values.
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/fluentd.nix b/third_party/nixpkgs/nixos/modules/services/logging/fluentd.nix
index c8718f26db..bbf905eca0 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/fluentd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/fluentd.nix
@@ -12,12 +12,12 @@ in {
options = {
services.fluentd = {
- enable = mkEnableOption (lib.mdDoc "fluentd");
+ enable = mkEnableOption "fluentd, a data/log collector";
config = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Fluentd config.";
+ description = "Fluentd config.";
};
package = mkPackageOption pkgs "fluentd" { };
@@ -25,7 +25,7 @@ in {
plugins = mkOption {
type = types.listOf types.path;
default = [];
- description = lib.mdDoc ''
+ description = ''
A list of plugin paths to pass into fluentd. It will make plugins defined in ruby files
there available in your config.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/graylog.nix b/third_party/nixpkgs/nixos/modules/services/logging/graylog.nix
index 673930c4cb..25982022c0 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/graylog.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/graylog.nix
@@ -33,36 +33,36 @@ in
services.graylog = {
- enable = mkEnableOption (lib.mdDoc "Graylog");
+ enable = mkEnableOption "Graylog, a log management solution";
package = mkOption {
type = types.package;
default = if versionOlder config.system.stateVersion "23.05" then pkgs.graylog-3_3 else pkgs.graylog-5_1;
defaultText = literalExpression (if versionOlder config.system.stateVersion "23.05" then "pkgs.graylog-3_3" else "pkgs.graylog-5_1");
- description = lib.mdDoc "Graylog package to use.";
+ description = "Graylog package to use.";
};
user = mkOption {
type = types.str;
default = "graylog";
- description = lib.mdDoc "User account under which graylog runs";
+ description = "User account under which graylog runs";
};
isMaster = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether this is the master instance of your Graylog cluster";
+ description = "Whether this is the master instance of your Graylog cluster";
};
nodeIdFile = mkOption {
type = types.str;
default = "/var/lib/graylog/server/node-id";
- description = lib.mdDoc "Path of the file containing the graylog node-id";
+ description = "Path of the file containing the graylog node-id";
};
passwordSecret = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
You MUST set a secret to secure/pepper the stored user passwords here. Use at least 64 characters.
Generate one by using for example: pwgen -N 1 -s 96
'';
@@ -71,13 +71,13 @@ in
rootUsername = mkOption {
type = types.str;
default = "admin";
- description = lib.mdDoc "Name of the default administrator user";
+ description = "Name of the default administrator user";
};
rootPasswordSha2 = mkOption {
type = types.str;
example = "e3c652f0ba0b4801205814f8b6bc49672c4c74e25b497770bb89b22cdeb4e952";
- description = lib.mdDoc ''
+ description = ''
You MUST specify a hash password for the root user (which you only need to initially set up the
system and in case you lose connectivity to your authentication backend)
This password cannot be changed using the API or via the web interface. If you need to change it,
@@ -90,29 +90,29 @@ in
elasticsearchHosts = mkOption {
type = types.listOf types.str;
example = literalExpression ''[ "http://node1:9200" "http://user:password@node2:19200" ]'';
- description = lib.mdDoc "List of valid URIs of the http ports of your elastic nodes. If one or more of your elasticsearch hosts require authentication, include the credentials in each node URI that requires authentication";
+ description = "List of valid URIs of the http ports of your elastic nodes. If one or more of your elasticsearch hosts require authentication, include the credentials in each node URI that requires authentication";
};
messageJournalDir = mkOption {
type = types.str;
default = "/var/lib/graylog/data/journal";
- description = lib.mdDoc "The directory which will be used to store the message journal. The directory must be exclusively used by Graylog and must not contain any other files than the ones created by Graylog itself";
+ description = "The directory which will be used to store the message journal. The directory must be exclusively used by Graylog and must not contain any other files than the ones created by Graylog itself";
};
mongodbUri = mkOption {
type = types.str;
default = "mongodb://localhost/graylog";
- description = lib.mdDoc "MongoDB connection string. See http://docs.mongodb.org/manual/reference/connection-string/ for details";
+ description = "MongoDB connection string. See http://docs.mongodb.org/manual/reference/connection-string/ for details";
};
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Any other configuration options you might want to add";
+ description = "Any other configuration options you might want to add";
};
plugins = mkOption {
- description = lib.mdDoc "Extra graylog plugins";
+ description = "Extra graylog plugins";
default = [ ];
type = types.listOf types.package;
};
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/heartbeat.nix b/third_party/nixpkgs/nixos/modules/services/logging/heartbeat.nix
index 768ffe5315..1a264cebf6 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/heartbeat.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/heartbeat.nix
@@ -18,7 +18,7 @@ in
services.heartbeat = {
- enable = mkEnableOption (lib.mdDoc "heartbeat");
+ enable = mkEnableOption "heartbeat, uptime monitoring";
package = mkPackageOption pkgs "heartbeat" {
example = "heartbeat7";
@@ -27,19 +27,19 @@ in
name = mkOption {
type = types.str;
default = "heartbeat";
- description = lib.mdDoc "Name of the beat";
+ description = "Name of the beat";
};
tags = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "Tags to place on the shipped log messages";
+ description = "Tags to place on the shipped log messages";
};
stateDir = mkOption {
type = types.str;
default = "/var/lib/heartbeat";
- description = lib.mdDoc "The state directory. heartbeat's own logs and other data are stored here.";
+ description = "The state directory. heartbeat's own logs and other data are stored here.";
};
extraConfig = mkOption {
@@ -50,7 +50,7 @@ in
urls: ["http://localhost:9200"]
schedule: '@every 10s'
'';
- description = lib.mdDoc "Any other configuration options you want to add";
+ description = "Any other configuration options you want to add";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/journalbeat.nix b/third_party/nixpkgs/nixos/modules/services/logging/journalbeat.nix
index 80933d6a0f..e7d726ab1f 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/journalbeat.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/journalbeat.nix
@@ -18,26 +18,26 @@ in
services.journalbeat = {
- enable = mkEnableOption (lib.mdDoc "journalbeat");
+ enable = mkEnableOption "journalbeat";
package = mkPackageOption pkgs "journalbeat" { };
name = mkOption {
type = types.str;
default = "journalbeat";
- description = lib.mdDoc "Name of the beat";
+ description = "Name of the beat";
};
tags = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "Tags to place on the shipped log messages";
+ description = "Tags to place on the shipped log messages";
};
stateDir = mkOption {
type = types.str;
default = "journalbeat";
- description = lib.mdDoc ''
+ description = ''
Directory below `/var/lib/` to store journalbeat's
own logs and other data. This directory will be created automatically
using systemd's StateDirectory mechanism.
@@ -47,7 +47,7 @@ in
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Any other configuration options you want to add";
+ description = "Any other configuration options you want to add";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/journaldriver.nix b/third_party/nixpkgs/nixos/modules/services/logging/journaldriver.nix
index 4d21464018..bb82f8cf30 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/journaldriver.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/journaldriver.nix
@@ -17,7 +17,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable journaldriver to forward journald logs to
Stackdriver Logging.
'';
@@ -26,7 +26,7 @@ in {
logLevel = mkOption {
type = types.str;
default = "info";
- description = lib.mdDoc ''
+ description = ''
Log level at which journaldriver logs its own output.
'';
};
@@ -34,7 +34,7 @@ in {
logName = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Configures the name of the target log in Stackdriver Logging.
This option can be set to, for example, the hostname of a
machine to improve the user experience in the logging
@@ -45,7 +45,7 @@ in {
googleCloudProject = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Configures the name of the Google Cloud project to which to
forward journald logs.
@@ -57,7 +57,7 @@ in {
logStream = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Configures the name of the Stackdriver Logging log stream into
which to write journald entries.
@@ -69,7 +69,7 @@ in {
applicationCredentials = mkOption {
type = with types; nullOr path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to the service account private key (in JSON-format) used
to forward log entries to Stackdriver Logging on non-GCP
instances.
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/journalwatch.nix b/third_party/nixpkgs/nixos/modules/services/logging/journalwatch.nix
index 55e2d600ee..71b29d57b7 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/journalwatch.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/journalwatch.nix
@@ -51,7 +51,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If enabled, periodically check the journal with journalwatch and report the results by mail.
'';
};
@@ -59,7 +59,7 @@ in {
priority = mkOption {
type = types.int;
default = 6;
- description = lib.mdDoc ''
+ description = ''
Lowest priority of message to be considered.
A value between 7 ("debug"), and 0 ("emerg"). Defaults to 6 ("info").
If you don't care about anything with "info" priority, you can reduce
@@ -75,7 +75,7 @@ in {
type = types.str;
default = "journalwatch@${config.networking.hostName}";
defaultText = literalExpression ''"journalwatch@''${config.networking.hostName}"'';
- description = lib.mdDoc ''
+ description = ''
Mail address to send journalwatch reports from.
'';
};
@@ -83,7 +83,7 @@ in {
mailTo = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Mail address to send journalwatch reports to.
'';
};
@@ -91,7 +91,7 @@ in {
mailBinary = mkOption {
type = types.path;
default = "/run/wrappers/bin/sendmail";
- description = lib.mdDoc ''
+ description = ''
Sendmail-compatible binary to be used to send the messages.
'';
};
@@ -99,7 +99,7 @@ in {
extraConfig = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra lines to be added verbatim to the journalwatch/config configuration file.
You can add any commandline argument to the config, without the '--'.
See `journalwatch --help` for all arguments and their description.
@@ -112,7 +112,7 @@ in {
match = mkOption {
type = types.str;
example = "SYSLOG_IDENTIFIER = systemd";
- description = lib.mdDoc ''
+ description = ''
Syntax: `field = value`
Specifies the log entry `field` this block should apply to.
If the `field` of a message matches this `value`,
@@ -129,7 +129,7 @@ in {
(Stopped|Stopping|Starting|Started) .*
(Reached target|Stopped target) .*
'';
- description = lib.mdDoc ''
+ description = ''
The filters to apply on all messages which satisfy {option}`match`.
Any of those messages that match any specified filter will be removed from journalwatch's output.
Each filter is an extended Python regular expression.
@@ -175,7 +175,7 @@ in {
];
- description = lib.mdDoc ''
+ description = ''
filterBlocks can be defined to blacklist journal messages which are not errors.
Each block matches on a log entry field, and the filters in that block then are matched
against all messages with a matching log entry field.
@@ -191,7 +191,7 @@ in {
interval = mkOption {
type = types.str;
default = "hourly";
- description = lib.mdDoc ''
+ description = ''
How often to run journalwatch.
The format is described in systemd.time(7).
@@ -200,7 +200,7 @@ in {
accuracy = mkOption {
type = types.str;
default = "10min";
- description = lib.mdDoc ''
+ description = ''
The time window around the interval in which the journalwatch run will be scheduled.
The format is described in systemd.time(7).
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/logcheck.nix b/third_party/nixpkgs/nixos/modules/services/logging/logcheck.nix
index 5d87fc87d4..bda7f9a607 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/logcheck.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/logcheck.nix
@@ -56,7 +56,7 @@ let
levelOption = mkOption {
default = "server";
type = types.enum [ "workstation" "server" "paranoid" ];
- description = lib.mdDoc ''
+ description = ''
Set the logcheck level.
'';
};
@@ -68,7 +68,7 @@ let
regex = mkOption {
default = "";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Regex specifying which log lines to ignore.
'';
};
@@ -80,7 +80,7 @@ let
user = mkOption {
default = "root";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
User that runs the cronjob.
'';
};
@@ -88,7 +88,7 @@ let
cmdline = mkOption {
default = "";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Command line for the cron job. Will be turned into a regex for the logcheck ignore rule.
'';
};
@@ -97,7 +97,7 @@ let
default = null;
type = types.nullOr (types.str);
example = "02 06 * * *";
- description = lib.mdDoc ''
+ description = ''
"min hr dom mon dow" crontab time args, to auto-create a cronjob too.
Leave at null to not do this and just add a logcheck ignore rule.
'';
@@ -109,12 +109,12 @@ in
{
options = {
services.logcheck = {
- enable = mkEnableOption (lib.mdDoc "logcheck cron job");
+ enable = mkEnableOption "logcheck cron job, to mail anomalies in the system logfiles to the administrator";
user = mkOption {
default = "logcheck";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Username for the logcheck user.
'';
};
@@ -123,7 +123,7 @@ in
default = "*";
example = "6";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Time of day to run logcheck. A logcheck will be scheduled at xx:02 each day.
Leave default (*) to run every hour. Of course when nothing special was logged,
logcheck will be silent.
@@ -134,7 +134,7 @@ in
default = "root";
example = "you@domain.com";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Email address to send reports to.
'';
};
@@ -142,7 +142,7 @@ in
level = mkOption {
default = "server";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Set the logcheck level. Either "workstation", "server", or "paranoid".
'';
};
@@ -150,7 +150,7 @@ in
config = mkOption {
default = "FQDN=1";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Config options that you would like in logcheck.conf.
'';
};
@@ -159,7 +159,7 @@ in
default = [ "/var/log/messages" ];
type = types.listOf types.path;
example = [ "/var/log/messages" "/var/log/mail" ];
- description = lib.mdDoc ''
+ description = ''
Which log files to check.
'';
};
@@ -168,14 +168,14 @@ in
default = [];
example = [ "/etc/logcheck" ];
type = types.listOf types.path;
- description = lib.mdDoc ''
+ description = ''
Directories with extra rules.
'';
};
ignore = mkOption {
default = {};
- description = lib.mdDoc ''
+ description = ''
This option defines extra ignore rules.
'';
type = with types; attrsOf (submodule ignoreOptions);
@@ -183,7 +183,7 @@ in
ignoreCron = mkOption {
default = {};
- description = lib.mdDoc ''
+ description = ''
This option defines extra ignore rules for cronjobs.
'';
type = with types; attrsOf (submodule ignoreCronOptions);
@@ -193,7 +193,7 @@ in
default = [];
type = types.listOf types.str;
example = [ "postdrop" "mongodb" ];
- description = lib.mdDoc ''
+ description = ''
Extra groups for the logcheck user, for example to be able to use sendmail,
or to access certain log files.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/logrotate.nix b/third_party/nixpkgs/nixos/modules/services/logging/logrotate.nix
index ba1445f083..3e29828eba 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/logrotate.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/logrotate.nix
@@ -95,18 +95,21 @@ in
options = {
services.logrotate = {
- enable = mkEnableOption (lib.mdDoc "the logrotate systemd service") // {
+ enable = mkEnableOption "the logrotate systemd service" // {
default = foldr (n: a: a || n.enable) false (attrValues cfg.settings);
defaultText = literalExpression "cfg.settings != {}";
};
settings = mkOption {
default = { };
- description = lib.mdDoc ''
+ description = ''
logrotate freeform settings: each attribute here will define its own section,
- ordered by priority, which can either define files to rotate with their settings
+ ordered by {option}`services.logrotate.settings..priority`,
+ which can either define files to rotate with their settings
or settings common to all further files settings.
- Refer to for details.
+ All attribute names not explicitly defined as sub-options here are passed through
+ as logrotate config directives,
+ refer to for details.
'';
example = literalExpression ''
{
@@ -125,20 +128,28 @@ in
"/var/log/second.log"
];
};
+ # specify custom order of sections
+ "/var/log/myservice/*.log" = {
+ # ensure lower priority
+ priority = 110;
+ postrotate = '''
+ systemctl reload myservice
+ ''';
+ };
};
'';
type = types.attrsOf (types.submodule ({ name, ... }: {
freeformType = with types; attrsOf (nullOr (oneOf [ int bool str ]));
options = {
- enable = mkEnableOption (lib.mdDoc "setting individual kill switch") // {
+ enable = mkEnableOption "setting individual kill switch" // {
default = true;
};
global = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether this setting is a global option or not: set to have these
settings apply to all files settings with a higher priority.
'';
@@ -149,7 +160,7 @@ in
defaultText = ''
The attrset name if not specified
'';
- description = lib.mdDoc ''
+ description = ''
Single or list of files for which rules are defined.
The files are quoted with double-quotes in logrotate configuration,
so globs and spaces are supported.
@@ -160,7 +171,7 @@ in
frequency = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
How often to rotate the logs. Defaults to previously set global setting,
which itself defaults to weekly.
'';
@@ -169,7 +180,7 @@ in
priority = mkOption {
type = types.int;
default = 1000;
- description = lib.mdDoc ''
+ description = ''
Order of this logrotate block in relation to the others. The semantics are
the same as with `lib.mkOrder`. Smaller values are inserted first.
'';
@@ -185,7 +196,7 @@ in
defaultText = ''
A configuration file automatically generated by NixOS.
'';
- description = lib.mdDoc ''
+ description = ''
Override the configuration file used by logrotate. By default,
NixOS generates one automatically from [](#opt-services.logrotate.settings).
'';
@@ -203,7 +214,7 @@ in
checkConfig = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether the config should be checked at build time.
Some options are not checkable at build time because of the build sandbox:
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/logstash.nix b/third_party/nixpkgs/nixos/modules/services/logging/logstash.nix
index 22292dbd93..53e2e91d62 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/logstash.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/logstash.nix
@@ -51,7 +51,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable logstash.";
+ description = "Enable logstash.";
};
package = mkPackageOption pkgs "logstash" { };
@@ -60,13 +60,13 @@ in
type = types.listOf types.path;
default = [ ];
example = literalExpression "[ pkgs.logstash-contrib ]";
- description = lib.mdDoc "The paths to find other logstash plugins in.";
+ description = "The paths to find other logstash plugins in.";
};
dataDir = mkOption {
type = types.str;
default = "/var/lib/logstash";
- description = lib.mdDoc ''
+ description = ''
A path to directory writable by logstash that it uses to store data.
Plugins will also have access to this path.
'';
@@ -75,31 +75,31 @@ in
logLevel = mkOption {
type = types.enum [ "debug" "info" "warn" "error" "fatal" ];
default = "warn";
- description = lib.mdDoc "Logging verbosity level.";
+ description = "Logging verbosity level.";
};
filterWorkers = mkOption {
type = types.int;
default = 1;
- description = lib.mdDoc "The quantity of filter workers to run.";
+ description = "The quantity of filter workers to run.";
};
listenAddress = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc "Address on which to start webserver.";
+ description = "Address on which to start webserver.";
};
port = mkOption {
type = types.str;
default = "9292";
- description = lib.mdDoc "Port on which to start webserver.";
+ description = "Port on which to start webserver.";
};
inputConfig = mkOption {
type = types.lines;
default = "generator { }";
- description = lib.mdDoc "Logstash input configuration.";
+ description = "Logstash input configuration.";
example = literalExpression ''
'''
# Read from journal
@@ -114,7 +114,7 @@ in
filterConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "logstash filter configuration.";
+ description = "logstash filter configuration.";
example = ''
if [type] == "syslog" {
# Keep only relevant systemd fields
@@ -132,7 +132,7 @@ in
outputConfig = mkOption {
type = types.lines;
default = "stdout { codec => rubydebug }";
- description = lib.mdDoc "Logstash output configuration.";
+ description = "Logstash output configuration.";
example = ''
redis { host => ["localhost"] data_type => "list" key => "logstash" codec => json }
elasticsearch { }
@@ -142,7 +142,7 @@ in
extraSettings = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Extra Logstash settings in YAML format.";
+ description = "Extra Logstash settings in YAML format.";
example = ''
pipeline:
batch:
@@ -154,7 +154,7 @@ in
extraJvmOptions = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Extra JVM options, one per line (jvm.options format).";
+ description = "Extra JVM options, one per line (jvm.options format).";
example = ''
-Xms2g
-Xmx2g
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/promtail.nix b/third_party/nixpkgs/nixos/modules/services/logging/promtail.nix
index 9db82fd42b..a34bc07b6a 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/promtail.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/promtail.nix
@@ -12,12 +12,12 @@ let
positionsFile = cfg.configuration.positions.filename;
in {
options.services.promtail = with types; {
- enable = mkEnableOption (lib.mdDoc "the Promtail ingresser");
+ enable = mkEnableOption "the Promtail ingresser";
configuration = mkOption {
type = (pkgs.formats.json {}).type;
- description = lib.mdDoc ''
+ description = ''
Specify the configuration for Promtail in Nix.
'';
};
@@ -26,7 +26,7 @@ in {
type = listOf str;
default = [];
example = [ "--server.http-listen-port=3101" ];
- description = lib.mdDoc ''
+ description = ''
Specify a list of additional command line flags,
which get escaped and are then passed to Loki.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/rsyslogd.nix b/third_party/nixpkgs/nixos/modules/services/logging/rsyslogd.nix
index 207d416c1a..25b6eec505 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/rsyslogd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/rsyslogd.nix
@@ -39,7 +39,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable syslogd. Note that systemd also logs
syslog messages, so you normally don't need to run syslogd.
'';
@@ -48,7 +48,7 @@ in
defaultConfig = mkOption {
type = types.lines;
default = defaultConf;
- description = lib.mdDoc ''
+ description = ''
The default {file}`syslog.conf` file configures a
fairly standard setup of log files, which can be extended by
means of {var}`extraConfig`.
@@ -59,7 +59,7 @@ in
type = types.lines;
default = "";
example = "news.* -/var/log/news";
- description = lib.mdDoc ''
+ description = ''
Additional text appended to {file}`syslog.conf`,
i.e. the contents of {var}`defaultConfig`.
'';
@@ -69,7 +69,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "-m 0" ];
- description = lib.mdDoc ''
+ description = ''
Additional parameters passed to {command}`rsyslogd`.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/syslog-ng.nix b/third_party/nixpkgs/nixos/modules/services/logging/syslog-ng.nix
index eea236263f..14e18d3f0e 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/syslog-ng.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/syslog-ng.nix
@@ -36,7 +36,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the syslog-ng daemon.
'';
};
@@ -44,7 +44,7 @@ in {
extraModulePaths = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
A list of paths that should be included in syslog-ng's
`--module-path` option. They should usually
end in `/lib/syslog-ng`
@@ -53,7 +53,7 @@ in {
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Configuration added to the end of `syslog-ng.conf`.
'';
};
@@ -63,7 +63,7 @@ in {
@version: 4.4
@include "scl.conf"
'';
- description = lib.mdDoc ''
+ description = ''
The very first lines of the configuration file. Should usually contain
the syslog-ng version header.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/syslogd.nix b/third_party/nixpkgs/nixos/modules/services/logging/syslogd.nix
index 553973e255..8674fad696 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/syslogd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/syslogd.nix
@@ -39,7 +39,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable syslogd. Note that systemd also logs
syslog messages, so you normally don't need to run syslogd.
'';
@@ -48,7 +48,7 @@ in
tty = mkOption {
type = types.str;
default = "tty10";
- description = lib.mdDoc ''
+ description = ''
The tty device on which syslogd will print important log
messages. Leave this option blank to disable tty logging.
'';
@@ -57,7 +57,7 @@ in
defaultConfig = mkOption {
type = types.lines;
default = defaultConf;
- description = lib.mdDoc ''
+ description = ''
The default {file}`syslog.conf` file configures a
fairly standard setup of log files, which can be extended by
means of {var}`extraConfig`.
@@ -67,7 +67,7 @@ in
enableNetworkInput = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Accept logging through UDP. Option -r of syslogd(8).
'';
};
@@ -76,7 +76,7 @@ in
type = types.lines;
default = "";
example = "news.* -/var/log/news";
- description = lib.mdDoc ''
+ description = ''
Additional text appended to {file}`syslog.conf`,
i.e. the contents of {var}`defaultConfig`.
'';
@@ -86,7 +86,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "-m 0" ];
- description = lib.mdDoc ''
+ description = ''
Additional parameters passed to {command}`syslogd`.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/ulogd.nix b/third_party/nixpkgs/nixos/modules/services/logging/ulogd.nix
index 05c9797bb2..5bd51ef88f 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/ulogd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/ulogd.nix
@@ -8,7 +8,7 @@ let
in {
options = {
services.ulogd = {
- enable = mkEnableOption (lib.mdDoc "ulogd");
+ enable = mkEnableOption "ulogd, a userspace logging daemon for netfilter/iptables related logging";
settings = mkOption {
example = {
@@ -31,14 +31,14 @@ in {
};
type = settingsFormat.type;
default = { };
- description = lib.mdDoc
+ description =
"Configuration for ulogd. See {file}`/share/doc/ulogd/` in `pkgs.ulogd.doc`.";
};
logLevel = mkOption {
type = types.enum [ 1 3 5 7 8 ];
default = 5;
- description = lib.mdDoc
+ description =
"Log level (1 = debug, 3 = info, 5 = notice, 7 = error, 8 = fatal)";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/logging/vector.nix b/third_party/nixpkgs/nixos/modules/services/logging/vector.nix
index 9ccf8a4fa0..129a38b1d2 100644
--- a/third_party/nixpkgs/nixos/modules/services/logging/vector.nix
+++ b/third_party/nixpkgs/nixos/modules/services/logging/vector.nix
@@ -6,14 +6,14 @@ let cfg = config.services.vector;
in
{
options.services.vector = {
- enable = mkEnableOption (lib.mdDoc "Vector");
+ enable = mkEnableOption "Vector, a high-performance observability data pipeline";
package = mkPackageOption pkgs "vector" { };
journaldAccess = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable Vector to access journald.
'';
};
@@ -21,7 +21,7 @@ in
settings = mkOption {
type = (pkgs.formats.json { }).type;
default = { };
- description = lib.mdDoc ''
+ description = ''
Specify the configuration for Vector in Nix.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/clamsmtp.nix b/third_party/nixpkgs/nixos/modules/services/mail/clamsmtp.nix
index a0de259628..5bcf8ecdde 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/clamsmtp.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/clamsmtp.nix
@@ -12,17 +12,16 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable clamsmtp.";
+ description = "Whether to enable clamsmtp.";
};
instances = mkOption {
- description = lib.mdDoc "Instances of clamsmtp to run.";
+ description = "Instances of clamsmtp to run.";
type = types.listOf (types.submodule { options = {
action = mkOption {
type = types.enum [ "bounce" "drop" "pass" ];
default = "drop";
- description =
- lib.mdDoc ''
+ description = ''
Action to take when a virus is detected.
Note that viruses often spoof sender addresses, so bouncing is
@@ -34,8 +33,7 @@ in
type = types.str;
default = "";
example = "X-Virus-Scanned: ClamAV using ClamSMTP";
- description =
- lib.mdDoc ''
+ description = ''
A header to add to scanned messages. See clamsmtpd.conf(5) for
more details. Empty means no header.
'';
@@ -44,8 +42,7 @@ in
keepAlives = mkOption {
type = types.int;
default = 0;
- description =
- lib.mdDoc ''
+ description = ''
Number of seconds to wait between each NOOP sent to the sending
server. 0 to disable.
@@ -57,8 +54,7 @@ in
listen = mkOption {
type = types.str;
example = "127.0.0.1:10025";
- description =
- lib.mdDoc ''
+ description = ''
Address to wait for incoming SMTP connections on. See
clamsmtpd.conf(5) for more details.
'';
@@ -67,8 +63,7 @@ in
quarantine = mkOption {
type = types.bool;
default = false;
- description =
- lib.mdDoc ''
+ description = ''
Whether to quarantine files that contain viruses by leaving them
in the temporary directory.
'';
@@ -77,13 +72,12 @@ in
maxConnections = mkOption {
type = types.int;
default = 64;
- description = lib.mdDoc "Maximum number of connections to accept at once.";
+ description = "Maximum number of connections to accept at once.";
};
outAddress = mkOption {
type = types.str;
- description =
- lib.mdDoc ''
+ description = ''
Address of the SMTP server to send email to once it has been
scanned.
'';
@@ -92,8 +86,7 @@ in
tempDirectory = mkOption {
type = types.str;
default = "/tmp";
- description =
- lib.mdDoc ''
+ description = ''
Temporary directory that needs to be accessible to both clamd
and clamsmtpd.
'';
@@ -102,20 +95,19 @@ in
timeout = mkOption {
type = types.int;
default = 180;
- description = lib.mdDoc "Time-out for network connections.";
+ description = "Time-out for network connections.";
};
transparentProxy = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable clamsmtp's transparent proxy support.";
+ description = "Enable clamsmtp's transparent proxy support.";
};
virusAction = mkOption {
type = with types; nullOr path;
default = null;
- description =
- lib.mdDoc ''
+ description = ''
Command to run when a virus is found. Please see VIRUS ACTION in
clamsmtpd(8) for a discussion of this option and its safe use.
'';
@@ -124,8 +116,7 @@ in
xClient = mkOption {
type = types.bool;
default = false;
- description =
- lib.mdDoc ''
+ description = ''
Send the XCLIENT command to the receiving server, for forwarding
client addresses and connection information if the receiving
server supports this feature.
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/davmail.nix b/third_party/nixpkgs/nixos/modules/services/mail/davmail.nix
index 9cdb435af4..46ddaedd4b 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/davmail.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/davmail.nix
@@ -25,18 +25,18 @@ in
{
options.services.davmail = {
- enable = mkEnableOption (lib.mdDoc "davmail, an MS Exchange gateway");
+ enable = mkEnableOption "davmail, an MS Exchange gateway";
url = mkOption {
type = types.str;
- description = lib.mdDoc "Outlook Web Access URL to access the exchange server, i.e. the base webmail URL.";
+ description = "Outlook Web Access URL to access the exchange server, i.e. the base webmail URL.";
example = "https://outlook.office365.com/EWS/Exchange.asmx";
};
config = mkOption {
type = configType;
default = {};
- description = lib.mdDoc ''
+ description = ''
Davmail configuration. Refer to
and
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/dkimproxy-out.nix b/third_party/nixpkgs/nixos/modules/services/mail/dkimproxy-out.nix
index 6f9cbc4e9d..48ccf2dda6 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/dkimproxy-out.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/dkimproxy-out.nix
@@ -14,8 +14,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description =
- lib.mdDoc ''
+ description = ''
Whether to enable dkimproxy_out.
Note that a key will be auto-generated, and can be found in
@@ -26,26 +25,25 @@ in
listen = mkOption {
type = types.str;
example = "127.0.0.1:10027";
- description = lib.mdDoc "Address:port DKIMproxy should listen on.";
+ description = "Address:port DKIMproxy should listen on.";
};
relay = mkOption {
type = types.str;
example = "127.0.0.1:10028";
- description = lib.mdDoc "Address:port DKIMproxy should forward mail to.";
+ description = "Address:port DKIMproxy should forward mail to.";
};
domains = mkOption {
type = with types; listOf str;
example = [ "example.org" "example.com" ];
- description = lib.mdDoc "List of domains DKIMproxy can sign for.";
+ description = "List of domains DKIMproxy can sign for.";
};
selector = mkOption {
type = types.str;
example = "selector1";
- description =
- lib.mdDoc ''
+ description = ''
The selector to use for DKIM key identification.
For example, if 'selector1' is used here, then for each domain
@@ -58,8 +56,7 @@ in
keySize = mkOption {
type = types.int;
default = 2048;
- description =
- lib.mdDoc ''
+ description = ''
Size of the RSA key to use to sign outgoing emails. Note that the
maximum mandatorily verified as per RFC6376 is 2048.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/dovecot.nix b/third_party/nixpkgs/nixos/modules/services/mail/dovecot.nix
index 71baa2bb18..b2a6b3ab67 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/dovecot.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/dovecot.nix
@@ -195,25 +195,25 @@ let
example = "Spam";
default = name;
readOnly = true;
- description = lib.mdDoc "The name of the mailbox.";
+ description = "The name of the mailbox.";
};
auto = mkOption {
type = types.enum [ "no" "create" "subscribe" ];
default = "no";
example = "subscribe";
- description = lib.mdDoc "Whether to automatically create or create and subscribe to the mailbox or not.";
+ description = "Whether to automatically create or create and subscribe to the mailbox or not.";
};
specialUse = mkOption {
type = types.nullOr (types.enum [ "All" "Archive" "Drafts" "Flagged" "Junk" "Sent" "Trash" ]);
default = null;
example = "Junk";
- description = lib.mdDoc "Null if no special use flag is set. Other than that every use flag mentioned in the RFC is valid.";
+ description = "Null if no special use flag is set. Other than that every use flag mentioned in the RFC is valid.";
};
autoexpunge = mkOption {
type = types.nullOr types.str;
default = null;
example = "60d";
- description = lib.mdDoc ''
+ description = ''
To automatically remove all email from the mailbox which is older than the
specified time.
'';
@@ -228,37 +228,37 @@ in
];
options.services.dovecot2 = {
- enable = mkEnableOption (lib.mdDoc "the dovecot 2.x POP3/IMAP server");
+ enable = mkEnableOption "the dovecot 2.x POP3/IMAP server";
- enablePop3 = mkEnableOption (lib.mdDoc "starting the POP3 listener (when Dovecot is enabled)");
+ enablePop3 = mkEnableOption "starting the POP3 listener (when Dovecot is enabled)";
- enableImap = mkEnableOption (lib.mdDoc "starting the IMAP listener (when Dovecot is enabled)") // { default = true; };
+ enableImap = mkEnableOption "starting the IMAP listener (when Dovecot is enabled)" // { default = true; };
- enableLmtp = mkEnableOption (lib.mdDoc "starting the LMTP listener (when Dovecot is enabled)");
+ enableLmtp = mkEnableOption "starting the LMTP listener (when Dovecot is enabled)";
protocols = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "Additional listeners to start when Dovecot is enabled.";
+ description = "Additional listeners to start when Dovecot is enabled.";
};
user = mkOption {
type = types.str;
default = "dovecot2";
- description = lib.mdDoc "Dovecot user name.";
+ description = "Dovecot user name.";
};
group = mkOption {
type = types.str;
default = "dovecot2";
- description = lib.mdDoc "Dovecot group name.";
+ description = "Dovecot group name.";
};
extraConfig = mkOption {
type = types.lines;
default = "";
example = "mail_debug = yes";
- description = lib.mdDoc "Additional entries to put verbatim into Dovecot's config file.";
+ description = "Additional entries to put verbatim into Dovecot's config file.";
};
mailPlugins =
@@ -268,7 +268,7 @@ in
enable = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "mail plugins to enable as a list of strings to append to the ${hint} `$mail_plugins` configuration variable";
+ description = "mail plugins to enable as a list of strings to append to the ${hint} `$mail_plugins` configuration variable";
};
};
};
@@ -277,20 +277,20 @@ in
type = with types; submodule {
options = {
globally = mkOption {
- description = lib.mdDoc "Additional entries to add to the mail_plugins variable for all protocols";
+ description = "Additional entries to add to the mail_plugins variable for all protocols";
type = plugins "top-level";
example = { enable = [ "virtual" ]; };
default = { enable = []; };
};
perProtocol = mkOption {
- description = lib.mdDoc "Additional entries to add to the mail_plugins variable, per protocol";
+ description = "Additional entries to add to the mail_plugins variable, per protocol";
type = attrsOf (plugins "corresponding per-protocol");
default = {};
example = { imap = [ "imap_acl" ]; };
};
};
};
- description = lib.mdDoc "Additional entries to add to the mail_plugins variable, globally and per protocol";
+ description = "Additional entries to add to the mail_plugins variable, globally and per protocol";
example = {
globally.enable = [ "acl" ];
perProtocol.imap.enable = [ "imap_acl" ];
@@ -301,7 +301,7 @@ in
configFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc "Config file used for the whole dovecot configuration.";
+ description = "Config file used for the whole dovecot configuration.";
apply = v: if v != null then v else pkgs.writeText "dovecot.conf" dovecotConf;
};
@@ -309,7 +309,7 @@ in
type = types.str;
default = "maildir:/var/spool/mail/%u"; /* Same as inbox, as postfix */
example = "maildir:~/mail:INBOX=/var/spool/mail/%u";
- description = lib.mdDoc ''
+ description = ''
Location that dovecot will use for mail folders. Dovecot mail_location option.
'';
};
@@ -317,24 +317,24 @@ in
mailUser = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "Default user to store mail for virtual users.";
+ description = "Default user to store mail for virtual users.";
};
mailGroup = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "Default group to store mail for virtual users.";
+ description = "Default group to store mail for virtual users.";
};
- createMailUser = mkEnableOption (lib.mdDoc ''automatically creating the user
+ createMailUser = mkEnableOption ''automatically creating the user
given in {option}`services.dovecot.user` and the group
- given in {option}`services.dovecot.group`.'') // { default = true; };
+ given in {option}`services.dovecot.group`.'' // { default = true; };
modules = mkOption {
type = types.listOf types.package;
default = [];
example = literalExpression "[ pkgs.dovecot_pigeonhole ]";
- description = lib.mdDoc ''
+ description = ''
Symlinks the contents of lib/dovecot of every given package into
/etc/dovecot/modules. This will make the given modules available
if a dovecot package with the module_dir patch applied is being used.
@@ -344,26 +344,26 @@ in
sslCACert = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "Path to the server's CA certificate key.";
+ description = "Path to the server's CA certificate key.";
};
sslServerCert = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "Path to the server's public key.";
+ description = "Path to the server's public key.";
};
sslServerKey = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "Path to the server's private key.";
+ description = "Path to the server's private key.";
};
- enablePAM = mkEnableOption (lib.mdDoc "creating a own Dovecot PAM service and configure PAM user logins") // { default = true; };
+ enablePAM = mkEnableOption "creating a own Dovecot PAM service and configure PAM user logins" // { default = true; };
- enableDHE = mkEnableOption (lib.mdDoc "ssl_dh and generation of primes for the key exchange") // { default = true; };
+ enableDHE = mkEnableOption "ssl_dh and generation of primes for the key exchange" // { default = true; };
- showPAMFailure = mkEnableOption (lib.mdDoc "showing the PAM failure message on authentication error (useful for OTPW)");
+ showPAMFailure = mkEnableOption "showing the PAM failure message on authentication error (useful for OTPW)";
mailboxes = mkOption {
type = with types; coercedTo
@@ -376,15 +376,15 @@ in
Spam = { specialUse = "Junk"; auto = "create"; };
}
'';
- description = lib.mdDoc "Configure mailboxes and auto create or subscribe them.";
+ description = "Configure mailboxes and auto create or subscribe them.";
};
- enableQuota = mkEnableOption (lib.mdDoc "the dovecot quota service");
+ enableQuota = mkEnableOption "the dovecot quota service";
quotaPort = mkOption {
type = types.str;
default = "12340";
- description = lib.mdDoc ''
+ description = ''
The Port the dovecot quota service binds to.
If using postfix, add check_policy_service inet:localhost:12340 to your smtpd_recipient_restrictions in your postfix config.
'';
@@ -393,7 +393,7 @@ in
type = types.str;
default = "100G";
example = "10G";
- description = lib.mdDoc "Quota limit for the user in bytes. Supports suffixes b, k, M, G, T and %.";
+ description = "Quota limit for the user in bytes. Supports suffixes b, k, M, G, T and %.";
};
@@ -505,7 +505,7 @@ in
scripts = mkOption {
type = types.attrsOf types.path;
default = {};
- description = lib.mdDoc "Sieve scripts to be executed. Key is a sequence, e.g. 'before2', 'after' etc.";
+ description = "Sieve scripts to be executed. Key is a sequence, e.g. 'before2', 'after' etc.";
};
pipeBins = mkOption {
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/dspam.nix b/third_party/nixpkgs/nixos/modules/services/mail/dspam.nix
index 4fccd452a4..b81fe26524 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/dspam.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/dspam.nix
@@ -38,43 +38,43 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the dspam spam filter.";
+ description = "Whether to enable the dspam spam filter.";
};
user = mkOption {
type = types.str;
default = "dspam";
- description = lib.mdDoc "User for the dspam daemon.";
+ description = "User for the dspam daemon.";
};
group = mkOption {
type = types.str;
default = "dspam";
- description = lib.mdDoc "Group for the dspam daemon.";
+ description = "Group for the dspam daemon.";
};
storageDriver = mkOption {
type = types.str;
default = "hash";
- description = lib.mdDoc "Storage driver backend to use for dspam.";
+ description = "Storage driver backend to use for dspam.";
};
domainSocket = mkOption {
type = types.nullOr types.path;
default = defaultSock;
- description = lib.mdDoc "Path to local domain socket which is used for communication with the daemon. Set to null to disable UNIX socket.";
+ description = "Path to local domain socket which is used for communication with the daemon. Set to null to disable UNIX socket.";
};
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Additional dspam configuration.";
+ description = "Additional dspam configuration.";
};
maintenanceInterval = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "If set, maintenance script will be run at specified (in systemd.timer format) interval";
+ description = "If set, maintenance script will be run at specified (in systemd.timer format) interval";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/exim.nix b/third_party/nixpkgs/nixos/modules/services/mail/exim.nix
index 63d3fa54b2..0a5ba9d76d 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/exim.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/exim.nix
@@ -17,13 +17,13 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the Exim mail transfer agent.";
+ description = "Whether to enable the Exim mail transfer agent.";
};
config = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Verbatim Exim configuration. This should not contain exim_user,
exim_group, exim_path, or spool_directory.
'';
@@ -32,7 +32,7 @@ in
user = mkOption {
type = types.str;
default = "exim";
- description = lib.mdDoc ''
+ description = ''
User to use when no root privileges are required.
In particular, this applies when receiving messages and when doing
remote deliveries. (Local deliveries run as various non-root users,
@@ -44,7 +44,7 @@ in
group = mkOption {
type = types.str;
default = "exim";
- description = lib.mdDoc ''
+ description = ''
Group to use when no root privileges are required.
'';
};
@@ -52,7 +52,7 @@ in
spoolDir = mkOption {
type = types.path;
default = "/var/spool/exim";
- description = lib.mdDoc ''
+ description = ''
Location of the spool directory of exim.
'';
};
@@ -66,7 +66,7 @@ in
queueRunnerInterval = mkOption {
type = types.str;
default = "5m";
- description = lib.mdDoc ''
+ description = ''
How often to spawn a new queue runner.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/goeland.nix b/third_party/nixpkgs/nixos/modules/services/mail/goeland.nix
index 13092a65ed..158b9ef982 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/goeland.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/goeland.nix
@@ -8,10 +8,10 @@ let
in
{
options.services.goeland = {
- enable = mkEnableOption (mdDoc "goeland");
+ enable = mkEnableOption "goeland, an alternative to rss2email";
settings = mkOption {
- description = mdDoc ''
+ description = ''
Configuration of goeland.
See the [example config file](https://github.com/slurdge/goeland/blob/master/cmd/asset/config.default.toml) for the available options.
'';
@@ -22,12 +22,12 @@ in
type = types.str;
default = "12h";
example = "Mon, 00:00:00";
- description = mdDoc "How often to run goeland, in systemd time format.";
+ description = "How often to run goeland, in systemd time format.";
};
stateDir = mkOption {
type = types.path;
default = "/var/lib/goeland";
- description = mdDoc ''
+ description = ''
The data directory for goeland where the database will reside if using the unseen filter.
If left as the default value this directory will automatically be created before the goeland
server starts, otherwise you are responsible for ensuring the directory exists with
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/listmonk.nix b/third_party/nixpkgs/nixos/modules/services/mail/listmonk.nix
index 945eb436c1..482bc42696 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/listmonk.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/listmonk.nix
@@ -35,20 +35,20 @@ let
"app.notify_emails" = mkOption {
type = listOf str;
default = [ ];
- description = lib.mdDoc "Administrator emails for system notifications";
+ description = "Administrator emails for system notifications";
};
"privacy.exportable" = mkOption {
type = listOf str;
default = [ "profile" "subscriptions" "campaign_views" "link_clicks" ];
- description = lib.mdDoc
+ description =
"List of fields which can be exported through an automatic export request";
};
"privacy.domain_blocklist" = mkOption {
type = listOf str;
default = [ ];
- description = lib.mdDoc
+ description =
"E-mail addresses with these domains are disallowed from subscribing.";
};
@@ -57,30 +57,29 @@ let
freeformType = with types; attrsOf anything;
options = {
- enabled = mkEnableOption (lib.mdDoc "this SMTP server for listmonk");
+ enabled = mkEnableOption "this SMTP server for listmonk";
host = mkOption {
type = types.str;
- description = lib.mdDoc "Hostname for the SMTP server";
+ description = "Hostname for the SMTP server";
};
port = mkOption {
type = types.port;
- description = lib.mdDoc "Port for the SMTP server";
+ description = "Port for the SMTP server";
};
max_conns = mkOption {
type = types.int;
- description = lib.mdDoc
+ description =
"Maximum number of simultaneous connections, defaults to 1";
default = 1;
};
tls_type = mkOption {
type = types.enum [ "none" "STARTTLS" "TLS" ];
- description =
- lib.mdDoc "Type of TLS authentication with the SMTP server";
+ description = "Type of TLS authentication with the SMTP server";
};
};
});
- description = lib.mdDoc "List of outgoing SMTP servers";
+ description = "List of outgoing SMTP servers";
};
# TODO: refine this type based on the smtp one.
@@ -88,13 +87,13 @@ let
type = listOf
(submodule { freeformType = with types; listOf (attrsOf anything); });
default = [ ];
- description = lib.mdDoc "List of bounce mailboxes";
+ description = "List of bounce mailboxes";
};
messengers = mkOption {
type = listOf str;
default = [ ];
- description = lib.mdDoc
+ description =
"List of messengers, see: for options.";
};
};
@@ -103,26 +102,25 @@ in {
###### interface
options = {
services.listmonk = {
- enable = mkEnableOption
- (lib.mdDoc "Listmonk, this module assumes a reverse proxy to be set");
+ enable = mkEnableOption "Listmonk, this module assumes a reverse proxy to be set";
database = {
createLocally = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc
+ description =
"Create the PostgreSQL database and database user locally.";
};
settings = mkOption {
default = null;
type = with types; nullOr (submodule databaseSettingsOpts);
- description = lib.mdDoc
+ description =
"Dynamic settings in the PostgreSQL database, set by a SQL script, see for details.";
};
mutableSettings = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Database settings will be reset to the value set in this module if this is not enabled.
Enable this if you want to persist changes you have done in the application.
'';
@@ -131,7 +129,7 @@ in {
package = mkPackageOption pkgs "listmonk" {};
settings = mkOption {
type = types.submodule { freeformType = tomlFormat.type; };
- description = lib.mdDoc ''
+ description = ''
Static settings set in the config.toml, see for details.
You can set secrets using the secretFile option with environment variables following .
'';
@@ -139,7 +137,7 @@ in {
secretFile = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc
+ description =
"A file containing secrets as environment variables. See for details on supported values.";
};
};
@@ -187,7 +185,11 @@ in {
# Indeed, it will try to create all the folders and realize one of them already exist.
# Therefore, we have to create it ourselves.
''${pkgs.coreutils}/bin/mkdir -p "''${STATE_DIRECTORY}/listmonk/uploads"''
- "${cfg.package}/bin/listmonk --config ${cfgFile} --idempotent --install --upgrade --yes"
+ # setup database if not already done
+ "${cfg.package}/bin/listmonk --config ${cfgFile} --idempotent --install --yes"
+ # apply db migrations (setup and migrations can not be done in one step
+ # with "--install --upgrade" listmonk ignores the upgrade)
+ "${cfg.package}/bin/listmonk --config ${cfgFile} --upgrade --yes"
"${updateDatabaseConfigScript}/bin/update-database-config.sh"
];
ExecStart = "${cfg.package}/bin/listmonk --config ${cfgFile}";
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/maddy.nix b/third_party/nixpkgs/nixos/modules/services/mail/maddy.nix
index 2c4d75e839..7c67d4e613 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/maddy.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/maddy.nix
@@ -138,12 +138,12 @@ in {
options = {
services.maddy = {
- enable = mkEnableOption (lib.mdDoc "Maddy, a free an open source mail server");
+ enable = mkEnableOption "Maddy, a free an open source mail server";
user = mkOption {
default = "maddy";
type = with types; uniq str;
- description = lib.mdDoc ''
+ description = ''
User account under which maddy runs.
::: {.note}
@@ -157,7 +157,7 @@ in {
group = mkOption {
default = "maddy";
type = with types; uniq str;
- description = lib.mdDoc ''
+ description = ''
Group account under which maddy runs.
::: {.note}
@@ -172,7 +172,7 @@ in {
default = "localhost";
type = with types; uniq str;
example = ''example.com'';
- description = lib.mdDoc ''
+ description = ''
Hostname to use. It should be FQDN.
'';
};
@@ -181,7 +181,7 @@ in {
default = "localhost";
type = with types; uniq str;
example = ''mail.example.com'';
- description = lib.mdDoc ''
+ description = ''
Primary MX domain to use. It should be FQDN.
'';
};
@@ -194,7 +194,7 @@ in {
"example.com"
"other.example.com"
];
- description = lib.mdDoc ''
+ description = ''
Define list of allowed domains.
'';
};
@@ -202,7 +202,7 @@ in {
config = mkOption {
type = with types; nullOr lines;
default = defaultConfig;
- description = lib.mdDoc ''
+ description = ''
Server configuration, see
[https://maddy.email](https://maddy.email) for
more information. The default configuration of this module will setup
@@ -218,7 +218,7 @@ in {
loader = mkOption {
type = with types; nullOr (enum [ "off" "file" "acme" ]);
default = "off";
- description = lib.mdDoc ''
+ description = ''
TLS certificates are obtained by modules called "certificate
loaders".
@@ -243,14 +243,14 @@ in {
keyPath = mkOption {
type = types.path;
example = "/etc/ssl/mx1.example.org.key";
- description = lib.mdDoc ''
+ description = ''
Path to the private key used for TLS.
'';
};
certPath = mkOption {
type = types.path;
example = "/etc/ssl/mx1.example.org.crt";
- description = lib.mdDoc ''
+ description = ''
Path to the certificate used for TLS.
'';
};
@@ -263,7 +263,7 @@ in {
certPath = "/etc/ssl/mx1.example.org.crt";
}]
'';
- description = lib.mdDoc ''
+ description = ''
A list of attribute sets containing paths to TLS certificates and
keys. Maddy will use SNI if multiple pairs are selected.
'';
@@ -271,7 +271,7 @@ in {
extraConfig = mkOption {
type = with types; nullOr lines;
- description = lib.mdDoc ''
+ description = ''
Arguments for the specified certificate loader.
In case the `tls` loader is set, the defaults are considered secure
@@ -287,7 +287,7 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open the configured incoming and outgoing mail server ports.
'';
};
@@ -295,7 +295,7 @@ in {
ensureAccounts = mkOption {
type = with types; listOf str;
default = [];
- description = lib.mdDoc ''
+ description = ''
List of IMAP accounts which get automatically created. Note that for
a complete setup, user credentials for these accounts are required
and can be created using the `ensureCredentials` option.
@@ -309,7 +309,7 @@ in {
ensureCredentials = mkOption {
default = {};
- description = lib.mdDoc ''
+ description = ''
List of user accounts which get automatically created if they don't
exist yet. Note that for a complete setup, corresponding mail boxes
have to get created using the `ensureAccounts` option.
@@ -325,7 +325,7 @@ in {
type = types.path;
example = "/path/to/file";
default = null;
- description = lib.mdDoc ''
+ description = ''
Specifies the path to a file containing the
clear text password for the user.
'';
@@ -336,7 +336,7 @@ in {
secrets = lib.mkOption {
type = with types; listOf path;
- description = lib.mdDoc ''
+ description = ''
A list of files containing the various secrets. Should be in the format
expected by systemd's `EnvironmentFile` directory. Secrets can be
referenced in the format `{env:VAR}`.
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/mail.nix b/third_party/nixpkgs/nixos/modules/services/mail/mail.nix
index 8e1424595b..fcc7ff6db9 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/mail.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/mail.nix
@@ -14,7 +14,7 @@ with lib;
type = types.nullOr options.security.wrappers.type.nestedTypes.elemType;
default = null;
internal = true;
- description = lib.mdDoc ''
+ description = ''
Configuration for the sendmail setuid wapper.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/mailcatcher.nix b/third_party/nixpkgs/nixos/modules/services/mail/mailcatcher.nix
index d0f4550c19..6728bbcd3b 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/mailcatcher.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/mailcatcher.nix
@@ -11,37 +11,37 @@ in
options = {
services.mailcatcher = {
- enable = mkEnableOption (lib.mdDoc "MailCatcher");
+ enable = mkEnableOption "MailCatcher, an SMTP server and web interface to locally test outbound emails";
http.ip = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc "The ip address of the http server.";
+ description = "The ip address of the http server.";
};
http.port = mkOption {
type = types.port;
default = 1080;
- description = lib.mdDoc "The port address of the http server.";
+ description = "The port address of the http server.";
};
http.path = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc "Prefix to all HTTP paths.";
+ description = "Prefix to all HTTP paths.";
example = "/mailcatcher";
};
smtp.ip = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc "The ip address of the smtp server.";
+ description = "The ip address of the smtp server.";
};
smtp.port = mkOption {
type = types.port;
default = 1025;
- description = lib.mdDoc "The port address of the smtp server.";
+ description = "The port address of the smtp server.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/mailhog.nix b/third_party/nixpkgs/nixos/modules/services/mail/mailhog.nix
index 7ae62de291..455e509549 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/mailhog.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/mailhog.nix
@@ -27,36 +27,36 @@ in
options = {
services.mailhog = {
- enable = mkEnableOption (lib.mdDoc "MailHog");
+ enable = mkEnableOption "MailHog, web and API based SMTP testing";
storage = mkOption {
type = types.enum [ "maildir" "memory" ];
default = "memory";
- description = lib.mdDoc "Store mails on disk or in memory.";
+ description = "Store mails on disk or in memory.";
};
apiPort = mkOption {
type = types.port;
default = 8025;
- description = lib.mdDoc "Port on which the API endpoint will listen.";
+ description = "Port on which the API endpoint will listen.";
};
smtpPort = mkOption {
type = types.port;
default = 1025;
- description = lib.mdDoc "Port on which the SMTP endpoint will listen.";
+ description = "Port on which the SMTP endpoint will listen.";
};
uiPort = mkOption {
type = types.port;
default = 8025;
- description = lib.mdDoc "Port on which the HTTP UI will listen.";
+ description = "Port on which the HTTP UI will listen.";
};
extraArgs = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "List of additional arguments to pass to the MailHog process.";
+ description = "List of additional arguments to pass to the MailHog process.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/mailman.md b/third_party/nixpkgs/nixos/modules/services/mail/mailman.md
index 55b61f8a25..446aa1f921 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/mailman.md
+++ b/third_party/nixpkgs/nixos/modules/services/mail/mailman.md
@@ -9,7 +9,7 @@ an existing, securely configured Postfix setup, as it does not automatically con
## Basic usage with Postfix {#module-services-mailman-basic-usage}
For a basic configuration with Postfix as the MTA, the following settings are suggested:
-```
+```nix
{ config, ... }: {
services.postfix = {
enable = true;
@@ -50,7 +50,7 @@ necessary, but outside the scope of the Mailman module.
## Using with other MTAs {#module-services-mailman-other-mtas}
Mailman also supports other MTA, though with a little bit more configuration. For example, to use Mailman with Exim, you can use the following settings:
-```
+```nix
{ config, ... }: {
services = {
mailman = {
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/mailman.nix b/third_party/nixpkgs/nixos/modules/services/mail/mailman.nix
index 76035625fb..7e7ca7e406 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/mailman.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/mailman.nix
@@ -88,29 +88,29 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable Mailman on this host. Requires an active MTA on the host (e.g. Postfix).";
+ description = "Enable Mailman on this host. Requires an active MTA on the host (e.g. Postfix).";
};
ldap = {
- enable = mkEnableOption (lib.mdDoc "LDAP auth");
+ enable = mkEnableOption "LDAP auth";
serverUri = mkOption {
type = types.str;
example = "ldaps://ldap.host";
- description = lib.mdDoc ''
+ description = ''
LDAP host to connect against.
'';
};
bindDn = mkOption {
type = types.str;
example = "cn=root,dc=nixos,dc=org";
- description = lib.mdDoc ''
+ description = ''
Service account to bind against.
'';
};
bindPasswordFile = mkOption {
type = types.str;
example = "/run/secrets/ldap-bind";
- description = lib.mdDoc ''
+ description = ''
Path to the file containing the bind password of the service account
defined by [](#opt-services.mailman.ldap.bindDn).
'';
@@ -119,7 +119,7 @@ in {
type = types.nullOr types.str;
default = null;
example = "cn=admin,ou=groups,dc=nixos,dc=org";
- description = lib.mdDoc ''
+ description = ''
Group where a user must be a member of to gain superuser rights.
'';
};
@@ -127,14 +127,14 @@ in {
query = mkOption {
type = types.str;
example = "(&(objectClass=inetOrgPerson)(|(uid=%(user)s)(mail=%(user)s)))";
- description = lib.mdDoc ''
+ description = ''
Query to find a user in the LDAP database.
'';
};
ou = mkOption {
type = types.str;
example = "ou=users,dc=nixos,dc=org";
- description = lib.mdDoc ''
+ description = ''
Organizational unit to look up a user.
'';
};
@@ -148,21 +148,21 @@ in {
];
default = "posixGroup";
apply = v: "${toUpper (substring 0 1 v)}${substring 1 (stringLength v) v}Type";
- description = lib.mdDoc ''
+ description = ''
Type of group to perform a group search against.
'';
};
query = mkOption {
type = types.str;
example = "(objectClass=groupOfNames)";
- description = lib.mdDoc ''
+ description = ''
Query to find a group associated to a user in the LDAP database.
'';
};
ou = mkOption {
type = types.str;
example = "ou=groups,dc=nixos,dc=org";
- description = lib.mdDoc ''
+ description = ''
Organizational unit to look up a group.
'';
};
@@ -171,28 +171,28 @@ in {
username = mkOption {
default = "uid";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
LDAP-attribute that corresponds to the `username`-attribute in mailman.
'';
};
firstName = mkOption {
default = "givenName";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
LDAP-attribute that corresponds to the `firstName`-attribute in mailman.
'';
};
lastName = mkOption {
default = "sn";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
LDAP-attribute that corresponds to the `lastName`-attribute in mailman.
'';
};
email = mkOption {
default = "mail";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
LDAP-attribute that corresponds to the `email`-attribute in mailman.
'';
};
@@ -203,7 +203,7 @@ in {
type = types.bool;
default = true;
example = false;
- description = lib.mdDoc ''
+ description = ''
Enable Postfix integration. Requires an active Postfix installation.
If you want to use another MTA, set this option to false and configure
@@ -216,7 +216,7 @@ in {
siteOwner = mkOption {
type = types.str;
example = "postmaster@example.org";
- description = lib.mdDoc ''
+ description = ''
Certain messages that must be delivered to a human, but which can't
be delivered to a list owner (e.g. a bounce from a list owner), will
be sent to this address. It should point to a human.
@@ -226,7 +226,7 @@ in {
webHosts = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
The list of hostnames and/or IP addresses from which the Mailman Web
UI will accept requests. By default, "localhost" and "127.0.0.1" are
enabled. All additional names under which your web server accepts
@@ -238,7 +238,7 @@ in {
webUser = mkOption {
type = types.str;
default = "mailman-web";
- description = lib.mdDoc ''
+ description = ''
User to run mailman-web as
'';
};
@@ -246,7 +246,7 @@ in {
webSettings = mkOption {
type = types.attrs;
default = {};
- description = lib.mdDoc ''
+ description = ''
Overrides for the default mailman-web Django settings.
'';
};
@@ -254,43 +254,43 @@ in {
restApiPassFile = mkOption {
default = null;
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
Path to the file containing the value for `MAILMAN_REST_API_PASS`.
'';
};
serve = {
- enable = mkEnableOption (lib.mdDoc "automatic nginx and uwsgi setup for mailman-web");
+ enable = mkEnableOption "automatic nginx and uwsgi setup for mailman-web";
virtualRoot = mkOption {
default = "/";
example = lib.literalExpression "/lists";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Path to mount the mailman-web django application on.
'';
};
};
extraPythonPackages = mkOption {
- description = lib.mdDoc "Packages to add to the python environment used by mailman and mailman-web";
+ description = "Packages to add to the python environment used by mailman and mailman-web";
type = types.listOf types.package;
default = [];
};
settings = mkOption {
- description = lib.mdDoc "Settings for mailman.cfg";
+ description = "Settings for mailman.cfg";
type = types.attrsOf (types.attrsOf types.str);
default = {};
};
hyperkitty = {
- enable = mkEnableOption (lib.mdDoc "the Hyperkitty archiver for Mailman");
+ enable = mkEnableOption "the Hyperkitty archiver for Mailman";
baseUrl = mkOption {
type = types.str;
default = "http://localhost:18507/archives/";
- description = lib.mdDoc ''
+ description = ''
Where can Mailman connect to Hyperkitty's internal API, preferably on
localhost?
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/mlmmj.nix b/third_party/nixpkgs/nixos/modules/services/mail/mlmmj.nix
index 66106a1449..80fd6d9f4e 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/mlmmj.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/mlmmj.nix
@@ -56,37 +56,37 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable mlmmj";
+ description = "Enable mlmmj";
};
user = mkOption {
type = types.str;
default = "mlmmj";
- description = lib.mdDoc "mailinglist local user";
+ description = "mailinglist local user";
};
group = mkOption {
type = types.str;
default = "mlmmj";
- description = lib.mdDoc "mailinglist local group";
+ description = "mailinglist local group";
};
listDomain = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "Set the mailing list domain";
+ description = "Set the mailing list domain";
};
mailLists = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "The collection of hosted maillists";
+ description = "The collection of hosted maillists";
};
maintInterval = mkOption {
type = types.str;
default = "20min";
- description = lib.mdDoc ''
+ description = ''
Time interval between mlmmj-maintd runs, see
{manpage}`systemd.time(7)` for format information.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/nullmailer.nix b/third_party/nixpkgs/nixos/modules/services/mail/nullmailer.nix
index 4fd0026dbe..55a85a3544 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/nullmailer.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/nullmailer.nix
@@ -10,13 +10,13 @@ with lib;
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable nullmailer daemon.";
+ description = "Whether to enable nullmailer daemon.";
};
user = mkOption {
type = types.str;
default = "nullmailer";
- description = lib.mdDoc ''
+ description = ''
User to use to run nullmailer-send.
'';
};
@@ -24,7 +24,7 @@ with lib;
group = mkOption {
type = types.str;
default = "nullmailer";
- description = lib.mdDoc ''
+ description = ''
Group to use to run nullmailer-send.
'';
};
@@ -32,13 +32,13 @@ with lib;
setSendmail = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to set the system sendmail to nullmailer's.";
+ description = "Whether to set the system sendmail to nullmailer's.";
};
remotesFile = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to the `remotes` control file. This file contains a
list of remote servers to which to send each message.
@@ -51,7 +51,7 @@ with lib;
adminaddr = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
If set, all recipients to users at either "localhost" (the literal string)
or the canonical host name (from the me control attribute) are remapped to this address.
This is provided to allow local daemons to be able to send email to
@@ -64,7 +64,7 @@ with lib;
allmailfrom = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
If set, content will override the envelope sender on all messages.
'';
};
@@ -72,7 +72,7 @@ with lib;
defaultdomain = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The content of this attribute is appended to any host name that
does not contain a period (except localhost), including defaulthost
and idhost. Defaults to the value of the me attribute, if it exists,
@@ -83,7 +83,7 @@ with lib;
defaulthost = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The content of this attribute is appended to any address that
is missing a host name. Defaults to the value of the me control
attribute, if it exists, otherwise the literal name defaulthost.
@@ -93,7 +93,7 @@ with lib;
doublebounceto = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
If the original sender was empty (the original message was a
delivery status or disposition notification), the double bounce
is sent to the address in this attribute.
@@ -103,7 +103,7 @@ with lib;
helohost = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Sets the environment variable $HELOHOST which is used by the
SMTP protocol module to set the parameter given to the HELO command.
Defaults to the value of the me configuration attribute.
@@ -113,7 +113,7 @@ with lib;
idhost = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The content of this attribute is used when building the message-id
string for the message. Defaults to the canonicalized value of defaulthost.
'';
@@ -122,7 +122,7 @@ with lib;
maxpause = mkOption {
type = with types; nullOr (oneOf [ str int ]);
default = null;
- description = lib.mdDoc ''
+ description = ''
The maximum time to pause between successive queue runs, in seconds.
Defaults to 24 hours (86400).
'';
@@ -131,7 +131,7 @@ with lib;
me = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The fully-qualifiled host name of the computer running nullmailer.
Defaults to the literal name me.
'';
@@ -140,7 +140,7 @@ with lib;
pausetime = mkOption {
type = with types; nullOr (oneOf [ str int ]);
default = null;
- description = lib.mdDoc ''
+ description = ''
The minimum time to pause between successive queue runs when there
are messages in the queue, in seconds. Defaults to 1 minute (60).
Each time this timeout is reached, the timeout is doubled to a
@@ -153,7 +153,7 @@ with lib;
remotes = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
A list of remote servers to which to send each message. Each line
contains a remote host name or address followed by an optional
protocol string, separated by white space.
@@ -170,7 +170,7 @@ with lib;
sendtimeout = mkOption {
type = with types; nullOr (oneOf [ str int ]);
default = null;
- description = lib.mdDoc ''
+ description = ''
The time to wait for a remote module listed above to complete sending
a message before killing it and trying again, in seconds.
Defaults to 1 hour (3600). If this is set to 0, nullmailer-send
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/offlineimap.nix b/third_party/nixpkgs/nixos/modules/services/mail/offlineimap.nix
index 0166ec4e8d..f1517232c4 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/offlineimap.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/offlineimap.nix
@@ -7,12 +7,12 @@ let
in {
options.services.offlineimap = {
- enable = mkEnableOption (lib.mdDoc "OfflineIMAP, a software to dispose your mailbox(es) as a local Maildir(s)");
+ enable = mkEnableOption "OfflineIMAP, a software to dispose your mailbox(es) as a local Maildir(s)";
install = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to install a user service for Offlineimap. Once
the service is started, emails will be fetched automatically.
@@ -28,19 +28,19 @@ in {
type = types.listOf types.path;
default = [];
example = literalExpression "[ pkgs.pass pkgs.bash pkgs.notmuch ]";
- description = lib.mdDoc "List of derivations to put in Offlineimap's path.";
+ description = "List of derivations to put in Offlineimap's path.";
};
onCalendar = mkOption {
type = types.str;
default = "*:0/3"; # every 3 minutes
- description = lib.mdDoc "How often is offlineimap started. Default is '*:0/3' meaning every 3 minutes. See systemd.time(7) for more information about the format.";
+ description = "How often is offlineimap started. Default is '*:0/3' meaning every 3 minutes. See systemd.time(7) for more information about the format.";
};
timeoutStartSec = mkOption {
type = types.str;
default = "120sec"; # Kill if still alive after 2 minutes
- description = lib.mdDoc "How long waiting for offlineimap before killing it. Default is '120sec' meaning every 2 minutes. See systemd.time(7) for more information about the format.";
+ description = "How long waiting for offlineimap before killing it. Default is '120sec' meaning every 2 minutes. See systemd.time(7) for more information about the format.";
};
};
config = mkIf (cfg.enable || cfg.install) {
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/opendkim.nix b/third_party/nixpkgs/nixos/modules/services/mail/opendkim.nix
index a377fccc7b..0460764ef0 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/opendkim.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/opendkim.nix
@@ -31,25 +31,25 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the OpenDKIM sender authentication system.";
+ description = "Whether to enable the OpenDKIM sender authentication system.";
};
socket = mkOption {
type = types.str;
default = defaultSock;
- description = lib.mdDoc "Socket which is used for communication with OpenDKIM.";
+ description = "Socket which is used for communication with OpenDKIM.";
};
user = mkOption {
type = types.str;
default = "opendkim";
- description = lib.mdDoc "User for the daemon.";
+ description = "User for the daemon.";
};
group = mkOption {
type = types.str;
default = "opendkim";
- description = lib.mdDoc "Group for the daemon.";
+ description = "Group for the daemon.";
};
domains = mkOption {
@@ -57,7 +57,7 @@ in {
default = "csl:${config.networking.hostName}";
defaultText = literalExpression ''"csl:''${config.networking.hostName}"'';
example = "csl:example.com,mydomain.net";
- description = lib.mdDoc ''
+ description = ''
Local domains set (see `opendkim(8)` for more information on datasets).
Messages from them are signed, not verified.
'';
@@ -65,7 +65,7 @@ in {
keyPath = mkOption {
type = types.path;
- description = lib.mdDoc ''
+ description = ''
The path that opendkim should put its generated private keys into.
The DNS settings will be found in this directory with the name selector.txt.
'';
@@ -74,13 +74,13 @@ in {
selector = mkOption {
type = types.str;
- description = lib.mdDoc "Selector to use when signing.";
+ description = "Selector to use when signing.";
};
configFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc "Additional opendkim configuration.";
+ description = "Additional opendkim configuration.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/opensmtpd.nix b/third_party/nixpkgs/nixos/modules/services/mail/opensmtpd.nix
index a65c8e05a9..88e7bc0193 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/opensmtpd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/opensmtpd.nix
@@ -28,7 +28,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the OpenSMTPD server.";
+ description = "Whether to enable the OpenSMTPD server.";
};
package = mkPackageOption pkgs "opensmtpd" { };
@@ -36,14 +36,14 @@ in {
setSendmail = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to set the system sendmail to OpenSMTPD's.";
+ description = "Whether to set the system sendmail to OpenSMTPD's.";
};
extraServerArgs = mkOption {
type = types.listOf types.str;
default = [];
example = [ "-v" "-P mta" ];
- description = lib.mdDoc ''
+ description = ''
Extra command line arguments provided when the smtpd process
is started.
'';
@@ -55,7 +55,7 @@ in {
listen on lo
accept for any deliver to lmtp localhost:24
'';
- description = lib.mdDoc ''
+ description = ''
The contents of the smtpd.conf configuration file. See the
OpenSMTPD documentation for syntax information.
'';
@@ -64,7 +64,7 @@ in {
procPackages = mkOption {
type = types.listOf types.package;
default = [];
- description = lib.mdDoc ''
+ description = ''
Packages to search for filters, tables, queues, and schedulers.
Add OpenSMTPD-extras here if you want to use the filters, etc. from
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/pfix-srsd.nix b/third_party/nixpkgs/nixos/modules/services/mail/pfix-srsd.nix
index 237f36945e..7ad2b20454 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/pfix-srsd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/pfix-srsd.nix
@@ -12,17 +12,17 @@ with lib;
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Whether to run the postfix sender rewriting scheme daemon.";
+ description = "Whether to run the postfix sender rewriting scheme daemon.";
};
domain = mkOption {
- description = lib.mdDoc "The domain for which to enable srs";
+ description = "The domain for which to enable srs";
type = types.str;
example = "example.com";
};
secretsFile = mkOption {
- description = lib.mdDoc ''
+ description = ''
The secret data used to encode the SRS address.
to generate, use a command like:
`for n in $(seq 5); do dd if=/dev/urandom count=1 bs=1024 status=none | sha256sum | sed 's/ -$//' | sed 's/^/ /'; done`
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/postfix.nix b/third_party/nixpkgs/nixos/modules/services/mail/postfix.nix
index 209e066a19..fd78c98d0c 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/postfix.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/postfix.nix
@@ -45,7 +45,7 @@ let
type = types.str;
default = name;
example = "smtp";
- description = lib.mdDoc ''
+ description = ''
The name of the service to run. Defaults to the attribute set key.
'';
};
@@ -54,13 +54,13 @@ let
type = types.enum [ "inet" "unix" "unix-dgram" "fifo" "pass" ];
default = "unix";
example = "inet";
- description = lib.mdDoc "The type of the service";
+ description = "The type of the service";
};
private = mkOption {
type = types.bool;
example = false;
- description = lib.mdDoc ''
+ description = ''
Whether the service's sockets and storage directory is restricted to
be only available via the mail system. If `null` is
given it uses the postfix default `true`.
@@ -70,13 +70,13 @@ let
privileged = mkOption {
type = types.bool;
example = true;
- description = lib.mdDoc "";
+ description = "";
};
chroot = mkOption {
type = types.bool;
example = true;
- description = lib.mdDoc ''
+ description = ''
Whether the service is chrooted to have only access to the
{option}`services.postfix.queueDir` and the closure of
store paths specified by the {option}`program` option.
@@ -86,7 +86,7 @@ let
wakeup = mkOption {
type = types.int;
example = 60;
- description = lib.mdDoc ''
+ description = ''
Automatically wake up the service after the specified number of
seconds. If `0` is given, never wake the service
up.
@@ -96,7 +96,7 @@ let
wakeupUnusedComponent = mkOption {
type = types.bool;
example = false;
- description = lib.mdDoc ''
+ description = ''
If set to `false` the component will only be woken
up if it is used. This is equivalent to postfix' notion of adding a
question mark behind the wakeup time in
@@ -107,7 +107,7 @@ let
maxproc = mkOption {
type = types.int;
example = 1;
- description = lib.mdDoc ''
+ description = ''
The maximum number of processes to spawn for this service. If the
value is `0` it doesn't have any limit. If
`null` is given it uses the postfix default of
@@ -119,7 +119,7 @@ let
type = types.str;
default = name;
example = "smtpd";
- description = lib.mdDoc ''
+ description = ''
A program name specifying a Postfix service/daemon process.
By default it's the attribute {option}`name`.
'';
@@ -129,7 +129,7 @@ let
type = types.listOf types.str;
default = [];
example = [ "-o" "smtp_helo_timeout=5" ];
- description = lib.mdDoc ''
+ description = ''
Arguments to pass to the {option}`command`. There is no shell
processing involved and shell syntax is passed verbatim to the
process.
@@ -140,7 +140,7 @@ let
type = types.listOf types.str;
default = [];
internal = true;
- description = lib.mdDoc ''
+ description = ''
The raw configuration line for the {file}`master.cf`.
'';
};
@@ -221,13 +221,13 @@ let
type = types.str;
default = "/^.*/";
example = "/^X-Mailer:/";
- description = lib.mdDoc "A regexp pattern matching the header";
+ description = "A regexp pattern matching the header";
};
action = mkOption {
type = types.str;
default = "DUNNO";
example = "BCC mail@example.com";
- description = lib.mdDoc "The action to be executed when the pattern is matched";
+ description = "The action to be executed when the pattern is matched";
};
};
};
@@ -267,25 +267,25 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to run the Postfix mail server.";
+ description = "Whether to run the Postfix mail server.";
};
enableSmtp = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to enable smtp in master.cf.";
+ description = "Whether to enable smtp in master.cf.";
};
enableSubmission = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable smtp submission.";
+ description = "Whether to enable smtp submission.";
};
enableSubmissions = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable smtp submission via smtps.
According to RFC 8314 this should be preferred
@@ -308,7 +308,7 @@ in
smtpd_client_restrictions = "permit_sasl_authenticated,reject";
milter_macro_daemon_name = "ORIGINATING";
};
- description = lib.mdDoc "Options for the submission config in master.cf";
+ description = "Options for the submission config in master.cf";
};
submissionsOptions = mkOption {
@@ -324,7 +324,7 @@ in
smtpd_client_restrictions = "permit_sasl_authenticated,reject";
milter_macro_daemon_name = "ORIGINATING";
};
- description = lib.mdDoc ''
+ description = ''
Options for the submission config via smtps in master.cf.
smtpd_tls_security_level will be set to encrypt, if it is missing
@@ -337,25 +337,25 @@ in
setSendmail = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to set the system sendmail to postfix's.";
+ description = "Whether to set the system sendmail to postfix's.";
};
user = mkOption {
type = types.str;
default = "postfix";
- description = lib.mdDoc "What to call the Postfix user (must be used only for postfix).";
+ description = "What to call the Postfix user (must be used only for postfix).";
};
group = mkOption {
type = types.str;
default = "postfix";
- description = lib.mdDoc "What to call the Postfix group (must be used only for postfix).";
+ description = "What to call the Postfix group (must be used only for postfix).";
};
setgidGroup = mkOption {
type = types.str;
default = "postdrop";
- description = lib.mdDoc ''
+ description = ''
How to call postfix setgid group (for postdrop). Should
be uniquely used group.
'';
@@ -365,7 +365,7 @@ in
type = types.nullOr (types.listOf types.str);
default = null;
example = ["192.168.0.1/24"];
- description = lib.mdDoc ''
+ description = ''
Net masks for trusted - allowed to relay mail to third parties -
hosts. Leave empty to use mynetworks_style configuration or use
default (localhost-only).
@@ -375,7 +375,7 @@ in
networksStyle = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Name of standard way of trusted network specification to use,
leave blank if you specify it explicitly or if you want to use
default (localhost-only).
@@ -385,7 +385,7 @@ in
hostname = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Hostname to use. Leave blank to use just the hostname of machine.
It should be FQDN.
'';
@@ -394,7 +394,7 @@ in
domain = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Domain to use. Leave blank to use hostname minus first component.
'';
};
@@ -402,7 +402,7 @@ in
origin = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Origin to use in outgoing e-mail. Leave blank to use hostname.
'';
};
@@ -411,7 +411,7 @@ in
type = types.nullOr (types.listOf types.str);
default = null;
example = ["localhost"];
- description = lib.mdDoc ''
+ description = ''
Full (!) list of domains we deliver locally. Leave blank for
acceptable Postfix default.
'';
@@ -421,7 +421,7 @@ in
type = types.nullOr (types.listOf types.str);
default = null;
example = ["localdomain"];
- description = lib.mdDoc ''
+ description = ''
List of domains we agree to relay to. Default is empty.
'';
};
@@ -429,7 +429,7 @@ in
relayHost = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Mail relay for outbound mail.
'';
};
@@ -437,7 +437,7 @@ in
relayPort = mkOption {
type = types.int;
default = 25;
- description = lib.mdDoc ''
+ description = ''
SMTP port for relay mail relay.
'';
};
@@ -445,7 +445,7 @@ in
lookupMX = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether relay specified is just domain whose MX must be used.
'';
};
@@ -453,7 +453,7 @@ in
postmasterAlias = mkOption {
type = types.str;
default = "root";
- description = lib.mdDoc ''
+ description = ''
Who should receive postmaster e-mail. Multiple values can be added by
separating values with comma.
'';
@@ -462,7 +462,7 @@ in
rootAlias = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Who should receive root e-mail. Blank for no redirection.
Multiple values can be added by separating values with comma.
'';
@@ -471,7 +471,7 @@ in
extraAliases = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Additional entries to put verbatim into aliases file, cf. man-page aliases(8).
'';
};
@@ -480,12 +480,12 @@ in
type = with types; enum [ "hash" "regexp" "pcre" ];
default = "hash";
example = "regexp";
- description = lib.mdDoc "The format the alias map should have. Use regexp if you want to use regular expressions.";
+ description = "The format the alias map should have. Use regexp if you want to use regular expressions.";
};
config = mkOption {
type = with types; attrsOf (oneOf [ bool str (listOf str) ]);
- description = lib.mdDoc ''
+ description = ''
The main.cf configuration file as key value set.
'';
example = {
@@ -497,7 +497,7 @@ in
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra lines to be added verbatim to the main.cf configuration file.
'';
};
@@ -506,7 +506,7 @@ in
type = types.str;
default = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
defaultText = literalExpression ''"''${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"'';
- description = lib.mdDoc ''
+ description = ''
File containing trusted certification authorities (CA) to verify certificates of mailservers contacted for mail delivery. This basically sets smtp_tls_CAfile and enables opportunistic tls. Defaults to NixOS trusted certification authorities.
'';
};
@@ -514,20 +514,20 @@ in
sslCert = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc "SSL certificate to use.";
+ description = "SSL certificate to use.";
};
sslKey = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc "SSL key to use.";
+ description = "SSL key to use.";
};
recipientDelimiter = mkOption {
type = types.str;
default = "";
example = "+";
- description = lib.mdDoc ''
+ description = ''
Delimiter for address extension: so mail to user+test can be handled by ~user/.forward+test
'';
};
@@ -535,7 +535,7 @@ in
canonical = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Entries for the {manpage}`canonical(5)` table.
'';
};
@@ -543,7 +543,7 @@ in
virtual = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Entries for the virtual alias map, cf. man-page virtual(5).
'';
};
@@ -551,7 +551,7 @@ in
virtualMapType = mkOption {
type = types.enum ["hash" "regexp" "pcre"];
default = "hash";
- description = lib.mdDoc ''
+ description = ''
What type of virtual alias map file to use. Use `"regexp"` for regular expressions.
'';
};
@@ -559,7 +559,7 @@ in
localRecipients = mkOption {
type = with types; nullOr (listOf str);
default = null;
- description = lib.mdDoc ''
+ description = ''
List of accepted local users. Specify a bare username, an
`"@domain.tld"` wild-card, or a complete
`"user@domain.tld"` address. If set, these names end
@@ -572,7 +572,7 @@ in
transport = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Entries for the transport map, cf. man-page transport(8).
'';
};
@@ -580,13 +580,13 @@ in
dnsBlacklists = mkOption {
default = [];
type = with types; listOf str;
- description = lib.mdDoc "dns blacklist servers to use with smtpd_client_restrictions";
+ description = "dns blacklist servers to use with smtpd_client_restrictions";
};
dnsBlacklistOverrides = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc "contents of check_client_access for overriding dnsBlacklists";
+ description = "contents of check_client_access for overriding dnsBlacklists";
};
masterConfig = mkOption {
@@ -598,7 +598,7 @@ in
args = [ "-o" "smtpd_tls_security_level=encrypt" ];
};
};
- description = lib.mdDoc ''
+ description = ''
An attribute set of service options, which correspond to the service
definitions usually done within the Postfix
{file}`master.cf` file.
@@ -609,46 +609,46 @@ in
type = types.lines;
default = "";
example = "submission inet n - n - - smtpd";
- description = lib.mdDoc "Extra lines to append to the generated master.cf file.";
+ description = "Extra lines to append to the generated master.cf file.";
};
enableHeaderChecks = mkOption {
type = types.bool;
default = false;
example = true;
- description = lib.mdDoc "Whether to enable postfix header checks";
+ description = "Whether to enable postfix header checks";
};
headerChecks = mkOption {
type = types.listOf (types.submodule headerCheckOptions);
default = [];
example = [ { pattern = "/^X-Spam-Flag:/"; action = "REDIRECT spam@example.com"; } ];
- description = lib.mdDoc "Postfix header checks.";
+ description = "Postfix header checks.";
};
extraHeaderChecks = mkOption {
type = types.lines;
default = "";
example = "/^X-Spam-Flag:/ REDIRECT spam@example.com";
- description = lib.mdDoc "Extra lines to /etc/postfix/header_checks file.";
+ description = "Extra lines to /etc/postfix/header_checks file.";
};
aliasFiles = mkOption {
type = types.attrsOf types.path;
default = {};
- description = lib.mdDoc "Aliases' tables to be compiled and placed into /var/lib/postfix/conf.";
+ description = "Aliases' tables to be compiled and placed into /var/lib/postfix/conf.";
};
mapFiles = mkOption {
type = types.attrsOf types.path;
default = {};
- description = lib.mdDoc "Maps to be compiled and placed into /var/lib/postfix/conf.";
+ description = "Maps to be compiled and placed into /var/lib/postfix/conf.";
};
useSrs = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable sender rewriting scheme";
+ description = "Whether to enable sender rewriting scheme";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/postfixadmin.nix b/third_party/nixpkgs/nixos/modules/services/mail/postfixadmin.nix
index e7ebb6fbd6..87a9f963b1 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/postfixadmin.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/postfixadmin.nix
@@ -13,7 +13,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable postfixadmin.
Also enables nginx virtual host management.
@@ -25,13 +25,13 @@ in
hostName = mkOption {
type = types.str;
example = "postfixadmin.example.com";
- description = lib.mdDoc "Hostname to use for the nginx vhost";
+ description = "Hostname to use for the nginx vhost";
};
adminEmail = mkOption {
type = types.str;
example = "postmaster@example.com";
- description = lib.mdDoc ''
+ description = ''
Defines the Site Admin's email address.
This will be used to send emails from to create mailboxes and
from Send Email / Broadcast message pages.
@@ -40,7 +40,7 @@ in
setupPasswordFile = mkOption {
type = types.path;
- description = lib.mdDoc ''
+ description = ''
Password file for the admin.
Generate with `php -r "echo password_hash('some password here', PASSWORD_DEFAULT);"`
'';
@@ -50,7 +50,7 @@ in
username = mkOption {
type = types.str;
default = "postfixadmin";
- description = lib.mdDoc ''
+ description = ''
Username for the postgresql connection.
If `database.host` is set to `localhost`, a unix user and group of the same name will be created as well.
'';
@@ -58,7 +58,7 @@ in
host = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc ''
+ description = ''
Host of the postgresql server. If this is not set to
`localhost`, you have to create the
postgresql user and database yourself, with appropriate
@@ -67,19 +67,19 @@ in
};
passwordFile = mkOption {
type = types.path;
- description = lib.mdDoc "Password file for the postgresql connection. Must be readable by user `nginx`.";
+ description = "Password file for the postgresql connection. Must be readable by user `nginx`.";
};
dbname = mkOption {
type = types.str;
default = "postfixadmin";
- description = lib.mdDoc "Name of the postgresql database";
+ description = "Name of the postgresql database";
};
};
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Extra configuration for the postfixadmin instance, see postfixadmin's config.inc.php for available options.";
+ description = "Extra configuration for the postfixadmin instance, see postfixadmin's config.inc.php for available options.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/postgrey.nix b/third_party/nixpkgs/nixos/modules/services/mail/postgrey.nix
index fdfa08946d..7c206e3725 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/postgrey.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/postgrey.nix
@@ -15,12 +15,12 @@ with lib; let
type = nullOr str;
default = null;
example = "127.0.0.1";
- description = lib.mdDoc "The address to bind to. Localhost if null";
+ description = "The address to bind to. Localhost if null";
};
port = mkOption {
type = natural';
default = 10030;
- description = lib.mdDoc "Tcp port to bind to";
+ description = "Tcp port to bind to";
};
};
};
@@ -30,13 +30,13 @@ with lib; let
path = mkOption {
type = path;
default = "/run/postgrey.sock";
- description = lib.mdDoc "Path of the unix socket";
+ description = "Path of the unix socket";
};
mode = mkOption {
type = str;
default = "0777";
- description = lib.mdDoc "Mode of the unix socket";
+ description = "Mode of the unix socket";
};
};
};
@@ -59,7 +59,7 @@ in {
enable = mkOption {
type = bool;
default = false;
- description = lib.mdDoc "Whether to run the Postgrey daemon";
+ description = "Whether to run the Postgrey daemon";
};
socket = mkOption {
type = socket;
@@ -71,73 +71,73 @@ in {
addr = "127.0.0.1";
port = 10030;
};
- description = lib.mdDoc "Socket to bind to";
+ description = "Socket to bind to";
};
greylistText = mkOption {
type = str;
default = "Greylisted for %%s seconds";
- description = lib.mdDoc "Response status text for greylisted messages; use %%s for seconds left until greylisting is over and %%r for mail domain of recipient";
+ description = "Response status text for greylisted messages; use %%s for seconds left until greylisting is over and %%r for mail domain of recipient";
};
greylistAction = mkOption {
type = str;
default = "DEFER_IF_PERMIT";
- description = lib.mdDoc "Response status for greylisted messages (see access(5))";
+ description = "Response status for greylisted messages (see access(5))";
};
greylistHeader = mkOption {
type = str;
default = "X-Greylist: delayed %%t seconds by postgrey-%%v at %%h; %%d";
- description = lib.mdDoc "Prepend header to greylisted mails; use %%t for seconds delayed due to greylisting, %%v for the version of postgrey, %%d for the date, and %%h for the host";
+ description = "Prepend header to greylisted mails; use %%t for seconds delayed due to greylisting, %%v for the version of postgrey, %%d for the date, and %%h for the host";
};
delay = mkOption {
type = natural;
default = 300;
- description = lib.mdDoc "Greylist for N seconds";
+ description = "Greylist for N seconds";
};
maxAge = mkOption {
type = natural;
default = 35;
- description = lib.mdDoc "Delete entries from whitelist if they haven't been seen for N days";
+ description = "Delete entries from whitelist if they haven't been seen for N days";
};
retryWindow = mkOption {
type = either str natural;
default = 2;
example = "12h";
- description = lib.mdDoc "Allow N days for the first retry. Use string with appended 'h' to specify time in hours";
+ description = "Allow N days for the first retry. Use string with appended 'h' to specify time in hours";
};
lookupBySubnet = mkOption {
type = bool;
default = true;
- description = lib.mdDoc "Strip the last N bits from IP addresses, determined by IPv4CIDR and IPv6CIDR";
+ description = "Strip the last N bits from IP addresses, determined by IPv4CIDR and IPv6CIDR";
};
IPv4CIDR = mkOption {
type = natural;
default = 24;
- description = lib.mdDoc "Strip N bits from IPv4 addresses if lookupBySubnet is true";
+ description = "Strip N bits from IPv4 addresses if lookupBySubnet is true";
};
IPv6CIDR = mkOption {
type = natural;
default = 64;
- description = lib.mdDoc "Strip N bits from IPv6 addresses if lookupBySubnet is true";
+ description = "Strip N bits from IPv6 addresses if lookupBySubnet is true";
};
privacy = mkOption {
type = bool;
default = true;
- description = lib.mdDoc "Store data using one-way hash functions (SHA1)";
+ description = "Store data using one-way hash functions (SHA1)";
};
autoWhitelist = mkOption {
type = nullOr natural';
default = 5;
- description = lib.mdDoc "Whitelist clients after successful delivery of N messages";
+ description = "Whitelist clients after successful delivery of N messages";
};
whitelistClients = mkOption {
type = listOf path;
default = [];
- description = lib.mdDoc "Client address whitelist files (see postgrey(8))";
+ description = "Client address whitelist files (see postgrey(8))";
};
whitelistRecipients = mkOption {
type = listOf path;
default = [];
- description = lib.mdDoc "Recipient address whitelist files (see postgrey(8))";
+ description = "Recipient address whitelist files (see postgrey(8))";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/postsrsd.nix b/third_party/nixpkgs/nixos/modules/services/mail/postsrsd.nix
index 41301c8697..2ebc675ab1 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/postsrsd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/postsrsd.nix
@@ -17,24 +17,24 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the postsrsd SRS server for Postfix.";
+ description = "Whether to enable the postsrsd SRS server for Postfix.";
};
secretsFile = mkOption {
type = types.path;
default = "/var/lib/postsrsd/postsrsd.secret";
- description = lib.mdDoc "Secret keys used for signing and verification";
+ description = "Secret keys used for signing and verification";
};
domain = mkOption {
type = types.str;
- description = lib.mdDoc "Domain name for rewrite";
+ description = "Domain name for rewrite";
};
separator = mkOption {
type = types.enum ["-" "=" "+"];
default = "=";
- description = lib.mdDoc "First separator character in generated addresses";
+ description = "First separator character in generated addresses";
};
# bindAddress = mkOption { # uncomment once 1.5 is released
@@ -46,37 +46,37 @@ in {
forwardPort = mkOption {
type = types.int;
default = 10001;
- description = lib.mdDoc "Port for the forward SRS lookup";
+ description = "Port for the forward SRS lookup";
};
reversePort = mkOption {
type = types.int;
default = 10002;
- description = lib.mdDoc "Port for the reverse SRS lookup";
+ description = "Port for the reverse SRS lookup";
};
timeout = mkOption {
type = types.int;
default = 1800;
- description = lib.mdDoc "Timeout for idle client connections in seconds";
+ description = "Timeout for idle client connections in seconds";
};
excludeDomains = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "Origin domains to exclude from rewriting in addition to primary domain";
+ description = "Origin domains to exclude from rewriting in addition to primary domain";
};
user = mkOption {
type = types.str;
default = "postsrsd";
- description = lib.mdDoc "User for the daemon";
+ description = "User for the daemon";
};
group = mkOption {
type = types.str;
default = "postsrsd";
- description = lib.mdDoc "Group for the daemon";
+ description = "Group for the daemon";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/public-inbox.nix b/third_party/nixpkgs/nixos/modules/services/mail/public-inbox.nix
index bab4e8bb8d..14a2ab48fa 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/public-inbox.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/public-inbox.nix
@@ -16,12 +16,12 @@ let
args = mkOption {
type = with types; listOf str;
default = [];
- description = lib.mdDoc "Command-line arguments to pass to {manpage}`public-inbox-${proto}d(1)`.";
+ description = "Command-line arguments to pass to {manpage}`public-inbox-${proto}d(1)`.";
};
port = mkOption {
type = with types; nullOr (either str port);
default = defaultPort;
- description = lib.mdDoc ''
+ description = ''
Listening port.
Beware that public-inbox uses well-known ports number to decide whether to enable TLS or not.
Set to null and use `systemd.sockets.public-inbox-${proto}d.listenStreams`
@@ -32,13 +32,13 @@ let
type = with types; nullOr str;
default = null;
example = "/path/to/fullchain.pem";
- description = lib.mdDoc "Path to TLS certificate to use for connections to {manpage}`public-inbox-${proto}d(1)`.";
+ description = "Path to TLS certificate to use for connections to {manpage}`public-inbox-${proto}d(1)`.";
};
key = mkOption {
type = with types; nullOr str;
default = null;
example = "/path/to/key.pem";
- description = lib.mdDoc "Path to TLS key to use for connections to {manpage}`public-inbox-${proto}d(1)`.";
+ description = "Path to TLS key to use for connections to {manpage}`public-inbox-${proto}d(1)`.";
};
};
@@ -143,19 +143,19 @@ in
{
options.services.public-inbox = {
- enable = mkEnableOption (lib.mdDoc "the public-inbox mail archiver");
+ enable = mkEnableOption "the public-inbox mail archiver";
package = mkPackageOption pkgs "public-inbox" { };
path = mkOption {
type = with types; listOf package;
default = [];
example = literalExpression "with pkgs; [ spamassassin ]";
- description = lib.mdDoc ''
+ description = ''
Additional packages to place in the path of public-inbox-mda,
public-inbox-watch, etc.
'';
};
inboxes = mkOption {
- description = lib.mdDoc ''
+ description = ''
Inboxes to configure, where attribute names are inbox names.
'';
default = {};
@@ -164,40 +164,40 @@ in
options.inboxdir = mkOption {
type = types.str;
default = "${stateDir}/inboxes/${name}";
- description = lib.mdDoc "The absolute path to the directory which hosts the public-inbox.";
+ description = "The absolute path to the directory which hosts the public-inbox.";
};
options.address = mkOption {
type = with types; listOf str;
example = "example-discuss@example.org";
- description = lib.mdDoc "The email addresses of the public-inbox.";
+ description = "The email addresses of the public-inbox.";
};
options.url = mkOption {
type = types.nonEmptyStr;
example = "https://example.org/lists/example-discuss";
- description = lib.mdDoc "URL where this inbox can be accessed over HTTP.";
+ description = "URL where this inbox can be accessed over HTTP.";
};
options.description = mkOption {
type = types.str;
example = "user/dev discussion of public-inbox itself";
- description = lib.mdDoc "User-visible description for the repository.";
+ description = "User-visible description for the repository.";
apply = pkgs.writeText "public-inbox-description-${name}";
};
options.newsgroup = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc "NNTP group name for the inbox.";
+ description = "NNTP group name for the inbox.";
};
options.watch = mkOption {
type = with types; listOf str;
default = [];
- description = lib.mdDoc "Paths for {manpage}`public-inbox-watch(1)` to monitor for new mail.";
+ description = "Paths for {manpage}`public-inbox-watch(1)` to monitor for new mail.";
example = [ "maildir:/path/to/test.example.com.git" ];
};
options.watchheader = mkOption {
type = with types; nullOr str;
default = null;
example = "List-Id:";
- description = lib.mdDoc ''
+ description = ''
If specified, {manpage}`public-inbox-watch(1)` will only process
mail containing a matching header.
'';
@@ -207,20 +207,20 @@ in
description = "list of coderepo names";
};
default = [];
- description = lib.mdDoc "Nicknames of a 'coderepo' section associated with the inbox.";
+ description = "Nicknames of a 'coderepo' section associated with the inbox.";
};
}));
};
imap = {
- enable = mkEnableOption (lib.mdDoc "the public-inbox IMAP server");
+ enable = mkEnableOption "the public-inbox IMAP server";
} // publicInboxDaemonOptions "imap" 993;
http = {
- enable = mkEnableOption (lib.mdDoc "the public-inbox HTTP server");
+ enable = mkEnableOption "the public-inbox HTTP server";
mounts = mkOption {
type = with types; listOf str;
default = [ "/" ];
example = [ "/lists/archives" ];
- description = lib.mdDoc ''
+ description = ''
Root paths or URLs that public-inbox will be served on.
If domain parts are present, only requests to those
domains will be accepted.
@@ -231,7 +231,7 @@ in
type = with types; nullOr (either str port);
default = 80;
example = "/run/public-inbox-httpd.sock";
- description = lib.mdDoc ''
+ description = ''
Listening port or systemd's ListenStream= entry
to be used as a reverse proxy, eg. in nginx:
`locations."/inbox".proxyPass = "http://unix:''${config.services.public-inbox.http.port}:/inbox";`
@@ -241,25 +241,25 @@ in
};
};
mda = {
- enable = mkEnableOption (lib.mdDoc "the public-inbox Mail Delivery Agent");
+ enable = mkEnableOption "the public-inbox Mail Delivery Agent";
args = mkOption {
type = with types; listOf str;
default = [];
- description = lib.mdDoc "Command-line arguments to pass to {manpage}`public-inbox-mda(1)`.";
+ description = "Command-line arguments to pass to {manpage}`public-inbox-mda(1)`.";
};
};
- postfix.enable = mkEnableOption (lib.mdDoc "the integration into Postfix");
+ postfix.enable = mkEnableOption "the integration into Postfix";
nntp = {
- enable = mkEnableOption (lib.mdDoc "the public-inbox NNTP server");
+ enable = mkEnableOption "the public-inbox NNTP server";
} // publicInboxDaemonOptions "nntp" 563;
spamAssassinRules = mkOption {
type = with types; nullOr path;
default = "${cfg.package.sa_config}/user/.spamassassin/user_prefs";
defaultText = literalExpression "\${cfg.package.sa_config}/user/.spamassassin/user_prefs";
- description = lib.mdDoc "SpamAssassin configuration specific to public-inbox.";
+ description = "SpamAssassin configuration specific to public-inbox.";
};
settings = mkOption {
- description = lib.mdDoc ''
+ description = ''
Settings for the [public-inbox config file](https://public-inbox.org/public-inbox-config.html).
'';
default = {};
@@ -267,7 +267,7 @@ in
freeformType = gitIni.type;
options.publicinbox = mkOption {
default = {};
- description = lib.mdDoc "public inboxes";
+ description = "public inboxes";
type = types.submodule {
# Support both global options like `services.public-inbox.settings.publicinbox.imapserver`
# and inbox specific options like `services.public-inbox.settings.publicinbox.foo.address`.
@@ -276,30 +276,30 @@ in
options.css = mkOption {
type = with types; listOf str;
default = [];
- description = lib.mdDoc "The local path name of a CSS file for the PSGI web interface.";
+ description = "The local path name of a CSS file for the PSGI web interface.";
};
options.imapserver = mkOption {
type = with types; listOf str;
default = [];
example = [ "imap.public-inbox.org" ];
- description = lib.mdDoc "IMAP URLs to this public-inbox instance";
+ description = "IMAP URLs to this public-inbox instance";
};
options.nntpserver = mkOption {
type = with types; listOf str;
default = [];
example = [ "nntp://news.public-inbox.org" "nntps://news.public-inbox.org" ];
- description = lib.mdDoc "NNTP URLs to this public-inbox instance";
+ description = "NNTP URLs to this public-inbox instance";
};
options.pop3server = mkOption {
type = with types; listOf str;
default = [];
example = [ "pop.public-inbox.org" ];
- description = lib.mdDoc "POP3 URLs to this public-inbox instance";
+ description = "POP3 URLs to this public-inbox instance";
};
options.wwwlisting = mkOption {
type = with types; enum [ "all" "404" "match=domain" ];
default = "404";
- description = lib.mdDoc ''
+ description = ''
Controls which lists (if any) are listed for when the root
public-inbox URL is accessed over HTTP.
'';
@@ -309,7 +309,7 @@ in
options.publicinboxmda.spamcheck = mkOption {
type = with types; enum [ "spamc" "none" ];
default = "none";
- description = lib.mdDoc ''
+ description = ''
If set to spamc, {manpage}`public-inbox-watch(1)` will filter spam
using SpamAssassin.
'';
@@ -317,7 +317,7 @@ in
options.publicinboxwatch.spamcheck = mkOption {
type = with types; enum [ "spamc" "none" ];
default = "none";
- description = lib.mdDoc ''
+ description = ''
If set to spamc, {manpage}`public-inbox-watch(1)` will filter spam
using SpamAssassin.
'';
@@ -326,29 +326,29 @@ in
type = with types; nullOr str;
default = null;
example = "maildir:/path/to/spam";
- description = lib.mdDoc ''
+ description = ''
If set, mail in this maildir will be trained as spam and
deleted from all watched inboxes
'';
};
options.coderepo = mkOption {
default = {};
- description = lib.mdDoc "code repositories";
+ description = "code repositories";
type = types.attrsOf (types.submodule {
freeformType = types.attrsOf iniAtom;
options.cgitUrl = mkOption {
type = types.str;
- description = lib.mdDoc "URL of a cgit instance";
+ description = "URL of a cgit instance";
};
options.dir = mkOption {
type = types.str;
- description = lib.mdDoc "Path to a git repository";
+ description = "Path to a git repository";
};
});
};
};
};
- openFirewall = mkEnableOption (lib.mdDoc "opening the firewall when using a port option");
+ openFirewall = mkEnableOption "opening the firewall when using a port option";
};
config = mkIf cfg.enable {
assertions = [
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/roundcube.nix b/third_party/nixpkgs/nixos/modules/services/mail/roundcube.nix
index 3f1a695ab9..4499532ace 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/roundcube.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/roundcube.nix
@@ -14,7 +14,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable roundcube.
Also enables nginx virtual host management.
@@ -26,7 +26,7 @@ in
hostName = mkOption {
type = types.str;
example = "webmail.example.com";
- description = lib.mdDoc "Hostname to use for the nginx vhost";
+ description = "Hostname to use for the nginx vhost";
};
package = mkPackageOption pkgs "roundcube" {
@@ -37,7 +37,7 @@ in
username = mkOption {
type = types.str;
default = "roundcube";
- description = lib.mdDoc ''
+ description = ''
Username for the postgresql connection.
If `database.host` is set to `localhost`, a unix user and group of the same name will be created as well.
'';
@@ -45,7 +45,7 @@ in
host = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc ''
+ description = ''
Host of the postgresql server. If this is not set to
`localhost`, you have to create the
postgresql user and database yourself, with appropriate
@@ -54,12 +54,12 @@ in
};
password = mkOption {
type = types.str;
- description = lib.mdDoc "Password for the postgresql connection. Do not use: the password will be stored world readable in the store; use `passwordFile` instead.";
+ description = "Password for the postgresql connection. Do not use: the password will be stored world readable in the store; use `passwordFile` instead.";
default = "";
};
passwordFile = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Password file for the postgresql connection.
Must be formatted according to PostgreSQL .pgpass standard (see https://www.postgresql.org/docs/current/libpq-pgpass.html)
but only one line, no comments and readable by user `nginx`.
@@ -69,14 +69,14 @@ in
dbname = mkOption {
type = types.str;
default = "roundcube";
- description = lib.mdDoc "Name of the postgresql database";
+ description = "Name of the postgresql database";
};
};
plugins = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
List of roundcube plugins to enable. Currently, only those directly shipped with Roundcube are supported.
'';
};
@@ -85,7 +85,7 @@ in
type = types.listOf types.package;
default = [];
example = literalExpression "with pkgs.aspellDicts; [ en fr de ]";
- description = lib.mdDoc ''
+ description = ''
List of aspell dictionaries for spell checking. If empty, spell checking is disabled.
'';
};
@@ -93,7 +93,7 @@ in
maxAttachmentSize = mkOption {
type = types.int;
default = 18;
- description = lib.mdDoc ''
+ description = ''
The maximum attachment size in MB.
Note: Since roundcube only uses 70% of max upload values configured in php
@@ -105,13 +105,13 @@ in
configureNginx = lib.mkOption {
type = lib.types.bool;
default = true;
- description = lib.mdDoc "Configure nginx as a reverse proxy for roundcube.";
+ description = "Configure nginx as a reverse proxy for roundcube.";
};
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Extra configuration for roundcube webmail instance";
+ description = "Extra configuration for roundcube webmail instance";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/rspamd-trainer.nix b/third_party/nixpkgs/nixos/modules/services/mail/rspamd-trainer.nix
index bb78ddf9dd..81a0c460f0 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/rspamd-trainer.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/rspamd-trainer.nix
@@ -10,11 +10,11 @@ let
in {
options.services.rspamd-trainer = {
- enable = mkEnableOption (mdDoc "Spam/ham trainer for rspamd");
+ enable = mkEnableOption "Spam/ham trainer for rspamd";
settings = mkOption {
default = { };
- description = mdDoc ''
+ description = ''
IMAP authentication configuration for rspamd-trainer. For supplying
the IMAP password, use the `secrets` option.
'';
@@ -32,7 +32,7 @@ in {
secrets = lib.mkOption {
type = with types; listOf path;
- description = lib.mdDoc ''
+ description = ''
A list of files containing the various secrets. Should be in the
format expected by systemd's `EnvironmentFile` directory. For the
IMAP account password use `PASSWORD = mypassword`.
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/rspamd.nix b/third_party/nixpkgs/nixos/modules/services/mail/rspamd.nix
index ca88d81221..c61ddcac95 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/rspamd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/rspamd.nix
@@ -13,24 +13,24 @@ let
socket = mkOption {
type = types.str;
example = "localhost:11333";
- description = lib.mdDoc ''
+ description = ''
Socket for this worker to listen on in a format acceptable by rspamd.
'';
};
mode = mkOption {
type = types.str;
default = "0644";
- description = lib.mdDoc "Mode to set on unix socket";
+ description = "Mode to set on unix socket";
};
owner = mkOption {
type = types.str;
default = "${cfg.user}";
- description = lib.mdDoc "Owner to set on unix socket";
+ description = "Owner to set on unix socket";
};
group = mkOption {
type = types.str;
default = "${cfg.group}";
- description = lib.mdDoc "Group to set on unix socket";
+ description = "Group to set on unix socket";
};
rawEntry = mkOption {
type = types.str;
@@ -52,18 +52,18 @@ let
enable = mkOption {
type = types.nullOr types.bool;
default = null;
- description = lib.mdDoc "Whether to run the rspamd worker.";
+ description = "Whether to run the rspamd worker.";
};
name = mkOption {
type = types.nullOr types.str;
default = name;
- description = lib.mdDoc "Name of the worker";
+ description = "Name of the worker";
};
type = mkOption {
type = types.nullOr (types.enum [
"normal" "controller" "fuzzy" "rspamd_proxy" "lua" "proxy"
]);
- description = lib.mdDoc ''
+ description = ''
The type of this worker. The type `proxy` is
deprecated and only kept for backwards compatibility and should be
replaced with `rspamd_proxy`.
@@ -77,7 +77,7 @@ let
bindSockets = mkOption {
type = types.listOf (types.either types.str (types.submodule bindSocketOpts));
default = [];
- description = lib.mdDoc ''
+ description = ''
List of sockets to listen, in format acceptable by rspamd
'';
example = [{
@@ -94,21 +94,21 @@ let
count = mkOption {
type = types.nullOr types.int;
default = null;
- description = lib.mdDoc ''
+ description = ''
Number of worker instances to run
'';
};
includes = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
List of files to include in configuration
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Additional entries to put verbatim into worker section of rspamd config file.";
+ description = "Additional entries to put verbatim into worker section of rspamd config file.";
};
};
config = mkIf (name == "normal" || name == "controller" || name == "fuzzy" || name == "rspamd_proxy") {
@@ -186,7 +186,7 @@ let
enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether this file ${prefix} should be generated. This
option allows specific ${prefix} files to be disabled.
'';
@@ -195,12 +195,12 @@ let
text = mkOption {
default = null;
type = types.nullOr types.lines;
- description = lib.mdDoc "Text of the file.";
+ description = "Text of the file.";
};
source = mkOption {
type = types.path;
- description = lib.mdDoc "Path of the source file.";
+ description = "Path of the source file.";
};
};
config = {
@@ -227,18 +227,18 @@ in
services.rspamd = {
- enable = mkEnableOption (lib.mdDoc "rspamd, the Rapid spam filtering system");
+ enable = mkEnableOption "rspamd, the Rapid spam filtering system";
debug = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to run the rspamd daemon in debug mode.";
+ description = "Whether to run the rspamd daemon in debug mode.";
};
locals = mkOption {
type = with types; attrsOf (submodule (configFileModule "locals"));
default = {};
- description = lib.mdDoc ''
+ description = ''
Local configuration files, written into {file}`/etc/rspamd/local.d/{name}`.
'';
example = literalExpression ''
@@ -251,7 +251,7 @@ in
overrides = mkOption {
type = with types; attrsOf (submodule (configFileModule "overrides"));
default = {};
- description = lib.mdDoc ''
+ description = ''
Overridden configuration files, written into {file}`/etc/rspamd/override.d/{name}`.
'';
example = literalExpression ''
@@ -264,7 +264,7 @@ in
localLuaRules = mkOption {
default = null;
type = types.nullOr types.path;
- description = lib.mdDoc ''
+ description = ''
Path of file to link to {file}`/etc/rspamd/rspamd.local.lua` for local
rules written in Lua
'';
@@ -272,7 +272,7 @@ in
workers = mkOption {
type = with types; attrsOf (submodule workerOpts);
- description = lib.mdDoc ''
+ description = ''
Attribute set of workers to start.
'';
default = {
@@ -301,7 +301,7 @@ in
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra configuration to add at the end of the rspamd configuration
file.
'';
@@ -310,7 +310,7 @@ in
user = mkOption {
type = types.str;
default = "rspamd";
- description = lib.mdDoc ''
+ description = ''
User to use when no root privileges are required.
'';
};
@@ -318,7 +318,7 @@ in
group = mkOption {
type = types.str;
default = "rspamd";
- description = lib.mdDoc ''
+ description = ''
Group to use when no root privileges are required.
'';
};
@@ -327,12 +327,12 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Add rspamd milter to postfix main.conf";
+ description = "Add rspamd milter to postfix main.conf";
};
config = mkOption {
type = with types; attrsOf (oneOf [ bool str (listOf str) ]);
- description = lib.mdDoc ''
+ description = ''
Addon to postfix configuration
'';
default = {
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/rss2email.nix b/third_party/nixpkgs/nixos/modules/services/mail/rss2email.nix
index 4939f979ca..c3327f7b43 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/rss2email.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/rss2email.nix
@@ -15,24 +15,24 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable rss2email.";
+ description = "Whether to enable rss2email.";
};
to = mkOption {
type = types.str;
- description = lib.mdDoc "Mail address to which to send emails";
+ description = "Mail address to which to send emails";
};
interval = mkOption {
type = types.str;
default = "12h";
- description = lib.mdDoc "How often to check the feeds, in systemd interval format";
+ description = "How often to check the feeds, in systemd interval format";
};
config = mkOption {
type = with types; attrsOf (oneOf [ str int bool ]);
default = {};
- description = lib.mdDoc ''
+ description = ''
The configuration to give rss2email.
Default will use system-wide `sendmail` to send the
@@ -49,18 +49,18 @@ in {
};
feeds = mkOption {
- description = lib.mdDoc "The feeds to watch.";
+ description = "The feeds to watch.";
type = types.attrsOf (types.submodule {
options = {
url = mkOption {
type = types.str;
- description = lib.mdDoc "The URL at which to fetch the feed.";
+ description = "The URL at which to fetch the feed.";
};
to = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Email address to which to send feed items.
If `null`, this will not be set in the
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/schleuder.nix b/third_party/nixpkgs/nixos/modules/services/mail/schleuder.nix
index 2991418dd8..ca07b87907 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/schleuder.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/schleuder.nix
@@ -18,10 +18,10 @@ let
in
{
options.services.schleuder = {
- enable = lib.mkEnableOption (lib.mdDoc "Schleuder secure remailer");
- enablePostfix = lib.mkEnableOption (lib.mdDoc "automatic postfix integration") // { default = true; };
+ enable = lib.mkEnableOption "Schleuder secure remailer";
+ enablePostfix = lib.mkEnableOption "automatic postfix integration" // { default = true; };
lists = lib.mkOption {
- description = lib.mdDoc ''
+ description = ''
List of list addresses that should be handled by Schleuder.
Note that this is only handled by the postfix integration, and
@@ -42,7 +42,7 @@ in
};
*/
settings = lib.mkOption {
- description = lib.mdDoc ''
+ description = ''
Settings for schleuder.yml.
Check the [example configuration](https://0xacab.org/schleuder/schleuder/blob/master/etc/schleuder.yml) for possible values.
@@ -51,7 +51,7 @@ in
freeformType = settingsFormat.type;
options.keyserver = lib.mkOption {
type = lib.types.str;
- description = lib.mdDoc ''
+ description = ''
Key server from which to fetch and update keys.
Note that NixOS uses a different default from upstream, since the upstream default sks-keyservers.net is deprecated.
@@ -62,12 +62,12 @@ in
default = { };
};
extraSettingsFile = lib.mkOption {
- description = lib.mdDoc "YAML file to merge into the schleuder config at runtime. This can be used for secrets such as API keys.";
+ description = "YAML file to merge into the schleuder config at runtime. This can be used for secrets such as API keys.";
type = lib.types.nullOr lib.types.path;
default = null;
};
listDefaults = lib.mkOption {
- description = lib.mdDoc ''
+ description = ''
Default settings for lists (list-defaults.yml).
Check the [example configuration](https://0xacab.org/schleuder/schleuder/-/blob/master/etc/list-defaults.yml) for possible values.
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/spamassassin.nix b/third_party/nixpkgs/nixos/modules/services/mail/spamassassin.nix
index 072172e314..e51cc0239a 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/spamassassin.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/spamassassin.nix
@@ -12,17 +12,17 @@ in
options = {
services.spamassassin = {
- enable = mkEnableOption (lib.mdDoc "the SpamAssassin daemon");
+ enable = mkEnableOption "the SpamAssassin daemon";
debug = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to run the SpamAssassin daemon in debug mode";
+ description = "Whether to run the SpamAssassin daemon in debug mode";
};
config = mkOption {
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
The SpamAssassin local.cf config
If you are using this configuration:
@@ -57,7 +57,7 @@ in
initPreConf = mkOption {
type = with types; either str path;
- description = lib.mdDoc "The SpamAssassin init.pre config.";
+ description = "The SpamAssassin init.pre config.";
apply = val: if builtins.isPath val then val else pkgs.writeText "init.pre" val;
default =
''
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/stalwart-mail.nix b/third_party/nixpkgs/nixos/modules/services/mail/stalwart-mail.nix
index 8ab3497f7a..9cc919fd11 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/stalwart-mail.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/stalwart-mail.nix
@@ -10,13 +10,13 @@ let
in {
options.services.stalwart-mail = {
- enable = mkEnableOption (mdDoc "the Stalwart all-in-one email server");
+ enable = mkEnableOption "the Stalwart all-in-one email server";
package = mkPackageOption pkgs "stalwart-mail" { };
settings = mkOption {
inherit (configFormat) type;
default = { };
- description = mdDoc ''
+ description = ''
Configuration options for the Stalwart email server.
See for available options.
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/sympa.nix b/third_party/nixpkgs/nixos/modules/services/mail/sympa.nix
index 13fc8656a2..fa8d3b82aa 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/sympa.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/sympa.nix
@@ -80,13 +80,13 @@ in
###### interface
options.services.sympa = with types; {
- enable = mkEnableOption (lib.mdDoc "Sympa mailing list manager");
+ enable = mkEnableOption "Sympa mailing list manager";
lang = mkOption {
type = str;
default = "en_US";
example = "cs";
- description = lib.mdDoc ''
+ description = ''
Default Sympa language.
See
for available options.
@@ -96,7 +96,7 @@ in
listMasters = mkOption {
type = listOf str;
example = [ "postmaster@sympa.example.org" ];
- description = lib.mdDoc ''
+ description = ''
The list of the email addresses of the listmasters
(users authorized to perform global server commands).
'';
@@ -106,7 +106,7 @@ in
type = nullOr str;
default = null;
example = "lists.example.org";
- description = lib.mdDoc ''
+ description = ''
Main domain to be used in {file}`sympa.conf`.
If `null`, one of the {option}`services.sympa.domains` is chosen for you.
'';
@@ -119,7 +119,7 @@ in
type = nullOr str;
default = null;
example = "archive.example.org";
- description = lib.mdDoc ''
+ description = ''
Domain part of the web interface URL (no web interface for this domain if `null`).
DNS record of type A (or AAAA or CNAME) has to exist with this value.
'';
@@ -128,7 +128,7 @@ in
type = str;
default = "/";
example = "/sympa";
- description = lib.mdDoc "URL path part of the web interface.";
+ description = "URL path part of the web interface.";
};
settings = mkOption {
type = attrsOf (oneOf [ str int bool ]);
@@ -136,7 +136,7 @@ in
example = {
default_max_list_members = 3;
};
- description = lib.mdDoc ''
+ description = ''
The {file}`robot.conf` configuration file as key value set.
See
for list of configuration parameters.
@@ -149,7 +149,7 @@ in
};
}));
- description = lib.mdDoc ''
+ description = ''
Email domains handled by this instance. There have
to be MX records for keys of this attribute set.
'';
@@ -172,13 +172,13 @@ in
type = enum [ "SQLite" "PostgreSQL" "MySQL" ];
default = "SQLite";
example = "MySQL";
- description = lib.mdDoc "Database engine to use.";
+ description = "Database engine to use.";
};
host = mkOption {
type = nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Database host address.
For MySQL, use `localhost` to connect using Unix domain socket.
@@ -194,14 +194,14 @@ in
port = mkOption {
type = nullOr port;
default = null;
- description = lib.mdDoc "Database port. Use `null` for default port.";
+ description = "Database port. Use `null` for default port.";
};
name = mkOption {
type = str;
default = if cfg.database.type == "SQLite" then "${dataDir}/sympa.sqlite" else "sympa";
defaultText = literalExpression ''if database.type == "SQLite" then "${dataDir}/sympa.sqlite" else "sympa"'';
- description = lib.mdDoc ''
+ description = ''
Database name. When using SQLite this must be an absolute
path to the database file.
'';
@@ -210,14 +210,14 @@ in
user = mkOption {
type = nullOr str;
default = user;
- description = lib.mdDoc "Database user. The system user name is used as a default.";
+ description = "Database user. The system user name is used as a default.";
};
passwordFile = mkOption {
type = nullOr path;
default = null;
example = "/run/keys/sympa-dbpassword";
- description = lib.mdDoc ''
+ description = ''
A file containing the password for {option}`services.sympa.database.name`.
'';
};
@@ -225,7 +225,7 @@ in
createLocally = mkOption {
type = bool;
default = true;
- description = lib.mdDoc "Whether to create a local database automatically.";
+ description = "Whether to create a local database automatically.";
};
};
@@ -233,13 +233,13 @@ in
enable = mkOption {
type = bool;
default = true;
- description = lib.mdDoc "Whether to enable Sympa web interface.";
+ description = "Whether to enable Sympa web interface.";
};
server = mkOption {
type = enum [ "nginx" "none" ];
default = "nginx";
- description = lib.mdDoc ''
+ description = ''
The webserver used for the Sympa web interface. Set it to `none` if you want to configure it yourself.
Further nginx configuration can be done by adapting
{option}`services.nginx.virtualHosts.«name»`.
@@ -249,7 +249,7 @@ in
https = mkOption {
type = bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to use HTTPS. When nginx integration is enabled, this option forces SSL and enables ACME.
Please note that Sympa web interface always uses https links even when this option is disabled.
'';
@@ -258,7 +258,7 @@ in
fcgiProcs = mkOption {
type = ints.positive;
default = 2;
- description = lib.mdDoc "Number of FastCGI processes to fork.";
+ description = "Number of FastCGI processes to fork.";
};
};
@@ -266,7 +266,7 @@ in
type = mkOption {
type = enum [ "postfix" "none" ];
default = "postfix";
- description = lib.mdDoc ''
+ description = ''
Mail transfer agent (MTA) integration. Use `none` if you want to configure it yourself.
The `postfix` integration sets up local Postfix instance that will pass incoming
@@ -285,7 +285,7 @@ in
viewlogs_page_size = 50;
}
'';
- description = lib.mdDoc ''
+ description = ''
The {file}`sympa.conf` configuration file as key value set.
See
for list of configuration parameters.
@@ -298,16 +298,16 @@ in
enable = mkOption {
type = bool;
default = true;
- description = lib.mdDoc "Whether this file should be generated. This option allows specific files to be disabled.";
+ description = "Whether this file should be generated. This option allows specific files to be disabled.";
};
text = mkOption {
default = null;
type = nullOr lines;
- description = lib.mdDoc "Text of the file.";
+ description = "Text of the file.";
};
source = mkOption {
type = path;
- description = lib.mdDoc "Path of the source file.";
+ description = "Path of the source file.";
};
};
@@ -321,7 +321,7 @@ in
};
}
'';
- description = lib.mdDoc "Set of files to be linked in {file}`${dataDir}`.";
+ description = "Set of files to be linked in {file}`${dataDir}`.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/mail/zeyple.nix b/third_party/nixpkgs/nixos/modules/services/mail/zeyple.nix
index 9d4bc7f712..6f6a1799bc 100644
--- a/third_party/nixpkgs/nixos/modules/services/mail/zeyple.nix
+++ b/third_party/nixpkgs/nixos/modules/services/mail/zeyple.nix
@@ -16,12 +16,12 @@ let
'';
in {
options.services.zeyple = {
- enable = mkEnableOption (lib.mdDoc "Zeyple, an utility program to automatically encrypt outgoing emails with GPG");
+ enable = mkEnableOption "Zeyple, an utility program to automatically encrypt outgoing emails with GPG";
user = mkOption {
type = types.str;
default = "zeyple";
- description = lib.mdDoc ''
+ description = ''
User to run Zeyple as.
::: {.note}
@@ -35,7 +35,7 @@ in {
group = mkOption {
type = types.str;
default = "zeyple";
- description = lib.mdDoc ''
+ description = ''
Group to use to run Zeyple.
::: {.note}
@@ -49,7 +49,7 @@ in {
settings = mkOption {
type = ini.type;
default = { };
- description = lib.mdDoc ''
+ description = ''
Zeyple configuration. refer to
for details on supported values.
@@ -58,13 +58,13 @@ in {
keys = mkOption {
type = with types; listOf path;
- description = lib.mdDoc "List of public key files that will be imported by gpg.";
+ description = "List of public key files that will be imported by gpg.";
};
rotateLogs = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to enable rotation of log files.";
+ description = "Whether to enable rotation of log files.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/appservice-discord.nix b/third_party/nixpkgs/nixos/modules/services/matrix/appservice-discord.nix
index c2c3abb79f..7f3a1ed3e2 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/appservice-discord.nix
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/appservice-discord.nix
@@ -13,7 +13,7 @@ let
in {
options = {
services.matrix-appservice-discord = {
- enable = mkEnableOption (lib.mdDoc "a bridge between Matrix and Discord");
+ enable = mkEnableOption "a bridge between Matrix and Discord";
package = mkPackageOption pkgs "matrix-appservice-discord" { };
@@ -41,7 +41,7 @@ in {
};
}
'';
- description = lib.mdDoc ''
+ description = ''
{file}`config.yaml` configuration as a Nix attribute set.
Configuration options should match those described in
@@ -58,7 +58,7 @@ in {
environmentFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
File containing environment variables to be passed to the matrix-appservice-discord service,
in which secret tokens can be specified securely by defining values for
`APPSERVICE_DISCORD_AUTH_CLIENT_I_D` and
@@ -70,7 +70,7 @@ in {
type = types.str;
default = "http://localhost:${toString cfg.port}";
defaultText = literalExpression ''"http://localhost:''${toString config.${opt.port}}"'';
- description = lib.mdDoc ''
+ description = ''
The URL where the application service is listening for HS requests.
'';
};
@@ -78,7 +78,7 @@ in {
port = mkOption {
type = types.port;
default = 9005; # from https://github.com/Half-Shot/matrix-appservice-discord/blob/master/package.json#L11
- description = lib.mdDoc ''
+ description = ''
Port number on which the bridge should listen for internal communication with the Matrix homeserver.
'';
};
@@ -86,7 +86,7 @@ in {
localpart = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The user_id localpart to assign to the AS.
'';
};
@@ -97,7 +97,7 @@ in {
defaultText = literalExpression ''
optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit
'';
- description = lib.mdDoc ''
+ description = ''
List of Systemd services to require and wait for when starting the application service,
such as the Matrix homeserver if it's running on the same host.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/appservice-irc.nix b/third_party/nixpkgs/nixos/modules/services/matrix/appservice-irc.nix
index c79cd799b4..9079016914 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/appservice-irc.nix
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/appservice-irc.nix
@@ -26,30 +26,30 @@ let
registrationFile = "/var/lib/matrix-appservice-irc/registration.yml";
in {
options.services.matrix-appservice-irc = with types; {
- enable = mkEnableOption (lib.mdDoc "the Matrix/IRC bridge");
+ enable = mkEnableOption "the Matrix/IRC bridge";
port = mkOption {
type = port;
- description = lib.mdDoc "The port to listen on";
+ description = "The port to listen on";
default = 8009;
};
needBindingCap = mkOption {
type = bool;
- description = lib.mdDoc "Whether the daemon needs to bind to ports below 1024 (e.g. for the ident service)";
+ description = "Whether the daemon needs to bind to ports below 1024 (e.g. for the ident service)";
default = false;
};
passwordEncryptionKeyLength = mkOption {
type = ints.unsigned;
- description = lib.mdDoc "Length of the key to encrypt IRC passwords with";
+ description = "Length of the key to encrypt IRC passwords with";
default = 4096;
example = 8192;
};
registrationUrl = mkOption {
type = str;
- description = lib.mdDoc ''
+ description = ''
The URL where the application service is listening for homeserver requests,
from the Matrix homeserver perspective.
'';
@@ -58,12 +58,12 @@ in {
localpart = mkOption {
type = str;
- description = lib.mdDoc "The user_id localpart to assign to the appservice";
+ description = "The user_id localpart to assign to the appservice";
default = "appservice-irc";
};
settings = mkOption {
- description = lib.mdDoc ''
+ description = ''
Configuration for the appservice, see
for supported values
@@ -74,7 +74,7 @@ in {
options = {
homeserver = mkOption {
- description = lib.mdDoc "Homeserver configuration";
+ description = "Homeserver configuration";
default = {};
type = submodule {
freeformType = jsonType;
@@ -82,12 +82,12 @@ in {
options = {
url = mkOption {
type = str;
- description = lib.mdDoc "The URL to the home server for client-server API calls";
+ description = "The URL to the home server for client-server API calls";
};
domain = mkOption {
type = str;
- description = lib.mdDoc ''
+ description = ''
The 'domain' part for user IDs on this home server. Usually
(but not always) is the "domain name" part of the homeserver URL.
'';
@@ -98,21 +98,21 @@ in {
database = mkOption {
default = {};
- description = lib.mdDoc "Configuration for the database";
+ description = "Configuration for the database";
type = submodule {
freeformType = jsonType;
options = {
engine = mkOption {
type = str;
- description = lib.mdDoc "Which database engine to use";
+ description = "Which database engine to use";
default = "nedb";
example = "postgres";
};
connectionString = mkOption {
type = str;
- description = lib.mdDoc "The database connection string";
+ description = "The database connection string";
default = "nedb://var/lib/matrix-appservice-irc/data";
example = "postgres://username:password@host:port/databasename";
};
@@ -122,14 +122,14 @@ in {
ircService = mkOption {
default = {};
- description = lib.mdDoc "IRC bridge configuration";
+ description = "IRC bridge configuration";
type = submodule {
freeformType = jsonType;
options = {
passwordEncryptionKeyPath = mkOption {
type = str;
- description = lib.mdDoc ''
+ description = ''
Location of the key with which IRC passwords are encrypted
for storage. Will be generated on first run if not present.
'';
@@ -138,7 +138,7 @@ in {
servers = mkOption {
type = submodule { freeformType = jsonType; };
- description = lib.mdDoc "IRC servers to connect to";
+ description = "IRC servers to connect to";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/conduit.nix b/third_party/nixpkgs/nixos/modules/services/matrix/conduit.nix
index b0fc85dbda..e6685af562 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/conduit.nix
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/conduit.nix
@@ -11,11 +11,11 @@ in
{
meta.maintainers = with maintainers; [ pstn piegames ];
options.services.matrix-conduit = {
- enable = mkEnableOption (lib.mdDoc "matrix-conduit");
+ enable = mkEnableOption "matrix-conduit";
extraEnvironment = mkOption {
type = types.attrsOf types.str;
- description = lib.mdDoc "Extra Environment variables to pass to the conduit server.";
+ description = "Extra Environment variables to pass to the conduit server.";
default = {};
example = { RUST_BACKTRACE="yes"; };
};
@@ -29,50 +29,50 @@ in
global.server_name = mkOption {
type = types.str;
example = "example.com";
- description = lib.mdDoc "The server_name is the name of this server. It is used as a suffix for user # and room ids.";
+ description = "The server_name is the name of this server. It is used as a suffix for user # and room ids.";
};
global.port = mkOption {
type = types.port;
default = 6167;
- description = lib.mdDoc "The port Conduit will be running on. You need to set up a reverse proxy in your web server (e.g. apache or nginx), so all requests to /_matrix on port 443 and 8448 will be forwarded to the Conduit instance running on this port";
+ description = "The port Conduit will be running on. You need to set up a reverse proxy in your web server (e.g. apache or nginx), so all requests to /_matrix on port 443 and 8448 will be forwarded to the Conduit instance running on this port";
};
global.max_request_size = mkOption {
type = types.ints.positive;
default = 20000000;
- description = lib.mdDoc "Max request size in bytes. Don't forget to also change it in the proxy.";
+ description = "Max request size in bytes. Don't forget to also change it in the proxy.";
};
global.allow_registration = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether new users can register on this server.";
+ description = "Whether new users can register on this server.";
};
global.allow_encryption = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether new encrypted rooms can be created. Note: existing rooms will continue to work.";
+ description = "Whether new encrypted rooms can be created. Note: existing rooms will continue to work.";
};
global.allow_federation = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether this server federates with other servers.
'';
};
global.trusted_servers = mkOption {
type = types.listOf types.str;
default = [ "matrix.org" ];
- description = lib.mdDoc "Servers trusted with signing server keys.";
+ description = "Servers trusted with signing server keys.";
};
global.address = mkOption {
type = types.str;
default = "::1";
- description = lib.mdDoc "Address to listen on for connections by the reverse proxy/tls terminator.";
+ description = "Address to listen on for connections by the reverse proxy/tls terminator.";
};
global.database_path = mkOption {
type = types.str;
default = "/var/lib/matrix-conduit/";
readOnly = true;
- description = lib.mdDoc ''
+ description = ''
Path to the conduit database, the directory where conduit will save its data.
Note that due to using the DynamicUser feature of systemd, this value should not be changed
and is set to be read only.
@@ -82,7 +82,7 @@ in
type = types.enum [ "sqlite" "rocksdb" ];
default = "sqlite";
example = "rocksdb";
- description = lib.mdDoc ''
+ description = ''
The database backend for the service. Switching it on an existing
instance will require manual migration of data.
'';
@@ -90,7 +90,7 @@ in
global.allow_check_for_updates = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to allow Conduit to automatically contact
hourly to check for important Conduit news.
@@ -100,7 +100,7 @@ in
};
};
default = {};
- description = lib.mdDoc ''
+ description = ''
Generates the conduit.toml configuration file. Refer to
for details on supported values.
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/dendrite.nix b/third_party/nixpkgs/nixos/modules/services/matrix/dendrite.nix
index 244c15fbf7..5152dfadf2 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/dendrite.nix
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/dendrite.nix
@@ -7,18 +7,18 @@ let
in
{
options.services.dendrite = {
- enable = lib.mkEnableOption (lib.mdDoc "matrix.org dendrite");
+ enable = lib.mkEnableOption "matrix.org dendrite";
httpPort = lib.mkOption {
type = lib.types.nullOr lib.types.port;
default = 8008;
- description = lib.mdDoc ''
+ description = ''
The port to listen for HTTP requests on.
'';
};
httpsPort = lib.mkOption {
type = lib.types.nullOr lib.types.port;
default = null;
- description = lib.mdDoc ''
+ description = ''
The port to listen for HTTPS requests on.
'';
};
@@ -26,7 +26,7 @@ in
type = lib.types.nullOr lib.types.path;
example = "/var/lib/dendrite/server.cert";
default = null;
- description = lib.mdDoc ''
+ description = ''
The path to the TLS certificate.
```
@@ -38,7 +38,7 @@ in
type = lib.types.nullOr lib.types.path;
example = "/var/lib/dendrite/server.key";
default = null;
- description = lib.mdDoc ''
+ description = ''
The path to the TLS key.
```
@@ -50,7 +50,7 @@ in
type = lib.types.nullOr lib.types.path;
example = "/var/lib/dendrite/registration_secret";
default = null;
- description = lib.mdDoc ''
+ description = ''
Environment file as defined in {manpage}`systemd.exec(5)`.
Secrets may be passed to the service without adding them to the world-readable
Nix store, by specifying placeholder variables as the option value in Nix and
@@ -76,7 +76,7 @@ in
type = lib.types.listOf lib.types.str;
default = [ ];
example = [ "private_key:/path/to/my_private_key" ];
- description = lib.mdDoc ''
+ description = ''
This can be used to pass secrets to the systemd service without adding them to
the nix store.
To use the example setting, see the example of
@@ -91,7 +91,7 @@ in
server_name = lib.mkOption {
type = lib.types.str;
example = "example.com";
- description = lib.mdDoc ''
+ description = ''
The domain name of the server, with optional explicit port.
This is used by remote servers to connect to this server.
This is also the last part of your UserID.
@@ -102,7 +102,7 @@ in
lib.types.path
(lib.types.strMatching "^\\$CREDENTIALS_DIRECTORY/.+");
example = "$CREDENTIALS_DIRECTORY/private_key";
- description = lib.mdDoc ''
+ description = ''
The path to the signing private key file, used to sign
requests and events.
@@ -115,7 +115,7 @@ in
type = lib.types.listOf lib.types.str;
example = [ "matrix.org" ];
default = [ "matrix.org" "vector.im" ];
- description = lib.mdDoc ''
+ description = ''
Lists of domains that the server will trust as identity
servers to verify third party identifiers such as phone
numbers and email addresses
@@ -126,7 +126,7 @@ in
connection_string = lib.mkOption {
type = lib.types.str;
default = "file:federationapi.db";
- description = lib.mdDoc ''
+ description = ''
Database for the Appservice API.
'';
};
@@ -135,7 +135,7 @@ in
registration_disabled = lib.mkOption {
type = lib.types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to disable user registration to the server
without the shared secret.
'';
@@ -145,7 +145,7 @@ in
connection_string = lib.mkOption {
type = lib.types.str;
default = "file:federationapi.db";
- description = lib.mdDoc ''
+ description = ''
Database for the Federation API.
'';
};
@@ -154,7 +154,7 @@ in
connection_string = lib.mkOption {
type = lib.types.str;
default = "file:keyserver.db";
- description = lib.mdDoc ''
+ description = ''
Database for the Key Server (for end-to-end encryption).
'';
};
@@ -163,7 +163,7 @@ in
connection_string = lib.mkOption {
type = lib.types.str;
default = "file:relayapi.db";
- description = lib.mdDoc ''
+ description = ''
Database for the Relay Server.
'';
};
@@ -173,7 +173,7 @@ in
connection_string = lib.mkOption {
type = lib.types.str;
default = "file:mediaapi.db";
- description = lib.mdDoc ''
+ description = ''
Database for the Media API.
'';
};
@@ -181,7 +181,7 @@ in
base_path = lib.mkOption {
type = lib.types.str;
default = "${workingDir}/media_store";
- description = lib.mdDoc ''
+ description = ''
Storage path for uploaded media.
'';
};
@@ -190,7 +190,7 @@ in
connection_string = lib.mkOption {
type = lib.types.str;
default = "file:roomserver.db";
- description = lib.mdDoc ''
+ description = ''
Database for the Room Server.
'';
};
@@ -199,24 +199,24 @@ in
connection_string = lib.mkOption {
type = lib.types.str;
default = "file:syncserver.db";
- description = lib.mdDoc ''
+ description = ''
Database for the Sync API.
'';
};
};
options.sync_api.search = {
- enable = lib.mkEnableOption (lib.mdDoc "Dendrite's full-text search engine");
+ enable = lib.mkEnableOption "Dendrite's full-text search engine";
index_path = lib.mkOption {
type = lib.types.str;
default = "${workingDir}/searchindex";
- description = lib.mdDoc ''
+ description = ''
The path the search index will be created in.
'';
};
language = lib.mkOption {
type = lib.types.str;
default = "en";
- description = lib.mdDoc ''
+ description = ''
The language most likely to be used on the server - used when indexing, to
ensure the returned results match expectations. A full list of possible languages
can be found at https://github.com/blevesearch/bleve/tree/master/analysis/lang
@@ -228,7 +228,7 @@ in
connection_string = lib.mkOption {
type = lib.types.str;
default = "file:userapi_accounts.db";
- description = lib.mdDoc ''
+ description = ''
Database for the User API, accounts.
'';
};
@@ -237,7 +237,7 @@ in
connection_string = lib.mkOption {
type = lib.types.str;
default = "file:userapi_devices.db";
- description = lib.mdDoc ''
+ description = ''
Database for the User API, devices.
'';
};
@@ -248,7 +248,7 @@ in
connection_string = lib.mkOption {
type = lib.types.str;
default = "file:mscs.db";
- description = lib.mdDoc ''
+ description = ''
Database for exerimental MSC's.
'';
};
@@ -256,7 +256,7 @@ in
};
};
default = { };
- description = lib.mdDoc ''
+ description = ''
Configuration for dendrite, see:
for available options with which to populate settings.
@@ -265,7 +265,7 @@ in
openRegistration = lib.mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Allow open registration without secondary verification (reCAPTCHA).
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/hebbot.nix b/third_party/nixpkgs/nixos/modules/services/matrix/hebbot.nix
index ebf175464d..9f344fbe08 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/hebbot.nix
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/hebbot.nix
@@ -11,7 +11,7 @@ let
settingsFile = format.generate "config.toml" cfg.settings;
mkTemplateOption = templateName: mkOption {
type = types.path;
- description = lib.mdDoc ''
+ description = ''
A path to the Markdown file for the ${templateName}.
'';
};
@@ -22,7 +22,7 @@ in
enable = mkEnableOption "hebbot";
botPasswordFile = mkOption {
type = types.path;
- description = lib.mdDoc ''
+ description = ''
A path to the password file for your bot.
Consider using a path that does not end up in your Nix store
@@ -37,7 +37,7 @@ in
settings = mkOption {
type = format.type;
default = { };
- description = lib.mdDoc ''
+ description = ''
Configuration for Hebbot, see, for examples:
-
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/matrix-sliding-sync.nix b/third_party/nixpkgs/nixos/modules/services/matrix/matrix-sliding-sync.nix
index 8b22cd7dba..d273bba3e5 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/matrix-sliding-sync.nix
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/matrix-sliding-sync.nix
@@ -9,7 +9,7 @@ in
];
options.services.matrix-sliding-sync = {
- enable = lib.mkEnableOption (lib.mdDoc "sliding sync");
+ enable = lib.mkEnableOption "sliding sync";
package = lib.mkPackageOption pkgs "matrix-sliding-sync" { };
@@ -19,7 +19,7 @@ in
options = {
SYNCV3_SERVER = lib.mkOption {
type = lib.types.str;
- description = lib.mdDoc ''
+ description = ''
The destination homeserver to talk to not including `/_matrix/` e.g `https://matrix.example.org`.
'';
};
@@ -27,7 +27,7 @@ in
SYNCV3_DB = lib.mkOption {
type = lib.types.str;
default = "postgresql:///matrix-sliding-sync?host=/run/postgresql";
- description = lib.mdDoc ''
+ description = ''
The postgres connection string.
Refer to .
'';
@@ -37,18 +37,18 @@ in
type = lib.types.str;
default = "127.0.0.1:8009";
example = "[::]:8008";
- description = lib.mdDoc "The interface and port to listen on.";
+ description = "The interface and port or path (for unix socket) to listen on.";
};
SYNCV3_LOG_LEVEL = lib.mkOption {
type = lib.types.enum [ "trace" "debug" "info" "warn" "error" "fatal" ];
default = "info";
- description = lib.mdDoc "The level of verbosity for messages logged.";
+ description = "The level of verbosity for messages logged.";
};
};
};
default = { };
- description = lib.mdDoc ''
+ description = ''
Freeform environment variables passed to the sliding sync proxy.
Refer to for all supported values.
'';
@@ -57,7 +57,7 @@ in
createDatabase = lib.mkOption {
type = lib.types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable and configure `services.postgres` to ensure that the database user `matrix-sliding-sync`
and the database `matrix-sliding-sync` exist.
'';
@@ -65,7 +65,7 @@ in
environmentFile = lib.mkOption {
type = lib.types.str;
- description = lib.mdDoc ''
+ description = ''
Environment file as defined in {manpage}`systemd.exec(5)`.
This must contain the {env}`SYNCV3_SECRET` variable which should
@@ -98,6 +98,7 @@ in
ExecStart = lib.getExe cfg.package;
StateDirectory = "matrix-sliding-sync";
WorkingDirectory = "%S/matrix-sliding-sync";
+ RuntimeDirectory = "matrix-sliding-sync";
Restart = "on-failure";
RestartSec = "1s";
};
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/maubot.md b/third_party/nixpkgs/nixos/modules/services/matrix/maubot.md
index f6a05db56c..d49066057a 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/maubot.md
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/maubot.md
@@ -10,7 +10,9 @@ framework for Matrix.
2. If you want to use PostgreSQL instead of SQLite, do this:
```nix
- services.maubot.settings.database = "postgresql://maubot@localhost/maubot";
+ {
+ services.maubot.settings.database = "postgresql://maubot@localhost/maubot";
+ }
```
If the PostgreSQL connection requires a password, you will have to
@@ -18,54 +20,58 @@ framework for Matrix.
3. If you plan to expose your Maubot interface to the web, do something
like this:
```nix
- services.nginx.virtualHosts."matrix.example.org".locations = {
- "/_matrix/maubot/" = {
- proxyPass = "http://127.0.0.1:${toString config.services.maubot.settings.server.port}";
- proxyWebsockets = true;
+ {
+ services.nginx.virtualHosts."matrix.example.org".locations = {
+ "/_matrix/maubot/" = {
+ proxyPass = "http://127.0.0.1:${toString config.services.maubot.settings.server.port}";
+ proxyWebsockets = true;
+ };
};
- };
- services.maubot.settings.server.public_url = "matrix.example.org";
- # do the following only if you want to use something other than /_matrix/maubot...
- services.maubot.settings.server.ui_base_path = "/another/base/path";
+ services.maubot.settings.server.public_url = "matrix.example.org";
+ # do the following only if you want to use something other than /_matrix/maubot...
+ services.maubot.settings.server.ui_base_path = "/another/base/path";
+ }
```
4. Optionally, set `services.maubot.pythonPackages` to a list of python3
packages to make available for Maubot plugins.
5. Optionally, set `services.maubot.plugins` to a list of Maubot
plugins (full list available at https://plugins.maubot.xyz/):
```nix
- services.maubot.plugins = with config.services.maubot.package.plugins; [
- reactbot
- # This will only change the default config! After you create a
- # plugin instance, the default config will be copied into that
- # instance's config in Maubot's database, and further base config
- # changes won't affect the running plugin.
- (rss.override {
- base_config = {
- update_interval = 60;
- max_backoff = 7200;
- spam_sleep = 2;
- command_prefix = "rss";
- admins = [ "@chayleaf:pavluk.org" ];
- };
- })
- ];
- # ...or...
- services.maubot.plugins = config.services.maubot.package.plugins.allOfficialPlugins;
- # ...or...
- services.maubot.plugins = config.services.maubot.package.plugins.allPlugins;
- # ...or...
- services.maubot.plugins = with config.services.maubot.package.plugins; [
- (weather.override {
- # you can pass base_config as a string
- base_config = ''
- default_location: New York
- default_units: M
- default_language:
- show_link: true
- show_image: false
- '';
- })
- ];
+ {
+ services.maubot.plugins = with config.services.maubot.package.plugins; [
+ reactbot
+ # This will only change the default config! After you create a
+ # plugin instance, the default config will be copied into that
+ # instance's config in Maubot's database, and further base config
+ # changes won't affect the running plugin.
+ (rss.override {
+ base_config = {
+ update_interval = 60;
+ max_backoff = 7200;
+ spam_sleep = 2;
+ command_prefix = "rss";
+ admins = [ "@chayleaf:pavluk.org" ];
+ };
+ })
+ ];
+ # ...or...
+ services.maubot.plugins = config.services.maubot.package.plugins.allOfficialPlugins;
+ # ...or...
+ services.maubot.plugins = config.services.maubot.package.plugins.allPlugins;
+ # ...or...
+ services.maubot.plugins = with config.services.maubot.package.plugins; [
+ (weather.override {
+ # you can pass base_config as a string
+ base_config = ''
+ default_location: New York
+ default_units: M
+ default_language:
+ show_link: true
+ show_image: false
+ '';
+ })
+ ];
+ }
```
6. Start Maubot at least once before doing the following steps (it's
necessary to generate the initial config).
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/maubot.nix b/third_party/nixpkgs/nixos/modules/services/matrix/maubot.nix
index bc96ca03b1..7aea88bd27 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/maubot.nix
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/maubot.nix
@@ -57,7 +57,7 @@ let
in
{
options.services.maubot = with lib; {
- enable = mkEnableOption (mdDoc "maubot");
+ enable = mkEnableOption "maubot";
package = lib.mkPackageOption pkgs "maubot" { };
@@ -70,7 +70,7 @@ in
xyz.maubot.rss
];
'';
- description = mdDoc ''
+ description = ''
List of additional maubot plugins to make available.
'';
};
@@ -83,7 +83,7 @@ in
aiohttp
];
'';
- description = mdDoc ''
+ description = ''
List of additional Python packages to make available for maubot.
'';
};
@@ -91,7 +91,7 @@ in
dataDir = mkOption {
type = types.str;
default = "/var/lib/maubot";
- description = mdDoc ''
+ description = ''
The directory where maubot stores its stateful data.
'';
};
@@ -100,7 +100,7 @@ in
type = types.str;
default = "./config.yaml";
defaultText = literalExpression ''"''${config.services.maubot.dataDir}/config.yaml"'';
- description = mdDoc ''
+ description = ''
A file for storing secrets. You can pass homeserver registration keys here.
If it already exists, **it must contain `server.unshared_secret`** which is used for signing API keys.
If `configMutable` is not set to true, **maubot user must have write access to this file**.
@@ -110,14 +110,14 @@ in
configMutable = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Whether maubot should write updated config into `extraConfigFile`. **This will make your Nix module settings have no effect besides the initial config, as extraConfigFile takes precedence over NixOS settings!**
'';
};
settings = mkOption {
default = { };
- description = mdDoc ''
+ description = ''
YAML settings for maubot. See the
[example configuration](https://github.com/maubot/maubot/blob/master/maubot/example-config.yaml)
for more info.
@@ -130,7 +130,7 @@ in
type = str;
default = "sqlite:maubot.db";
example = "postgresql://username:password@hostname/dbname";
- description = mdDoc ''
+ description = ''
The full URI to the database. SQLite and Postgres are fully supported.
Other DBMSes supported by SQLAlchemy may or may not work.
'';
@@ -140,7 +140,7 @@ in
type = str;
default = "default";
example = "postgresql://username:password@hostname/dbname";
- description = mdDoc ''
+ description = ''
Separate database URL for the crypto database. By default, the regular database is also used for crypto.
'';
};
@@ -148,21 +148,21 @@ in
database_opts = mkOption {
type = types.attrs;
default = { };
- description = mdDoc ''
+ description = ''
Additional arguments for asyncpg.create_pool() or sqlite3.connect()
'';
};
plugin_directories = mkOption {
default = { };
- description = mdDoc "Plugin directory paths";
+ description = "Plugin directory paths";
type = submodule {
options = {
upload = mkOption {
type = types.str;
default = "./plugins";
defaultText = literalExpression ''"''${config.services.maubot.dataDir}/plugins"'';
- description = mdDoc ''
+ description = ''
The directory where uploaded new plugins should be stored.
'';
};
@@ -170,7 +170,7 @@ in
type = types.listOf types.str;
default = [ "./plugins" ];
defaultText = literalExpression ''[ "''${config.services.maubot.dataDir}/plugins" ]'';
- description = mdDoc ''
+ description = ''
The directories from which plugins should be loaded. Duplicate plugin IDs will be moved to the trash.
'';
};
@@ -178,7 +178,7 @@ in
type = with types; nullOr str;
default = "./trash";
defaultText = literalExpression ''"''${config.services.maubot.dataDir}/trash"'';
- description = mdDoc ''
+ description = ''
The directory where old plugin versions and conflicting plugins should be moved. Set to null to delete files immediately.
'';
};
@@ -187,7 +187,7 @@ in
};
plugin_databases = mkOption {
- description = mdDoc "Plugin database settings";
+ description = "Plugin database settings";
default = { };
type = submodule {
options = {
@@ -195,7 +195,7 @@ in
type = types.str;
default = "./plugins";
defaultText = literalExpression ''"''${config.services.maubot.dataDir}/plugins"'';
- description = mdDoc ''
+ description = ''
The directory where SQLite plugin databases should be stored.
'';
};
@@ -204,7 +204,7 @@ in
type = types.nullOr types.str;
default = if isPostgresql cfg.settings.database then "default" else null;
defaultText = literalExpression ''if isPostgresql config.services.maubot.settings.database then "default" else null'';
- description = mdDoc ''
+ description = ''
The connection URL for plugin database. See [example config](https://github.com/maubot/maubot/blob/master/maubot/example-config.yaml) for exact format.
'';
};
@@ -212,7 +212,7 @@ in
postgres_max_conns_per_plugin = mkOption {
type = types.nullOr types.int;
default = 3;
- description = mdDoc ''
+ description = ''
Maximum number of connections per plugin instance.
'';
};
@@ -220,7 +220,7 @@ in
postgres_opts = mkOption {
type = types.attrs;
default = { };
- description = mdDoc ''
+ description = ''
Overrides for the default database_opts when using a non-default postgres connection URL.
'';
};
@@ -230,20 +230,20 @@ in
server = mkOption {
default = { };
- description = mdDoc "Listener config";
+ description = "Listener config";
type = submodule {
options = {
hostname = mkOption {
type = types.str;
default = "127.0.0.1";
- description = mdDoc ''
+ description = ''
The IP to listen on
'';
};
port = mkOption {
type = types.port;
default = 29316;
- description = mdDoc ''
+ description = ''
The port to listen on
'';
};
@@ -251,14 +251,14 @@ in
type = types.str;
default = "http://${cfg.settings.server.hostname}:${toString cfg.settings.server.port}";
defaultText = literalExpression ''"http://''${config.services.maubot.settings.server.hostname}:''${toString config.services.maubot.settings.server.port}"'';
- description = mdDoc ''
+ description = ''
Public base URL where the server is visible.
'';
};
ui_base_path = mkOption {
type = types.str;
default = "/_matrix/maubot";
- description = mdDoc ''
+ description = ''
The base path for the UI.
'';
};
@@ -268,14 +268,14 @@ in
defaultText = literalExpression ''
"''${config.services.maubot.settings.server.ui_base_path}/plugin/"
'';
- description = mdDoc ''
+ description = ''
The base path for plugin endpoints. The instance ID will be appended directly.
'';
};
override_resource_path = mkOption {
type = types.nullOr types.str;
default = null;
- description = mdDoc ''
+ description = ''
Override path from where to load UI resources.
'';
};
@@ -288,7 +288,7 @@ in
options = {
url = mkOption {
type = types.str;
- description = mdDoc ''
+ description = ''
Client-server API URL
'';
};
@@ -299,7 +299,7 @@ in
url = "https://matrix-client.matrix.org";
};
};
- description = mdDoc ''
+ description = ''
Known homeservers. This is required for the `mbc auth` command and also allows more convenient access from the management UI.
If you want to specify registration secrets, pass this via extraConfigFile instead.
'';
@@ -308,7 +308,7 @@ in
admins = mkOption {
type = types.attrsOf types.str;
default = { root = ""; };
- description = mdDoc ''
+ description = ''
List of administrator users. Plaintext passwords will be bcrypted on startup. Set empty password
to prevent normal login. Root is a special user that can't have a password and will always exist.
'';
@@ -328,14 +328,14 @@ in
dev_open = true;
log = true;
};
- description = mdDoc ''
+ description = ''
API feature switches.
'';
};
logging = mkOption {
type = types.attrs;
- description = mdDoc ''
+ description = ''
Python logging configuration. See [section 16.7.2 of the Python
documentation](https://docs.python.org/3.6/library/logging.config.html#configuration-dictionary-schema)
for more info.
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/mautrix-facebook.nix b/third_party/nixpkgs/nixos/modules/services/matrix/mautrix-facebook.nix
index d7cf024bb8..4d5217ee43 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/mautrix-facebook.nix
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/mautrix-facebook.nix
@@ -17,7 +17,7 @@ let
in {
options = {
services.mautrix-facebook = {
- enable = mkEnableOption (lib.mdDoc "Mautrix-Facebook, a Matrix-Facebook hybrid puppeting/relaybot bridge");
+ enable = mkEnableOption "Mautrix-Facebook, a Matrix-Facebook hybrid puppeting/relaybot bridge";
settings = mkOption rec {
apply = recursiveUpdate default;
@@ -83,7 +83,7 @@ in {
};
}
'';
- description = lib.mdDoc ''
+ description = ''
{file}`config.yaml` configuration as a Nix attribute set.
Configuration options should match those described in
[example-config.yaml](https://github.com/mautrix/facebook/blob/master/mautrix_facebook/example-config.yaml).
@@ -96,7 +96,7 @@ in {
environmentFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
File containing environment variables to be passed to the mautrix-facebook service.
Any config variable can be overridden by setting `MAUTRIX_FACEBOOK_SOME_KEY` to override the `some.key` variable.
@@ -106,7 +106,7 @@ in {
configurePostgresql = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Enable PostgreSQL and create a user and database for mautrix-facebook. The default `settings` reference this database, if you disable this option you must provide a database URL.
'';
};
@@ -114,7 +114,7 @@ in {
registrationData = mkOption {
type = types.attrs;
default = {};
- description = lib.mdDoc ''
+ description = ''
Output data for appservice registration. Simply make any desired changes and serialize to JSON. Note that this data contains secrets so think twice before putting it into the nix store.
Currently `as_token` and `hs_token` need to be added as they are not known to this module.
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/mautrix-meta.nix b/third_party/nixpkgs/nixos/modules/services/matrix/mautrix-meta.nix
new file mode 100644
index 0000000000..f0905c3af1
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/mautrix-meta.nix
@@ -0,0 +1,562 @@
+{ config, pkgs, lib, ... }:
+
+let
+ settingsFormat = pkgs.formats.yaml {};
+
+ upperConfig = config;
+ cfg = config.services.mautrix-meta;
+ upperCfg = cfg;
+
+ fullDataDir = cfg: "/var/lib/${cfg.dataDir}";
+
+ settingsFile = cfg: "${fullDataDir cfg}/config.yaml";
+ settingsFileUnsubstituted = cfg: settingsFormat.generate "mautrix-meta-config.yaml" cfg.settings;
+
+ metaName = name: "mautrix-meta-${name}";
+
+ enabledInstances = lib.filterAttrs (name: config: config.enable) config.services.mautrix-meta.instances;
+ registerToSynapseInstances = lib.filterAttrs (name: config: config.enable && config.registerToSynapse) config.services.mautrix-meta.instances;
+in {
+ options = {
+ services.mautrix-meta = {
+
+ package = lib.mkPackageOption pkgs "mautrix-meta" { };
+
+ instances = lib.mkOption {
+ type = lib.types.attrsOf (lib.types.submodule ({ config, name, ... }: {
+
+ options = {
+
+ enable = lib.mkEnableOption "Mautrix-Meta, a Matrix <-> Facebook and Matrix <-> Instagram hybrid puppeting/relaybot bridge";
+
+ dataDir = lib.mkOption {
+ type = lib.types.str;
+ default = metaName name;
+ description = ''
+ Path to the directory with database, registration, and other data for the bridge service.
+ This path is relative to `/var/lib`, it cannot start with `../` (it cannot be outside of `/var/lib`).
+ '';
+ };
+
+ registrationFile = lib.mkOption {
+ type = lib.types.path;
+ readOnly = true;
+ description = ''
+ Path to the yaml registration file of the appservice.
+ '';
+ };
+
+ registerToSynapse = lib.mkOption {
+ type = lib.types.bool;
+ default = true;
+ description = ''
+ Whether to add registration file to `services.matrix-synapse.settings.app_service_config_files` and
+ make Synapse wait for registration service.
+ '';
+ };
+
+ settings = lib.mkOption rec {
+ apply = lib.recursiveUpdate default;
+ inherit (settingsFormat) type;
+ default = {
+ homeserver = {
+ software = "standard";
+
+ domain = "";
+ address = "";
+ };
+
+ appservice = {
+ id = "";
+
+ database = {
+ type = "sqlite3-fk-wal";
+ uri = "file:${fullDataDir config}/mautrix-meta.db?_txlock=immediate";
+ };
+
+ bot = {
+ username = "";
+ };
+
+ hostname = "localhost";
+ port = 29319;
+ address = "http://${config.settings.appservice.hostname}:${toString config.settings.appservice.port}";
+ };
+
+ meta = {
+ mode = "";
+ };
+
+ bridge = {
+ # Enable encryption by default to make the bridge more secure
+ encryption = {
+ allow = true;
+ default = true;
+ require = true;
+
+ # Recommended options from mautrix documentation
+ # for additional security.
+ delete_keys = {
+ dont_store_outbound = true;
+ ratchet_on_decrypt = true;
+ delete_fully_used_on_decrypt = true;
+ delete_prev_on_new_session = true;
+ delete_on_device_delete = true;
+ periodically_delete_expired = true;
+ delete_outdated_inbound = true;
+ };
+
+ verification_levels = {
+ receive = "cross-signed-tofu";
+ send = "cross-signed-tofu";
+ share = "cross-signed-tofu";
+ };
+ };
+
+ permissions = {};
+ };
+
+ logging = {
+ min_level = "info";
+ writers = lib.singleton {
+ type = "stdout";
+ format = "pretty-colored";
+ time_format = " ";
+ };
+ };
+ };
+ defaultText = ''
+ {
+ homeserver = {
+ software = "standard";
+ address = "https://''${config.settings.homeserver.domain}";
+ };
+
+ appservice = {
+ database = {
+ type = "sqlite3-fk-wal";
+ uri = "file:''${fullDataDir config}/mautrix-meta.db?_txlock=immediate";
+ };
+
+ hostname = "localhost";
+ port = 29319;
+ address = "http://''${config.settings.appservice.hostname}:''${toString config.settings.appservice.port}";
+ };
+
+ bridge = {
+ # Require encryption by default to make the bridge more secure
+ encryption = {
+ allow = true;
+ default = true;
+ require = true;
+
+ # Recommended options from mautrix documentation
+ # for optimal security.
+ delete_keys = {
+ dont_store_outbound = true;
+ ratchet_on_decrypt = true;
+ delete_fully_used_on_decrypt = true;
+ delete_prev_on_new_session = true;
+ delete_on_device_delete = true;
+ periodically_delete_expired = true;
+ delete_outdated_inbound = true;
+ };
+
+ verification_levels = {
+ receive = "cross-signed-tofu";
+ send = "cross-signed-tofu";
+ share = "cross-signed-tofu";
+ };
+ };
+ };
+
+ logging = {
+ min_level = "info";
+ writers = lib.singleton {
+ type = "stdout";
+ format = "pretty-colored";
+ time_format = " ";
+ };
+ };
+ };
+ '';
+ description = ''
+ {file}`config.yaml` configuration as a Nix attribute set.
+ Configuration options should match those described in
+ [example-config.yaml](https://github.com/mautrix/meta/blob/main/example-config.yaml).
+
+ Secret tokens should be specified using {option}`environmentFile`
+ instead
+ '';
+ };
+
+ environmentFile = lib.mkOption {
+ type = lib.types.nullOr lib.types.path;
+ default = null;
+ description = ''
+ File containing environment variables to substitute when copying the configuration
+ out of Nix store to the `services.mautrix-meta.dataDir`.
+
+ Can be used for storing the secrets without making them available in the Nix store.
+
+ For example, you can set `services.mautrix-meta.settings.appservice.as_token = "$MAUTRIX_META_APPSERVICE_AS_TOKEN"`
+ and then specify `MAUTRIX_META_APPSERVICE_AS_TOKEN="{token}"` in the environment file.
+ This value will get substituted into the configuration file as as token.
+ '';
+ };
+
+ serviceDependencies = lib.mkOption {
+ type = lib.types.listOf lib.types.str;
+ default =
+ [ config.registrationServiceUnit ] ++
+ (lib.lists.optional upperConfig.services.matrix-synapse.enable upperConfig.services.matrix-synapse.serviceUnit) ++
+ (lib.lists.optional upperConfig.services.matrix-conduit.enable "matrix-conduit.service") ++
+ (lib.lists.optional upperConfig.services.dendrite.enable "dendrite.service");
+
+ defaultText = ''
+ [ config.registrationServiceUnit ] ++
+ (lib.lists.optional upperConfig.services.matrix-synapse.enable upperConfig.services.matrix-synapse.serviceUnit) ++
+ (lib.lists.optional upperConfig.services.matrix-conduit.enable "matrix-conduit.service") ++
+ (lib.lists.optional upperConfig.services.dendrite.enable "dendrite.service");
+ '';
+ description = ''
+ List of Systemd services to require and wait for when starting the application service.
+ '';
+ };
+
+ serviceUnit = lib.mkOption {
+ type = lib.types.str;
+ readOnly = true;
+ description = ''
+ The systemd unit (a service or a target) for other services to depend on if they
+ need to be started after matrix-synapse.
+
+ This option is useful as the actual parent unit for all matrix-synapse processes
+ changes when configuring workers.
+ '';
+ };
+
+ registrationServiceUnit = lib.mkOption {
+ type = lib.types.str;
+ readOnly = true;
+ description = ''
+ The registration service that generates the registration file.
+
+ Systemd unit (a service or a target) for other services to depend on if they
+ need to be started after mautrix-meta registration service.
+
+ This option is useful as the actual parent unit for all matrix-synapse processes
+ changes when configuring workers.
+ '';
+ };
+ };
+
+ config = {
+ serviceUnit = (metaName name) + ".service";
+ registrationServiceUnit = (metaName name) + "-registration.service";
+ registrationFile = (fullDataDir config) + "/meta-registration.yaml";
+ };
+ }));
+
+ description = ''
+ Configuration of multiple `mautrix-meta` instances.
+ `services.mautrix-meta.instances.facebook` and `services.mautrix-meta.instances.instagram`
+ come preconfigured with meta.mode, appservice.id, bot username, display name and avatar.
+ '';
+
+ example = ''
+ {
+ facebook = {
+ enable = true;
+ settings = {
+ homeserver.domain = "example.com";
+ };
+ };
+
+ instagram = {
+ enable = true;
+ settings = {
+ homeserver.domain = "example.com";
+ };
+ };
+
+ messenger = {
+ enable = true;
+ settings = {
+ meta.mode = "messenger";
+ homeserver.domain = "example.com";
+ appservice = {
+ id = "messenger";
+ bot = {
+ username = "messengerbot";
+ displayname = "Messenger bridge bot";
+ avatar = "mxc://maunium.net/ygtkteZsXnGJLJHRchUwYWak";
+ };
+ };
+ };
+ };
+ }
+ '';
+ };
+ };
+ };
+
+ config = lib.mkMerge [
+ (lib.mkIf (enabledInstances != {}) {
+ assertions = lib.mkMerge (lib.attrValues (lib.mapAttrs (name: cfg: [
+ {
+ assertion = cfg.settings.homeserver.domain != "" && cfg.settings.homeserver.address != "";
+ message = ''
+ The options with information about the homeserver:
+ `services.mautrix-meta.instances.${name}.settings.homeserver.domain` and
+ `services.mautrix-meta.instances.${name}.settings.homeserver.address` have to be set.
+ '';
+ }
+ {
+ assertion = builtins.elem cfg.settings.meta.mode [ "facebook" "facebook-tor" "messenger" "instagram" ];
+ message = ''
+ The option `services.mautrix-meta.instances.${name}.settings.meta.mode` has to be set
+ to one of: facebook, facebook-tor, messenger, instagram.
+ This configures the mode of the bridge.
+ '';
+ }
+ {
+ assertion = cfg.settings.bridge.permissions != {};
+ message = ''
+ The option `services.mautrix-meta.instances.${name}.settings.bridge.permissions` has to be set.
+ '';
+ }
+ {
+ assertion = cfg.settings.appservice.id != "";
+ message = ''
+ The option `services.mautrix-meta.instances.${name}.settings.appservice.id` has to be set.
+ '';
+ }
+ {
+ assertion = cfg.settings.appservice.bot.username != "";
+ message = ''
+ The option `services.mautrix-meta.instances.${name}.settings.appservice.bot.username` has to be set.
+ '';
+ }
+ ]) enabledInstances));
+
+ users.users = lib.mapAttrs' (name: cfg: lib.nameValuePair "mautrix-meta-${name}" {
+ isSystemUser = true;
+ group = "mautrix-meta";
+ extraGroups = [ "mautrix-meta-registration" ];
+ description = "Mautrix-Meta-${name} bridge user";
+ }) enabledInstances;
+
+ users.groups.mautrix-meta = {};
+ users.groups.mautrix-meta-registration = {
+ members = lib.lists.optional config.services.matrix-synapse.enable "matrix-synapse";
+ };
+
+ services.matrix-synapse = lib.mkIf (config.services.matrix-synapse.enable) (let
+ registrationFiles = lib.attrValues
+ (lib.mapAttrs (name: cfg: cfg.registrationFile) registerToSynapseInstances);
+ in {
+ settings.app_service_config_files = registrationFiles;
+ });
+
+ systemd.services = lib.mkMerge [
+ {
+ matrix-synapse = lib.mkIf (config.services.matrix-synapse.enable) (let
+ registrationServices = lib.attrValues
+ (lib.mapAttrs (name: cfg: cfg.registrationServiceUnit) registerToSynapseInstances);
+ in {
+ wants = registrationServices;
+ after = registrationServices;
+ });
+ }
+
+ (lib.mapAttrs' (name: cfg: lib.nameValuePair "${metaName name}-registration" {
+ description = "Mautrix-Meta registration generation service - ${metaName name}";
+
+ path = [
+ pkgs.yq
+ pkgs.envsubst
+ upperCfg.package
+ ];
+
+ script = ''
+ # substitute the settings file by environment variables
+ # in this case read from EnvironmentFile
+ rm -f '${settingsFile cfg}'
+ old_umask=$(umask)
+ umask 0177
+ envsubst \
+ -o '${settingsFile cfg}' \
+ -i '${settingsFileUnsubstituted cfg}'
+
+ config_has_tokens=$(yq '.appservice | has("as_token") and has("hs_token")' '${settingsFile cfg}')
+ registration_already_exists=$([[ -f '${cfg.registrationFile}' ]] && echo "true" || echo "false")
+
+ echo "There are tokens in the config: $config_has_tokens"
+ echo "Registration already existed: $registration_already_exists"
+
+ # tokens not configured from config/environment file, and registration file
+ # is already generated, override tokens in config to make sure they are not lost
+ if [[ $config_has_tokens == "false" && $registration_already_exists == "true" ]]; then
+ echo "Copying as_token, hs_token from registration into configuration"
+ yq -sY '.[0].appservice.as_token = .[1].as_token
+ | .[0].appservice.hs_token = .[1].hs_token
+ | .[0]' '${settingsFile cfg}' '${cfg.registrationFile}' \
+ > '${settingsFile cfg}.tmp'
+ mv '${settingsFile cfg}.tmp' '${settingsFile cfg}'
+ fi
+
+ # make sure --generate-registration does not affect config.yaml
+ cp '${settingsFile cfg}' '${settingsFile cfg}.tmp'
+
+ echo "Generating registration file"
+ mautrix-meta \
+ --generate-registration \
+ --config='${settingsFile cfg}.tmp' \
+ --registration='${cfg.registrationFile}'
+
+ rm '${settingsFile cfg}.tmp'
+
+ # no tokens configured, and new were just generated by generate registration for first time
+ if [[ $config_has_tokens == "false" && $registration_already_exists == "false" ]]; then
+ echo "Copying newly generated as_token, hs_token from registration into configuration"
+ yq -sY '.[0].appservice.as_token = .[1].as_token
+ | .[0].appservice.hs_token = .[1].hs_token
+ | .[0]' '${settingsFile cfg}' '${cfg.registrationFile}' \
+ > '${settingsFile cfg}.tmp'
+ mv '${settingsFile cfg}.tmp' '${settingsFile cfg}'
+ fi
+
+ # Make sure correct tokens are in the registration file
+ if [[ $config_has_tokens == "true" || $registration_already_exists == "true" ]]; then
+ echo "Copying as_token, hs_token from configuration to the registration file"
+ yq -sY '.[1].as_token = .[0].appservice.as_token
+ | .[1].hs_token = .[0].appservice.hs_token
+ | .[1]' '${settingsFile cfg}' '${cfg.registrationFile}' \
+ > '${cfg.registrationFile}.tmp'
+ mv '${cfg.registrationFile}.tmp' '${cfg.registrationFile}'
+ fi
+
+ umask $old_umask
+
+ chown :mautrix-meta-registration '${cfg.registrationFile}'
+ chmod 640 '${cfg.registrationFile}'
+ '';
+
+ serviceConfig = {
+ Type = "oneshot";
+ UMask = 0027;
+
+ User = "mautrix-meta-${name}";
+ Group = "mautrix-meta";
+
+ SystemCallFilter = [ "@system-service" ];
+
+ ProtectSystem = "strict";
+ ProtectHome = true;
+
+ ReadWritePaths = fullDataDir cfg;
+ StateDirectory = cfg.dataDir;
+ EnvironmentFile = cfg.environmentFile;
+ };
+
+ restartTriggers = [ (settingsFileUnsubstituted cfg) ];
+ }) enabledInstances)
+
+ (lib.mapAttrs' (name: cfg: lib.nameValuePair "${metaName name}" {
+ description = "Mautrix-Meta bridge - ${metaName name}";
+ wantedBy = [ "multi-user.target" ];
+ wants = [ "network-online.target" ] ++ cfg.serviceDependencies;
+ after = [ "network-online.target" ] ++ cfg.serviceDependencies;
+
+ serviceConfig = {
+ Type = "simple";
+
+ User = "mautrix-meta-${name}";
+ Group = "mautrix-meta";
+ PrivateUsers = true;
+
+ LockPersonality = true;
+ MemoryDenyWriteExecute = true;
+ NoNewPrivileges = true;
+ PrivateDevices = true;
+ PrivateTmp = true;
+ ProtectClock = true;
+ ProtectControlGroups = true;
+ ProtectHome = true;
+ ProtectHostname = true;
+ ProtectKernelLogs = true;
+ ProtectKernelModules = true;
+ ProtectKernelTunables = true;
+ ProtectSystem = "strict";
+ Restart = "on-failure";
+ RestartSec = "30s";
+ RestrictRealtime = true;
+ RestrictSUIDSGID = true;
+ SystemCallArchitectures = "native";
+ SystemCallErrorNumber = "EPERM";
+ SystemCallFilter = ["@system-service"];
+ UMask = 0027;
+
+ WorkingDirectory = fullDataDir cfg;
+ ReadWritePaths = fullDataDir cfg;
+ StateDirectory = cfg.dataDir;
+ EnvironmentFile = cfg.environmentFile;
+
+ ExecStart = lib.escapeShellArgs [
+ (lib.getExe upperCfg.package)
+ "--config=${settingsFile cfg}"
+ ];
+ };
+ restartTriggers = [ (settingsFileUnsubstituted cfg) ];
+ }) enabledInstances)
+ ];
+ })
+ {
+ services.mautrix-meta.instances = let
+ inherit (lib.modules) mkDefault;
+ in {
+ instagram = {
+ settings = {
+ meta.mode = mkDefault "instagram";
+
+ bridge = {
+ username_template = mkDefault "instagram_{{.}}";
+ };
+
+ appservice = {
+ id = mkDefault "instagram";
+ port = mkDefault 29320;
+ bot = {
+ username = mkDefault "instagrambot";
+ displayname = mkDefault "Instagram bridge bot";
+ avatar = mkDefault "mxc://maunium.net/JxjlbZUlCPULEeHZSwleUXQv";
+ };
+ };
+ };
+ };
+ facebook = {
+ settings = {
+ meta.mode = mkDefault "facebook";
+
+ bridge = {
+ username_template = mkDefault "facebook_{{.}}";
+ };
+
+ appservice = {
+ id = mkDefault "facebook";
+ port = mkDefault 29321;
+ bot = {
+ username = mkDefault "facebookbot";
+ displayname = mkDefault "Facebook bridge bot";
+ avatar = mkDefault "mxc://maunium.net/ygtkteZsXnGJLJHRchUwYWak";
+ };
+ };
+ };
+ };
+ };
+ }
+ ];
+
+ meta.maintainers = with lib.maintainers; [ rutherther ];
+}
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/mautrix-telegram.nix b/third_party/nixpkgs/nixos/modules/services/matrix/mautrix-telegram.nix
index 168c8bf436..a1ffaf9deb 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/mautrix-telegram.nix
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/mautrix-telegram.nix
@@ -13,7 +13,7 @@ let
in {
options = {
services.mautrix-telegram = {
- enable = mkEnableOption (lib.mdDoc "Mautrix-Telegram, a Matrix-Telegram hybrid puppeting/relaybot bridge");
+ enable = mkEnableOption "Mautrix-Telegram, a Matrix-Telegram hybrid puppeting/relaybot bridge";
settings = mkOption rec {
apply = recursiveUpdate default;
@@ -85,7 +85,7 @@ in {
};
}
'';
- description = lib.mdDoc ''
+ description = ''
{file}`config.yaml` configuration as a Nix attribute set.
Configuration options should match those described in
[example-config.yaml](https://github.com/mautrix/telegram/blob/master/mautrix_telegram/example-config.yaml).
@@ -98,7 +98,7 @@ in {
environmentFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
File containing environment variables to be passed to the mautrix-telegram service,
in which secret tokens can be specified securely by defining values for e.g.
`MAUTRIX_TELEGRAM_APPSERVICE_AS_TOKEN`,
@@ -126,7 +126,7 @@ in {
defaultText = literalExpression ''
optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit
'';
- description = lib.mdDoc ''
+ description = ''
List of Systemd services to require and wait for when starting the application service.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/mautrix-whatsapp.nix b/third_party/nixpkgs/nixos/modules/services/matrix/mautrix-whatsapp.nix
index 4b561a4b07..31f64c16d7 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/mautrix-whatsapp.nix
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/mautrix-whatsapp.nix
@@ -47,12 +47,12 @@
in {
options.services.mautrix-whatsapp = {
- enable = lib.mkEnableOption (lib.mdDoc "mautrix-whatsapp, a puppeting/relaybot bridge between Matrix and WhatsApp.");
+ enable = lib.mkEnableOption "mautrix-whatsapp, a puppeting/relaybot bridge between Matrix and WhatsApp.";
settings = lib.mkOption {
type = settingsFormat.type;
default = defaultConfig;
- description = lib.mdDoc ''
+ description = ''
{file}`config.yaml` configuration as a Nix attribute set.
Configuration options should match those described in
[example-config.yaml](https://github.com/mautrix/whatsapp/blob/master/example-config.yaml).
@@ -91,7 +91,7 @@ in {
environmentFile = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
File containing environment variables to be passed to the mautrix-whatsapp service,
in which secret tokens can be specified securely by optionally defining a value for
`MAUTRIX_WHATSAPP_BRIDGE_LOGIN_SHARED_SECRET`.
@@ -104,7 +104,7 @@ in {
defaultText = lib.literalExpression ''
optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnits
'';
- description = lib.mdDoc ''
+ description = ''
List of Systemd services to require and wait for when starting the application service.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/mjolnir.md b/third_party/nixpkgs/nixos/modules/services/matrix/mjolnir.md
index f6994eeb8f..2594f05ce2 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/mjolnir.md
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/mjolnir.md
@@ -46,7 +46,7 @@ autoconfigure a new Pantalaimon instance, which will connect to the homeserver
set in [services.mjolnir.homeserverUrl](#opt-services.mjolnir.homeserverUrl) and Mjolnir itself
will be configured to connect to the new Pantalaimon instance.
-```
+```nix
{
services.mjolnir = {
enable = true;
@@ -78,7 +78,7 @@ uses across an entire homeserver.
To use the Antispam Module, add `matrix-synapse-plugins.matrix-synapse-mjolnir-antispam`
to the Synapse plugin list and enable the `mjolnir.Module` module.
-```
+```nix
{
services.matrix-synapse = {
plugins = with pkgs; [
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/mjolnir.nix b/third_party/nixpkgs/nixos/modules/services/matrix/mjolnir.nix
index 4e9a915c23..d01c058e73 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/mjolnir.nix
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/mjolnir.nix
@@ -65,12 +65,12 @@ let
in
{
options.services.mjolnir = {
- enable = mkEnableOption (lib.mdDoc "Mjolnir, a moderation tool for Matrix");
+ enable = mkEnableOption "Mjolnir, a moderation tool for Matrix";
homeserverUrl = mkOption {
type = types.str;
default = "https://matrix.org";
- description = lib.mdDoc ''
+ description = ''
Where the homeserver is located (client-server URL).
If `pantalaimon.enable` is `true`, this option will become the homeserver to which `pantalaimon` connects.
@@ -81,13 +81,13 @@ in
accessTokenFile = mkOption {
type = with types; nullOr path;
default = null;
- description = lib.mdDoc ''
+ description = ''
File containing the matrix access token for the `mjolnir` user.
'';
};
pantalaimon = mkOption {
- description = lib.mdDoc ''
+ description = ''
`pantalaimon` options (enables E2E Encryption support).
This will create a `pantalaimon` instance with the name "mjolnir".
@@ -95,20 +95,20 @@ in
default = { };
type = types.submodule {
options = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
ignoring the accessToken. If true, accessToken is ignored and the username/password below will be
used instead. The access token of the bot will be stored in the dataPath
- '');
+ '';
username = mkOption {
type = types.str;
- description = lib.mdDoc "The username to login with.";
+ description = "The username to login with.";
};
passwordFile = mkOption {
type = with types; nullOr path;
default = null;
- description = lib.mdDoc ''
+ description = ''
File containing the matrix password for the `mjolnir` user.
'';
};
@@ -116,7 +116,7 @@ in
options = mkOption {
type = types.submodule (import ./pantalaimon-options.nix);
default = { };
- description = lib.mdDoc ''
+ description = ''
passthrough additional options to the `pantalaimon` service.
'';
};
@@ -127,7 +127,7 @@ in
dataPath = mkOption {
type = types.path;
default = "/var/lib/mjolnir";
- description = lib.mdDoc ''
+ description = ''
The directory the bot should store various bits of information in.
'';
};
@@ -135,7 +135,7 @@ in
managementRoom = mkOption {
type = types.str;
default = "#moderators:example.org";
- description = lib.mdDoc ''
+ description = ''
The room ID where people can use the bot. The bot has no access controls, so
anyone in this room can use the bot - secure your room!
This should be a room alias or room ID - not a matrix.to URL.
@@ -152,7 +152,7 @@ in
"https://matrix.to/#/#anotherroom:example.org"
]
'';
- description = lib.mdDoc ''
+ description = ''
A list of rooms to protect (matrix.to URLs).
'';
};
@@ -166,7 +166,7 @@ in
automaticallyRedactForReasons = [ "spam" "advertising" ];
}
'';
- description = lib.mdDoc ''
+ description = ''
Additional settings (see [mjolnir default config](https://github.com/matrix-org/mjolnir/blob/main/config/default.yaml) for available settings). These settings will override settings made by the module config.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/mx-puppet-discord.nix b/third_party/nixpkgs/nixos/modules/services/matrix/mx-puppet-discord.nix
index 70828804b5..2b3a461931 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/mx-puppet-discord.nix
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/mx-puppet-discord.nix
@@ -12,10 +12,10 @@ let
in {
options = {
services.mx-puppet-discord = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
mx-puppet-discord is a discord puppeting bridge for matrix.
It handles bridging private and group DMs, as well as Guilds (servers)
- '');
+ '';
settings = mkOption rec {
apply = recursiveUpdate default;
@@ -57,7 +57,7 @@ in {
relay.whitelist = [ "@.*:example.com" ];
}
'';
- description = lib.mdDoc ''
+ description = ''
{file}`config.yaml` configuration as a Nix attribute set.
Configuration options should match those described in
[
@@ -70,7 +70,7 @@ in {
defaultText = literalExpression ''
optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit
'';
- description = lib.mdDoc ''
+ description = ''
List of Systemd services to require and wait for when starting the application service.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/pantalaimon-options.nix b/third_party/nixpkgs/nixos/modules/services/matrix/pantalaimon-options.nix
index 3945a70fc8..4243513788 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/pantalaimon-options.nix
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/pantalaimon-options.nix
@@ -6,7 +6,7 @@ with lib;
dataPath = mkOption {
type = types.path;
default = "/var/lib/pantalaimon-${name}";
- description = lib.mdDoc ''
+ description = ''
The directory where `pantalaimon` should store its state such as the database file.
'';
};
@@ -14,7 +14,7 @@ with lib;
logLevel = mkOption {
type = types.enum [ "info" "warning" "error" "debug" ];
default = "warning";
- description = lib.mdDoc ''
+ description = ''
Set the log level of the daemon.
'';
};
@@ -22,7 +22,7 @@ with lib;
homeserver = mkOption {
type = types.str;
example = "https://matrix.org";
- description = lib.mdDoc ''
+ description = ''
The URI of the homeserver that the `pantalaimon` proxy should
forward requests to, without the matrix API path but including
the http(s) schema.
@@ -32,7 +32,7 @@ with lib;
ssl = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether or not SSL verification should be enabled for outgoing
connections to the homeserver.
'';
@@ -41,7 +41,7 @@ with lib;
listenAddress = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc ''
+ description = ''
The address where the daemon will listen to client connections
for this homeserver.
'';
@@ -50,7 +50,7 @@ with lib;
listenPort = mkOption {
type = types.port;
default = 8009;
- description = lib.mdDoc ''
+ description = ''
The port where the daemon will listen to client connections for
this homeserver. Note that the listen address/port combination
needs to be unique between different homeservers.
@@ -60,7 +60,7 @@ with lib;
extraSettings = mkOption {
type = types.attrs;
default = { };
- description = lib.mdDoc ''
+ description = ''
Extra configuration options. See
[pantalaimon(5)](https://github.com/matrix-org/pantalaimon/blob/master/docs/man/pantalaimon.5.md)
for available options.
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/pantalaimon.nix b/third_party/nixpkgs/nixos/modules/services/matrix/pantalaimon.nix
index 591ba9a7ab..6f3fefdb34 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/pantalaimon.nix
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/pantalaimon.nix
@@ -51,7 +51,7 @@ in
options.services.pantalaimon-headless.instances = mkOption {
default = { };
type = types.attrsOf (types.submodule (import ./pantalaimon-options.nix));
- description = lib.mdDoc ''
+ description = ''
Declarative instance config.
Note: to use pantalaimon interactively, e.g. for a Matrix client which does not
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/synapse.md b/third_party/nixpkgs/nixos/modules/services/matrix/synapse.md
index 9c9c025fc5..0ce13550d5 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/synapse.md
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/synapse.md
@@ -18,12 +18,32 @@ around Matrix.
[Synapse](https://github.com/element-hq/synapse) is
the reference homeserver implementation of Matrix from the core development
-team at matrix.org. The following configuration example will set up a
+team at matrix.org.
+
+Before deploying synapse server, a postgresql database must be set up.
+For that, please make sure that postgresql is running and the following
+SQL statements to create a user & database called `matrix-synapse` were
+executed before synapse starts up:
+
+```sql
+CREATE ROLE "matrix-synapse";
+CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
+ TEMPLATE template0
+ LC_COLLATE = "C"
+ LC_CTYPE = "C";
+```
+
+Usually, it's sufficient to do this once manually before
+continuing with the installation.
+
+Please make sure to set a different password.
+
+The following configuration example will set up a
synapse server for the `example.org` domain, served from
the host `myhostname.example.org`. For more information,
please refer to the
[installation instructions of Synapse](https://element-hq.github.io/synapse/latest/setup/installation.html) .
-```
+```nix
{ pkgs, lib, config, ... }:
let
fqdn = "${config.networking.hostName}.${config.networking.domain}";
@@ -41,13 +61,6 @@ in {
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.postgresql.enable = true;
- services.postgresql.initialScript = pkgs.writeText "synapse-init.sql" ''
- CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse';
- CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
- TEMPLATE template0
- LC_COLLATE = "C"
- LC_CTYPE = "C";
- '';
services.nginx = {
enable = true;
@@ -158,7 +171,7 @@ in an additional file like this:
by `matrix-synapse`.
- Include the file like this in your configuration:
- ```
+ ```nix
{
services.matrix-synapse.extraConfigFiles = [
"/run/secrets/matrix-shared-secret"
@@ -190,7 +203,7 @@ fill in the required connection details automatically when you enter your
Matrix Identifier. See
[Try Matrix Now!](https://matrix.org/docs/projects/try-matrix-now.html)
for a list of existing clients and their supported featureset.
-```
+```nix
{
services.nginx.virtualHosts."element.${fqdn}" = {
enableACME = true;
diff --git a/third_party/nixpkgs/nixos/modules/services/matrix/synapse.nix b/third_party/nixpkgs/nixos/modules/services/matrix/synapse.nix
index e3f9c7742c..bc88fb5301 100644
--- a/third_party/nixpkgs/nixos/modules/services/matrix/synapse.nix
+++ b/third_party/nixpkgs/nixos/modules/services/matrix/synapse.nix
@@ -219,7 +219,7 @@ in {
type = types.nullOr types.port;
default = null;
example = 8448;
- description = lib.mdDoc ''
+ description = ''
The port to listen for HTTP(S) requests on.
'';
};
@@ -245,7 +245,7 @@ in {
"0.0.0.0"
]
'';
- description = lib.mdDoc ''
+ description = ''
IP addresses to bind the listener to.
'';
};
@@ -288,7 +288,7 @@ in {
];
default = "http";
example = "metrics";
- description = lib.mdDoc ''
+ description = ''
The type of the listener, usually http.
'';
};
@@ -303,7 +303,7 @@ in {
Enabled for the main instance listener, unless it is configured with a UNIX domain socket path.
'';
example = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable TLS on the listener socket.
::: {.note}
@@ -319,7 +319,7 @@ in {
Enabled if the listener is configured with a UNIX domain socket path
'';
example = true;
- description = lib.mdDoc ''
+ description = ''
Use the X-Forwarded-For (XFF) header as the client IP and not the
actual client IP.
'';
@@ -341,7 +341,7 @@ in {
"replication"
"static"
]);
- description = lib.mdDoc ''
+ description = ''
List of resources to host on this listener.
'';
example = [
@@ -351,7 +351,7 @@ in {
compress = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether synapse should compress HTTP responses to clients that support it.
This should be disabled if running synapse behind a load balancer
that can do automatic compression.
@@ -359,7 +359,7 @@ in {
};
};
});
- description = lib.mdDoc ''
+ description = ''
List of HTTP resources to serve on this listener.
'';
};
@@ -367,7 +367,7 @@ in {
});
in {
services.matrix-synapse = {
- enable = mkEnableOption (lib.mdDoc "matrix.org synapse");
+ enable = mkEnableOption "matrix.org synapse, the reference homeserver";
enableRegistrationScript = mkOption {
type = types.bool;
@@ -389,7 +389,7 @@ in {
serviceUnit = lib.mkOption {
type = lib.types.str;
readOnly = true;
- description = lib.mdDoc ''
+ description = ''
The systemd unit (a service or a target) for other services to depend on if they
need to be started after matrix-synapse.
@@ -401,7 +401,7 @@ in {
configFile = mkOption {
type = types.path;
readOnly = true;
- description = lib.mdDoc ''
+ description = ''
Path to the configuration file on the target system. Useful to configure e.g. workers
that also need this.
'';
@@ -410,7 +410,7 @@ in {
package = mkOption {
type = types.package;
readOnly = true;
- description = lib.mdDoc ''
+ description = ''
Reference to the `matrix-synapse` wrapper with all extras
(e.g. for `oidc` or `saml2`) added to the `PYTHONPATH` of all executables.
@@ -445,7 +445,7 @@ in {
"user-search" # Support internationalized domain names in user-search
]
'';
- description = lib.mdDoc ''
+ description = ''
Explicitly install extras provided by matrix-synapse. Most
will require some additional configuration.
@@ -467,7 +467,7 @@ in {
matrix-synapse-pam
];
'';
- description = lib.mdDoc ''
+ description = ''
List of additional Matrix plugins to make available.
'';
};
@@ -475,7 +475,7 @@ in {
withJemalloc = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to preload jemalloc to reduce memory fragmentation and overall usage.
'';
};
@@ -483,7 +483,7 @@ in {
dataDir = mkOption {
type = types.str;
default = "/var/lib/matrix-synapse";
- description = lib.mdDoc ''
+ description = ''
The directory where matrix-synapse stores its stateful data such as
certificates, media and uploads.
'';
@@ -492,7 +492,7 @@ in {
log = mkOption {
type = types.attrsOf format.type;
defaultText = literalExpression defaultCommonLogConfigText;
- description = mdDoc ''
+ description = ''
Default configuration for the loggers used by `matrix-synapse` and its workers.
The defaults are added with the default priority which means that
these will be merged with additional declarations. These additional
@@ -534,7 +534,7 @@ in {
settings = mkOption {
default = { };
- description = mdDoc ''
+ description = ''
The primary synapse configuration. See the
[sample configuration](https://github.com/element-hq/synapse/blob/v${pkgs.matrix-synapse-unwrapped.version}/docs/sample_config.yaml)
for possible values.
@@ -553,7 +553,7 @@ in {
example = "example.com";
default = config.networking.hostName;
defaultText = literalExpression "config.networking.hostName";
- description = lib.mdDoc ''
+ description = ''
The domain name of the server, with optional explicit port.
This is used by remote servers to look up the server address.
This is also the last part of your UserID.
@@ -565,7 +565,7 @@ in {
enable_registration = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable registration for new users.
'';
};
@@ -573,7 +573,7 @@ in {
registration_shared_secret = mkOption {
type = types.nullOr types.str;
default = null;
- description = mdDoc ''
+ description = ''
If set, allows registration by anyone who also has the shared
secret, even if registration is otherwise disabled.
@@ -584,7 +584,7 @@ in {
macaroon_secret_key = mkOption {
type = types.nullOr types.str;
default = null;
- description = mdDoc ''
+ description = ''
Secret key for authentication tokens. If none is specified,
the registration_shared_secret is used, if one is given; otherwise,
a secret key is derived from the signing key.
@@ -596,7 +596,7 @@ in {
enable_metrics = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable collection and rendering of performance metrics
'';
};
@@ -604,7 +604,7 @@ in {
report_stats = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether or not to report anonymized homeserver usage statistics.
'';
};
@@ -612,7 +612,7 @@ in {
signing_key_path = mkOption {
type = types.path;
default = "${cfg.dataDir}/homeserver.signing.key";
- description = lib.mdDoc ''
+ description = ''
Path to the signing key to sign messages with.
'';
};
@@ -621,7 +621,7 @@ in {
type = types.path;
default = "/run/matrix-synapse.pid";
readOnly = true;
- description = lib.mdDoc ''
+ description = ''
The file to store the PID in.
'';
};
@@ -630,7 +630,7 @@ in {
type = types.path;
default = genLogConfigFile "synapse";
defaultText = logConfigText "synapse";
- description = lib.mdDoc ''
+ description = ''
The file that holds the logging configuration.
'';
};
@@ -641,7 +641,7 @@ in {
then "${cfg.dataDir}/media_store"
else "${cfg.dataDir}/media";
defaultText = "${cfg.dataDir}/media_store for when system.stateVersion is at least 22.05, ${cfg.dataDir}/media when lower than 22.05";
- description = lib.mdDoc ''
+ description = ''
Directory where uploaded images and attachments are stored.
'';
};
@@ -650,7 +650,7 @@ in {
type = types.nullOr types.str;
default = null;
example = "https://example.com:8448/";
- description = lib.mdDoc ''
+ description = ''
The public-facing base URL for the client API (not including _matrix/...)
'';
};
@@ -659,7 +659,7 @@ in {
type = types.nullOr types.str;
default = null;
example = "/var/lib/acme/example.com/fullchain.pem";
- description = lib.mdDoc ''
+ description = ''
PEM encoded X509 certificate for TLS.
You can replace the self-signed certificate that synapse
autogenerates on launch with your own SSL certificate + key pair
@@ -672,7 +672,7 @@ in {
type = types.nullOr types.str;
default = null;
example = "/var/lib/acme/example.com/key.pem";
- description = lib.mdDoc ''
+ description = ''
PEM encoded private key for TLS. Specify null if synapse is not
speaking TLS directly.
'';
@@ -682,7 +682,7 @@ in {
type = types.bool;
default = true;
example = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable presence tracking.
Presence tracking allows users to see the state (e.g online/offline)
@@ -713,7 +713,7 @@ in {
compress = false;
}];
};
- description = lib.mdDoc ''
+ description = ''
List of ports that Synapse should listen on, their purpose and their configuration.
By default, synapse will be configured for client and federation traffic on port 8008, and
@@ -735,7 +735,7 @@ in {
then "psycopg2"
else "sqlite3"
'';
- description = lib.mdDoc ''
+ description = ''
The database engine name. Can be sqlite3 or psycopg2.
'';
};
@@ -752,7 +752,7 @@ in {
psycopg2 = "matrix-synapse";
}.''${${options.services.matrix-synapse.settings}.database.name};
'';
- description = lib.mdDoc ''
+ description = ''
Name of the database when using the psycopg2 backend,
path to the database location when using sqlite3.
'';
@@ -770,7 +770,7 @@ in {
psycopg2 = "matrix-synapse";
}.''${cfg.settings.database.name};
'';
- description = lib.mdDoc ''
+ description = ''
Username to connect with psycopg2, set to null
when using sqlite3.
'';
@@ -780,7 +780,7 @@ in {
type = types.bool;
default = true;
example = false;
- description = lib.mdDoc ''
+ description = ''
Is the preview URL API enabled? If enabled, you *must* specify an
explicit url_preview_ip_range_blacklist of IPs that the spider is
denied from accessing.
@@ -810,7 +810,7 @@ in {
"fec0::/10"
"ff00::/8"
];
- description = lib.mdDoc ''
+ description = ''
List of IP address CIDR ranges that the URL preview spider is denied
from accessing.
'';
@@ -819,7 +819,7 @@ in {
url_preview_ip_range_whitelist = mkOption {
type = types.listOf types.str;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
List of IP address CIDR ranges that the URL preview spider is allowed
to access even if they are specified in url_preview_ip_range_blacklist.
'';
@@ -847,7 +847,7 @@ in {
{ netloc = "www.acme.com"; path = "/foo"; } # block http(s)://www.acme.com/foo
]
'';
- description = lib.mdDoc ''
+ description = ''
Optional list of URL matches that the URL preview spider is
denied from accessing.
'';
@@ -857,7 +857,7 @@ in {
type = types.str;
default = "50M";
example = "100M";
- description = lib.mdDoc ''
+ description = ''
The largest allowed upload size in bytes
'';
};
@@ -866,7 +866,7 @@ in {
type = types.str;
default = "32M";
example = "64M";
- description = lib.mdDoc ''
+ description = ''
Maximum number of pixels that will be thumbnailed
'';
};
@@ -875,7 +875,7 @@ in {
type = types.bool;
default = false;
example = true;
- description = lib.mdDoc ''
+ description = ''
Whether to generate new thumbnails on the fly to precisely match
the resolution requested by the client. If true then whenever
a new resolution is requested by the client the server will
@@ -893,7 +893,7 @@ in {
"turns:turn.example.com:5349?transport=udp"
"turns:turn.example.com:5349?transport=tcp"
];
- description = lib.mdDoc ''
+ description = ''
The public URIs of the TURN server to give to clients
'';
};
@@ -903,7 +903,7 @@ in {
example = literalExpression ''
config.services.coturn.static-auth-secret
'';
- description = mdDoc ''
+ description = ''
The shared secret used to compute passwords for the TURN server.
Secrets should be passed in via `extraConfigFiles`!
@@ -917,7 +917,7 @@ in {
server_name = mkOption {
type = types.str;
example = "matrix.org";
- description = lib.mdDoc ''
+ description = ''
Hostname of the trusted server.
'';
};
@@ -929,7 +929,7 @@ in {
"ed25519:auto" = "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw";
};
}];
- description = lib.mdDoc ''
+ description = ''
The trusted servers to download signing keys from.
'';
};
@@ -937,7 +937,7 @@ in {
app_service_config_files = mkOption {
type = types.listOf types.path;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
A list of application service config file to use
'';
};
@@ -949,14 +949,14 @@ in {
enabled = lib.mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to use redis support
'';
};
};
};
default = { };
- description = lib.mdDoc ''
+ description = ''
Redis configuration for synapse.
See the
@@ -970,7 +970,7 @@ in {
workers = lib.mkOption {
default = { };
- description = lib.mdDoc ''
+ description = ''
Options for configuring workers. Worker support will be enabled if at least one worker is configured here.
See the [worker documention](https://element-hq.github.io/synapse/latest/workers.html#worker-configuration)
@@ -1007,7 +1007,7 @@ in {
worker_listeners = lib.mkOption {
default = [ ];
type = types.listOf (listenerType true);
- description = lib.mdDoc ''
+ description = ''
List of ports that this worker should listen on, their purpose and their configuration.
'';
};
@@ -1015,7 +1015,7 @@ in {
type = types.path;
default = genLogConfigFile "synapse-${name}";
defaultText = logConfigText "synapse-${name}";
- description = lib.mdDoc ''
+ description = ''
The file for log configuration.
See the [python documentation](https://docs.python.org/3/library/logging.config.html#configuration-dictionary-schema)
@@ -1050,7 +1050,7 @@ in {
extraConfigFiles = mkOption {
type = types.listOf types.path;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
Extra config files to include.
The configuration files will be included based on the command line
@@ -1063,7 +1063,7 @@ in {
configureRedisLocally = lib.mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to automatically configure a local redis server for matrix-synapse.
'';
};
@@ -1232,7 +1232,8 @@ in {
ProtectKernelTunables = true;
ProtectProc = "invisible";
ProtectSystem = "strict";
- ReadWritePaths = [ cfg.dataDir cfg.settings.media_store_path ];
+ ReadWritePaths = [ cfg.dataDir cfg.settings.media_store_path ] ++
+ (map (listener: dirOf listener.path) (filter (listener: listener.path != null) cfg.settings.listeners));
RemoveIPC = true;
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" "AF_UNIX" ];
RestrictNamespaces = true;
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/airsonic.nix b/third_party/nixpkgs/nixos/modules/services/misc/airsonic.nix
index 6ba6ff5ca3..6095268eb9 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/airsonic.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/airsonic.nix
@@ -9,18 +9,18 @@ in {
options = {
services.airsonic = {
- enable = mkEnableOption (lib.mdDoc "Airsonic, the Free and Open Source media streaming server (fork of Subsonic and Libresonic)");
+ enable = mkEnableOption "Airsonic, the Free and Open Source media streaming server (fork of Subsonic and Libresonic)";
user = mkOption {
type = types.str;
default = "airsonic";
- description = lib.mdDoc "User account under which airsonic runs.";
+ description = "User account under which airsonic runs.";
};
home = mkOption {
type = types.path;
default = "/var/lib/airsonic";
- description = lib.mdDoc ''
+ description = ''
The directory where Airsonic will create files.
Make sure it is writable.
'';
@@ -29,7 +29,7 @@ in {
virtualHost = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Name of the nginx virtualhost to use and setup. If null, do not setup any virtualhost.
'';
};
@@ -37,7 +37,7 @@ in {
listenAddress = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc ''
+ description = ''
The host name or IP address on which to bind Airsonic.
The default value is appropriate for first launch, when the
default credentials are easy to guess. It is also appropriate
@@ -50,7 +50,7 @@ in {
port = mkOption {
type = types.port;
default = 4040;
- description = lib.mdDoc ''
+ description = ''
The port on which Airsonic will listen for
incoming HTTP traffic. Set to 0 to disable.
'';
@@ -59,7 +59,7 @@ in {
contextPath = mkOption {
type = types.path;
default = "/";
- description = lib.mdDoc ''
+ description = ''
The context path, i.e., the last part of the Airsonic
URL. Typically '/' or '/airsonic'. Default '/'
'';
@@ -68,7 +68,7 @@ in {
maxMemory = mkOption {
type = types.int;
default = 100;
- description = lib.mdDoc ''
+ description = ''
The memory limit (max Java heap size) in megabytes.
Default: 100
'';
@@ -78,7 +78,7 @@ in {
type = types.listOf types.path;
default = [ "${pkgs.ffmpeg.bin}/bin/ffmpeg" ];
defaultText = literalExpression ''[ "''${pkgs.ffmpeg.bin}/bin/ffmpeg" ]'';
- description = lib.mdDoc ''
+ description = ''
List of paths to transcoder executables that should be accessible
from Airsonic. Symlinks will be created to each executable inside
''${config.${opt.home}}/transcoders.
@@ -98,11 +98,11 @@ in {
type = types.path;
default = "${pkgs.airsonic}/webapps/airsonic.war";
defaultText = literalExpression ''"''${pkgs.airsonic}/webapps/airsonic.war"'';
- description = lib.mdDoc "Airsonic war file to use.";
+ description = "Airsonic war file to use.";
};
jvmOptions = mkOption {
- description = lib.mdDoc ''
+ description = ''
Extra command line options for the JVM running AirSonic.
Useful for sending jukebox output to non-default alsa
devices.
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/amazon-ssm-agent.nix b/third_party/nixpkgs/nixos/modules/services/misc/amazon-ssm-agent.nix
index 89a1c07665..9ab4a7f96d 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/amazon-ssm-agent.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/amazon-ssm-agent.nix
@@ -27,11 +27,11 @@ in {
];
options.services.amazon-ssm-agent = {
- enable = mkEnableOption (lib.mdDoc "Amazon SSM agent");
+ enable = mkEnableOption "Amazon SSM agent";
package = mkOption {
type = types.path;
- description = lib.mdDoc "The Amazon SSM agent package to use";
+ description = "The Amazon SSM agent package to use";
default = pkgs.amazon-ssm-agent.override { overrideEtc = false; };
defaultText = literalExpression "pkgs.amazon-ssm-agent.override { overrideEtc = false; }";
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/ananicy.nix b/third_party/nixpkgs/nixos/modules/services/misc/ananicy.nix
index 01e1053c9e..f7ab41fcce 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/ananicy.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/ananicy.nix
@@ -13,7 +13,7 @@ in
{
options = {
services.ananicy = {
- enable = mkEnableOption (lib.mdDoc "Ananicy, an auto nice daemon");
+ enable = mkEnableOption "Ananicy, an auto nice daemon";
package = mkPackageOption pkgs "ananicy" {
example = "ananicy-cpp";
@@ -22,7 +22,7 @@ in
rulesProvider = mkPackageOption pkgs "ananicy" {
example = "ananicy-cpp";
} // {
- description = lib.mdDoc ''
+ description = ''
Which package to copy default rules,types,cgroups from.
'';
};
@@ -33,7 +33,7 @@ in
example = {
apply_nice = false;
};
- description = lib.mdDoc ''
+ description = ''
See
'';
};
@@ -41,7 +41,7 @@ in
extraRules = mkOption {
type = with types; listOf attrs;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
Rules to write in 'nixRules.rules'. See:
@@ -54,7 +54,7 @@ in
extraTypes = mkOption {
type = with types; listOf attrs;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
Types to write in 'nixTypes.types'. See:
'';
@@ -66,7 +66,7 @@ in
extraCgroups = mkOption {
type = with types; listOf attrs;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
Cgroups to write in 'nixCgroups.cgroups'. See:
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/anki-sync-server.md b/third_party/nixpkgs/nixos/modules/services/misc/anki-sync-server.md
index 5d2b4da4d2..f58d3d8ad0 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/anki-sync-server.md
+++ b/third_party/nixpkgs/nixos/modules/services/misc/anki-sync-server.md
@@ -16,7 +16,7 @@ unit which runs the sync server with an isolated user using the systemd
`DynamicUser` option.
This can be done by enabling the `anki-sync-server` service:
-```
+```nix
{ ... }:
{
@@ -27,7 +27,7 @@ This can be done by enabling the `anki-sync-server` service:
It is necessary to set at least one username-password pair under
{option}`services.anki-sync-server.users`. For example
-```
+```nix
{
services.anki-sync-server.users = [
{
@@ -50,7 +50,7 @@ you want to expose the sync server directly to other computers (not recommended
in most circumstances, because the sync server doesn't use HTTPS), then set the
following options:
-```
+```nix
{
services.anki-sync-server.host = "0.0.0.0";
services.anki-sync-server.openFirewall = true;
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/ankisyncd.nix b/third_party/nixpkgs/nixos/modules/services/misc/ankisyncd.nix
index f5acfbb0ee..b999b02534 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/ankisyncd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/ankisyncd.nix
@@ -22,26 +22,26 @@ let
in
{
options.services.ankisyncd = {
- enable = mkEnableOption (lib.mdDoc "ankisyncd");
+ enable = mkEnableOption "ankisyncd, a standalone unofficial anky sync server";
package = mkPackageOption pkgs "ankisyncd" { };
host = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "ankisyncd host";
+ description = "ankisyncd host";
};
port = mkOption {
type = types.port;
default = 27701;
- description = lib.mdDoc "ankisyncd port";
+ description = "ankisyncd port";
};
openFirewall = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Whether to open the firewall for the specified port.";
+ description = "Whether to open the firewall for the specified port.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/apache-kafka.nix b/third_party/nixpkgs/nixos/modules/services/misc/apache-kafka.nix
index b7281a0d9d..d1a3d92f2e 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/apache-kafka.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/apache-kafka.nix
@@ -32,10 +32,10 @@ let
in {
options.services.apache-kafka = {
- enable = mkEnableOption (lib.mdDoc "Apache Kafka event streaming broker");
+ enable = mkEnableOption "Apache Kafka event streaming broker";
settings = mkOption {
- description = lib.mdDoc ''
+ description = ''
[Kafka broker configuration](https://kafka.apache.org/documentation.html#brokerconfigs)
{file}`server.properties`.
@@ -51,13 +51,13 @@ in {
options = {
"broker.id" = mkOption {
- description = lib.mdDoc "Broker ID. -1 or null to auto-allocate in zookeeper mode.";
+ description = "Broker ID. -1 or null to auto-allocate in zookeeper mode.";
default = null;
type = with types; nullOr int;
};
"log.dirs" = mkOption {
- description = lib.mdDoc "Log file directories.";
+ description = "Log file directories.";
# Deliberaly leave out old default and use the rewrite opportunity
# to have users choose a safer value -- /tmp might be volatile and is a
# slightly scary default choice.
@@ -66,7 +66,7 @@ in {
};
"listeners" = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kafka Listener List.
See [listeners](https://kafka.apache.org/documentation/#brokerconfigs_listeners).
'';
@@ -78,7 +78,7 @@ in {
};
clusterId = mkOption {
- description = lib.mdDoc ''
+ description = ''
KRaft mode ClusterId used for formatting log directories. Can be generated with `kafka-storage.sh random-uuid`
'';
type = with types; nullOr str;
@@ -86,7 +86,7 @@ in {
};
configFiles.serverProperties = mkOption {
- description = lib.mdDoc ''
+ description = ''
Kafka server.properties configuration file path.
Defaults to the rendered `settings`.
'';
@@ -94,14 +94,14 @@ in {
};
configFiles.log4jProperties = mkOption {
- description = lib.mdDoc "Kafka log4j property configuration file path";
+ description = "Kafka log4j property configuration file path";
type = types.path;
default = pkgs.writeText "log4j.properties" cfg.log4jProperties;
defaultText = ''pkgs.writeText "log4j.properties" cfg.log4jProperties'';
};
formatLogDirs = mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether to format log dirs in KRaft mode if all log dirs are
unformatted, ie. they contain no meta.properties.
'';
@@ -110,7 +110,7 @@ in {
};
formatLogDirsIgnoreFormatted = mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether to ignore already formatted log dirs when formatting log dirs,
instead of failing. Useful when replacing or adding disks.
'';
@@ -119,7 +119,7 @@ in {
};
log4jProperties = mkOption {
- description = lib.mdDoc "Kafka log4j property configuration.";
+ description = "Kafka log4j property configuration.";
default = ''
log4j.rootLogger=INFO, stdout
@@ -131,7 +131,7 @@ in {
};
jvmOptions = mkOption {
- description = lib.mdDoc "Extra command line options for the JVM running Kafka.";
+ description = "Extra command line options for the JVM running Kafka.";
default = [];
type = types.listOf types.str;
example = [
@@ -144,7 +144,7 @@ in {
package = mkPackageOption pkgs "apacheKafka" { };
jre = mkOption {
- description = lib.mdDoc "The JRE with which to run Kafka";
+ description = "The JRE with which to run Kafka";
default = cfg.package.passthru.jre;
defaultText = literalExpression "pkgs.apacheKafka.passthru.jre";
type = types.package;
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/atuin.nix b/third_party/nixpkgs/nixos/modules/services/misc/atuin.nix
index 7e89929884..79c2c2a171 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/atuin.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/atuin.nix
@@ -1,63 +1,63 @@
{ config, pkgs, lib, ... }:
let
- inherit (lib) mkOption types mdDoc mkIf;
+ inherit (lib) mkOption types mkIf;
cfg = config.services.atuin;
in
{
options = {
services.atuin = {
- enable = lib.mkEnableOption (mdDoc "Atuin server for shell history sync");
+ enable = lib.mkEnableOption "Atuin server for shell history sync";
package = lib.mkPackageOption pkgs "atuin" { };
openRegistration = mkOption {
type = types.bool;
default = false;
- description = mdDoc "Allow new user registrations with the atuin server.";
+ description = "Allow new user registrations with the atuin server.";
};
path = mkOption {
type = types.str;
default = "";
- description = mdDoc "A path to prepend to all the routes of the server.";
+ description = "A path to prepend to all the routes of the server.";
};
host = mkOption {
type = types.str;
default = "127.0.0.1";
- description = mdDoc "The host address the atuin server should listen on.";
+ description = "The host address the atuin server should listen on.";
};
maxHistoryLength = mkOption {
type = types.int;
default = 8192;
- description = mdDoc "The max length of each history item the atuin server should store.";
+ description = "The max length of each history item the atuin server should store.";
};
port = mkOption {
type = types.port;
default = 8888;
- description = mdDoc "The port the atuin server should listen on.";
+ description = "The port the atuin server should listen on.";
};
openFirewall = mkOption {
type = types.bool;
default = false;
- description = mdDoc "Open ports in the firewall for the atuin server.";
+ description = "Open ports in the firewall for the atuin server.";
};
database = {
createLocally = mkOption {
type = types.bool;
default = true;
- description = mdDoc "Create the database and database user locally.";
+ description = "Create the database and database user locally.";
};
uri = mkOption {
type = types.nullOr types.str;
default = "postgresql:///atuin?host=/run/postgresql";
example = "postgresql://atuin@localhost:5432/atuin";
- description = mdDoc ''
+ description = ''
URI to the database.
Can be set to null in which case ATUIN_DB_URI should be set through an EnvironmentFile
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/autofs.nix b/third_party/nixpkgs/nixos/modules/services/misc/autofs.nix
index 723b67e8bb..d94fae3ede 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/autofs.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/autofs.nix
@@ -21,7 +21,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Mount filesystems on demand. Unmount them automatically.
You may also be interested in afuse.
'';
@@ -46,7 +46,7 @@ in
/auto file:''${mapConf}
'''
'';
- description = lib.mdDoc ''
+ description = ''
Contents of `/etc/auto.master` file. See {command}`auto.master(5)` and {command}`autofs(5)`.
'';
};
@@ -54,13 +54,13 @@ in
timeout = mkOption {
type = types.int;
default = 600;
- description = lib.mdDoc "Set the global minimum timeout, in seconds, until directories are unmounted";
+ description = "Set the global minimum timeout, in seconds, until directories are unmounted";
};
debug = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Pass -d and -7 to automount and write log to the system journal.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/autorandr.nix b/third_party/nixpkgs/nixos/modules/services/misc/autorandr.nix
index aa96acb613..1dbfc4caa3 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/autorandr.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/autorandr.nix
@@ -27,7 +27,7 @@ let
options = {
fingerprint = mkOption {
type = types.attrsOf types.str;
- description = lib.mdDoc ''
+ description = ''
Output name to EDID mapping.
Use `autorandr --fingerprint` to get current setup values.
'';
@@ -36,13 +36,13 @@ let
config = mkOption {
type = types.attrsOf configModule;
- description = lib.mdDoc "Per output profile configuration.";
+ description = "Per output profile configuration.";
default = { };
};
hooks = mkOption {
type = hooksModule;
- description = lib.mdDoc "Profile hook scripts.";
+ description = "Profile hook scripts.";
default = { };
};
};
@@ -52,54 +52,54 @@ let
options = {
enable = mkOption {
type = types.bool;
- description = lib.mdDoc "Whether to enable the output.";
+ description = "Whether to enable the output.";
default = true;
};
crtc = mkOption {
type = types.nullOr types.ints.unsigned;
- description = lib.mdDoc "Output video display controller.";
+ description = "Output video display controller.";
default = null;
example = 0;
};
primary = mkOption {
type = types.bool;
- description = lib.mdDoc "Whether output should be marked as primary";
+ description = "Whether output should be marked as primary";
default = false;
};
position = mkOption {
type = types.str;
- description = lib.mdDoc "Output position";
+ description = "Output position";
default = "";
example = "5760x0";
};
mode = mkOption {
type = types.str;
- description = lib.mdDoc "Output resolution.";
+ description = "Output resolution.";
default = "";
example = "3840x2160";
};
rate = mkOption {
type = types.str;
- description = lib.mdDoc "Output framerate.";
+ description = "Output framerate.";
default = "";
example = "60.00";
};
gamma = mkOption {
type = types.str;
- description = lib.mdDoc "Output gamma configuration.";
+ description = "Output gamma configuration.";
default = "";
example = "1.0:0.909:0.833";
};
rotate = mkOption {
type = types.nullOr (types.enum [ "normal" "left" "right" "inverted" ]);
- description = lib.mdDoc "Output rotate configuration.";
+ description = "Output rotate configuration.";
default = null;
example = "left";
};
@@ -114,7 +114,7 @@ let
[ 0.0 0.0 1.0 ]
]
'';
- description = lib.mdDoc ''
+ description = ''
Refer to
{manpage}`xrandr(1)`
for the documentation of the transform matrix.
@@ -123,7 +123,7 @@ let
dpi = mkOption {
type = types.nullOr types.ints.positive;
- description = lib.mdDoc "Output DPI configuration.";
+ description = "Output DPI configuration.";
default = null;
example = 96;
};
@@ -133,23 +133,23 @@ let
options = {
method = mkOption {
type = types.enum [ "factor" "pixel" ];
- description = lib.mdDoc "Output scaling method.";
+ description = "Output scaling method.";
default = "factor";
example = "pixel";
};
x = mkOption {
type = types.either types.float types.ints.positive;
- description = lib.mdDoc "Horizontal scaling factor/pixels.";
+ description = "Horizontal scaling factor/pixels.";
};
y = mkOption {
type = types.either types.float types.ints.positive;
- description = lib.mdDoc "Vertical scaling factor/pixels.";
+ description = "Vertical scaling factor/pixels.";
};
};
});
- description = lib.mdDoc ''
+ description = ''
Output scale configuration.
Either configure by pixels or a scaling factor. When using pixel method the
@@ -178,19 +178,19 @@ let
options = {
postswitch = mkOption {
type = types.attrsOf hookType;
- description = lib.mdDoc "Postswitch hook executed after mode switch.";
+ description = "Postswitch hook executed after mode switch.";
default = { };
};
preswitch = mkOption {
type = types.attrsOf hookType;
- description = lib.mdDoc "Preswitch hook executed before mode switch.";
+ description = "Preswitch hook executed before mode switch.";
default = { };
};
predetect = mkOption {
type = types.attrsOf hookType;
- description = lib.mdDoc ''
+ description = ''
Predetect hook executed before autorandr attempts to run xrandr.
'';
default = { };
@@ -242,12 +242,12 @@ in {
options = {
services.autorandr = {
- enable = mkEnableOption (lib.mdDoc "handling of hotplug and sleep events by autorandr");
+ enable = mkEnableOption "handling of hotplug and sleep events by autorandr";
defaultTarget = mkOption {
default = "default";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Fallback if no monitor layout can be detected. See the docs
(https://github.com/phillipberndt/autorandr/blob/v1.0/README.md#how-to-use)
for further reference.
@@ -257,12 +257,18 @@ in {
ignoreLid = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Treat outputs as connected even if their lids are closed";
+ description = "Treat outputs as connected even if their lids are closed";
+ };
+
+ matchEdid = mkOption {
+ default = false;
+ type = types.bool;
+ description = "Match displays based on edid instead of name";
};
hooks = mkOption {
type = hooksModule;
- description = lib.mdDoc "Global hook scripts";
+ description = "Global hook scripts";
default = { };
example = literalExpression ''
{
@@ -292,7 +298,7 @@ in {
};
profiles = mkOption {
type = types.attrsOf profileModule;
- description = lib.mdDoc "Autorandr profiles specification.";
+ description = "Autorandr profiles specification.";
default = { };
example = literalExpression ''
{
@@ -351,7 +357,8 @@ in {
--batch \
--change \
--default ${cfg.defaultTarget} \
- ${optionalString cfg.ignoreLid "--ignore-lid"}
+ ${optionalString cfg.ignoreLid "--ignore-lid"} \
+ ${optionalString cfg.matchEdid "--match-edid"}
'';
Type = "oneshot";
RemainAfterExit = false;
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/autosuspend.nix b/third_party/nixpkgs/nixos/modules/services/misc/autosuspend.nix
index 28dfa12105..a41ad43c44 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/autosuspend.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/autosuspend.nix
@@ -1,7 +1,7 @@
{ config, pkgs, lib, ... }:
let
inherit (lib) mapAttrs' nameValuePair filterAttrs types mkEnableOption
- mdDoc mkPackageOption mkOption literalExpression mkIf flatten
+ mkPackageOption mkOption literalExpression mkIf flatten
maintainers attrValues;
cfg = config.services.autosuspend;
@@ -38,7 +38,7 @@ let
checkType = types.submodule {
freeformType = settingsFormat.type.nestedTypes.elemType;
- options.enabled = mkEnableOption (mdDoc "this activity check") // { default = true; };
+ options.enabled = mkEnableOption "this activity check" // { default = true; };
options.class = mkOption {
default = null;
@@ -61,7 +61,7 @@ let
"XIdleTime"
"XPath"
]);
- description = mdDoc ''
+ description = ''
Name of the class implementing the check. If this option is not specified, the check's
name must represent a valid internal check class.
'';
@@ -71,7 +71,7 @@ let
wakeupType = types.submodule {
freeformType = settingsFormat.type.nestedTypes.elemType;
- options.enabled = mkEnableOption (mdDoc "this wake-up check") // { default = true; };
+ options.enabled = mkEnableOption "this wake-up check" // { default = true; };
options.class = mkOption {
default = null;
@@ -84,7 +84,7 @@ let
"XPath"
"XPathDelta"
]);
- description = mdDoc ''
+ description = ''
Name of the class implementing the check. If this option is not specified, the check's
name must represent a valid internal check class.
'';
@@ -94,7 +94,7 @@ in
{
options = {
services.autosuspend = {
- enable = mkEnableOption (mdDoc "the autosuspend daemon");
+ enable = mkEnableOption "the autosuspend daemon";
package = mkPackageOption pkgs "autosuspend" { };
@@ -107,7 +107,7 @@ in
suspend_cmd = mkOption {
default = "systemctl suspend";
type = with types; str;
- description = mdDoc ''
+ description = ''
The command to execute in case the host shall be suspended. This line can contain
additional command line arguments to the command to execute.
'';
@@ -115,7 +115,7 @@ in
wakeup_cmd = mkOption {
default = ''sh -c 'echo 0 > /sys/class/rtc/rtc0/wakealarm && echo {timestamp:.0f} > /sys/class/rtc/rtc0/wakealarm' '';
type = with types; str;
- description = mdDoc ''
+ description = ''
The command to execute for scheduling a wake up of the system. The given string is
processed using Python’s `str.format()` and a format argument called `timestamp`
encodes the UTC timestamp of the planned wake up time (float). Additionally `iso`
@@ -132,7 +132,7 @@ in
idle_time = 120;
}
'';
- description = mdDoc ''
+ description = ''
Configuration for autosuspend, see
for supported values.
@@ -142,7 +142,7 @@ in
checks = mkOption {
default = { };
type = with types; attrsOf checkType;
- description = mdDoc ''
+ description = ''
Checks for activity. For more information, see:
-
-
@@ -184,7 +184,7 @@ in
wakeups = mkOption {
default = { };
type = with types; attrsOf wakeupType;
- description = mdDoc ''
+ description = ''
Checks for wake up. For more information, see:
-
-
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/bazarr.nix b/third_party/nixpkgs/nixos/modules/services/misc/bazarr.nix
index 07c9350535..99343a146a 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/bazarr.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/bazarr.nix
@@ -8,30 +8,30 @@ in
{
options = {
services.bazarr = {
- enable = mkEnableOption (lib.mdDoc "bazarr, a subtitle manager for Sonarr and Radarr");
+ enable = mkEnableOption "bazarr, a subtitle manager for Sonarr and Radarr";
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Open ports in the firewall for the bazarr web interface.";
+ description = "Open ports in the firewall for the bazarr web interface.";
};
listenPort = mkOption {
type = types.port;
default = 6767;
- description = lib.mdDoc "Port on which the bazarr web interface should listen";
+ description = "Port on which the bazarr web interface should listen";
};
user = mkOption {
type = types.str;
default = "bazarr";
- description = lib.mdDoc "User account under which bazarr runs.";
+ description = "User account under which bazarr runs.";
};
group = mkOption {
type = types.str;
default = "bazarr";
- description = lib.mdDoc "Group under which bazarr runs.";
+ description = "Group under which bazarr runs.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/bcg.nix b/third_party/nixpkgs/nixos/modules/services/misc/bcg.nix
index ad0b9c8713..626a67f66d 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/bcg.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/bcg.nix
@@ -25,13 +25,13 @@ in
{
options = {
services.bcg = {
- enable = mkEnableOption (mdDoc "BigClown gateway");
+ enable = mkEnableOption "BigClown gateway";
package = mkPackageOption pkgs [ "python3Packages" "bcg" ] { };
environmentFiles = mkOption {
type = types.listOf types.path;
default = [];
example = [ "/run/keys/bcg.env" ];
- description = mdDoc ''
+ description = ''
File to load as environment file. Environment variables from this file
will be interpolated into the config file using envsubst with this
syntax: `$ENVIRONMENT` or `''${VARIABLE}`.
@@ -41,16 +41,16 @@ in
verbose = mkOption {
type = types.enum ["CRITICAL" "ERROR" "WARNING" "INFO" "DEBUG"];
default = "WARNING";
- description = mdDoc "Verbosity level.";
+ description = "Verbosity level.";
};
device = mkOption {
type = types.str;
- description = mdDoc "Device name to configure gateway to use.";
+ description = "Device name to configure gateway to use.";
};
name = mkOption {
type = with types; nullOr str;
default = null;
- description = mdDoc ''
+ description = ''
Name for the device.
Supported variables:
@@ -64,78 +64,78 @@ in
host = mkOption {
type = types.str;
default = "127.0.0.1";
- description = mdDoc "Host where MQTT server is running.";
+ description = "Host where MQTT server is running.";
};
port = mkOption {
type = types.port;
default = 1883;
- description = mdDoc "Port of MQTT server.";
+ description = "Port of MQTT server.";
};
username = mkOption {
type = with types; nullOr str;
default = null;
- description = mdDoc "MQTT server access username.";
+ description = "MQTT server access username.";
};
password = mkOption {
type = with types; nullOr str;
default = null;
- description = mdDoc "MQTT server access password.";
+ description = "MQTT server access password.";
};
cafile = mkOption {
type = with types; nullOr str;
default = null;
- description = mdDoc "Certificate Authority file for MQTT server access.";
+ description = "Certificate Authority file for MQTT server access.";
};
certfile = mkOption {
type = with types; nullOr str;
default = null;
- description = mdDoc "Certificate file for MQTT server access.";
+ description = "Certificate file for MQTT server access.";
};
keyfile = mkOption {
type = with types; nullOr str;
default = null;
- description = mdDoc "Key file for MQTT server access.";
+ description = "Key file for MQTT server access.";
};
};
retainNodeMessages = mkOption {
type = types.bool;
default = false;
- description = mdDoc "Specify that node messages should be retaied in MQTT broker.";
+ description = "Specify that node messages should be retaied in MQTT broker.";
};
qosNodeMessages = mkOption {
type = types.int;
default = 1;
- description = mdDoc "Set the guarantee of MQTT message delivery.";
+ description = "Set the guarantee of MQTT message delivery.";
};
baseTopicPrefix = mkOption {
type = types.str;
default = "";
- description = mdDoc "Topic prefix added to all MQTT messages.";
+ description = "Topic prefix added to all MQTT messages.";
};
automaticRemoveKitFromNames = mkOption {
type = types.bool;
default = true;
- description = mdDoc "Automatically remove kits.";
+ description = "Automatically remove kits.";
};
automaticRenameKitNodes = mkOption {
type = types.bool;
default = true;
- description = mdDoc "Automatically rename kit's nodes.";
+ description = "Automatically rename kit's nodes.";
};
automaticRenameGenericNodes = mkOption {
type = types.bool;
default = true;
- description = mdDoc "Automatically rename generic nodes.";
+ description = "Automatically rename generic nodes.";
};
automaticRenameNodes = mkOption {
type = types.bool;
default = true;
- description = mdDoc "Automatically rename all nodes.";
+ description = "Automatically rename all nodes.";
};
rename = mkOption {
type = with types; attrsOf str;
default = {};
- description = mdDoc "Rename nodes to different name.";
+ description = "Rename nodes to different name.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/beanstalkd.nix b/third_party/nixpkgs/nixos/modules/services/misc/beanstalkd.nix
index 4262cae323..b8f163cbfa 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/beanstalkd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/beanstalkd.nix
@@ -12,18 +12,18 @@ in
options = {
services.beanstalkd = {
- enable = mkEnableOption (lib.mdDoc "the Beanstalk work queue");
+ enable = mkEnableOption "the Beanstalk work queue";
listen = {
port = mkOption {
type = types.port;
- description = lib.mdDoc "TCP port that will be used to accept client connections.";
+ description = "TCP port that will be used to accept client connections.";
default = 11300;
};
address = mkOption {
type = types.str;
- description = lib.mdDoc "IP address to listen on.";
+ description = "IP address to listen on.";
default = "127.0.0.1";
example = "0.0.0.0";
};
@@ -32,7 +32,7 @@ in
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to open ports in the firewall for the server.";
+ description = "Whether to open ports in the firewall for the server.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/bees.nix b/third_party/nixpkgs/nixos/modules/services/misc/bees.nix
index 37f90c6822..a0fd3cd43d 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/bees.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/bees.nix
@@ -11,7 +11,7 @@ let
fsOptions = with types; {
options.spec = mkOption {
type = str;
- description = lib.mdDoc ''
+ description = ''
Description of how to identify the filesystem to be duplicated by this
instance of bees. Note that deduplication crosses subvolumes; one must
not configure multiple instances for subvolumes of the same filesystem
@@ -28,7 +28,7 @@ let
options.hashTableSizeMB = mkOption {
type = types.addCheck types.int (n: mod n 16 == 0);
default = 1024; # 1GB; default from upstream beesd script
- description = lib.mdDoc ''
+ description = ''
Hash table size in MB; must be a multiple of 16.
A larger ratio of index size to storage size means smaller blocks of
@@ -44,12 +44,12 @@ let
type = types.enum (attrNames logLevels ++ attrValues logLevels);
apply = v: if isString v then logLevels.${v} else v;
default = "info";
- description = lib.mdDoc "Log verbosity (syslog keyword/level).";
+ description = "Log verbosity (syslog keyword/level).";
};
options.workDir = mkOption {
type = str;
default = ".beeshome";
- description = lib.mdDoc ''
+ description = ''
Name (relative to the root of the filesystem) of the subvolume where
the hash table will be stored.
'';
@@ -57,7 +57,7 @@ let
options.extraOptions = mkOption {
type = listOf str;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
Extra command-line options passed to the daemon. See upstream bees documentation.
'';
example = literalExpression ''
@@ -72,7 +72,7 @@ in
options.services.beesd = {
filesystems = mkOption {
type = with types; attrsOf (submodule fsOptions);
- description = lib.mdDoc "BTRFS filesystems to run block-level deduplication on.";
+ description = "BTRFS filesystems to run block-level deduplication on.";
default = { };
example = literalExpression ''
{
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/bepasty.nix b/third_party/nixpkgs/nixos/modules/services/misc/bepasty.nix
index 70d0762949..fad4827c66 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/bepasty.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/bepasty.nix
@@ -13,11 +13,11 @@ let
in
{
options.services.bepasty = {
- enable = mkEnableOption (lib.mdDoc "Bepasty servers");
+ enable = mkEnableOption "bepasty, a binary pastebin server";
servers = mkOption {
default = {};
- description = lib.mdDoc ''
+ description = ''
configure a number of bepasty servers which will be started with
gunicorn.
'';
@@ -27,7 +27,7 @@ in
bind = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Bind address to be used for this server.
'';
example = "0.0.0.0:8000";
@@ -36,7 +36,7 @@ in
dataDir = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Path to the directory where the pastes will be saved to
'';
default = default_home+"/data";
@@ -44,7 +44,7 @@ in
defaultPermissions = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
default permissions for all unauthenticated accesses.
'';
example = "read,create,delete";
@@ -53,7 +53,7 @@ in
extraConfig = mkOption {
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra configuration for bepasty server to be appended on the
configuration.
see https://bepasty-server.readthedocs.org/en/latest/quickstart.html#configuring-bepasty
@@ -70,7 +70,7 @@ in
secretKey = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
server secret for safe session cookies, must be set.
Warning: this secret is stored in the WORLD-READABLE Nix store!
@@ -84,7 +84,7 @@ in
secretKeyFile = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
A file that contains the server secret for safe session cookies, must be set.
{option}`secretKeyFile` takes precedence over {option}`secretKey`.
@@ -96,7 +96,7 @@ in
workDir = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Path to the working directory (used for config and pidfile).
Defaults to the users home directory.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/calibre-server.nix b/third_party/nixpkgs/nixos/modules/services/misc/calibre-server.nix
index 66ae5fa91b..8e2ce29092 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/calibre-server.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/calibre-server.nix
@@ -32,13 +32,13 @@ in
options = {
services.calibre-server = {
- enable = mkEnableOption (lib.mdDoc "calibre-server");
+ enable = mkEnableOption "calibre-server (e-book software)";
package = lib.mkPackageOption pkgs "calibre" { };
libraries = mkOption {
type = types.listOf types.path;
default = [ "/var/lib/calibre-server" ];
- description = lib.mdDoc ''
+ description = ''
Make sure each library path is initialized before service startup.
The directories of the libraries to serve. They must be readable for the user under which the server runs.
See the [calibredb documentation](${documentationLink}/generated/en/calibredb.html#add) for details.
@@ -48,20 +48,20 @@ in
user = mkOption {
type = types.str;
default = "calibre-server";
- description = lib.mdDoc "The user under which calibre-server runs.";
+ description = "The user under which calibre-server runs.";
};
group = mkOption {
type = types.str;
default = "calibre-server";
- description = lib.mdDoc "The group under which calibre-server runs.";
+ description = "The group under which calibre-server runs.";
};
host = mkOption {
type = types.str;
default = "0.0.0.0";
example = "::1";
- description = lib.mdDoc ''
+ description = ''
The interface on which to listen for connections.
See the [calibre-server documentation](${generatedDocumentationLink}#cmdoption-calibre-server-listen-on) for details.
'';
@@ -70,7 +70,7 @@ in
port = mkOption {
default = 8080;
type = types.port;
- description = lib.mdDoc ''
+ description = ''
The port on which to listen for connections.
See the [calibre-server documentation](${generatedDocumentationLink}#cmdoption-calibre-server-port) for details.
'';
@@ -80,7 +80,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Password based authentication to access the server.
See the [calibre-server documentation](${generatedDocumentationLink}#cmdoption-calibre-server-enable-auth) for details.
'';
@@ -89,7 +89,7 @@ in
mode = mkOption {
type = types.enum [ "auto" "basic" "digest" ];
default = "auto";
- description = lib.mdDoc ''
+ description = ''
Choose the type of authentication used.
Set the HTTP authentication mode used by the server.
See the [calibre-server documentation](${generatedDocumentationLink}#cmdoption-calibre-server-auth-mode) for details.
@@ -99,7 +99,7 @@ in
userDb = mkOption {
default = null;
type = types.nullOr types.path;
- description = lib.mdDoc ''
+ description = ''
Choose users database file to use for authentication.
Make sure users database file is initialized before service startup.
See the [calibre-server documentation](${documentationLink}/server.html#managing-user-accounts-from-the-command-line-only) for details.
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/canto-daemon.nix b/third_party/nixpkgs/nixos/modules/services/misc/canto-daemon.nix
index 8150e038bc..db51a263aa 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/canto-daemon.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/canto-daemon.nix
@@ -16,7 +16,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the canto RSS daemon.";
+ description = "Whether to enable the canto RSS daemon.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/cfdyndns.nix b/third_party/nixpkgs/nixos/modules/services/misc/cfdyndns.nix
index dba8ac2001..506e5f7613 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/cfdyndns.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/cfdyndns.nix
@@ -14,11 +14,11 @@ in
options = {
services.cfdyndns = {
- enable = mkEnableOption (lib.mdDoc "Cloudflare Dynamic DNS Client");
+ enable = mkEnableOption "Cloudflare Dynamic DNS Client";
email = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The email address to use to authenticate to CloudFlare.
'';
};
@@ -26,7 +26,7 @@ in
apiTokenFile = mkOption {
default = null;
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
The path to a file containing the API Token
used to authenticate with CloudFlare.
'';
@@ -35,7 +35,7 @@ in
apikeyFile = mkOption {
default = null;
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
The path to a file containing the API Key
used to authenticate with CloudFlare.
'';
@@ -45,7 +45,7 @@ in
default = [];
example = [ "host.tld" ];
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
The records to update in CloudFlare.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/cgminer.nix b/third_party/nixpkgs/nixos/modules/services/misc/cgminer.nix
index ad6cbf5091..dd857124b2 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/cgminer.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/cgminer.nix
@@ -31,20 +31,20 @@ in
services.cgminer = {
- enable = mkEnableOption (lib.mdDoc "cgminer, an ASIC/FPGA/GPU miner for bitcoin and litecoin");
+ enable = mkEnableOption "cgminer, an ASIC/FPGA/GPU miner for bitcoin and litecoin";
package = mkPackageOption pkgs "cgminer" { };
user = mkOption {
type = types.str;
default = "cgminer";
- description = lib.mdDoc "User account under which cgminer runs";
+ description = "User account under which cgminer runs";
};
pools = mkOption {
default = []; # Run benchmark
type = types.listOf (types.attrsOf types.str);
- description = lib.mdDoc "List of pools where to mine";
+ description = "List of pools where to mine";
example = [{
url = "http://p2pool.org:9332";
username = "17EUZxTvs9uRmPsjPZSYUU3zCz9iwstudk";
@@ -55,7 +55,7 @@ in
hardware = mkOption {
default = []; # Run without options
type = types.listOf (types.attrsOf (types.either types.str types.int));
- description= lib.mdDoc "List of config options for every GPU";
+ description= "List of config options for every GPU";
example = [
{
intensity = 9;
@@ -82,7 +82,7 @@ in
config = mkOption {
default = {};
type = types.attrsOf (types.either types.bool types.int);
- description = lib.mdDoc "Additional config";
+ description = "Additional config";
example = {
auto-fan = true;
auto-gpu = true;
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/clipcat.nix b/third_party/nixpkgs/nixos/modules/services/misc/clipcat.nix
index fb64427095..fa608e73c7 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/clipcat.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/clipcat.nix
@@ -7,7 +7,7 @@ let
in {
options.services.clipcat= {
- enable = mkEnableOption (lib.mdDoc "Clipcat clipboard daemon");
+ enable = mkEnableOption "Clipcat clipboard daemon";
package = mkPackageOption pkgs "clipcat" { };
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/clipmenu.nix b/third_party/nixpkgs/nixos/modules/services/misc/clipmenu.nix
index 343167b1df..71d36f9ef1 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/clipmenu.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/clipmenu.nix
@@ -7,7 +7,7 @@ let
in {
options.services.clipmenu = {
- enable = mkEnableOption (lib.mdDoc "clipmenu, the clipboard management daemon");
+ enable = mkEnableOption "clipmenu, the clipboard management daemon";
package = mkPackageOption pkgs "clipmenu" { };
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/confd.nix b/third_party/nixpkgs/nixos/modules/services/misc/confd.nix
index 93731547ed..836a1119a5 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/confd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/confd.nix
@@ -17,46 +17,46 @@ let
in {
options.services.confd = {
- enable = mkEnableOption (lib.mdDoc "confd service");
+ enable = mkEnableOption "confd, a service to manage local application configuration files using templates and data from etcd/consul/redis/zookeeper";
backend = mkOption {
- description = lib.mdDoc "Confd config storage backend to use.";
+ description = "Confd config storage backend to use.";
default = "etcd";
type = types.enum ["etcd" "consul" "redis" "zookeeper"];
};
interval = mkOption {
- description = lib.mdDoc "Confd check interval.";
+ description = "Confd check interval.";
default = 10;
type = types.int;
};
nodes = mkOption {
- description = lib.mdDoc "Confd list of nodes to connect to.";
+ description = "Confd list of nodes to connect to.";
default = [ "http://127.0.0.1:2379" ];
type = types.listOf types.str;
};
watch = mkOption {
- description = lib.mdDoc "Confd, whether to watch etcd config for changes.";
+ description = "Confd, whether to watch etcd config for changes.";
default = true;
type = types.bool;
};
prefix = mkOption {
- description = lib.mdDoc "The string to prefix to keys.";
+ description = "The string to prefix to keys.";
default = "/";
type = types.path;
};
logLevel = mkOption {
- description = lib.mdDoc "Confd log level.";
+ description = "Confd log level.";
default = "info";
type = types.enum ["info" "debug"];
};
confDir = mkOption {
- description = lib.mdDoc "The path to the confd configs.";
+ description = "The path to the confd configs.";
default = "/etc/confd";
type = types.path;
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/cpuminer-cryptonight.nix b/third_party/nixpkgs/nixos/modules/services/misc/cpuminer-cryptonight.nix
index 7b18c6b3cd..907b9d90da 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/cpuminer-cryptonight.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/cpuminer-cryptonight.nix
@@ -23,27 +23,27 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the cpuminer cryptonight miner.
'';
};
url = mkOption {
type = types.str;
- description = lib.mdDoc "URL of mining server";
+ description = "URL of mining server";
};
user = mkOption {
type = types.str;
- description = lib.mdDoc "Username for mining server";
+ description = "Username for mining server";
};
pass = mkOption {
type = types.str;
default = "x";
- description = lib.mdDoc "Password for mining server";
+ description = "Password for mining server";
};
threads = mkOption {
type = types.int;
default = 0;
- description = lib.mdDoc "Number of miner threads, defaults to available processors";
+ description = "Number of miner threads, defaults to available processors";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/db-rest.nix b/third_party/nixpkgs/nixos/modules/services/misc/db-rest.nix
new file mode 100644
index 0000000000..fbf8b327af
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/services/misc/db-rest.nix
@@ -0,0 +1,182 @@
+{ config, pkgs, lib, ... }:
+let
+ inherit (lib) mkOption types mkIf mkMerge mkDefault mkEnableOption mkPackageOption maintainers;
+ cfg = config.services.db-rest;
+in
+{
+ options = {
+ services.db-rest = {
+ enable = mkEnableOption "db-rest service";
+
+ user = mkOption {
+ type = types.str;
+ default = "db-rest";
+ description = "User account under which db-rest runs.";
+ };
+
+ group = mkOption {
+ type = types.str;
+ default = "db-rest";
+ description = "Group under which db-rest runs.";
+ };
+
+ host = mkOption {
+ type = types.str;
+ default = "127.0.0.1";
+ description = "The host address the db-rest server should listen on.";
+ };
+
+ port = mkOption {
+ type = types.port;
+ default = 3000;
+ description = "The port the db-rest server should listen on.";
+ };
+
+ redis = {
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Enable caching with redis for db-rest.";
+ };
+
+ createLocally = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Configure a local redis server for db-rest.";
+ };
+
+ host = mkOption {
+ type = with types; nullOr str;
+ default = null;
+ description = "Redis host.";
+ };
+
+ port = mkOption {
+ type = with types; nullOr port;
+ default = null;
+ description = "Redis port.";
+ };
+
+ user = mkOption {
+ type = with types; nullOr str;
+ default = null;
+ description = "Optional username used for authentication with redis.";
+ };
+
+ passwordFile = mkOption {
+ type = with types; nullOr path;
+ default = null;
+ example = "/run/keys/db-rest/pasword-redis-db";
+ description = "Path to a file containing the redis password.";
+ };
+
+ useSSL = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Use SSL if using a redis network connection.";
+ };
+ };
+
+ package = mkPackageOption pkgs "db-rest" { };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ assertions = [
+ {
+ assertion = (cfg.redis.enable && !cfg.redis.createLocally) -> (cfg.redis.host != null && cfg.redis.port != null);
+ message = ''
+ {option}`services.db-rest.redis.createLocally` and redis network connection ({option}`services.db-rest.redis.host` or {option}`services.db-rest.redis.port`) enabled. Disable either of them.
+ '';
+ }
+ {
+ assertion = (cfg.redis.enable && !cfg.redis.createLocally) -> (cfg.redis.passwordFile != null);
+ message = ''
+ {option}`services.db-rest.redis.createLocally` is disabled, but {option}`services.db-rest.redis.passwordFile` is not set.
+ '';
+ }
+ ];
+
+ systemd.services.db-rest = mkMerge [
+ {
+ description = "db-rest service";
+ after = [ "network.target" ]
+ ++ lib.optional cfg.redis.createLocally "redis-db-rest.service";
+ requires = lib.optional cfg.redis.createLocally "redis-db-rest.service";
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ Type = "simple";
+ Restart = "always";
+ RestartSec = 5;
+ WorkingDirectory = cfg.package;
+ User = cfg.user;
+ Group = cfg.group;
+ RestrictAddressFamilies = [ "AF_UNIX" "AF_INET" "AF_INET6" ];
+ MemoryDenyWriteExecute = false;
+ LoadCredential = lib.optional (cfg.redis.enable && cfg.redis.passwordFile != null) "REDIS_PASSWORD:${cfg.redis.passwordFile}";
+ ExecStart = mkDefault "${cfg.package}/bin/db-rest";
+
+ RemoveIPC = true;
+ NoNewPrivileges = true;
+ PrivateDevices = true;
+ ProtectClock = true;
+ ProtectKernelLogs = true;
+ ProtectControlGroups = true;
+ ProtectKernelModules = true;
+ PrivateMounts = true;
+ SystemCallArchitectures = "native";
+ ProtectHostname = true;
+ LockPersonality = true;
+ ProtectKernelTunables = true;
+ RestrictRealtime = true;
+ RestrictSUIDSGID = true;
+ RestrictNamespaces = true;
+ ProtectSystem = "strict";
+ ProtectProc = "invisible";
+ ProcSubset = "pid";
+ ProtectHome = true;
+ PrivateUsers = true;
+ PrivateTmp = true;
+ CapabilityBoundingSet = "";
+ };
+ environment = {
+ NODE_ENV = "production";
+ NODE_EXTRA_CA_CERTS = "/etc/ssl/certs/ca-certificates.crt";
+ HOSTNAME = cfg.host;
+ PORT = toString cfg.port;
+ };
+ }
+ (mkIf cfg.redis.enable (if cfg.redis.createLocally then
+ { environment.REDIS_URL = config.services.redis.servers.db-rest.unixSocket; }
+ else
+ {
+ script =
+ let
+ username = lib.optionalString (cfg.redis.user != null) (cfg.redis.user);
+ host = cfg.redis.host;
+ port = toString cfg.redis.port;
+ protocol = if cfg.redis.useSSL then "rediss" else "redis";
+ in
+ ''
+ export REDIS_URL="${protocol}://${username}:$(${config.systemd.package}/bin/systemd-creds cat REDIS_PASSWORD)@${host}:${port}"
+ exec ${cfg.package}/bin/db-rest
+ '';
+ }))
+ ];
+
+ users.users = lib.mkMerge [
+ (lib.mkIf (cfg.user == "db-rest") {
+ db-rest = {
+ isSystemUser = true;
+ group = cfg.group;
+ };
+ })
+ (lib.mkIf cfg.redis.createLocally { ${cfg.user}.extraGroups = [ "redis-db-rest" ]; })
+ ];
+
+ users.groups = lib.mkIf (cfg.group == "db-rest") { db-rest = { }; };
+
+ services.redis.servers.db-rest.enable = cfg.redis.enable && cfg.redis.createLocally;
+ };
+ meta.maintainers = with maintainers; [ marie ];
+}
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/devmon.nix b/third_party/nixpkgs/nixos/modules/services/misc/devmon.nix
index bd0b738b70..e4a3348646 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/devmon.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/devmon.nix
@@ -8,7 +8,7 @@ let
in {
options = {
services.devmon = {
- enable = mkEnableOption (lib.mdDoc "devmon, an automatic device mounting daemon");
+ enable = mkEnableOption "devmon, an automatic device mounting daemon";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/dictd.nix b/third_party/nixpkgs/nixos/modules/services/misc/dictd.nix
index 4b714b84f3..8cb51bb0b7 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/dictd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/dictd.nix
@@ -17,7 +17,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the DICT.org dictionary server.
'';
};
@@ -27,7 +27,7 @@ in
default = with pkgs.dictdDBs; [ wiktionary wordnet ];
defaultText = literalExpression "with pkgs.dictdDBs; [ wiktionary wordnet ]";
example = literalExpression "[ pkgs.dictdDBs.nld2eng ]";
- description = lib.mdDoc "List of databases to make available.";
+ description = "List of databases to make available.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/disnix.nix b/third_party/nixpkgs/nixos/modules/services/misc/disnix.nix
index ee342cbc2e..80e7492049 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/disnix.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/disnix.nix
@@ -17,24 +17,24 @@ in
services.disnix = {
- enable = mkEnableOption (lib.mdDoc "Disnix");
+ enable = mkEnableOption "Disnix";
enableMultiUser = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to support multi-user mode by enabling the Disnix D-Bus service";
+ description = "Whether to support multi-user mode by enabling the Disnix D-Bus service";
};
- useWebServiceInterface = mkEnableOption (lib.mdDoc "the DisnixWebService interface running on Apache Tomcat");
+ useWebServiceInterface = mkEnableOption "the DisnixWebService interface running on Apache Tomcat";
package = mkPackageOption pkgs "disnix" {};
- enableProfilePath = mkEnableOption (lib.mdDoc "exposing the Disnix profiles in the system's PATH");
+ enableProfilePath = mkEnableOption "exposing the Disnix profiles in the system's PATH";
profiles = mkOption {
type = types.listOf types.str;
default = [ "default" ];
- description = lib.mdDoc "Names of the Disnix profiles to expose in the system's PATH";
+ description = "Names of the Disnix profiles to expose in the system's PATH";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/docker-registry.nix b/third_party/nixpkgs/nixos/modules/services/misc/docker-registry.nix
index e8fbc05423..93bf71ea3e 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/docker-registry.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/docker-registry.nix
@@ -41,32 +41,37 @@ let
};
};
- configFile = pkgs.writeText "docker-registry-config.yml" (builtins.toJSON (recursiveUpdate registryConfig cfg.extraConfig));
-
+ configFile = cfg.configFile;
in {
options.services.dockerRegistry = {
- enable = mkEnableOption (lib.mdDoc "Docker Registry");
+ enable = mkEnableOption "Docker Registry";
package = mkPackageOption pkgs "docker-distribution" {
example = "gitlab-container-registry";
};
listenAddress = mkOption {
- description = lib.mdDoc "Docker registry host or ip to bind to.";
+ description = "Docker registry host or ip to bind to.";
default = "127.0.0.1";
type = types.str;
};
port = mkOption {
- description = lib.mdDoc "Docker registry port to bind to.";
+ description = "Docker registry port to bind to.";
default = 5000;
type = types.port;
};
+ openFirewall = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Opens the port used by the firewall.";
+ };
+
storagePath = mkOption {
type = types.nullOr types.path;
default = "/var/lib/docker-registry";
- description = lib.mdDoc ''
+ description = ''
Docker registry storage path for the filesystem storage backend. Set to
null to configure another backend via extraConfig.
'';
@@ -75,37 +80,48 @@ in {
enableDelete = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable delete for manifests and blobs.";
+ description = "Enable delete for manifests and blobs.";
};
- enableRedisCache = mkEnableOption (lib.mdDoc "redis as blob cache");
+ enableRedisCache = mkEnableOption "redis as blob cache";
redisUrl = mkOption {
type = types.str;
default = "localhost:6379";
- description = lib.mdDoc "Set redis host and port.";
+ description = "Set redis host and port.";
};
redisPassword = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc "Set redis password.";
+ description = "Set redis password.";
};
extraConfig = mkOption {
- description = lib.mdDoc ''
+ description = ''
Docker extra registry configuration via environment variables.
'';
default = {};
type = types.attrs;
};
- enableGarbageCollect = mkEnableOption (lib.mdDoc "garbage collect");
+ configFile = lib.mkOption {
+ default = pkgs.writeText "docker-registry-config.yml" (builtins.toJSON (recursiveUpdate registryConfig cfg.extraConfig));
+ defaultText = literalExpression ''pkgs.writeText "docker-registry-config.yml" "# my custom docker-registry-config.yml ..."'';
+ description = ''
+ Path to CNCF distribution config file.
+
+ Setting this option will override any configuration applied by the extraConfig option.
+ '';
+ type = types.path;
+ };
+
+ enableGarbageCollect = mkEnableOption "garbage collect";
garbageCollectDates = mkOption {
default = "daily";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Specification (in the format described by
{manpage}`systemd.time(7)`) of the time at
which the garbage collect will occur.
@@ -154,5 +170,9 @@ in {
isSystemUser = true;
};
users.groups.docker-registry = {};
+
+ networking.firewall = mkIf cfg.openFirewall {
+ allowedTCPPorts = [ cfg.port ];
+ };
};
}
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/domoticz.nix b/third_party/nixpkgs/nixos/modules/services/misc/domoticz.nix
index 315092f933..52443f49f7 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/domoticz.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/domoticz.nix
@@ -12,18 +12,18 @@ in {
options = {
services.domoticz = {
- enable = mkEnableOption (lib.mdDoc pkgDesc);
+ enable = mkEnableOption pkgDesc;
bind = mkOption {
type = types.str;
default = "0.0.0.0";
- description = lib.mdDoc "IP address to bind to.";
+ description = "IP address to bind to.";
};
port = mkOption {
type = types.port;
default = 8080;
- description = lib.mdDoc "Port to bind to for HTTP, set to 0 to disable HTTP.";
+ description = "Port to bind to for HTTP, set to 0 to disable HTTP.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/duckling.nix b/third_party/nixpkgs/nixos/modules/services/misc/duckling.nix
index 4d06ca7fa6..77d2a92380 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/duckling.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/duckling.nix
@@ -7,12 +7,12 @@ let
in {
options = {
services.duckling = {
- enable = mkEnableOption (lib.mdDoc "duckling");
+ enable = mkEnableOption "duckling";
port = mkOption {
type = types.port;
default = 8080;
- description = lib.mdDoc ''
+ description = ''
Port on which duckling will run.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/dwm-status.nix b/third_party/nixpkgs/nixos/modules/services/misc/dwm-status.nix
index 351adf31d9..081451f2ac 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/dwm-status.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/dwm-status.nix
@@ -22,7 +22,7 @@ in
services.dwm-status = {
- enable = mkEnableOption (lib.mdDoc "dwm-status user service");
+ enable = mkEnableOption "dwm-status user service";
package = mkPackageOption pkgs "dwm-status" {
example = "dwm-status.override { enableAlsaUtils = false; }";
@@ -30,7 +30,7 @@ in
order = mkOption {
type = types.listOf (types.enum [ "audio" "backlight" "battery" "cpu_load" "network" "time" ]);
- description = lib.mdDoc ''
+ description = ''
List of enabled features in order.
'';
};
@@ -38,7 +38,7 @@ in
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra config in TOML format.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/dysnomia.nix b/third_party/nixpkgs/nixos/modules/services/misc/dysnomia.nix
index 129345e381..8150b78762 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/dysnomia.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/dysnomia.nix
@@ -87,52 +87,52 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable Dysnomia";
+ description = "Whether to enable Dysnomia";
};
enableAuthentication = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to publish privacy-sensitive authentication credentials";
+ description = "Whether to publish privacy-sensitive authentication credentials";
};
package = mkOption {
type = types.path;
- description = lib.mdDoc "The Dysnomia package";
+ description = "The Dysnomia package";
};
properties = mkOption {
- description = lib.mdDoc "An attribute set in which each attribute represents a machine property. Optionally, these values can be shell substitutions.";
+ description = "An attribute set in which each attribute represents a machine property. Optionally, these values can be shell substitutions.";
default = {};
type = types.attrs;
};
containers = mkOption {
- description = lib.mdDoc "An attribute set in which each key represents a container and each value an attribute set providing its configuration properties";
+ description = "An attribute set in which each key represents a container and each value an attribute set providing its configuration properties";
default = {};
type = types.attrsOf types.attrs;
};
components = mkOption {
- description = lib.mdDoc "An attribute set in which each key represents a container and each value an attribute set in which each key represents a component and each value a derivation constructing its initial state";
+ description = "An attribute set in which each key represents a container and each value an attribute set in which each key represents a component and each value a derivation constructing its initial state";
default = {};
type = types.attrsOf types.attrs;
};
extraContainerProperties = mkOption {
- description = lib.mdDoc "An attribute set providing additional container settings in addition to the default properties";
+ description = "An attribute set providing additional container settings in addition to the default properties";
default = {};
type = types.attrs;
};
extraContainerPaths = mkOption {
- description = lib.mdDoc "A list of paths containing additional container configurations that are added to the search folders";
+ description = "A list of paths containing additional container configurations that are added to the search folders";
default = [];
type = types.listOf types.path;
};
extraModulePaths = mkOption {
- description = lib.mdDoc "A list of paths containing additional modules that are added to the search folders";
+ description = "A list of paths containing additional modules that are added to the search folders";
default = [];
type = types.listOf types.path;
};
@@ -140,7 +140,7 @@ in
enableLegacyModules = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to enable Dysnomia legacy process and wrapper modules";
+ description = "Whether to enable Dysnomia legacy process and wrapper modules";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/errbot.nix b/third_party/nixpkgs/nixos/modules/services/misc/errbot.nix
index a650bc5bbd..b447ba5d43 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/errbot.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/errbot.nix
@@ -27,48 +27,48 @@ in {
options = {
services.errbot.instances = mkOption {
default = {};
- description = lib.mdDoc "Errbot instance configs";
+ description = "Errbot instance configs";
type = types.attrsOf (types.submodule {
options = {
dataDir = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc "Data directory for errbot instance.";
+ description = "Data directory for errbot instance.";
};
plugins = mkOption {
type = types.listOf types.package;
default = [];
- description = lib.mdDoc "List of errbot plugin derivations.";
+ description = "List of errbot plugin derivations.";
};
logLevel = mkOption {
type = types.str;
default = "INFO";
- description = lib.mdDoc "Errbot log level";
+ description = "Errbot log level";
};
admins = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "List of identifiers of errbot admins.";
+ description = "List of identifiers of errbot admins.";
};
backend = mkOption {
type = types.str;
default = "XMPP";
- description = lib.mdDoc "Errbot backend name.";
+ description = "Errbot backend name.";
};
identity = mkOption {
type = types.attrs;
- description = lib.mdDoc "Errbot identity configuration";
+ description = "Errbot identity configuration";
};
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "String to be appended to the config verbatim";
+ description = "String to be appended to the config verbatim";
};
};
});
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/etebase-server.nix b/third_party/nixpkgs/nixos/modules/services/misc/etebase-server.nix
index 045048a1a2..7b6b5249f2 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/etebase-server.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/etebase-server.nix
@@ -5,9 +5,6 @@ with lib;
let
cfg = config.services.etebase-server;
- pythonEnv = pkgs.python3.withPackages (ps: with ps;
- [ etebase-server daphne ]);
-
iniFmt = pkgs.formats.ini {};
configIni = iniFmt.generate "etebase-server.ini" cfg.settings;
@@ -36,7 +33,7 @@ in
type = types.bool;
default = false;
example = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the Etebase server.
Once enabled you need to create an admin user by invoking the
@@ -46,22 +43,29 @@ in
'';
};
+ package = mkOption {
+ type = types.package;
+ default = pkgs.python3.pkgs.etebase-server;
+ defaultText = literalExpression "pkgs.python3.pkgs.etebase-server";
+ description = "etebase-server package to use.";
+ };
+
dataDir = mkOption {
type = types.str;
default = "/var/lib/etebase-server";
- description = lib.mdDoc "Directory to store the Etebase server data.";
+ description = "Directory to store the Etebase server data.";
};
port = mkOption {
type = with types; nullOr port;
default = 8001;
- description = lib.mdDoc "Port to listen on.";
+ description = "Port to listen on.";
};
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to open ports in the firewall for the server.
'';
};
@@ -69,7 +73,7 @@ in
unixSocket = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc "The path to the socket to bind to.";
+ description = "The path to the socket to bind to.";
example = "/run/etebase-server/etebase-server.sock";
};
@@ -82,14 +86,14 @@ in
debug = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to set django's DEBUG flag.
'';
};
secret_file = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The path to a file containing the secret
used as django's SECRET_KEY.
'';
@@ -98,13 +102,13 @@ in
type = types.str;
default = "${cfg.dataDir}/static";
defaultText = literalExpression ''"''${config.services.etebase-server.dataDir}/static"'';
- description = lib.mdDoc "The directory for static files.";
+ description = "The directory for static files.";
};
media_root = mkOption {
type = types.str;
default = "${cfg.dataDir}/media";
defaultText = literalExpression ''"''${config.services.etebase-server.dataDir}/media"'';
- description = lib.mdDoc "The media directory.";
+ description = "The media directory.";
};
};
allowed_hosts = {
@@ -112,7 +116,7 @@ in
type = types.str;
default = "0.0.0.0";
example = "localhost";
- description = lib.mdDoc ''
+ description = ''
The main host that is allowed access.
'';
};
@@ -121,19 +125,19 @@ in
engine = mkOption {
type = types.enum [ "django.db.backends.sqlite3" "django.db.backends.postgresql" ];
default = "django.db.backends.sqlite3";
- description = lib.mdDoc "The database engine to use.";
+ description = "The database engine to use.";
};
name = mkOption {
type = types.str;
default = "${cfg.dataDir}/db.sqlite3";
defaultText = literalExpression ''"''${config.services.etebase-server.dataDir}/db.sqlite3"'';
- description = lib.mdDoc "The database name.";
+ description = "The database name.";
};
};
};
};
default = {};
- description = lib.mdDoc ''
+ description = ''
Configuration for `etebase-server`. Refer to
and
@@ -153,7 +157,7 @@ in
user = mkOption {
type = types.str;
default = defaultUser;
- description = lib.mdDoc "User under which Etebase server runs.";
+ description = "User under which Etebase server runs.";
};
};
};
@@ -164,7 +168,7 @@ in
(runCommand "etebase-server" {
nativeBuildInputs = [ makeWrapper ];
} ''
- makeWrapper ${pythonEnv}/bin/etebase-server \
+ makeWrapper ${cfg.package}/bin/etebase-server \
$out/bin/etebase-server \
--chdir ${escapeShellArg cfg.dataDir} \
--prefix ETEBASE_EASY_CONFIG_PATH : "${configIni}"
@@ -173,13 +177,15 @@ in
systemd.tmpfiles.rules = [
"d '${cfg.dataDir}' - ${cfg.user} ${config.users.users.${cfg.user}.group} - -"
+ ] ++ lib.optionals (cfg.unixSocket != null) [
+ "d '${builtins.dirOf cfg.unixSocket}' - ${cfg.user} ${config.users.users.${cfg.user}.group} - -"
];
systemd.services.etebase-server = {
description = "An Etebase (EteSync 2.0) server";
after = [ "network.target" "systemd-tmpfiles-setup.service" ];
+ path = [ cfg.package ];
wantedBy = [ "multi-user.target" ];
- path = [ pythonEnv ];
serviceConfig = {
User = cfg.user;
Restart = "always";
@@ -187,24 +193,26 @@ in
};
environment = {
ETEBASE_EASY_CONFIG_PATH = configIni;
+ PYTHONPATH = cfg.package.pythonPath;
};
preStart = ''
# Auto-migrate on first run or if the package has changed
versionFile="${cfg.dataDir}/src-version"
- if [[ $(cat "$versionFile" 2>/dev/null) != ${pkgs.etebase-server} ]]; then
+ if [[ $(cat "$versionFile" 2>/dev/null) != ${cfg.package} ]]; then
etebase-server migrate --no-input
etebase-server collectstatic --no-input --clear
- echo ${pkgs.etebase-server} > "$versionFile"
+ echo ${cfg.package} > "$versionFile"
fi
'';
script =
let
+ python = cfg.package.python;
networking = if cfg.unixSocket != null
- then "-u ${cfg.unixSocket}"
- else "-b 0.0.0.0 -p ${toString cfg.port}";
+ then "--uds ${cfg.unixSocket}"
+ else "--host 0.0.0.0 --port ${toString cfg.port}";
in ''
- cd "${pythonEnv}/lib/etebase-server";
- daphne ${networking} \
+ ${python.pkgs.uvicorn}/bin/uvicorn ${networking} \
+ --app-dir ${cfg.package}/${cfg.package.python.sitePackages} \
etebase_server.asgi:application
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/etesync-dav.nix b/third_party/nixpkgs/nixos/modules/services/misc/etesync-dav.nix
index ae2b5ad043..ea659c61bd 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/etesync-dav.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/etesync-dav.nix
@@ -7,37 +7,37 @@ let
in
{
options.services.etesync-dav = {
- enable = mkEnableOption (lib.mdDoc "etesync-dav");
+ enable = mkEnableOption "etesync-dav, end-to-end encrypted sync for contacts, calendars and tasks";
host = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "The server host address.";
+ description = "The server host address.";
};
port = mkOption {
type = types.port;
default = 37358;
- description = lib.mdDoc "The server host port.";
+ description = "The server host port.";
};
apiUrl = mkOption {
type = types.str;
default = "https://api.etesync.com/";
- description = lib.mdDoc "The url to the etesync API.";
+ description = "The url to the etesync API.";
};
openFirewall = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Whether to open the firewall for the specified port.";
+ description = "Whether to open the firewall for the specified port.";
};
sslCertificate = mkOption {
type = types.nullOr types.path;
default = null;
example = "/var/etesync.crt";
- description = lib.mdDoc ''
+ description = ''
Path to server SSL certificate. It will be copied into
etesync-dav's data directory.
'';
@@ -47,7 +47,7 @@ in
type = types.nullOr types.path;
default = null;
example = "/var/etesync.key";
- description = lib.mdDoc ''
+ description = ''
Path to server SSL certificate key. It will be copied into
etesync-dav's data directory.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/evdevremapkeys.nix b/third_party/nixpkgs/nixos/modules/services/misc/evdevremapkeys.nix
index 11ea6a5f03..e559dd89dc 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/evdevremapkeys.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/evdevremapkeys.nix
@@ -8,12 +8,12 @@ let
in
{
options.services.evdevremapkeys = {
- enable = mkEnableOption (lib.mdDoc ''evdevremapkeys'');
+ enable = mkEnableOption ''evdevremapkeys, a daemon to remap events on linux input devices'';
settings = mkOption {
type = format.type;
default = { };
- description = lib.mdDoc ''
+ description = ''
config.yaml for evdevremapkeys
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/felix.nix b/third_party/nixpkgs/nixos/modules/services/misc/felix.nix
index 306d4cf0d7..0283de128a 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/felix.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/felix.nix
@@ -17,25 +17,25 @@ in
services.felix = {
- enable = mkEnableOption (lib.mdDoc "the Apache Felix OSGi service");
+ enable = mkEnableOption "the Apache Felix OSGi service";
bundles = mkOption {
type = types.listOf types.package;
default = [ pkgs.felix_remoteshell ];
defaultText = literalExpression "[ pkgs.felix_remoteshell ]";
- description = lib.mdDoc "List of bundles that should be activated on startup";
+ description = "List of bundles that should be activated on startup";
};
user = mkOption {
type = types.str;
default = "osgi";
- description = lib.mdDoc "User account under which Apache Felix runs.";
+ description = "User account under which Apache Felix runs.";
};
group = mkOption {
type = types.str;
default = "osgi";
- description = lib.mdDoc "Group account under which Apache Felix runs.";
+ description = "Group account under which Apache Felix runs.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/forgejo.md b/third_party/nixpkgs/nixos/modules/services/misc/forgejo.md
index 14b21933e6..f234ebf44a 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/forgejo.md
+++ b/third_party/nixpkgs/nixos/modules/services/misc/forgejo.md
@@ -57,23 +57,25 @@ locations and database, instead of having to copy or rename them.
Make sure to disable `services.gitea`, when doing this.
```nix
-services.gitea.enable = false;
+{
+ services.gitea.enable = false;
-services.forgejo = {
- enable = true;
- user = "gitea";
- group = "gitea";
- stateDir = "/var/lib/gitea";
- database.name = "gitea";
- database.user = "gitea";
-};
+ services.forgejo = {
+ enable = true;
+ user = "gitea";
+ group = "gitea";
+ stateDir = "/var/lib/gitea";
+ database.name = "gitea";
+ database.user = "gitea";
+ };
-users.users.gitea = {
- home = "/var/lib/gitea";
- useDefaultShell = true;
- group = "gitea";
- isSystemUser = true;
-};
+ users.users.gitea = {
+ home = "/var/lib/gitea";
+ useDefaultShell = true;
+ group = "gitea";
+ isSystemUser = true;
+ };
-users.groups.gitea = {};
+ users.groups.gitea = {};
+}
```
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/forgejo.nix b/third_party/nixpkgs/nixos/modules/services/misc/forgejo.nix
index 08cddc3a07..babed2d5ac 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/forgejo.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/forgejo.nix
@@ -14,7 +14,6 @@ let
inherit (lib)
literalExpression
- mdDoc
mkChangedOptionModule
mkDefault
mkEnableOption
@@ -55,14 +54,14 @@ in
options = {
services.forgejo = {
- enable = mkEnableOption (mdDoc "Forgejo");
+ enable = mkEnableOption "Forgejo, a software forge";
package = mkPackageOption pkgs "forgejo" { };
useWizard = mkOption {
default = false;
type = types.bool;
- description = mdDoc ''
+ description = ''
Whether to use the built-in installation wizard instead of
declaratively managing the {file}`app.ini` config file in nix.
'';
@@ -71,14 +70,14 @@ in
stateDir = mkOption {
default = "/var/lib/forgejo";
type = types.str;
- description = mdDoc "Forgejo data directory.";
+ description = "Forgejo data directory.";
};
customDir = mkOption {
default = "${cfg.stateDir}/custom";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/custom"'';
type = types.str;
- description = mdDoc ''
+ description = ''
Base directory for custom templates and other options.
If {option}`${opt.useWizard}` is disabled (default), this directory will also
@@ -89,13 +88,13 @@ in
user = mkOption {
type = types.str;
default = "forgejo";
- description = mdDoc "User account under which Forgejo runs.";
+ description = "User account under which Forgejo runs.";
};
group = mkOption {
type = types.str;
default = "forgejo";
- description = mdDoc "Group under which Forgejo runs.";
+ description = "Group under which Forgejo runs.";
};
database = {
@@ -103,43 +102,43 @@ in
type = types.enum [ "sqlite3" "mysql" "postgres" ];
example = "mysql";
default = "sqlite3";
- description = mdDoc "Database engine to use.";
+ description = "Database engine to use.";
};
host = mkOption {
type = types.str;
default = "127.0.0.1";
- description = mdDoc "Database host address.";
+ description = "Database host address.";
};
port = mkOption {
type = types.port;
- default = if !usePostgresql then 3306 else pg.port;
+ default = if usePostgresql then pg.settings.port else 3306;
defaultText = literalExpression ''
if config.${opt.database.type} != "postgresql"
then 3306
- else config.${options.services.postgresql.port}
+ else 5432
'';
- description = mdDoc "Database host port.";
+ description = "Database host port.";
};
name = mkOption {
type = types.str;
default = "forgejo";
- description = mdDoc "Database name.";
+ description = "Database name.";
};
user = mkOption {
type = types.str;
default = "forgejo";
- description = mdDoc "Database user.";
+ description = "Database user.";
};
passwordFile = mkOption {
type = types.nullOr types.path;
default = null;
example = "/run/keys/forgejo-dbpassword";
- description = mdDoc ''
+ description = ''
A file containing the password corresponding to
{option}`${opt.database.user}`.
'';
@@ -150,31 +149,31 @@ in
default = if (cfg.database.createDatabase && usePostgresql) then "/run/postgresql" else if (cfg.database.createDatabase && useMysql) then "/run/mysqld/mysqld.sock" else null;
defaultText = literalExpression "null";
example = "/run/mysqld/mysqld.sock";
- description = mdDoc "Path to the unix socket file to use for authentication.";
+ description = "Path to the unix socket file to use for authentication.";
};
path = mkOption {
type = types.str;
default = "${cfg.stateDir}/data/forgejo.db";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/data/forgejo.db"'';
- description = mdDoc "Path to the sqlite3 database file.";
+ description = "Path to the sqlite3 database file.";
};
createDatabase = mkOption {
type = types.bool;
default = true;
- description = mdDoc "Whether to create a local database automatically.";
+ description = "Whether to create a local database automatically.";
};
};
dump = {
- enable = mkEnableOption (mdDoc "periodic dumps via the [built-in {command}`dump` command](https://forgejo.org/docs/latest/admin/command-line/#dump)");
+ enable = mkEnableOption "periodic dumps via the [built-in {command}`dump` command](https://forgejo.org/docs/latest/admin/command-line/#dump)";
interval = mkOption {
type = types.str;
default = "04:31";
example = "hourly";
- description = mdDoc ''
+ description = ''
Run a Forgejo dump at this interval. Runs by default at 04:31 every day.
The format is described in
@@ -186,19 +185,19 @@ in
type = types.str;
default = "${cfg.stateDir}/dump";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/dump"'';
- description = mdDoc "Path to the directory where the dump archives will be stored.";
+ description = "Path to the directory where the dump archives will be stored.";
};
type = mkOption {
type = types.enum [ "zip" "tar" "tar.sz" "tar.gz" "tar.xz" "tar.bz2" "tar.br" "tar.lz4" "tar.zst" ];
default = "zip";
- description = mdDoc "Archive format used to store the dump file.";
+ description = "Archive format used to store the dump file.";
};
file = mkOption {
type = types.nullOr types.str;
default = null;
- description = mdDoc "Filename to be used for the dump. If `null` a default name is chosen by forgejo.";
+ description = "Filename to be used for the dump. If `null` a default name is chosen by forgejo.";
example = "forgejo-dump";
};
};
@@ -207,14 +206,14 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = mdDoc "Enables git-lfs support.";
+ description = "Enables git-lfs support.";
};
contentDir = mkOption {
type = types.str;
default = "${cfg.stateDir}/data/lfs";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/data/lfs"'';
- description = mdDoc "Where to store LFS files.";
+ description = "Where to store LFS files.";
};
};
@@ -222,19 +221,19 @@ in
type = types.str;
default = "${cfg.stateDir}/repositories";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/repositories"'';
- description = mdDoc "Path to the git repositories.";
+ description = "Path to the git repositories.";
};
mailerPasswordFile = mkOption {
type = types.nullOr types.str;
default = null;
example = "/run/keys/forgejo-mailpw";
- description = mdDoc "Path to a file containing the SMTP password.";
+ description = "Path to a file containing the SMTP password.";
};
settings = mkOption {
default = { };
- description = mdDoc ''
+ description = ''
Free-form settings written directly to the `app.ini` configfile file.
Refer to for supported values.
'';
@@ -267,12 +266,12 @@ in
default = "${cfg.stateDir}/log";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/log"'';
type = types.str;
- description = mdDoc "Root path for log files.";
+ description = "Root path for log files.";
};
LEVEL = mkOption {
default = "Info";
type = types.enum [ "Trace" "Debug" "Info" "Warn" "Error" "Critical" ];
- description = mdDoc "General log level.";
+ description = "General log level.";
};
};
@@ -280,33 +279,33 @@ in
PROTOCOL = mkOption {
type = types.enum [ "http" "https" "fcgi" "http+unix" "fcgi+unix" ];
default = "http";
- description = mdDoc ''Listen protocol. `+unix` means "over unix", not "in addition to."'';
+ description = ''Listen protocol. `+unix` means "over unix", not "in addition to."'';
};
HTTP_ADDR = mkOption {
type = types.either types.str types.path;
default = if lib.hasSuffix "+unix" cfg.settings.server.PROTOCOL then "/run/forgejo/forgejo.sock" else "0.0.0.0";
defaultText = literalExpression ''if lib.hasSuffix "+unix" cfg.settings.server.PROTOCOL then "/run/forgejo/forgejo.sock" else "0.0.0.0"'';
- description = mdDoc "Listen address. Must be a path when using a unix socket.";
+ description = "Listen address. Must be a path when using a unix socket.";
};
HTTP_PORT = mkOption {
type = types.port;
default = 3000;
- description = mdDoc "Listen port. Ignored when using a unix socket.";
+ description = "Listen port. Ignored when using a unix socket.";
};
DOMAIN = mkOption {
type = types.str;
default = "localhost";
- description = mdDoc "Domain name of your server.";
+ description = "Domain name of your server.";
};
ROOT_URL = mkOption {
type = types.str;
default = "http://${cfg.settings.server.DOMAIN}:${toString cfg.settings.server.HTTP_PORT}/";
defaultText = literalExpression ''"http://''${config.services.forgejo.settings.server.DOMAIN}:''${toString config.services.forgejo.settings.server.HTTP_PORT}/"'';
- description = mdDoc "Full public URL of Forgejo server.";
+ description = "Full public URL of Forgejo server.";
};
STATIC_ROOT_PATH = mkOption {
@@ -314,20 +313,20 @@ in
default = cfg.package.data;
defaultText = literalExpression "config.${opt.package}.data";
example = "/var/lib/forgejo/data";
- description = mdDoc "Upper level of template and static files path.";
+ description = "Upper level of template and static files path.";
};
DISABLE_SSH = mkOption {
type = types.bool;
default = false;
- description = mdDoc "Disable external SSH feature.";
+ description = "Disable external SSH feature.";
};
SSH_PORT = mkOption {
type = types.port;
default = 22;
example = 2222;
- description = mdDoc ''
+ description = ''
SSH port displayed in clone URL.
The option is required to configure a service when the external visible port
differs from the local listening port i.e. if port forwarding is used.
@@ -339,7 +338,7 @@ in
COOKIE_SECURE = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Marks session cookies as "secure" as a hint for browsers to only send
them via HTTPS. This option is recommend, if Forgejo is being served over HTTPS.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/freeswitch.nix b/third_party/nixpkgs/nixos/modules/services/misc/freeswitch.nix
index a8f7b3d0c3..e90d9838fc 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/freeswitch.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/freeswitch.nix
@@ -18,11 +18,11 @@ let
in {
options = {
services.freeswitch = {
- enable = mkEnableOption (lib.mdDoc "FreeSWITCH");
+ enable = mkEnableOption "FreeSWITCH";
enableReload = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Issue the `reloadxml` command to FreeSWITCH when configuration directory changes (instead of restart).
See [FreeSWITCH documentation](https://freeswitch.org/confluence/display/FREESWITCH/Reloading) for more info.
The configuration directory is exposed at {file}`/etc/freeswitch`.
@@ -34,7 +34,7 @@ in {
default = "${config.services.freeswitch.package}/share/freeswitch/conf/vanilla";
defaultText = literalExpression ''"''${config.services.freeswitch.package}/share/freeswitch/conf/vanilla"'';
example = literalExpression ''"''${config.services.freeswitch.package}/share/freeswitch/conf/minimal"'';
- description = lib.mdDoc ''
+ description = ''
Configuration template to use.
See available templates in [FreeSWITCH repository](https://github.com/signalwire/freeswitch/tree/master/conf).
You can also set your own configuration directory.
@@ -51,7 +51,7 @@ in {
''';
}
'';
- description = lib.mdDoc ''
+ description = ''
Override file in FreeSWITCH config template directory.
Each top-level attribute denotes a file path in the configuration directory, its value is the file path.
See [FreeSWITCH documentation](https://freeswitch.org/confluence/display/FREESWITCH/Default+Configuration) for more info.
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/fstrim.nix b/third_party/nixpkgs/nixos/modules/services/misc/fstrim.nix
index 55fb24e292..d2dda2636e 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/fstrim.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/fstrim.nix
@@ -11,12 +11,12 @@ in {
options = {
services.fstrim = {
- enable = mkEnableOption (lib.mdDoc "periodic SSD TRIM of mounted partitions in background");
+ enable = mkEnableOption "periodic SSD TRIM of mounted partitions in background";
interval = mkOption {
type = types.str;
default = "weekly";
- description = lib.mdDoc ''
+ description = ''
How often we run fstrim. For most desktop and server systems
a sufficient trimming frequency is once a week.
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/gammu-smsd.nix b/third_party/nixpkgs/nixos/modules/services/misc/gammu-smsd.nix
index eff725f5a8..b30258333a 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/gammu-smsd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/gammu-smsd.nix
@@ -53,44 +53,44 @@ in {
options = {
services.gammu-smsd = {
- enable = mkEnableOption (lib.mdDoc "gammu-smsd daemon");
+ enable = mkEnableOption "gammu-smsd daemon";
user = mkOption {
type = types.str;
default = "smsd";
- description = lib.mdDoc "User that has access to the device";
+ description = "User that has access to the device";
};
device = {
path = mkOption {
type = types.path;
- description = lib.mdDoc "Device node or address of the phone";
+ description = "Device node or address of the phone";
example = "/dev/ttyUSB2";
};
group = mkOption {
type = types.str;
default = "root";
- description = lib.mdDoc "Owner group of the device";
+ description = "Owner group of the device";
example = "dialout";
};
connection = mkOption {
type = types.str;
default = "at";
- description = lib.mdDoc "Protocol which will be used to talk to the phone";
+ description = "Protocol which will be used to talk to the phone";
};
synchronizeTime = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to set time from computer to the phone during starting connection";
+ description = "Whether to set time from computer to the phone during starting connection";
};
pin = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "PIN code for the simcard";
+ description = "PIN code for the simcard";
};
};
@@ -99,13 +99,13 @@ in {
file = mkOption {
type = types.str;
default = "syslog";
- description = lib.mdDoc "Path to file where information about communication will be stored";
+ description = "Path to file where information about communication will be stored";
};
format = mkOption {
type = types.enum [ "nothing" "text" "textall" "textalldate" "errors" "errorsdate" "binary" ];
default = "errors";
- description = lib.mdDoc "Determines what will be logged to the LogFile";
+ description = "Determines what will be logged to the LogFile";
};
};
@@ -114,14 +114,14 @@ in {
gammu = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Extra config lines to be added into [gammu] section";
+ description = "Extra config lines to be added into [gammu] section";
};
smsd = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Extra config lines to be added into [smsd] section";
+ description = "Extra config lines to be added into [smsd] section";
};
};
@@ -130,69 +130,69 @@ in {
service = mkOption {
type = types.enum [ "null" "files" "sql" ];
default = "null";
- description = lib.mdDoc "Service to use to store sms data.";
+ description = "Service to use to store sms data.";
};
files = {
inboxPath = mkOption {
type = types.path;
default = "/var/spool/sms/inbox/";
- description = lib.mdDoc "Where the received SMSes are stored";
+ description = "Where the received SMSes are stored";
};
outboxPath = mkOption {
type = types.path;
default = "/var/spool/sms/outbox/";
- description = lib.mdDoc "Where SMSes to be sent should be placed";
+ description = "Where SMSes to be sent should be placed";
};
sentSMSPath = mkOption {
type = types.path;
default = "/var/spool/sms/sent/";
- description = lib.mdDoc "Where the transmitted SMSes are placed";
+ description = "Where the transmitted SMSes are placed";
};
errorSMSPath = mkOption {
type = types.path;
default = "/var/spool/sms/error/";
- description = lib.mdDoc "Where SMSes with error in transmission is placed";
+ description = "Where SMSes with error in transmission is placed";
};
};
sql = {
driver = mkOption {
type = types.enum [ "native_mysql" "native_pgsql" "odbc" "dbi" ];
- description = lib.mdDoc "DB driver to use";
+ description = "DB driver to use";
};
sqlDialect = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "SQL dialect to use (odbc driver only)";
+ description = "SQL dialect to use (odbc driver only)";
};
database = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "Database name to store sms data";
+ description = "Database name to store sms data";
};
host = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "Database server address";
+ description = "Database server address";
};
user = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "User name used for connection to the database";
+ description = "User name used for connection to the database";
};
password = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "User password used for connection to the database";
+ description = "User password used for connection to the database";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/geoipupdate.nix b/third_party/nixpkgs/nixos/modules/services/misc/geoipupdate.nix
index 27c1157e9a..f46bf7b394 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/geoipupdate.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/geoipupdate.nix
@@ -11,14 +11,14 @@ in
options = {
services.geoipupdate = {
- enable = lib.mkEnableOption (lib.mdDoc ''
- periodic downloading of GeoIP databases using geoipupdate.
- '');
+ enable = lib.mkEnableOption ''
+ periodic downloading of GeoIP databases using geoipupdate
+ '';
interval = lib.mkOption {
type = lib.types.str;
default = "weekly";
- description = lib.mdDoc ''
+ description = ''
Update the GeoIP databases at this time / interval.
The format is described in
{manpage}`systemd.time(7)`.
@@ -35,7 +35,7 @@ in
ProxyUserPassword = { _secret = "/run/keys/proxy_pass"; };
}
'';
- description = lib.mdDoc ''
+ description = ''
geoipupdate configuration options. See
for a full list of available options.
@@ -62,7 +62,7 @@ in
AccountID = lib.mkOption {
type = lib.types.int;
- description = lib.mdDoc ''
+ description = ''
Your MaxMind account ID.
'';
};
@@ -74,7 +74,7 @@ in
"GeoLite2-City"
"GeoLite2-Country"
];
- description = lib.mdDoc ''
+ description = ''
List of database edition IDs. This includes new string
IDs like `GeoIP2-City` and old
numeric IDs like `106`.
@@ -83,7 +83,7 @@ in
LicenseKey = lib.mkOption {
type = with lib.types; either path (attrsOf path);
- description = lib.mdDoc ''
+ description = ''
A file containing the MaxMind license key.
Always handled as a secret whether the value is
@@ -98,7 +98,7 @@ in
type = lib.types.path;
default = "/var/lib/GeoIP";
example = "/run/GeoIP";
- description = lib.mdDoc ''
+ description = ''
The directory to store the database files in. The
directory will be automatically created, the owner
changed to `geoip` and permissions
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/gitea.nix b/third_party/nixpkgs/nixos/modules/services/misc/gitea.nix
index 08feea853e..e76ba0efd4 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/gitea.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/gitea.nix
@@ -48,7 +48,7 @@ in
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Enable Gitea Service.";
+ description = "Enable Gitea Service.";
};
package = mkPackageOption pkgs "gitea" { };
@@ -56,32 +56,32 @@ in
useWizard = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Do not generate a configuration and use gitea' installation wizard instead. The first registered user will be administrator.";
+ description = "Do not generate a configuration and use gitea' installation wizard instead. The first registered user will be administrator.";
};
stateDir = mkOption {
default = "/var/lib/gitea";
type = types.str;
- description = lib.mdDoc "Gitea data directory.";
+ description = "Gitea data directory.";
};
customDir = mkOption {
default = "${cfg.stateDir}/custom";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/custom"'';
type = types.str;
- description = lib.mdDoc "Gitea custom directory. Used for config, custom templates and other options.";
+ description = "Gitea custom directory. Used for config, custom templates and other options.";
};
user = mkOption {
type = types.str;
default = "gitea";
- description = lib.mdDoc "User account under which gitea runs.";
+ description = "User account under which gitea runs.";
};
group = mkOption {
type = types.str;
default = "gitea";
- description = lib.mdDoc "Group under which gitea runs.";
+ description = "Group under which gitea runs.";
};
database = {
@@ -89,42 +89,42 @@ in
type = types.enum [ "sqlite3" "mysql" "postgres" ];
example = "mysql";
default = "sqlite3";
- description = lib.mdDoc "Database engine to use.";
+ description = "Database engine to use.";
};
host = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc "Database host address.";
+ description = "Database host address.";
};
port = mkOption {
type = types.port;
- default = if !usePostgresql then 3306 else pg.port;
+ default = if usePostgresql then pg.settings.port else 3306;
defaultText = literalExpression ''
if config.${opt.database.type} != "postgresql"
then 3306
- else config.${options.services.postgresql.port}
+ else 5432
'';
- description = lib.mdDoc "Database host port.";
+ description = "Database host port.";
};
name = mkOption {
type = types.str;
default = "gitea";
- description = lib.mdDoc "Database name.";
+ description = "Database name.";
};
user = mkOption {
type = types.str;
default = "gitea";
- description = lib.mdDoc "Database user.";
+ description = "Database user.";
};
password = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
The password corresponding to {option}`database.user`.
Warning: this is stored in cleartext in the Nix store!
Use {option}`database.passwordFile` instead.
@@ -135,7 +135,7 @@ in
type = types.nullOr types.path;
default = null;
example = "/run/keys/gitea-dbpassword";
- description = lib.mdDoc ''
+ description = ''
A file containing the password corresponding to
{option}`database.user`.
'';
@@ -146,20 +146,20 @@ in
default = if (cfg.database.createDatabase && usePostgresql) then "/run/postgresql" else if (cfg.database.createDatabase && useMysql) then "/run/mysqld/mysqld.sock" else null;
defaultText = literalExpression "null";
example = "/run/mysqld/mysqld.sock";
- description = lib.mdDoc "Path to the unix socket file to use for authentication.";
+ description = "Path to the unix socket file to use for authentication.";
};
path = mkOption {
type = types.str;
default = "${cfg.stateDir}/data/gitea.db";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/data/gitea.db"'';
- description = lib.mdDoc "Path to the sqlite3 database file.";
+ description = "Path to the sqlite3 database file.";
};
createDatabase = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to create a local database automatically.";
+ description = "Whether to create a local database automatically.";
};
};
@@ -167,7 +167,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable a timer that runs gitea dump to generate backup-files of the
current gitea database and repositories.
'';
@@ -177,7 +177,7 @@ in
type = types.str;
default = "04:31";
example = "hourly";
- description = lib.mdDoc ''
+ description = ''
Run a gitea dump at this interval. Runs by default at 04:31 every day.
The format is described in
@@ -189,19 +189,19 @@ in
type = types.str;
default = "${cfg.stateDir}/dump";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/dump"'';
- description = lib.mdDoc "Path to the dump files.";
+ description = "Path to the dump files.";
};
type = mkOption {
type = types.enum [ "zip" "rar" "tar" "sz" "tar.gz" "tar.xz" "tar.bz2" "tar.br" "tar.lz4" "tar.zst" ];
default = "zip";
- description = lib.mdDoc "Archive format used to store the dump file.";
+ description = "Archive format used to store the dump file.";
};
file = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "Filename to be used for the dump. If `null` a default name is chosen by gitea.";
+ description = "Filename to be used for the dump. If `null` a default name is chosen by gitea.";
example = "gitea-dump";
};
};
@@ -210,54 +210,54 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enables git-lfs support.";
+ description = "Enables git-lfs support.";
};
contentDir = mkOption {
type = types.str;
default = "${cfg.stateDir}/data/lfs";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/data/lfs"'';
- description = lib.mdDoc "Where to store LFS files.";
+ description = "Where to store LFS files.";
};
};
appName = mkOption {
type = types.str;
default = "gitea: Gitea Service";
- description = lib.mdDoc "Application name.";
+ description = "Application name.";
};
repositoryRoot = mkOption {
type = types.str;
default = "${cfg.stateDir}/repositories";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/repositories"'';
- description = lib.mdDoc "Path to the git repositories.";
+ description = "Path to the git repositories.";
};
camoHmacKeyFile = mkOption {
type = types.nullOr types.str;
default = null;
example = "/var/lib/secrets/gitea/camoHmacKey";
- description = lib.mdDoc "Path to a file containing the camo HMAC key.";
+ description = "Path to a file containing the camo HMAC key.";
};
mailerPasswordFile = mkOption {
type = types.nullOr types.str;
default = null;
example = "/var/lib/secrets/gitea/mailpw";
- description = lib.mdDoc "Path to a file containing the SMTP password.";
+ description = "Path to a file containing the SMTP password.";
};
metricsTokenFile = mkOption {
type = types.nullOr types.str;
default = null;
example = "/var/lib/secrets/gitea/metrics_token";
- description = lib.mdDoc "Path to a file containing the metrics authentication token.";
+ description = "Path to a file containing the metrics authentication token.";
};
settings = mkOption {
default = {};
- description = lib.mdDoc ''
+ description = ''
Gitea configuration. Refer to
for details on supported values.
'';
@@ -287,12 +287,12 @@ in
default = "${cfg.stateDir}/log";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/log"'';
type = types.str;
- description = lib.mdDoc "Root path for log files.";
+ description = "Root path for log files.";
};
LEVEL = mkOption {
default = "Info";
type = types.enum [ "Trace" "Debug" "Info" "Warn" "Error" "Critical" ];
- description = lib.mdDoc "General log level.";
+ description = "General log level.";
};
};
@@ -300,33 +300,33 @@ in
PROTOCOL = mkOption {
type = types.enum [ "http" "https" "fcgi" "http+unix" "fcgi+unix" ];
default = "http";
- description = lib.mdDoc ''Listen protocol. `+unix` means "over unix", not "in addition to."'';
+ description = ''Listen protocol. `+unix` means "over unix", not "in addition to."'';
};
HTTP_ADDR = mkOption {
type = types.either types.str types.path;
default = if lib.hasSuffix "+unix" cfg.settings.server.PROTOCOL then "/run/gitea/gitea.sock" else "0.0.0.0";
defaultText = literalExpression ''if lib.hasSuffix "+unix" cfg.settings.server.PROTOCOL then "/run/gitea/gitea.sock" else "0.0.0.0"'';
- description = lib.mdDoc "Listen address. Must be a path when using a unix socket.";
+ description = "Listen address. Must be a path when using a unix socket.";
};
HTTP_PORT = mkOption {
type = types.port;
default = 3000;
- description = lib.mdDoc "Listen port. Ignored when using a unix socket.";
+ description = "Listen port. Ignored when using a unix socket.";
};
DOMAIN = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "Domain name of your server.";
+ description = "Domain name of your server.";
};
ROOT_URL = mkOption {
type = types.str;
default = "http://${cfg.settings.server.DOMAIN}:${toString cfg.settings.server.HTTP_PORT}/";
defaultText = literalExpression ''"http://''${config.services.gitea.settings.server.DOMAIN}:''${toString config.services.gitea.settings.server.HTTP_PORT}/"'';
- description = lib.mdDoc "Full public URL of gitea server.";
+ description = "Full public URL of gitea server.";
};
STATIC_ROOT_PATH = mkOption {
@@ -334,20 +334,20 @@ in
default = cfg.package.data;
defaultText = literalExpression "config.${opt.package}.data";
example = "/var/lib/gitea/data";
- description = lib.mdDoc "Upper level of template and static files path.";
+ description = "Upper level of template and static files path.";
};
DISABLE_SSH = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Disable external SSH feature.";
+ description = "Disable external SSH feature.";
};
SSH_PORT = mkOption {
type = types.port;
default = 22;
example = 2222;
- description = lib.mdDoc ''
+ description = ''
SSH port displayed in clone URL.
The option is required to configure a service when the external visible port
differs from the local listening port i.e. if port forwarding is used.
@@ -356,8 +356,8 @@ in
};
service = {
- DISABLE_REGISTRATION = mkEnableOption (lib.mdDoc "the registration lock") // {
- description = lib.mdDoc ''
+ DISABLE_REGISTRATION = mkEnableOption "the registration lock" // {
+ description = ''
By default any user can create an account on this `gitea` instance.
This can be disabled by using this option.
@@ -373,7 +373,7 @@ in
COOKIE_SECURE = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Marks session cookies as "secure" as a hint for browsers to only send
them via HTTPS. This option is recommend, if gitea is being served over HTTPS.
'';
@@ -386,7 +386,7 @@ in
extraConfig = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc "Configuration lines appended to the generated gitea configuration file.";
+ description = "Configuration lines appended to the generated gitea configuration file.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/gitlab.md b/third_party/nixpkgs/nixos/modules/services/misc/gitlab.md
index 916b23584e..f7a5a80274 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/gitlab.md
+++ b/third_party/nixpkgs/nixos/modules/services/misc/gitlab.md
@@ -10,19 +10,21 @@ configure a webserver to proxy HTTP requests to the socket.
For instance, the following configuration could be used to use nginx as
frontend proxy:
-```
-services.nginx = {
- enable = true;
- recommendedGzipSettings = true;
- recommendedOptimisation = true;
- recommendedProxySettings = true;
- recommendedTlsSettings = true;
- virtualHosts."git.example.com" = {
- enableACME = true;
- forceSSL = true;
- locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
+```nix
+{
+ services.nginx = {
+ enable = true;
+ recommendedGzipSettings = true;
+ recommendedOptimisation = true;
+ recommendedProxySettings = true;
+ recommendedTlsSettings = true;
+ virtualHosts."git.example.com" = {
+ enableACME = true;
+ forceSSL = true;
+ locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
+ };
};
-};
+}
```
## Configuring {#module-services-gitlab-configuring}
@@ -35,36 +37,38 @@ The default state dir is `/var/gitlab/state`. This is where
all data like the repositories and uploads will be stored.
A basic configuration with some custom settings could look like this:
-```
-services.gitlab = {
- enable = true;
- databasePasswordFile = "/var/keys/gitlab/db_password";
- initialRootPasswordFile = "/var/keys/gitlab/root_password";
- https = true;
- host = "git.example.com";
- port = 443;
- user = "git";
- group = "git";
- smtp = {
+```nix
+{
+ services.gitlab = {
enable = true;
- address = "localhost";
- port = 25;
- };
- secrets = {
- dbFile = "/var/keys/gitlab/db";
- secretFile = "/var/keys/gitlab/secret";
- otpFile = "/var/keys/gitlab/otp";
- jwsFile = "/var/keys/gitlab/jws";
- };
- extraConfig = {
- gitlab = {
- email_from = "gitlab-no-reply@example.com";
- email_display_name = "Example GitLab";
- email_reply_to = "gitlab-no-reply@example.com";
- default_projects_features = { builds = false; };
+ databasePasswordFile = "/var/keys/gitlab/db_password";
+ initialRootPasswordFile = "/var/keys/gitlab/root_password";
+ https = true;
+ host = "git.example.com";
+ port = 443;
+ user = "git";
+ group = "git";
+ smtp = {
+ enable = true;
+ address = "localhost";
+ port = 25;
+ };
+ secrets = {
+ dbFile = "/var/keys/gitlab/db";
+ secretFile = "/var/keys/gitlab/secret";
+ otpFile = "/var/keys/gitlab/otp";
+ jwsFile = "/var/keys/gitlab/jws";
+ };
+ extraConfig = {
+ gitlab = {
+ email_from = "gitlab-no-reply@example.com";
+ email_display_name = "Example GitLab";
+ email_reply_to = "gitlab-no-reply@example.com";
+ default_projects_features = { builds = false; };
+ };
};
};
-};
+}
```
If you're setting up a new GitLab instance, generate new
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/gitlab.nix b/third_party/nixpkgs/nixos/modules/services/misc/gitlab.nix
index ec347a75f0..43568f29dd 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/gitlab.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/gitlab.nix
@@ -253,7 +253,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable the gitlab service.
'';
};
@@ -273,7 +273,7 @@ in {
statePath = mkOption {
type = types.str;
default = "/var/gitlab/state";
- description = lib.mdDoc ''
+ description = ''
GitLab state directory. Configuration, repositories and
logs, among other things, are stored here.
@@ -287,7 +287,7 @@ in {
extraEnv = mkOption {
type = types.attrsOf types.str;
default = {};
- description = lib.mdDoc ''
+ description = ''
Additional environment variables for the GitLab environment.
'';
};
@@ -296,7 +296,7 @@ in {
type = with types; either str (listOf str);
default = [];
example = "03:00";
- description = lib.mdDoc ''
+ description = ''
The time(s) to run automatic backup of GitLab
state. Specified in systemd's time format; see
{manpage}`systemd.time(7)`.
@@ -307,7 +307,7 @@ in {
type = types.str;
default = cfg.statePath + "/backup";
defaultText = literalExpression ''config.${opt.statePath} + "/backup"'';
- description = lib.mdDoc "GitLab path for backups.";
+ description = "GitLab path for backups.";
};
backup.keepTime = mkOption {
@@ -315,7 +315,7 @@ in {
default = 0;
example = 48;
apply = x: x * 60 * 60;
- description = lib.mdDoc ''
+ description = ''
How long to keep the backups around, in
hours. `0` means “keep forever”.
'';
@@ -339,7 +339,7 @@ in {
default = [];
example = [ "artifacts" "lfs" ];
apply = x: if isString x then x else concatStringsSep "," x;
- description = lib.mdDoc ''
+ description = ''
Directories to exclude from the backup. The example excludes
CI artifacts and LFS objects from the backups. The
`tar` option skips the creation of a tar
@@ -378,7 +378,7 @@ in {
storage_class = "STANDARD";
};
'';
- description = lib.mdDoc ''
+ description = ''
GitLab automatic upload specification. Tells GitLab to
upload the backup to a remote location when done.
@@ -391,7 +391,7 @@ in {
databaseHost = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
GitLab database hostname. An empty string means
“use local unix socket connection”.
'';
@@ -400,7 +400,7 @@ in {
databasePasswordFile = mkOption {
type = with types; nullOr path;
default = null;
- description = lib.mdDoc ''
+ description = ''
File containing the GitLab database user password.
This should be a string, not a nix path, since nix paths are
@@ -411,7 +411,7 @@ in {
databaseCreateLocally = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether a database should be automatically created on the
local host. Set this to `false` if you plan
on provisioning a local database yourself. This has no effect
@@ -422,32 +422,32 @@ in {
databaseName = mkOption {
type = types.str;
default = "gitlab";
- description = lib.mdDoc "GitLab database name.";
+ description = "GitLab database name.";
};
databaseUsername = mkOption {
type = types.str;
default = "gitlab";
- description = lib.mdDoc "GitLab database user.";
+ description = "GitLab database user.";
};
databasePool = mkOption {
type = types.int;
default = 5;
- description = lib.mdDoc "Database connection pool size.";
+ description = "Database connection pool size.";
};
extraDatabaseConfig = mkOption {
type = types.attrs;
default = {};
- description = lib.mdDoc "Extra configuration in config/database.yml.";
+ description = "Extra configuration in config/database.yml.";
};
redisUrl = mkOption {
type = types.str;
default = "unix:/run/gitlab/redis.sock";
example = "redis://localhost:6379/";
- description = lib.mdDoc "Redis URL for all GitLab services.";
+ description = "Redis URL for all GitLab services.";
};
extraGitlabRb = mkOption {
@@ -463,7 +463,7 @@ in {
}
end
'';
- description = lib.mdDoc ''
+ description = ''
Extra configuration to be placed in config/extra-gitlab.rb. This can
be used to add configuration not otherwise exposed through this module's
options.
@@ -474,13 +474,13 @@ in {
type = types.str;
default = config.networking.hostName;
defaultText = literalExpression "config.networking.hostName";
- description = lib.mdDoc "GitLab host name. Used e.g. for copy-paste URLs.";
+ description = "GitLab host name. Used e.g. for copy-paste URLs.";
};
port = mkOption {
type = types.port;
default = 8080;
- description = lib.mdDoc ''
+ description = ''
GitLab server port for copy-paste URLs, e.g. 80 or 443 if you're
service over https.
'';
@@ -489,25 +489,25 @@ in {
https = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether gitlab prints URLs with https as scheme.";
+ description = "Whether gitlab prints URLs with https as scheme.";
};
user = mkOption {
type = types.str;
default = "gitlab";
- description = lib.mdDoc "User to run gitlab and all related services.";
+ description = "User to run gitlab and all related services.";
};
group = mkOption {
type = types.str;
default = "gitlab";
- description = lib.mdDoc "Group to run gitlab and all related services.";
+ description = "Group to run gitlab and all related services.";
};
initialRootEmail = mkOption {
type = types.str;
default = "admin@local.host";
- description = lib.mdDoc ''
+ description = ''
Initial email address of the root account if this is a new install.
'';
};
@@ -515,7 +515,7 @@ in {
initialRootPasswordFile = mkOption {
type = with types; nullOr path;
default = null;
- description = lib.mdDoc ''
+ description = ''
File containing the initial password of the root account if
this is a new install.
@@ -528,7 +528,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable GitLab container registry.";
+ description = "Enable GitLab container registry.";
};
package = mkOption {
type = types.package;
@@ -537,7 +537,7 @@ in {
then pkgs.gitlab-container-registry
else pkgs.docker-distribution;
defaultText = literalExpression "pkgs.docker-distribution";
- description = lib.mdDoc ''
+ description = ''
Container registry package to use.
External container registries such as `pkgs.docker-distribution` are not supported
@@ -548,45 +548,45 @@ in {
type = types.str;
default = config.services.gitlab.host;
defaultText = literalExpression "config.services.gitlab.host";
- description = lib.mdDoc "GitLab container registry host name.";
+ description = "GitLab container registry host name.";
};
port = mkOption {
type = types.port;
default = 4567;
- description = lib.mdDoc "GitLab container registry port.";
+ description = "GitLab container registry port.";
};
certFile = mkOption {
type = types.path;
- description = lib.mdDoc "Path to GitLab container registry certificate.";
+ description = "Path to GitLab container registry certificate.";
};
keyFile = mkOption {
type = types.path;
- description = lib.mdDoc "Path to GitLab container registry certificate-key.";
+ description = "Path to GitLab container registry certificate-key.";
};
defaultForProjects = mkOption {
type = types.bool;
default = cfg.registry.enable;
defaultText = literalExpression "config.${opt.registry.enable}";
- description = lib.mdDoc "If GitLab container registry should be enabled by default for projects.";
+ description = "If GitLab container registry should be enabled by default for projects.";
};
issuer = mkOption {
type = types.str;
default = "gitlab-issuer";
- description = lib.mdDoc "GitLab container registry issuer.";
+ description = "GitLab container registry issuer.";
};
serviceName = mkOption {
type = types.str;
default = "container_registry";
- description = lib.mdDoc "GitLab container registry service name.";
+ description = "GitLab container registry service name.";
};
externalAddress = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc "External address used to access registry from the internet";
+ description = "External address used to access registry from the internet";
};
externalPort = mkOption {
type = types.int;
- description = lib.mdDoc "External port used to access registry from the internet";
+ description = "External port used to access registry from the internet";
};
};
@@ -594,31 +594,31 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable gitlab mail delivery over SMTP.";
+ description = "Enable gitlab mail delivery over SMTP.";
};
address = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "Address of the SMTP server for GitLab.";
+ description = "Address of the SMTP server for GitLab.";
};
port = mkOption {
type = types.port;
default = 25;
- description = lib.mdDoc "Port of the SMTP server for GitLab.";
+ description = "Port of the SMTP server for GitLab.";
};
username = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc "Username of the SMTP server for GitLab.";
+ description = "Username of the SMTP server for GitLab.";
};
passwordFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
File containing the password of the SMTP server for GitLab.
This should be a string, not a nix path, since nix paths
@@ -629,35 +629,35 @@ in {
domain = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "HELO domain to use for outgoing mail.";
+ description = "HELO domain to use for outgoing mail.";
};
authentication = mkOption {
type = with types; nullOr str;
default = null;
- description = lib.mdDoc "Authentication type to use, see http://api.rubyonrails.org/classes/ActionMailer/Base.html";
+ description = "Authentication type to use, see http://api.rubyonrails.org/classes/ActionMailer/Base.html";
};
enableStartTLSAuto = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to try to use StartTLS.";
+ description = "Whether to try to use StartTLS.";
};
tls = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to use TLS wrapper-mode.";
+ description = "Whether to use TLS wrapper-mode.";
};
opensslVerifyMode = mkOption {
type = types.str;
default = "peer";
- description = lib.mdDoc "How OpenSSL checks the certificate, see http://api.rubyonrails.org/classes/ActionMailer/Base.html";
+ description = "How OpenSSL checks the certificate, see http://api.rubyonrails.org/classes/ActionMailer/Base.html";
};
};
- pages.enable = mkEnableOption (lib.mdDoc "the GitLab Pages service");
+ pages.enable = mkEnableOption "the GitLab Pages service";
pages.settings = mkOption {
example = literalExpression ''
@@ -671,7 +671,7 @@ in {
}
'';
- description = lib.mdDoc ''
+ description = ''
Configuration options to set in the GitLab Pages config
file.
@@ -693,7 +693,7 @@ in {
type = with types; listOf str;
apply = x: if x == [] then null else lib.concatStringsSep "," x;
default = [];
- description = lib.mdDoc ''
+ description = ''
The address(es) to listen on for HTTP requests.
'';
};
@@ -702,7 +702,7 @@ in {
type = with types; listOf str;
apply = x: if x == [] then null else lib.concatStringsSep "," x;
default = [];
- description = lib.mdDoc ''
+ description = ''
The address(es) to listen on for HTTPS requests.
'';
};
@@ -711,7 +711,7 @@ in {
type = with types; listOf str;
apply = x: if x == [] then null else lib.concatStringsSep "," x;
default = [ "127.0.0.1:8090" ];
- description = lib.mdDoc ''
+ description = ''
The address(es) to listen on for proxy requests.
'';
};
@@ -721,7 +721,7 @@ in {
default = "http${optionalString cfg.https "s"}://${cfg.host}/api/v4";
defaultText = "http(s):///api/v4";
example = "https://gitlab.example.com/api/v4";
- description = lib.mdDoc ''
+ description = ''
API URL to proxy artifact requests to.
'';
};
@@ -731,7 +731,7 @@ in {
default = "http${optionalString cfg.https "s"}://${cfg.host}";
defaultText = "http(s)://";
example = "https://gitlab.example.com";
- description = lib.mdDoc ''
+ description = ''
Public GitLab server URL.
'';
};
@@ -741,7 +741,7 @@ in {
default = null;
defaultText = "http(s)://";
example = "https://gitlab.example.internal";
- description = lib.mdDoc ''
+ description = ''
Internal GitLab server used for API requests, useful
if you want to send that traffic over an internal load
balancer. By default, the value of
@@ -754,7 +754,7 @@ in {
type = with types; nullOr str;
default = "${cfg.statePath}/gitlab_pages_secret";
internal = true;
- description = lib.mdDoc ''
+ description = ''
File with secret key used to authenticate with the
GitLab API.
'';
@@ -763,7 +763,7 @@ in {
pages-domain = mkOption {
type = with types; nullOr str;
example = "example.com";
- description = lib.mdDoc ''
+ description = ''
The domain to serve static pages on.
'';
};
@@ -772,7 +772,7 @@ in {
type = types.str;
default = "${gitlabConfig.production.shared.path}/pages";
defaultText = literalExpression ''config.${opt.extraConfig}.production.shared.path + "/pages"'';
- description = lib.mdDoc ''
+ description = ''
The directory where pages are stored.
'';
};
@@ -783,7 +783,7 @@ in {
secrets.secretFile = mkOption {
type = with types; nullOr path;
default = null;
- description = lib.mdDoc ''
+ description = ''
A file containing the secret used to encrypt variables in
the DB. If you change or lose this key you will be unable to
access variables stored in database.
@@ -799,7 +799,7 @@ in {
secrets.dbFile = mkOption {
type = with types; nullOr path;
default = null;
- description = lib.mdDoc ''
+ description = ''
A file containing the secret used to encrypt variables in
the DB. If you change or lose this key you will be unable to
access variables stored in database.
@@ -815,7 +815,7 @@ in {
secrets.otpFile = mkOption {
type = with types; nullOr path;
default = null;
- description = lib.mdDoc ''
+ description = ''
A file containing the secret used to encrypt secrets for OTP
tokens. If you change or lose this key, users which have 2FA
enabled for login won't be able to login anymore.
@@ -831,7 +831,7 @@ in {
secrets.jwsFile = mkOption {
type = with types; nullOr path;
default = null;
- description = lib.mdDoc ''
+ description = ''
A file containing the secret used to encrypt session
keys. If you change or lose this key, users will be
disconnected.
@@ -849,14 +849,14 @@ in {
extraShellConfig = mkOption {
type = types.attrs;
default = {};
- description = lib.mdDoc "Extra configuration to merge into shell-config.yml";
+ description = "Extra configuration to merge into shell-config.yml";
};
puma.workers = mkOption {
type = types.int;
default = 2;
apply = x: builtins.toString x;
- description = lib.mdDoc ''
+ description = ''
The number of worker processes Puma should spawn. This
controls the amount of parallel Ruby code can be
executed. GitLab recommends `Number of CPU cores - 1`, but at least two.
@@ -872,7 +872,7 @@ in {
type = types.int;
default = 0;
apply = x: builtins.toString x;
- description = lib.mdDoc ''
+ description = ''
The minimum number of threads Puma should use per
worker.
@@ -887,7 +887,7 @@ in {
type = types.int;
default = 4;
apply = x: builtins.toString x;
- description = lib.mdDoc ''
+ description = ''
The maximum number of threads Puma should use per
worker. This limits how many threads Puma will automatically
spawn in response to requests. In contrast to workers,
@@ -901,10 +901,20 @@ in {
'';
};
+ sidekiq.concurrency = mkOption {
+ type = with types; nullOr int;
+ default = null;
+ description = ''
+ How many processor threads to use for processing sidekiq background job queues. When null, the GitLab default is used.
+
+ See for details.
+ '';
+ };
+
sidekiq.memoryKiller.enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether the Sidekiq MemoryKiller should be turned
on. MemoryKiller kills Sidekiq when its memory consumption
exceeds a certain limit.
@@ -918,7 +928,7 @@ in {
type = types.int;
default = 2000;
apply = x: builtins.toString (x * 1024);
- description = lib.mdDoc ''
+ description = ''
The maximum amount of memory, in MiB, a Sidekiq worker is
allowed to consume before being killed.
'';
@@ -928,7 +938,7 @@ in {
type = types.int;
default = 900;
apply = x: builtins.toString x;
- description = lib.mdDoc ''
+ description = ''
The time MemoryKiller waits after noticing excessive memory
consumption before killing Sidekiq.
'';
@@ -938,7 +948,7 @@ in {
type = types.int;
default = 30;
apply = x: builtins.toString x;
- description = lib.mdDoc ''
+ description = ''
The time allowed for all jobs to finish before Sidekiq is
killed forcefully.
'';
@@ -948,7 +958,7 @@ in {
enable = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Enable rotation of log files.
'';
};
@@ -956,13 +966,13 @@ in {
frequency = mkOption {
type = types.str;
default = "daily";
- description = lib.mdDoc "How often to rotate the logs.";
+ description = "How often to rotate the logs.";
};
keep = mkOption {
type = types.int;
default = 30;
- description = lib.mdDoc "How many rotations to keep.";
+ description = "How many rotations to keep.";
};
};
@@ -978,7 +988,7 @@ in {
};
};
'';
- description = lib.mdDoc ''
+ description = ''
Configuration options to add to Workhorse's configuration
file.
@@ -1037,7 +1047,7 @@ in {
};
};
'';
- description = lib.mdDoc ''
+ description = ''
Extra options to be added under
`production` in
{file}`config/gitlab.yml`, as a nix attribute
@@ -1439,6 +1449,8 @@ in {
nodejs
gnupg
+ "${cfg.packages.gitlab}/share/gitlab/vendor/gems/sidekiq-${cfg.packages.gitlab.rubyEnv.gems.sidekiq.version}"
+
# Needed for GitLab project imports
gnutar
gzip
@@ -1452,7 +1464,17 @@ in {
TimeoutSec = "infinity";
Restart = "always";
WorkingDirectory = "${cfg.packages.gitlab}/share/gitlab";
- ExecStart="${cfg.packages.gitlab.rubyEnv}/bin/sidekiq -C \"${cfg.packages.gitlab}/share/gitlab/config/sidekiq_queues.yml\" -e production";
+ ExecStart = utils.escapeSystemdExecArgs (
+ [
+ "${cfg.packages.gitlab}/share/gitlab/bin/sidekiq-cluster"
+ "*" # all queue groups
+ ] ++ lib.optionals (cfg.sidekiq.concurrency != null) [
+ "--concurrency" (toString cfg.sidekiq.concurrency)
+ ] ++ [
+ "--environment" "production"
+ "--require" "."
+ ]
+ );
};
};
@@ -1550,7 +1572,7 @@ in {
gnutar
gzip
openssh
- gitlab-workhorse
+ cfg.packages.gitlab-workhorse
];
serviceConfig = {
Type = "simple";
@@ -1571,7 +1593,9 @@ in {
rm "${cfg.statePath}/config/gitlab-workhorse.json"
'';
ExecStart =
- "${cfg.packages.gitlab-workhorse}/bin/workhorse "
+ "${cfg.packages.gitlab-workhorse}/bin/${
+ optionalString (lib.versionAtLeast (lib.getVersion cfg.packages.gitlab-workhorse) "16.10") "gitlab-"
+ }workhorse "
+ "-listenUmask 0 "
+ "-listenNetwork unix "
+ "-listenAddr /run/gitlab/gitlab-workhorse.socket "
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/gitolite.nix b/third_party/nixpkgs/nixos/modules/services/misc/gitolite.nix
index 012abda2d7..89f72c0467 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/gitolite.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/gitolite.nix
@@ -14,7 +14,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable gitolite management under the
`gitolite` user. After
switching to a configuration with Gitolite enabled, you can
@@ -25,7 +25,7 @@ in
dataDir = mkOption {
type = types.str;
default = "/var/lib/gitolite";
- description = lib.mdDoc ''
+ description = ''
The gitolite home directory used to store all repositories. If left as the default value
this directory will automatically be created before the gitolite server starts, otherwise
the sysadmin is responsible for ensuring the directory exists with appropriate ownership
@@ -35,7 +35,7 @@ in
adminPubkey = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Initial administrative public key for Gitolite. This should
be an SSH Public Key. Note that this key will only be used
once, upon the first initialization of the Gitolite user.
@@ -46,7 +46,7 @@ in
enableGitAnnex = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable git-annex support. Uses the `extraGitoliteRc` option
to apply the necessary configuration.
'';
@@ -55,7 +55,7 @@ in
commonHooks = mkOption {
type = types.listOf types.path;
default = [];
- description = lib.mdDoc ''
+ description = ''
A list of custom git hooks that get copied to `~/.gitolite/hooks/common`.
'';
};
@@ -71,7 +71,7 @@ in
@{$RC{ENABLE}} = grep { $_ ne 'desc' } @{$RC{ENABLE}}; # disable the command/feature
'''
'';
- description = lib.mdDoc ''
+ description = ''
Extra configuration to append to the default `~/.gitolite.rc`.
This should be Perl code that modifies the `%RC`
@@ -96,7 +96,7 @@ in
user = mkOption {
type = types.str;
default = "gitolite";
- description = lib.mdDoc ''
+ description = ''
Gitolite user account. This is the username of the gitolite endpoint.
'';
};
@@ -104,7 +104,7 @@ in
description = mkOption {
type = types.str;
default = "Gitolite user";
- description = lib.mdDoc ''
+ description = ''
Gitolite user account's description.
'';
};
@@ -112,7 +112,7 @@ in
group = mkOption {
type = types.str;
default = "gitolite";
- description = lib.mdDoc ''
+ description = ''
Primary group of the Gitolite user account.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/gitweb.nix b/third_party/nixpkgs/nixos/modules/services/misc/gitweb.nix
index aac0dac8a0..ec08ab51a4 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/gitweb.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/gitweb.nix
@@ -13,7 +13,7 @@ in
projectroot = mkOption {
default = "/srv/git";
type = types.path;
- description = lib.mdDoc ''
+ description = ''
Path to git projects (bare repositories) that should be served by
gitweb. Must not end with a slash.
'';
@@ -22,7 +22,7 @@ in
extraConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Verbatim configuration text appended to the generated gitweb.conf file.
'';
example = ''
@@ -35,7 +35,7 @@ in
gitwebTheme = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Use an alternative theme for gitweb, strongly inspired by GitHub.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/gogs.nix b/third_party/nixpkgs/nixos/modules/services/misc/gogs.nix
index 9bf7e4aab8..e4e23d5972 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/gogs.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/gogs.nix
@@ -48,31 +48,31 @@ in
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Enable Go Git Service.";
+ description = "Enable Go Git Service.";
};
useWizard = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Do not generate a configuration and use Gogs' installation wizard instead. The first registered user will be administrator.";
+ description = "Do not generate a configuration and use Gogs' installation wizard instead. The first registered user will be administrator.";
};
stateDir = mkOption {
default = "/var/lib/gogs";
type = types.str;
- description = lib.mdDoc "Gogs data directory.";
+ description = "Gogs data directory.";
};
user = mkOption {
type = types.str;
default = "gogs";
- description = lib.mdDoc "User account under which Gogs runs.";
+ description = "User account under which Gogs runs.";
};
group = mkOption {
type = types.str;
default = "gogs";
- description = lib.mdDoc "Group account under which Gogs runs.";
+ description = "Group account under which Gogs runs.";
};
database = {
@@ -80,37 +80,37 @@ in
type = types.enum [ "sqlite3" "mysql" "postgres" ];
example = "mysql";
default = "sqlite3";
- description = lib.mdDoc "Database engine to use.";
+ description = "Database engine to use.";
};
host = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc "Database host address.";
+ description = "Database host address.";
};
port = mkOption {
type = types.port;
default = 3306;
- description = lib.mdDoc "Database host port.";
+ description = "Database host port.";
};
name = mkOption {
type = types.str;
default = "gogs";
- description = lib.mdDoc "Database name.";
+ description = "Database name.";
};
user = mkOption {
type = types.str;
default = "gogs";
- description = lib.mdDoc "Database user.";
+ description = "Database user.";
};
password = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
The password corresponding to {option}`database.user`.
Warning: this is stored in cleartext in the Nix store!
Use {option}`database.passwordFile` instead.
@@ -121,7 +121,7 @@ in
type = types.nullOr types.path;
default = null;
example = "/run/keys/gogs-dbpassword";
- description = lib.mdDoc ''
+ description = ''
A file containing the password corresponding to
{option}`database.user`.
'';
@@ -131,51 +131,51 @@ in
type = types.str;
default = "${cfg.stateDir}/data/gogs.db";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/data/gogs.db"'';
- description = lib.mdDoc "Path to the sqlite3 database file.";
+ description = "Path to the sqlite3 database file.";
};
};
appName = mkOption {
type = types.str;
default = "Gogs: Go Git Service";
- description = lib.mdDoc "Application name.";
+ description = "Application name.";
};
repositoryRoot = mkOption {
type = types.str;
default = "${cfg.stateDir}/repositories";
defaultText = literalExpression ''"''${config.${opt.stateDir}}/repositories"'';
- description = lib.mdDoc "Path to the git repositories.";
+ description = "Path to the git repositories.";
};
domain = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "Domain name of your server.";
+ description = "Domain name of your server.";
};
rootUrl = mkOption {
type = types.str;
default = "http://localhost:3000/";
- description = lib.mdDoc "Full public URL of Gogs server.";
+ description = "Full public URL of Gogs server.";
};
httpAddress = mkOption {
type = types.str;
default = "0.0.0.0";
- description = lib.mdDoc "HTTP listen address.";
+ description = "HTTP listen address.";
};
httpPort = mkOption {
type = types.port;
default = 3000;
- description = lib.mdDoc "HTTP listen port.";
+ description = "HTTP listen port.";
};
cookieSecure = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Marks session cookies as "secure" as a hint for browsers to only send
them via HTTPS. This option is recommend, if Gogs is being served over HTTPS.
'';
@@ -184,7 +184,7 @@ in
extraConfig = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc "Configuration lines appended to the generated Gogs configuration file.";
+ description = "Configuration lines appended to the generated Gogs configuration file.";
};
};
};
@@ -217,7 +217,6 @@ in
sed -e "s,#secretkey#,$KEY,g" \
-e "s,#dbpass#,$DBPASS,g" \
-i ${runConfig}
- chmod 440 ${runConfig} ${secretKey}
''}
mkdir -p ${cfg.repositoryRoot}
@@ -239,6 +238,7 @@ in
WorkingDirectory = cfg.stateDir;
ExecStart = "${pkgs.gogs}/bin/gogs web";
Restart = "always";
+ UMask = "0027";
};
environment = {
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/gollum.nix b/third_party/nixpkgs/nixos/modules/services/misc/gollum.nix
index e31eeaf8a3..3966ef036b 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/gollum.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/gollum.nix
@@ -8,79 +8,79 @@ in
{
options.services.gollum = {
- enable = mkEnableOption (lib.mdDoc "Gollum service");
+ enable = mkEnableOption "Gollum, a git-powered wiki service";
address = mkOption {
type = types.str;
default = "0.0.0.0";
- description = lib.mdDoc "IP address on which the web server will listen.";
+ description = "IP address on which the web server will listen.";
};
port = mkOption {
type = types.port;
default = 4567;
- description = lib.mdDoc "Port on which the web server will run.";
+ description = "Port on which the web server will run.";
};
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Content of the configuration file";
+ description = "Content of the configuration file";
};
mathjax = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable support for math rendering using MathJax";
+ description = "Enable support for math rendering using MathJax";
};
allowUploads = mkOption {
type = types.nullOr (types.enum [ "dir" "page" ]);
default = null;
- description = lib.mdDoc "Enable uploads of external files";
+ description = "Enable uploads of external files";
};
user-icons = mkOption {
type = types.nullOr (types.enum [ "gravatar" "identicon" ]);
default = null;
- description = lib.mdDoc "Enable specific user icons for history view";
+ description = "Enable specific user icons for history view";
};
emoji = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Parse and interpret emoji tags";
+ description = "Parse and interpret emoji tags";
};
h1-title = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Use the first h1 as page title";
+ description = "Use the first h1 as page title";
};
no-edit = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Disable editing pages";
+ description = "Disable editing pages";
};
local-time = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Use the browser's local timezone instead of the server's for displaying dates.";
+ description = "Use the browser's local timezone instead of the server's for displaying dates.";
};
branch = mkOption {
type = types.str;
default = "master";
example = "develop";
- description = lib.mdDoc "Git branch to serve";
+ description = "Git branch to serve";
};
stateDir = mkOption {
type = types.path;
default = "/var/lib/gollum";
- description = lib.mdDoc "Specifies the path of the repository directory. If it does not exist, Gollum will create it on startup.";
+ description = "Specifies the path of the repository directory. If it does not exist, Gollum will create it on startup.";
};
package = mkPackageOption pkgs "gollum" { };
@@ -88,13 +88,13 @@ in
user = mkOption {
type = types.str;
default = "gollum";
- description = lib.mdDoc "Specifies the owner of the wiki directory";
+ description = "Specifies the owner of the wiki directory";
};
group = mkOption {
type = types.str;
default = "gollum";
- description = lib.mdDoc "Specifies the owner group of the wiki directory";
+ description = "Specifies the owner group of the wiki directory";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/gpsd.nix b/third_party/nixpkgs/nixos/modules/services/misc/gpsd.nix
index 5d2e806181..6f7aec0784 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/gpsd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/gpsd.nix
@@ -24,7 +24,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable `gpsd`, a GPS service daemon.
'';
};
@@ -32,7 +32,7 @@ in {
devices = mkOption {
type = types.listOf types.str;
default = [ "/dev/ttyUSB0" ];
- description = lib.mdDoc ''
+ description = ''
List of devices that `gpsd` should subscribe to.
A device may be a local serial device for GPS input, or a
@@ -46,7 +46,7 @@ in {
readonly = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the broken-device-safety, otherwise
known as read-only mode. Some popular bluetooth and USB
receivers lock up or become totally inaccessible when
@@ -63,7 +63,7 @@ in {
nowait = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
don't wait for client connects to poll GPS
'';
};
@@ -71,7 +71,7 @@ in {
port = mkOption {
type = types.port;
default = 2947;
- description = lib.mdDoc ''
+ description = ''
The port where to listen for TCP connections.
'';
};
@@ -79,7 +79,7 @@ in {
debugLevel = mkOption {
type = types.int;
default = 0;
- description = lib.mdDoc ''
+ description = ''
The debugging level.
'';
};
@@ -87,7 +87,7 @@ in {
listenany = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Listen on all addresses rather than just loopback.
'';
};
@@ -96,7 +96,7 @@ in {
type = types.listOf types.str;
default = [ ];
example = [ "-r" "-s" "19200" ];
- description = lib.mdDoc ''
+ description = ''
A list of extra command line arguments to pass to gpsd.
Check gpsd(8) mangpage for possible arguments.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/graphical-desktop.nix b/third_party/nixpkgs/nixos/modules/services/misc/graphical-desktop.nix
new file mode 100644
index 0000000000..a88c02e610
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/services/misc/graphical-desktop.nix
@@ -0,0 +1,54 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+let
+ xcfg = config.services.xserver;
+ dmcfg = config.services.displayManager;
+in
+{
+ config = lib.mkIf (xcfg.enable || dmcfg.enable) {
+ # The default max inotify watches is 8192.
+ # Nowadays most apps require a good number of inotify watches,
+ # the value below is used by default on several other distros.
+ boot.kernel.sysctl = {
+ "fs.inotify.max_user_instances" = lib.mkDefault 524288;
+ "fs.inotify.max_user_watches" = lib.mkDefault 524288;
+ };
+
+ environment = {
+ # localectl looks into 00-keyboard.conf
+ etc."X11/xorg.conf.d/00-keyboard.conf".text = ''
+ Section "InputClass"
+ Identifier "Keyboard catchall"
+ MatchIsKeyboard "on"
+ Option "XkbModel" "${xcfg.xkb.model}"
+ Option "XkbLayout" "${xcfg.xkb.layout}"
+ Option "XkbOptions" "${xcfg.xkb.options}"
+ Option "XkbVariant" "${xcfg.xkb.variant}"
+ EndSection
+ '';
+ systemPackages = with pkgs; [
+ nixos-icons # needed for gnome and pantheon about dialog, nixos-manual and maybe more
+ xdg-utils
+ ];
+ };
+
+ fonts.enableDefaultPackages = lib.mkDefault true;
+
+ hardware.opengl.enable = lib.mkDefault true;
+
+ programs.gnupg.agent.pinentryPackage = lib.mkOverride 1100 pkgs.pinentry-gnome3;
+
+ systemd.defaultUnit = lib.mkIf (xcfg.autorun || dmcfg.enable) "graphical.target";
+
+ xdg = {
+ autostart.enable = true;
+ menus.enable = true;
+ mime.enable = true;
+ icons.enable = true;
+ };
+ };
+}
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/greenclip.nix b/third_party/nixpkgs/nixos/modules/services/misc/greenclip.nix
index ecfb864ab2..d92cd18548 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/greenclip.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/greenclip.nix
@@ -7,7 +7,7 @@ let
in {
options.services.greenclip = {
- enable = mkEnableOption (lib.mdDoc "Greenclip daemon");
+ enable = mkEnableOption "Greenclip, a clipboard manager";
package = mkPackageOption pkgs [ "haskellPackages" "greenclip" ] { };
};
@@ -18,7 +18,10 @@ in {
description = "greenclip daemon";
wantedBy = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
- serviceConfig.ExecStart = "${cfg.package}/bin/greenclip daemon";
+ serviceConfig = {
+ ExecStart = "${cfg.package}/bin/greenclip daemon";
+ Restart = "always";
+ };
};
environment.systemPackages = [ cfg.package ];
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/headphones.nix b/third_party/nixpkgs/nixos/modules/services/misc/headphones.nix
index 472b330fff..31bd61cb4c 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/headphones.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/headphones.nix
@@ -20,38 +20,38 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the headphones server.";
+ description = "Whether to enable the headphones server.";
};
dataDir = mkOption {
type = types.path;
default = "/var/lib/${name}";
- description = lib.mdDoc "Path where to store data files.";
+ description = "Path where to store data files.";
};
configFile = mkOption {
type = types.path;
default = "${cfg.dataDir}/config.ini";
defaultText = literalExpression ''"''${config.${opt.dataDir}}/config.ini"'';
- description = lib.mdDoc "Path to config file.";
+ description = "Path to config file.";
};
host = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "Host to listen on.";
+ description = "Host to listen on.";
};
port = mkOption {
type = types.ints.u16;
default = 8181;
- description = lib.mdDoc "Port to bind to.";
+ description = "Port to bind to.";
};
user = mkOption {
type = types.str;
default = name;
- description = lib.mdDoc "User to run the service as";
+ description = "User to run the service as";
};
group = mkOption {
type = types.str;
default = name;
- description = lib.mdDoc "Group to run the service as";
+ description = "Group to run the service as";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/heisenbridge.nix b/third_party/nixpkgs/nixos/modules/services/misc/heisenbridge.nix
index d7ce9c605c..de109e7266 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/heisenbridge.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/heisenbridge.nix
@@ -23,19 +23,19 @@ let
in
{
options.services.heisenbridge = {
- enable = mkEnableOption (lib.mdDoc "the Matrix to IRC bridge");
+ enable = mkEnableOption "the Matrix to IRC bridge";
package = mkPackageOption pkgs "heisenbridge" { };
homeserver = mkOption {
type = types.str;
- description = lib.mdDoc "The URL to the home server for client-server API calls";
+ description = "The URL to the home server for client-server API calls";
example = "http://localhost:8008";
};
registrationUrl = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The URL where the application service is listening for HS requests, from the Matrix HS perspective.#
The default value assumes the bridge runs on the same host as the home server, in the same network.
'';
@@ -46,26 +46,26 @@ in
address = mkOption {
type = types.str;
- description = lib.mdDoc "Address to listen on. IPv6 does not seem to be supported.";
+ description = "Address to listen on. IPv6 does not seem to be supported.";
default = "127.0.0.1";
example = "0.0.0.0";
};
port = mkOption {
type = types.port;
- description = lib.mdDoc "The port to listen on";
+ description = "The port to listen on";
default = 9898;
};
debug = mkOption {
type = types.bool;
- description = lib.mdDoc "More verbose logging. Recommended during initial setup.";
+ description = "More verbose logging. Recommended during initial setup.";
default = false;
};
owner = mkOption {
type = types.nullOr types.str;
- description = lib.mdDoc ''
+ description = ''
Set owner MXID otherwise first talking local user will claim the bridge
'';
default = null;
@@ -73,7 +73,7 @@ in
};
namespaces = mkOption {
- description = lib.mdDoc "Configure the 'namespaces' section of the registration.yml for the bridge and the server";
+ description = "Configure the 'namespaces' section of the registration.yml for the bridge and the server";
# TODO link to Matrix documentation of the format
type = types.submodule {
freeformType = jsonType;
@@ -91,16 +91,16 @@ in
};
};
- identd.enable = mkEnableOption (lib.mdDoc "identd service support");
+ identd.enable = mkEnableOption "identd service support";
identd.port = mkOption {
type = types.port;
- description = lib.mdDoc "identd listen port";
+ description = "identd listen port";
default = 113;
};
extraArgs = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc "Heisenbridge is configured over the command line. Append extra arguments here";
+ description = "Heisenbridge is configured over the command line. Append extra arguments here";
default = [ ];
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/homepage-dashboard.nix b/third_party/nixpkgs/nixos/modules/services/misc/homepage-dashboard.nix
index 07a09e2b6b..29fda16aa6 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/homepage-dashboard.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/homepage-dashboard.nix
@@ -6,50 +6,238 @@
let
cfg = config.services.homepage-dashboard;
+ # Define the settings format used for this program
+ settingsFormat = pkgs.formats.yaml { };
in
{
options = {
services.homepage-dashboard = {
- enable = lib.mkEnableOption (lib.mdDoc "Homepage Dashboard");
+ enable = lib.mkEnableOption "Homepage Dashboard, a highly customizable application dashboard";
package = lib.mkPackageOption pkgs "homepage-dashboard" { };
openFirewall = lib.mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc "Open ports in the firewall for Homepage.";
+ description = "Open ports in the firewall for Homepage.";
};
listenPort = lib.mkOption {
type = lib.types.int;
default = 8082;
- description = lib.mdDoc "Port for Homepage to bind to.";
+ description = "Port for Homepage to bind to.";
+ };
+
+ environmentFile = lib.mkOption {
+ type = lib.types.str;
+ description = ''
+ The path to an environment file that contains environment variables to pass
+ to the homepage-dashboard service, for the purpose of passing secrets to
+ the service.
+
+ See the upstream documentation:
+
+ https://gethomepage.dev/latest/installation/docker/#using-environment-secrets
+ '';
+ default = "";
+ };
+
+ customCSS = lib.mkOption {
+ type = lib.types.lines;
+ description = ''
+ Custom CSS for styling Homepage.
+
+ See https://gethomepage.dev/latest/configs/custom-css-js/.
+ '';
+ default = "";
+ };
+
+ customJS = lib.mkOption {
+ type = lib.types.lines;
+ description = ''
+ Custom Javascript for Homepage.
+
+ See https://gethomepage.dev/latest/configs/custom-css-js/.
+ '';
+ default = "";
+ };
+
+ bookmarks = lib.mkOption {
+ inherit (settingsFormat) type;
+ description = ''
+ Homepage bookmarks configuration.
+
+ See https://gethomepage.dev/latest/configs/bookmarks/.
+ '';
+ # Defaults: https://github.com/gethomepage/homepage/blob/main/src/skeleton/bookmarks.yaml
+ example = [
+ {
+ Developer = [
+ { Github = [{ abbr = "GH"; href = "https://github.com/"; }]; }
+ ];
+ }
+ {
+ Entertainment = [
+ { YouTube = [{ abbr = "YT"; href = "https://youtube.com/"; }]; }
+ ];
+ }
+ ];
+ default = [ ];
+ };
+
+ services = lib.mkOption {
+ inherit (settingsFormat) type;
+ description = ''
+ Homepage services configuration.
+
+ See https://gethomepage.dev/latest/configs/services/.
+ '';
+ # Defaults: https://github.com/gethomepage/homepage/blob/main/src/skeleton/services.yaml
+ example = [
+ {
+ "My First Group" = [
+ {
+ "My First Service" = {
+ href = "http://localhost/";
+ description = "Homepage is awesome";
+ };
+ }
+ ];
+ }
+ {
+ "My Second Group" = [
+ {
+ "My Second Service" = {
+ href = "http://localhost/";
+ description = "Homepage is the best";
+ };
+ }
+ ];
+ }
+ ];
+ default = [ ];
+ };
+
+ widgets = lib.mkOption {
+ inherit (settingsFormat) type;
+ description = ''
+ Homepage widgets configuration.
+
+ See https://gethomepage.dev/latest/configs/service-widgets/.
+ '';
+ # Defaults: https://github.com/gethomepage/homepage/blob/main/src/skeleton/widgets.yaml
+ example = [
+ {
+ resources = {
+ cpu = true;
+ memory = true;
+ disk = "/";
+ };
+ }
+ {
+ search = {
+ provider = "duckduckgo";
+ target = "_blank";
+ };
+ }
+ ];
+ default = [ ];
+ };
+
+ kubernetes = lib.mkOption {
+ inherit (settingsFormat) type;
+ description = ''
+ Homepage kubernetes configuration.
+
+ See https://gethomepage.dev/latest/configs/kubernetes/.
+ '';
+ default = { };
+ };
+
+ docker = lib.mkOption {
+ inherit (settingsFormat) type;
+ description = ''
+ Homepage docker configuration.
+
+ See https://gethomepage.dev/latest/configs/docker/.
+ '';
+ default = { };
+ };
+
+ settings = lib.mkOption {
+ inherit (settingsFormat) type;
+ description = ''
+ Homepage settings.
+
+ See https://gethomepage.dev/latest/configs/settings/.
+ '';
+ # Defaults: https://github.com/gethomepage/homepage/blob/main/src/skeleton/settings.yaml
+ default = { };
};
};
};
- config = lib.mkIf cfg.enable {
- systemd.services.homepage-dashboard = {
- description = "Homepage Dashboard";
- after = [ "network.target" ];
- wantedBy = [ "multi-user.target" ];
+ config =
+ let
+ # If homepage-dashboard is enabled, but none of the configuration values have been updated,
+ # then default to "unmanaged" configuration which is manually updated in
+ # var/lib/homepage-dashboard. This is to maintain backwards compatibility, and should be
+ # deprecated in a future release.
+ managedConfig = !(
+ cfg.bookmarks == [ ] &&
+ cfg.customCSS == "" &&
+ cfg.customJS == "" &&
+ cfg.docker == { } &&
+ cfg.kubernetes == { } &&
+ cfg.services == [ ] &&
+ cfg.settings == { } &&
+ cfg.widgets == [ ]
+ );
- environment = {
- HOMEPAGE_CONFIG_DIR = "/var/lib/homepage-dashboard";
- PORT = "${toString cfg.listenPort}";
+ configDir = if managedConfig then "/etc/homepage-dashboard" else "/var/lib/homepage-dashboard";
+
+ msg = "using unmanaged configuration for homepage-dashboard is deprecated and will be removed"
+ + " in 24.05. please see the NixOS documentation for `services.homepage-dashboard' and add"
+ + " your bookmarks, services, widgets, and other configuration using the options provided.";
+ in
+ lib.mkIf cfg.enable {
+ warnings = lib.optional (!managedConfig) msg;
+
+ environment.etc = lib.mkIf managedConfig {
+ "homepage-dashboard/custom.css".text = cfg.customCSS;
+ "homepage-dashboard/custom.js".text = cfg.customJS;
+
+ "homepage-dashboard/bookmarks.yaml".source = settingsFormat.generate "bookmarks.yaml" cfg.bookmarks;
+ "homepage-dashboard/docker.yaml".source = settingsFormat.generate "docker.yaml" cfg.docker;
+ "homepage-dashboard/kubernetes.yaml".source = settingsFormat.generate "kubernetes.yaml" cfg.kubernetes;
+ "homepage-dashboard/services.yaml".source = settingsFormat.generate "services.yaml" cfg.services;
+ "homepage-dashboard/settings.yaml".source = settingsFormat.generate "settings.yaml" cfg.settings;
+ "homepage-dashboard/widgets.yaml".source = settingsFormat.generate "widgets.yaml" cfg.widgets;
};
- serviceConfig = {
- Type = "simple";
- DynamicUser = true;
- StateDirectory = "homepage-dashboard";
- ExecStart = "${lib.getExe cfg.package}";
- Restart = "on-failure";
+ systemd.services.homepage-dashboard = {
+ description = "Homepage Dashboard";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+
+ environment = {
+ HOMEPAGE_CONFIG_DIR = configDir;
+ PORT = toString cfg.listenPort;
+ LOG_TARGETS = lib.mkIf managedConfig "stdout";
+ };
+
+ serviceConfig = {
+ Type = "simple";
+ DynamicUser = true;
+ EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
+ StateDirectory = lib.mkIf (!managedConfig) "homepage-dashboard";
+ ExecStart = lib.getExe cfg.package;
+ Restart = "on-failure";
+ };
+ };
+
+ networking.firewall = lib.mkIf cfg.openFirewall {
+ allowedTCPPorts = [ cfg.listenPort ];
};
};
-
- networking.firewall = lib.mkIf cfg.openFirewall {
- allowedTCPPorts = [ cfg.listenPort ];
- };
- };
}
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/ihaskell.nix b/third_party/nixpkgs/nixos/modules/services/misc/ihaskell.nix
index 4782053c4f..186ff7345a 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/ihaskell.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/ihaskell.nix
@@ -17,7 +17,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Autostart an IHaskell notebook service.";
+ description = "Autostart an IHaskell notebook service.";
};
extraPackages = mkOption {
@@ -30,7 +30,7 @@ in
haskellPackages.lens
]
'';
- description = lib.mdDoc ''
+ description = ''
Extra packages available to ghc when running ihaskell. The
value must be a function which receives the attrset defined
in {var}`haskellPackages` as the sole argument.
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/input-remapper.nix b/third_party/nixpkgs/nixos/modules/services/misc/input-remapper.nix
index 5b9f16e019..94c2ece52f 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/input-remapper.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/input-remapper.nix
@@ -6,14 +6,14 @@ let cfg = config.services.input-remapper; in
{
options = {
services.input-remapper = {
- enable = mkEnableOption (lib.mdDoc "input-remapper, an easy to use tool to change the mapping of your input device buttons");
+ enable = mkEnableOption "input-remapper, an easy to use tool to change the mapping of your input device buttons";
package = mkPackageOption pkgs "input-remapper" { };
- enableUdevRules = mkEnableOption (lib.mdDoc "udev rules added by input-remapper to handle hotplugged devices. Currently disabled by default due to https://github.com/sezanzeb/input-remapper/issues/140");
+ enableUdevRules = mkEnableOption "udev rules added by input-remapper to handle hotplugged devices. Currently disabled by default due to https://github.com/sezanzeb/input-remapper/issues/140";
serviceWantedBy = mkOption {
default = [ "graphical.target" ];
example = [ "multi-user.target" ];
type = types.listOf types.str;
- description = lib.mdDoc "Specifies the WantedBy setting for the input-remapper service.";
+ description = "Specifies the WantedBy setting for the input-remapper service.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/invidious-router.nix b/third_party/nixpkgs/nixos/modules/services/misc/invidious-router.nix
new file mode 100644
index 0000000000..33da7e96b5
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/services/misc/invidious-router.nix
@@ -0,0 +1,121 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}: let
+ cfg = config.services.invidious-router;
+ settingsFormat = pkgs.formats.yaml {};
+ configFile = settingsFormat.generate "config.yaml" cfg.settings;
+in {
+ meta.maintainers = [lib.maintainers.s1ls];
+
+ options.services.invidious-router = {
+ enable = lib.mkEnableOption "Enables the invidious-router service";
+ port = lib.mkOption {
+ type = lib.types.port;
+ default = 8050;
+ description = ''
+ Port to bind to.
+ '';
+ };
+ address = lib.mkOption {
+ type = lib.types.str;
+ default = "127.0.0.1";
+ description = ''
+ Address on which invidious-router should listen on.
+ '';
+ };
+ settings = lib.mkOption {
+ type = lib.types.submodule {
+ freeformType = settingsFormat.type;
+ };
+ default = {
+ app = {
+ listen = "127.0.0.1:8050";
+ enable_youtube_fallback = false;
+ reload_instance_list_interval = "60s";
+ };
+ api = {
+ enabled = true;
+ url = "https://api.invidious.io/instances.json";
+ filter_regions = true;
+ allowed_regions = [
+ "AT"
+ "DE"
+ "CH"
+ ];
+ };
+ healthcheck = {
+ path = "/";
+ allowed_status_codes = [
+ 200
+ ];
+ timeout = "1s";
+ interval = "10s";
+ filter_by_response_time = {
+ enabled = true;
+ qty_of_top_results = 3;
+ };
+ minimum_ratio = 0.2;
+ remove_no_ratio = true;
+ text_not_present = "YouTube is currently trying to block Invidious instances";
+ };
+ };
+ description = ''
+ Configuration for invidious-router.
+ Check https://gitlab.com/gaincoder/invidious-router#configuration
+ for configuration options.
+ '';
+ };
+ package = lib.mkOption {
+ type = lib.types.package;
+ default = pkgs.invidious-router;
+ defaultText = lib.literalExpression "pkgs.invidious-router";
+ description = ''
+ The invidious-router package to use.
+ '';
+ };
+ nginx = {
+ enable = lib.mkEnableOption ''
+ Automatic nginx proxy configuration
+ '';
+ domain = lib.mkOption {
+ type = lib.types.str;
+ example = "invidious-router.example.com";
+ description = ''
+ The domain on which invidious-router should be served.
+ '';
+ };
+ extraDomains = lib.mkOption {
+ type = lib.types.listOf lib.types.str;
+ default = [];
+ description = ''
+ Additional domains to serve invidious-router on.
+ '';
+ };
+ };
+ };
+ config = lib.mkIf cfg.enable {
+ systemd.services.invidious-router = {
+ wantedBy = ["multi-user.target"];
+ serviceConfig = {
+ Restart = "on-failure";
+ ExecStart = "${lib.getExe cfg.package} --configfile ${configFile}";
+ DynamicUser = "yes";
+ };
+ };
+
+ services.nginx.virtualHosts = lib.mkIf cfg.nginx.enable {
+ ${cfg.nginx.domain} = {
+ locations."/" = {
+ recommendedProxySettings = true;
+ proxyPass = "http://${cfg.address}:${toString cfg.port}";
+ };
+ enableACME = true;
+ forceSSL = true;
+ serverAliases = cfg.nginx.extraDomains;
+ };
+ };
+ };
+}
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/irkerd.nix b/third_party/nixpkgs/nixos/modules/services/misc/irkerd.nix
index d080cc0a73..993d77ba42 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/irkerd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/irkerd.nix
@@ -9,13 +9,13 @@ in
{
options.services.irkerd = {
enable = mkOption {
- description = lib.mdDoc "Whether to enable irker, an IRC notification daemon.";
+ description = "Whether to enable irker, an IRC notification daemon.";
default = false;
type = types.bool;
};
openPorts = mkOption {
- description = lib.mdDoc "Open ports in the firewall for irkerd";
+ description = "Open ports in the firewall for irkerd";
default = false;
type = types.bool;
};
@@ -24,7 +24,7 @@ in
default = "localhost";
example = "0.0.0.0";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Specifies the bind address on which the irker daemon listens.
The default is localhost.
@@ -36,7 +36,7 @@ in
nick = mkOption {
default = "irker";
type = types.str;
- description = lib.mdDoc "Nick to use for irker";
+ description = "Nick to use for irker";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/jackett.nix b/third_party/nixpkgs/nixos/modules/services/misc/jackett.nix
index c0bb0a575f..8b5011ce0d 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/jackett.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/jackett.nix
@@ -9,30 +9,30 @@ in
{
options = {
services.jackett = {
- enable = mkEnableOption (lib.mdDoc "Jackett");
+ enable = mkEnableOption "Jackett, API support for your favorite torrent trackers";
dataDir = mkOption {
type = types.str;
default = "/var/lib/jackett/.config/Jackett";
- description = lib.mdDoc "The directory where Jackett stores its data files.";
+ description = "The directory where Jackett stores its data files.";
};
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Open ports in the firewall for the Jackett web interface.";
+ description = "Open ports in the firewall for the Jackett web interface.";
};
user = mkOption {
type = types.str;
default = "jackett";
- description = lib.mdDoc "User account under which Jackett runs.";
+ description = "User account under which Jackett runs.";
};
group = mkOption {
type = types.str;
default = "jackett";
- description = lib.mdDoc "Group under which Jackett runs.";
+ description = "Group under which Jackett runs.";
};
package = mkPackageOption pkgs "jackett" { };
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/jellyseerr.nix b/third_party/nixpkgs/nixos/modules/services/misc/jellyseerr.nix
index 31e0c5beb6..7599a1af33 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/jellyseerr.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/jellyseerr.nix
@@ -8,18 +8,18 @@ in
meta.maintainers = [ maintainers.camillemndn ];
options.services.jellyseerr = {
- enable = mkEnableOption (mdDoc ''Jellyseerr, a requests manager for Jellyfin'');
+ enable = mkEnableOption ''Jellyseerr, a requests manager for Jellyfin'';
openFirewall = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''Open port in the firewall for the Jellyseerr web interface.'';
+ description = ''Open port in the firewall for the Jellyseerr web interface.'';
};
port = mkOption {
type = types.port;
default = 5055;
- description = mdDoc ''The port which the Jellyseerr web UI should listen to.'';
+ description = ''The port which the Jellyseerr web UI should listen to.'';
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/klipper.nix b/third_party/nixpkgs/nixos/modules/services/misc/klipper.nix
index a0eb409599..5e20b32bc8 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/klipper.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/klipper.nix
@@ -14,7 +14,7 @@ in
##### interface
options = {
services.klipper = {
- enable = mkEnableOption (lib.mdDoc "Klipper, the 3D printer firmware");
+ enable = mkEnableOption "Klipper, the 3D printer firmware";
package = mkPackageOption pkgs "klipper" { };
@@ -22,7 +22,7 @@ in
type = types.nullOr types.path;
default = null;
example = "/var/lib/klipper/klipper.log";
- description = lib.mdDoc ''
+ description = ''
Path of the file Klipper should log to.
If `null`, it logs to stdout, which is not recommended by upstream.
'';
@@ -31,20 +31,20 @@ in
inputTTY = mkOption {
type = types.path;
default = "/run/klipper/tty";
- description = lib.mdDoc "Path of the virtual printer symlink to create.";
+ description = "Path of the virtual printer symlink to create.";
};
apiSocket = mkOption {
type = types.nullOr types.path;
default = "/run/klipper/api";
- description = lib.mdDoc "Path of the API socket to create.";
+ description = "Path of the API socket to create.";
};
mutableConfig = mkOption {
type = types.bool;
default = false;
example = true;
- description = lib.mdDoc ''
+ description = ''
Whether to copy the config to a mutable directory instead of using the one directly from the nix store.
This will only copy the config if the file at `services.klipper.mutableConfigPath` doesn't exist.
'';
@@ -53,13 +53,13 @@ in
mutableConfigFolder = mkOption {
type = types.path;
default = "/var/lib/klipper";
- description = lib.mdDoc "Path to mutable Klipper config file.";
+ description = "Path to mutable Klipper config file.";
};
configFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to default Klipper config.
'';
};
@@ -67,13 +67,13 @@ in
octoprintIntegration = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Allows Octoprint to control Klipper.";
+ description = "Allows Octoprint to control Klipper.";
};
user = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
User account under which Klipper runs.
If null is specified (default), a temporary user will be created by systemd.
@@ -83,7 +83,7 @@ in
group = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Group account under which Klipper runs.
If null is specified (default), a temporary user will be created by systemd.
@@ -93,32 +93,32 @@ in
settings = mkOption {
type = types.nullOr format.type;
default = null;
- description = lib.mdDoc ''
+ description = ''
Configuration for Klipper. See the [documentation](https://www.klipper3d.org/Overview.html#configuration-and-tuning-guides)
for supported values.
'';
};
firmwares = mkOption {
- description = lib.mdDoc "Firmwares klipper should manage";
+ description = "Firmwares klipper should manage";
default = { };
type = with types; attrsOf
(submodule {
options = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
building of firmware for manual flashing
- '');
- enableKlipperFlash = mkEnableOption (lib.mdDoc ''
+ '';
+ enableKlipperFlash = mkEnableOption ''
flashings scripts for firmware. This will add `klipper-flash-$mcu` scripts to your environment which can be called to flash the firmware.
Please check the configs at [klipper](https://github.com/Klipper3d/klipper/tree/master/config) whether your board supports flashing via `make flash`
- '');
+ '';
serial = mkOption {
type = types.nullOr path;
- description = lib.mdDoc "Path to serial port this printer is connected to. Leave `null` to derive it from `service.klipper.settings`.";
+ description = "Path to serial port this printer is connected to. Leave `null` to derive it from `service.klipper.settings`.";
};
configFile = mkOption {
type = path;
- description = lib.mdDoc "Path to firmware config which is generated using `klipper-genconf`";
+ description = "Path to firmware config which is generated using `klipper-genconf`";
};
};
});
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/languagetool.nix b/third_party/nixpkgs/nixos/modules/services/misc/languagetool.nix
index 9adf792373..ba563dace4 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/languagetool.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/languagetool.nix
@@ -7,24 +7,24 @@ let
settingsFormat = pkgs.formats.javaProperties {};
in {
options.services.languagetool = {
- enable = mkEnableOption (mdDoc "the LanguageTool server");
+ enable = mkEnableOption "the LanguageTool server, a multilingual spelling, style, and grammar checker that helps correct or paraphrase texts";
port = mkOption {
type = types.port;
default = 8081;
example = 8081;
- description = mdDoc ''
+ description = ''
Port on which LanguageTool listens.
'';
};
- public = mkEnableOption (mdDoc "access from anywhere (rather than just localhost)");
+ public = mkEnableOption "access from anywhere (rather than just localhost)";
allowOrigin = mkOption {
type = types.nullOr types.str;
default = null;
example = "https://my-website.org";
- description = mdDoc ''
+ description = ''
Set the Access-Control-Allow-Origin header in the HTTP response,
used for direct (non-proxy) JavaScript-based access from browsers.
`null` to allow access from all sites.
@@ -39,11 +39,11 @@ in {
type = types.ints.unsigned;
default = 1000;
apply = toString;
- description = mdDoc "Number of sentences cached.";
+ description = "Number of sentences cached.";
};
};
default = {};
- description = mdDoc ''
+ description = ''
Configuration file options for LanguageTool, see
'languagetool-http-server --help'
for supported settings.
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/leaps.nix b/third_party/nixpkgs/nixos/modules/services/misc/leaps.nix
index 5522223ecc..c6f5a12523 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/leaps.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/leaps.nix
@@ -9,22 +9,22 @@ in
{
options = {
services.leaps = {
- enable = mkEnableOption (lib.mdDoc "leaps");
+ enable = mkEnableOption "leaps, a pair programming service";
port = mkOption {
type = types.port;
default = 8080;
- description = lib.mdDoc "A port where leaps listens for incoming http requests";
+ description = "A port where leaps listens for incoming http requests";
};
address = mkOption {
default = "";
type = types.str;
example = "127.0.0.1";
- description = lib.mdDoc "Hostname or IP-address to listen to. By default it will listen on all interfaces.";
+ description = "Hostname or IP-address to listen to. By default it will listen on all interfaces.";
};
path = mkOption {
default = "/";
type = types.path;
- description = lib.mdDoc "Subdirectory used for reverse proxy setups";
+ description = "Subdirectory used for reverse proxy setups";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/libreddit.nix b/third_party/nixpkgs/nixos/modules/services/misc/libreddit.nix
index 02d71c198e..c1f6b276ad 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/libreddit.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/libreddit.nix
@@ -13,7 +13,7 @@ in
{
options = {
services.libreddit = {
- enable = mkEnableOption (lib.mdDoc "Private front-end for Reddit");
+ enable = mkEnableOption "Private front-end for Reddit";
package = mkPackageOption pkgs "libreddit" { };
@@ -21,20 +21,20 @@ in
default = "0.0.0.0";
example = "127.0.0.1";
type = types.str;
- description = lib.mdDoc "The address to listen on";
+ description = "The address to listen on";
};
port = mkOption {
default = 8080;
example = 8000;
type = types.port;
- description = lib.mdDoc "The port to listen on";
+ description = "The port to listen on";
};
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Open ports in the firewall for the libreddit web interface";
+ description = "Open ports in the firewall for the libreddit web interface";
};
};
@@ -47,7 +47,7 @@ in
after = [ "network.target" ];
serviceConfig = {
DynamicUser = true;
- ExecStart = "${cfg.package}/bin/libreddit ${args}";
+ ExecStart = "${lib.getExe cfg.package} ${args}";
AmbientCapabilities = lib.mkIf (cfg.port < 1024) [ "CAP_NET_BIND_SERVICE" ];
Restart = "on-failure";
RestartSec = "2s";
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/lidarr.nix b/third_party/nixpkgs/nixos/modules/services/misc/lidarr.nix
index 8ceb567e88..5f7b5c293a 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/lidarr.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/lidarr.nix
@@ -8,12 +8,12 @@ in
{
options = {
services.lidarr = {
- enable = mkEnableOption (lib.mdDoc "Lidarr");
+ enable = mkEnableOption "Lidarr, a Usenet/BitTorrent music downloader";
dataDir = mkOption {
type = types.str;
default = "/var/lib/lidarr/.config/Lidarr";
- description = lib.mdDoc "The directory where Lidarr stores its data files.";
+ description = "The directory where Lidarr stores its data files.";
};
package = mkPackageOption pkgs "lidarr" { };
@@ -21,7 +21,7 @@ in
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open ports in the firewall for Lidarr
'';
};
@@ -29,7 +29,7 @@ in
user = mkOption {
type = types.str;
default = "lidarr";
- description = lib.mdDoc ''
+ description = ''
User account under which Lidarr runs.
'';
};
@@ -37,7 +37,7 @@ in
group = mkOption {
type = types.str;
default = "lidarr";
- description = lib.mdDoc ''
+ description = ''
Group under which Lidarr runs.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/lifecycled.nix b/third_party/nixpkgs/nixos/modules/services/misc/lifecycled.nix
index fb5cabb4f0..8b80af3924 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/lifecycled.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/lifecycled.nix
@@ -25,15 +25,15 @@ in
options = {
services.lifecycled = {
- enable = mkEnableOption (lib.mdDoc "lifecycled");
+ enable = mkEnableOption "lifecycled, a daemon for responding to AWS AutoScaling Lifecycle Hooks";
queueCleaner = {
- enable = mkEnableOption (lib.mdDoc "lifecycled-queue-cleaner");
+ enable = mkEnableOption "lifecycled-queue-cleaner";
frequency = mkOption {
type = types.str;
default = "hourly";
- description = lib.mdDoc ''
+ description = ''
How often to trigger the queue cleaner.
NOTE: This string should be a valid value for a systemd
@@ -46,7 +46,7 @@ in
parallel = mkOption {
type = types.ints.unsigned;
default = 20;
- description = lib.mdDoc ''
+ description = ''
The number of parallel deletes to run.
'';
};
@@ -55,7 +55,7 @@ in
instanceId = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The instance ID to listen for events for.
'';
};
@@ -63,7 +63,7 @@ in
snsTopic = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The SNS topic that receives events.
'';
};
@@ -71,14 +71,14 @@ in
noSpot = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Disable the spot termination listener.
'';
};
handler = mkOption {
type = types.path;
- description = lib.mdDoc ''
+ description = ''
The script to invoke to handle events.
'';
};
@@ -86,7 +86,7 @@ in
json = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable JSON logging.
'';
};
@@ -94,7 +94,7 @@ in
cloudwatchGroup = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Write logs to a specific Cloudwatch Logs group.
'';
};
@@ -102,7 +102,7 @@ in
cloudwatchStream = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
Write logs to a specific Cloudwatch Logs stream. Defaults to the instance ID.
'';
};
@@ -110,7 +110,7 @@ in
debug = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable debugging information.
'';
};
@@ -120,7 +120,7 @@ in
awsRegion = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc ''
+ description = ''
The region used for accessing AWS services.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/llama-cpp.nix b/third_party/nixpkgs/nixos/modules/services/misc/llama-cpp.nix
index 4d76456fb2..c73cff027e 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/llama-cpp.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/llama-cpp.nix
@@ -20,7 +20,7 @@ in {
extraFlags = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = "Extra flags passed to llama-cpp-server.";
- example = ["-c" "4096" "-ngl" "32" "--numa"];
+ example = ["-c" "4096" "-ngl" "32" "--numa" "numactl"];
default = [];
};
@@ -56,7 +56,7 @@ in {
serviceConfig = {
Type = "idle";
KillSignal = "SIGINT";
- ExecStart = "${cfg.package}/bin/llama-cpp-server --log-disable --host ${cfg.host} --port ${builtins.toString cfg.port} -m ${cfg.model} ${utils.escapeSystemdExecArgs cfg.extraFlags}";
+ ExecStart = "${cfg.package}/bin/llama-server --log-disable --host ${cfg.host} --port ${builtins.toString cfg.port} -m ${cfg.model} ${utils.escapeSystemdExecArgs cfg.extraFlags}";
Restart = "on-failure";
RestartSec = 300;
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/logkeys.nix b/third_party/nixpkgs/nixos/modules/services/misc/logkeys.nix
index 75d073a0c9..0fb4fa6cf8 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/logkeys.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/logkeys.nix
@@ -6,10 +6,10 @@ let
cfg = config.services.logkeys;
in {
options.services.logkeys = {
- enable = mkEnableOption (lib.mdDoc "logkeys service");
+ enable = mkEnableOption "logkeys, a keylogger service";
device = mkOption {
- description = lib.mdDoc "Use the given device as keyboard input event device instead of /dev/input/eventX default.";
+ description = "Use the given device as keyboard input event device instead of /dev/input/eventX default.";
default = null;
type = types.nullOr types.str;
example = "/dev/input/event15";
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/mame.nix b/third_party/nixpkgs/nixos/modules/services/misc/mame.nix
index 6e9d2fd26c..6c7f08d48b 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/mame.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/mame.nix
@@ -12,19 +12,19 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to setup TUN/TAP Ethernet interface for MAME emulator.
'';
};
user = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
User from which you run MAME binary.
'';
};
hostAddr = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
IP address of the host system. Usually an address of the main network
adapter or the adapter through which you get an internet connection.
'';
@@ -32,7 +32,7 @@ in
};
emuAddr = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
IP address of the guest system. The same you set inside guest OS under
MAME. Should be on the same subnet as {option}`services.mame.hostAddr`.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/mbpfan.nix b/third_party/nixpkgs/nixos/modules/services/misc/mbpfan.nix
index ef56ea49d1..1d9b7ae87c 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/mbpfan.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/mbpfan.nix
@@ -4,55 +4,54 @@ with lib;
let
cfg = config.services.mbpfan;
verbose = optionalString cfg.verbose "v";
- settingsFormat = pkgs.formats.ini {};
- settingsFile = settingsFormat.generate "mbpfan.ini" cfg.settings;
+ format = pkgs.formats.ini {};
+ cfgfile = format.generate "mbpfan.ini" cfg.settings;
in {
options.services.mbpfan = {
- enable = mkEnableOption (lib.mdDoc "mbpfan, fan controller daemon for Apple Macs and MacBooks");
-
- package = mkPackageOption pkgs "mbpfan" { };
+ enable = mkEnableOption "mbpfan, fan controller daemon for Apple Macs and MacBooks";
+ package = mkPackageOption pkgs "mbpfan" {};
verbose = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "If true, sets the log level to verbose.";
+ description = "If true, sets the log level to verbose.";
};
aggressive = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "If true, favors higher default fan speeds.";
+ description = "If true, favors higher default fan speeds.";
};
settings = mkOption {
default = {};
- description = lib.mdDoc "INI configuration for Mbpfan.";
+ description = "INI configuration for Mbpfan.";
type = types.submodule {
- freeformType = settingsFormat.type;
+ freeformType = format.type;
options.general.low_temp = mkOption {
type = types.int;
default = (if cfg.aggressive then 55 else 63);
defaultText = literalExpression "55";
- description = lib.mdDoc "If temperature is below this, fans will run at minimum speed.";
+ description = "If temperature is below this, fans will run at minimum speed.";
};
options.general.high_temp = mkOption {
type = types.int;
default = (if cfg.aggressive then 58 else 66);
defaultText = literalExpression "58";
- description = lib.mdDoc "If temperature is above this, fan speed will gradually increase.";
+ description = "If temperature is above this, fan speed will gradually increase.";
};
options.general.max_temp = mkOption {
type = types.int;
default = (if cfg.aggressive then 78 else 86);
defaultText = literalExpression "78";
- description = lib.mdDoc "If temperature is above this, fans will run at maximum speed.";
+ description = "If temperature is above this, fans will run at maximum speed.";
};
options.general.polling_interval = mkOption {
type = types.int;
default = 1;
- description = lib.mdDoc "The polling interval.";
+ description = "The polling interval.";
};
};
};
@@ -70,12 +69,12 @@ in {
config = mkIf cfg.enable {
boot.kernelModules = [ "coretemp" "applesmc" ];
environment.systemPackages = [ cfg.package ];
- environment.etc."mbpfan.conf".source = settingsFile;
+ environment.etc."mbpfan.conf".source = cfgfile;
systemd.services.mbpfan = {
description = "A fan manager daemon for MacBook Pro";
wantedBy = [ "sysinit.target" ];
- after = [ "syslog.target" "sysinit.target" ];
+ after = [ "sysinit.target" ];
restartTriggers = [ config.environment.etc."mbpfan.conf".source ];
serviceConfig = {
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/mediatomb.nix b/third_party/nixpkgs/nixos/modules/services/misc/mediatomb.nix
index 03235e9a12..932558e258 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/mediatomb.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/mediatomb.nix
@@ -15,19 +15,19 @@ let
options = {
path = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Absolute directory path to the media directory to index.
'';
};
recursive = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether the indexation must take place recursively or not.";
+ description = "Whether the indexation must take place recursively or not.";
};
hidden-files = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Whether to index the hidden files or not.";
+ description = "Whether to index the hidden files or not.";
};
};
};
@@ -202,7 +202,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the Gerbera/Mediatomb DLNA server.
'';
};
@@ -210,7 +210,7 @@ in {
serverName = mkOption {
type = types.str;
default = "Gerbera (Mediatomb)";
- description = lib.mdDoc ''
+ description = ''
How to identify the server on the network.
'';
};
@@ -220,7 +220,7 @@ in {
ps3Support = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable ps3 specific tweaks.
WARNING: incompatible with DSM 320 support.
'';
@@ -229,7 +229,7 @@ in {
dsmSupport = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable D-Link DSM 320 specific tweaks.
WARNING: incompatible with ps3 support.
'';
@@ -238,7 +238,7 @@ in {
tg100Support = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Telegent TG100 specific tweaks.
'';
};
@@ -246,7 +246,7 @@ in {
transcoding = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable transcoding.
'';
};
@@ -255,7 +255,7 @@ in {
type = types.path;
default = "/var/lib/${name}";
defaultText = literalExpression ''"/var/lib/''${config.${opt.package}.pname}"'';
- description = lib.mdDoc ''
+ description = ''
The directory where Gerbera/Mediatomb stores its state, data, etc.
'';
};
@@ -263,7 +263,7 @@ in {
pcDirectoryHide = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to list the top-level directory or not (from upnp client standpoint).
'';
};
@@ -271,19 +271,19 @@ in {
user = mkOption {
type = types.str;
default = "mediatomb";
- description = lib.mdDoc "User account under which the service runs.";
+ description = "User account under which the service runs.";
};
group = mkOption {
type = types.str;
default = "mediatomb";
- description = lib.mdDoc "Group account under which the service runs.";
+ description = "Group account under which the service runs.";
};
port = mkOption {
type = types.port;
default = 49152;
- description = lib.mdDoc ''
+ description = ''
The network port to listen on.
'';
};
@@ -291,7 +291,7 @@ in {
interface = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
A specific interface to bind to.
'';
};
@@ -299,7 +299,7 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
If false (the default), this is up to the user to declare the firewall rules.
If true, this opens port 1900 (tcp and udp) and the port specified by
{option}`sercvices.mediatomb.port`.
@@ -313,7 +313,7 @@ in {
uuid = mkOption {
type = types.str;
default = "fdfc8a4e-a3ad-4c1d-b43d-a2eedb03a687";
- description = lib.mdDoc ''
+ description = ''
A unique (on your network) to identify the server by.
'';
};
@@ -321,7 +321,7 @@ in {
mediaDirectories = mkOption {
type = with types; listOf (submodule mediaDirectory);
default = [];
- description = lib.mdDoc ''
+ description = ''
Declare media directories to index.
'';
example = [
@@ -333,7 +333,7 @@ in {
customCfg = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Allow the service to create and use its own config file inside the `dataDir` as
configured by {option}`services.mediatomb.dataDir`.
Deactivated by default, the service then runs with the configuration generated from this module.
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/metabase.nix b/third_party/nixpkgs/nixos/modules/services/misc/metabase.nix
index 5fc18e27ea..eebe582548 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/metabase.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/metabase.nix
@@ -13,13 +13,13 @@ in {
options = {
services.metabase = {
- enable = mkEnableOption (lib.mdDoc "Metabase service");
+ enable = mkEnableOption "Metabase service";
listen = {
ip = mkOption {
type = types.str;
default = "0.0.0.0";
- description = lib.mdDoc ''
+ description = ''
IP address that Metabase should listen on.
'';
};
@@ -27,7 +27,7 @@ in {
port = mkOption {
type = types.port;
default = 3000;
- description = lib.mdDoc ''
+ description = ''
Listen port for Metabase.
'';
};
@@ -37,7 +37,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable SSL (https) support.
'';
};
@@ -45,7 +45,7 @@ in {
port = mkOption {
type = types.port;
default = 8443;
- description = lib.mdDoc ''
+ description = ''
Listen port over SSL (https) for Metabase.
'';
};
@@ -54,7 +54,7 @@ in {
type = types.nullOr types.path;
default = "${dataDir}/metabase.jks";
example = "/etc/secrets/keystore.jks";
- description = lib.mdDoc ''
+ description = ''
[Java KeyStore](https://www.digitalocean.com/community/tutorials/java-keytool-essentials-working-with-java-keystores) file containing the certificates.
'';
};
@@ -64,7 +64,7 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open ports in the firewall for Metabase.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/mollysocket.nix b/third_party/nixpkgs/nixos/modules/services/misc/mollysocket.nix
new file mode 100644
index 0000000000..f40caa4a78
--- /dev/null
+++ b/third_party/nixpkgs/nixos/modules/services/misc/mollysocket.nix
@@ -0,0 +1,133 @@
+{ config, lib, pkgs, ... }:
+
+let
+ inherit (lib) getExe mkIf mkOption mkEnableOption optionals types;
+
+ cfg = config.services.mollysocket;
+ configuration = format.generate "mollysocket.conf" cfg.settings;
+ format = pkgs.formats.toml { };
+ package = pkgs.writeShellScriptBin "mollysocket" ''
+ MOLLY_CONF=${configuration} exec ${getExe pkgs.mollysocket} "$@"
+ '';
+in {
+ options.services.mollysocket = {
+ enable = mkEnableOption ''
+ [MollySocket](https://github.com/mollyim/mollysocket) for getting Signal
+ notifications via UnifiedPush
+ '';
+
+ settings = mkOption {
+ default = { };
+ description = ''
+ Configuration for MollySocket. Available options are listed
+ [here](https://github.com/mollyim/mollysocket#configuration).
+ '';
+ type = types.submodule {
+ freeformType = format.type;
+ options = {
+ host = mkOption {
+ default = "127.0.0.1";
+ description = "Listening address of the web server";
+ type = types.str;
+ };
+
+ port = mkOption {
+ default = 8020;
+ description = "Listening port of the web server";
+ type = types.port;
+ };
+
+ allowed_endpoints = mkOption {
+ default = [ "*" ];
+ description = "List of UnifiedPush servers";
+ example = [ "https://ntfy.sh" ];
+ type = with types; listOf str;
+ };
+
+ allowed_uuids = mkOption {
+ default = [ "*" ];
+ description = "UUIDs of Signal accounts that may use this server";
+ example = [ "abcdef-12345-tuxyz-67890" ];
+ type = with types; listOf str;
+ };
+ };
+ };
+ };
+
+ environmentFile = mkOption {
+ default = null;
+ description = ''
+ Environment file (see {manpage}`systemd.exec(5)` "EnvironmentFile="
+ section for the syntax) passed to the service. This option can be
+ used to safely include secrets in the configuration.
+ '';
+ example = "/run/secrets/mollysocket";
+ type = with types; nullOr path;
+ };
+
+ logLevel = mkOption {
+ default = "info";
+ description = "Set the {env}`RUST_LOG` environment variable";
+ example = "debug";
+ type = types.str;
+ };
+ };
+
+ config = mkIf cfg.enable {
+ environment.systemPackages = [
+ package
+ ];
+
+ # see https://github.com/mollyim/mollysocket/blob/main/mollysocket.service
+ systemd.services.mollysocket = {
+ description = "MollySocket";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network-online.target" ];
+ wants = [ "network-online.target" ];
+ environment.RUST_LOG = cfg.logLevel;
+ serviceConfig = let
+ capabilities = [ "" ] ++ optionals (cfg.settings.port < 1024) [ "CAP_NET_BIND_SERVICE" ];
+ in {
+ EnvironmentFile = cfg.environmentFile;
+ ExecStart = "${getExe package} server";
+ KillSignal = "SIGINT";
+ Restart = "on-failure";
+ StateDirectory = "mollysocket";
+ TimeoutStopSec = 5;
+ WorkingDirectory = "/var/lib/mollysocket";
+
+ # hardening
+ AmbientCapabilities = capabilities;
+ CapabilityBoundingSet = capabilities;
+ DevicePolicy = "closed";
+ DynamicUser = true;
+ LockPersonality = true;
+ MemoryDenyWriteExecute = true;
+ NoNewPrivileges = true;
+ PrivateDevices = true;
+ PrivateTmp = true;
+ PrivateUsers = true;
+ ProcSubset = "pid";
+ ProtectClock = true;
+ ProtectControlGroups = true;
+ ProtectHome = true;
+ ProtectHostname = true;
+ ProtectKernelLogs = true;
+ ProtectKernelModules = true;
+ ProtectKernelTunables = true;
+ ProtectProc = "invisible";
+ ProtectSystem = "strict";
+ RemoveIPC = true;
+ RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ];
+ RestrictNamespaces = true;
+ RestrictRealtime = true;
+ RestrictSUIDSGID = true;
+ SystemCallArchitectures = "native";
+ SystemCallFilter = [ "@system-service" "~@resources" "~@privileged" ];
+ UMask = "0077";
+ };
+ };
+ };
+
+ meta.maintainers = with lib.maintainers; [ dotlambda ];
+}
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/moonraker.nix b/third_party/nixpkgs/nixos/modules/services/misc/moonraker.nix
index f043cc83bf..1461f1048b 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/moonraker.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/moonraker.nix
@@ -16,7 +16,7 @@ let
in {
options = {
services.moonraker = {
- enable = mkEnableOption (lib.mdDoc "Moonraker, an API web server for Klipper");
+ enable = mkEnableOption "Moonraker, an API web server for Klipper";
package = mkPackageOption pkgs "moonraker" {
nullable = true;
@@ -27,19 +27,19 @@ in {
type = types.path;
default = config.services.klipper.apiSocket;
defaultText = literalExpression "config.services.klipper.apiSocket";
- description = lib.mdDoc "Path to Klipper's API socket.";
+ description = "Path to Klipper's API socket.";
};
stateDir = mkOption {
type = types.path;
default = "/var/lib/moonraker";
- description = lib.mdDoc "The directory containing the Moonraker databases.";
+ description = "The directory containing the Moonraker databases.";
};
configDir = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Deprecated directory containing client-writable configuration files.
Clients will be able to edit files in this directory via the API. This directory must be writable.
@@ -49,26 +49,26 @@ in {
user = mkOption {
type = types.str;
default = "moonraker";
- description = lib.mdDoc "User account under which Moonraker runs.";
+ description = "User account under which Moonraker runs.";
};
group = mkOption {
type = types.str;
default = "moonraker";
- description = lib.mdDoc "Group account under which Moonraker runs.";
+ description = "Group account under which Moonraker runs.";
};
address = mkOption {
type = types.str;
default = "127.0.0.1";
example = "0.0.0.0";
- description = lib.mdDoc "The IP or host to listen on.";
+ description = "The IP or host to listen on.";
};
port = mkOption {
type = types.ints.unsigned;
default = 7125;
- description = lib.mdDoc "The port to listen on.";
+ description = "The port to listen on.";
};
settings = mkOption {
@@ -80,7 +80,7 @@ in {
cors_domains = [ "https://app.fluidd.xyz" "https://my.mainsail.xyz" ];
};
};
- description = lib.mdDoc ''
+ description = ''
Configuration for Moonraker. See the [documentation](https://moonraker.readthedocs.io/en/latest/configuration/)
for supported values.
'';
@@ -89,7 +89,7 @@ in {
allowSystemControl = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to allow Moonraker to perform system-level operations.
Moonraker exposes APIs to perform system-level operations, such as
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/mqtt2influxdb.nix b/third_party/nixpkgs/nixos/modules/services/misc/mqtt2influxdb.nix
index 621f51a4e7..a2d6a2b34a 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/mqtt2influxdb.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/mqtt2influxdb.nix
@@ -21,11 +21,11 @@ let
options = {
measurement = mkOption {
type = types.str;
- description = mdDoc "Name of the measurement";
+ description = "Name of the measurement";
};
topic = mkOption {
type = types.str;
- description = mdDoc "MQTT topic to subscribe to.";
+ description = "MQTT topic to subscribe to.";
};
fields = mkOption {
type = types.submodule {
@@ -33,21 +33,21 @@ let
value = mkOption {
type = types.str;
default = "$.payload";
- description = mdDoc "Value to be picked up";
+ description = "Value to be picked up";
};
type = mkOption {
type = with types; nullOr str;
default = null;
- description = mdDoc "Type to be picked up";
+ description = "Type to be picked up";
};
};
};
- description = mdDoc "Field selector.";
+ description = "Field selector.";
};
tags = mkOption {
type = with types; attrsOf str;
default = {};
- description = mdDoc "Tags applied";
+ description = "Tags applied";
};
};
};
@@ -124,12 +124,12 @@ let
in {
options = {
services.mqtt2influxdb = {
- enable = mkEnableOption (mdDoc "BigClown MQTT to InfluxDB bridge.");
+ enable = mkEnableOption "BigClown MQTT to InfluxDB bridge.";
environmentFiles = mkOption {
type = types.listOf types.path;
default = [];
example = [ "/run/keys/mqtt2influxdb.env" ];
- description = mdDoc ''
+ description = ''
File to load as environment file. Environment variables from this file
will be interpolated into the config file using envsubst with this
syntax: `$ENVIRONMENT` or `''${VARIABLE}`.
@@ -140,22 +140,22 @@ in {
host = mkOption {
type = types.str;
default = "127.0.0.1";
- description = mdDoc "Host where MQTT server is running.";
+ description = "Host where MQTT server is running.";
};
port = mkOption {
type = types.port;
default = 1883;
- description = mdDoc "MQTT server port.";
+ description = "MQTT server port.";
};
username = mkOption {
type = with types; nullOr str;
default = null;
- description = mdDoc "Username used to connect to the MQTT server.";
+ description = "Username used to connect to the MQTT server.";
};
password = mkOption {
type = with types; nullOr str;
default = null;
- description = mdDoc ''
+ description = ''
MQTT password.
It is highly suggested to use here replacement through
@@ -166,43 +166,43 @@ in {
cafile = mkOption {
type = with types; nullOr path;
default = null;
- description = mdDoc "Certification Authority file for MQTT";
+ description = "Certification Authority file for MQTT";
};
certfile = mkOption {
type = with types; nullOr path;
default = null;
- description = mdDoc "Certificate file for MQTT";
+ description = "Certificate file for MQTT";
};
keyfile = mkOption {
type = with types; nullOr path;
default = null;
- description = mdDoc "Key file for MQTT";
+ description = "Key file for MQTT";
};
};
influxdb = {
host = mkOption {
type = types.str;
default = "127.0.0.1";
- description = mdDoc "Host where InfluxDB server is running.";
+ description = "Host where InfluxDB server is running.";
};
port = mkOption {
type = types.port;
default = 8086;
- description = mdDoc "InfluxDB server port";
+ description = "InfluxDB server port";
};
database = mkOption {
type = types.str;
- description = mdDoc "Name of the InfluxDB database.";
+ description = "Name of the InfluxDB database.";
};
username = mkOption {
type = with types; nullOr str;
default = null;
- description = mdDoc "Username for InfluxDB login.";
+ description = "Username for InfluxDB login.";
};
password = mkOption {
type = with types; nullOr str;
default = null;
- description = mdDoc ''
+ description = ''
Password for InfluxDB login.
It is highly suggested to use here replacement through
@@ -213,18 +213,18 @@ in {
ssl = mkOption {
type = types.bool;
default = false;
- description = mdDoc "Use SSL to connect to the InfluxDB server.";
+ description = "Use SSL to connect to the InfluxDB server.";
};
verify_ssl = mkOption {
type = types.bool;
default = true;
- description = mdDoc "Verify SSL certificate when connecting to the InfluxDB server.";
+ description = "Verify SSL certificate when connecting to the InfluxDB server.";
};
};
points = mkOption {
type = types.listOf pointType;
default = defaultPoints;
- description = mdDoc "Points to bridge from MQTT to InfluxDB.";
+ description = "Points to bridge from MQTT to InfluxDB.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/n8n.nix b/third_party/nixpkgs/nixos/modules/services/misc/n8n.nix
index 2af37fba91..231470b993 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/n8n.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/n8n.nix
@@ -9,18 +9,18 @@ let
in
{
options.services.n8n = {
- enable = mkEnableOption (lib.mdDoc "n8n server");
+ enable = mkEnableOption "n8n server";
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Open ports in the firewall for the n8n web interface.";
+ description = "Open ports in the firewall for the n8n web interface.";
};
settings = mkOption {
type = format.type;
default = {};
- description = lib.mdDoc ''
+ description = ''
Configuration for n8n, see
for supported values.
'';
@@ -29,7 +29,7 @@ in
webhookUrl = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
WEBHOOK_URL for n8n, in case we're running behind a reverse proxy.
This cannot be set through configuration and must reside in an environment variable.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/nitter.nix b/third_party/nixpkgs/nixos/modules/services/misc/nitter.nix
index d2cf7c0de2..f8be2aed70 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/nitter.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/nitter.nix
@@ -52,7 +52,7 @@ in
options = {
services.nitter = {
- enable = mkEnableOption (lib.mdDoc "Nitter");
+ enable = mkEnableOption "Nitter, an alternative Twitter front-end";
package = mkPackageOption pkgs "nitter" { };
@@ -61,46 +61,46 @@ in
type = types.str;
default = "0.0.0.0";
example = "127.0.0.1";
- description = lib.mdDoc "The address to listen on.";
+ description = "The address to listen on.";
};
port = mkOption {
type = types.port;
default = 8080;
example = 8000;
- description = lib.mdDoc "The port to listen on.";
+ description = "The port to listen on.";
};
https = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Set secure attribute on cookies. Keep it disabled to enable cookies when not using HTTPS.";
+ description = "Set secure attribute on cookies. Keep it disabled to enable cookies when not using HTTPS.";
};
httpMaxConnections = mkOption {
type = types.int;
default = 100;
- description = lib.mdDoc "Maximum number of HTTP connections.";
+ description = "Maximum number of HTTP connections.";
};
staticDir = mkOption {
type = types.path;
default = "${cfg.package}/share/nitter/public";
defaultText = literalExpression ''"''${config.services.nitter.package}/share/nitter/public"'';
- description = lib.mdDoc "Path to the static files directory.";
+ description = "Path to the static files directory.";
};
title = mkOption {
type = types.str;
default = "nitter";
- description = lib.mdDoc "Title of the instance.";
+ description = "Title of the instance.";
};
hostname = mkOption {
type = types.str;
default = "localhost";
example = "nitter.net";
- description = lib.mdDoc "Hostname of the instance.";
+ description = "Hostname of the instance.";
};
};
@@ -108,37 +108,37 @@ in
listMinutes = mkOption {
type = types.int;
default = 240;
- description = lib.mdDoc "How long to cache list info (not the tweets, so keep it high).";
+ description = "How long to cache list info (not the tweets, so keep it high).";
};
rssMinutes = mkOption {
type = types.int;
default = 10;
- description = lib.mdDoc "How long to cache RSS queries.";
+ description = "How long to cache RSS queries.";
};
redisHost = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "Redis host.";
+ description = "Redis host.";
};
redisPort = mkOption {
type = types.port;
default = 6379;
- description = lib.mdDoc "Redis port.";
+ description = "Redis port.";
};
redisConnections = mkOption {
type = types.int;
default = 20;
- description = lib.mdDoc "Redis connection pool size.";
+ description = "Redis connection pool size.";
};
redisMaxConnections = mkOption {
type = types.int;
default = 30;
- description = lib.mdDoc ''
+ description = ''
Maximum number of connections to Redis.
New connections are opened when none are available, but if the
@@ -152,29 +152,29 @@ in
base64Media = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Use base64 encoding for proxied media URLs.";
+ description = "Use base64 encoding for proxied media URLs.";
};
- enableRSS = mkEnableOption (lib.mdDoc "RSS feeds") // { default = true; };
+ enableRSS = mkEnableOption "RSS feeds" // { default = true; };
- enableDebug = mkEnableOption (lib.mdDoc "request logs and debug endpoints");
+ enableDebug = mkEnableOption "request logs and debug endpoints";
proxy = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc "URL to a HTTP/HTTPS proxy.";
+ description = "URL to a HTTP/HTTPS proxy.";
};
proxyAuth = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc "Credentials for proxy.";
+ description = "Credentials for proxy.";
};
tokenCount = mkOption {
type = types.int;
default = 10;
- description = lib.mdDoc ''
+ description = ''
Minimum amount of usable tokens.
Tokens are used to authorize API requests, but they expire after
@@ -191,112 +191,112 @@ in
type = types.str;
default = "";
example = "nitter.net";
- description = lib.mdDoc "Replace Twitter links with links to this instance (blank to disable).";
+ description = "Replace Twitter links with links to this instance (blank to disable).";
};
replaceYouTube = mkOption {
type = types.str;
default = "";
example = "piped.kavin.rocks";
- description = lib.mdDoc "Replace YouTube links with links to this instance (blank to disable).";
+ description = "Replace YouTube links with links to this instance (blank to disable).";
};
replaceReddit = mkOption {
type = types.str;
default = "";
example = "teddit.net";
- description = lib.mdDoc "Replace Reddit links with links to this instance (blank to disable).";
+ description = "Replace Reddit links with links to this instance (blank to disable).";
};
mp4Playback = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Enable MP4 video playback.";
+ description = "Enable MP4 video playback.";
};
hlsPlayback = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable HLS video streaming (requires JavaScript).";
+ description = "Enable HLS video streaming (requires JavaScript).";
};
proxyVideos = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Proxy video streaming through the server (might be slow).";
+ description = "Proxy video streaming through the server (might be slow).";
};
muteVideos = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Mute videos by default.";
+ description = "Mute videos by default.";
};
autoplayGifs = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Autoplay GIFs.";
+ description = "Autoplay GIFs.";
};
theme = mkOption {
type = types.str;
default = "Nitter";
- description = lib.mdDoc "Instance theme.";
+ description = "Instance theme.";
};
infiniteScroll = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Infinite scrolling (requires JavaScript, experimental!).";
+ description = "Infinite scrolling (requires JavaScript, experimental!).";
};
stickyProfile = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Make profile sidebar stick to top.";
+ description = "Make profile sidebar stick to top.";
};
bidiSupport = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Support bidirectional text (makes clicking on tweets harder).";
+ description = "Support bidirectional text (makes clicking on tweets harder).";
};
hideTweetStats = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Hide tweet stats (replies, retweets, likes).";
+ description = "Hide tweet stats (replies, retweets, likes).";
};
hideBanner = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Hide profile banner.";
+ description = "Hide profile banner.";
};
hidePins = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Hide pinned tweets.";
+ description = "Hide pinned tweets.";
};
hideReplies = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Hide tweet replies.";
+ description = "Hide tweet replies.";
};
squareAvatars = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Square profile pictures.";
+ description = "Square profile pictures.";
};
};
settings = mkOption {
type = types.attrs;
default = {};
- description = lib.mdDoc ''
+ description = ''
Add settings here to override NixOS module generated settings.
Check the official repository for the available settings:
@@ -307,7 +307,7 @@ in
guestAccounts = mkOption {
type = types.path;
default = "/var/lib/nitter/guest_accounts.jsonl";
- description = lib.mdDoc ''
+ description = ''
Path to the guest accounts file.
This file contains a list of guest accounts that can be used to
@@ -324,13 +324,13 @@ in
redisCreateLocally = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Configure local Redis server for Nitter.";
+ description = "Configure local Redis server for Nitter.";
};
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Open ports in the firewall for Nitter web interface.";
+ description = "Open ports in the firewall for Nitter web interface.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/nix-gc.nix b/third_party/nixpkgs/nixos/modules/services/misc/nix-gc.nix
index 656cbad813..9caca5d740 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/nix-gc.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/nix-gc.nix
@@ -15,14 +15,14 @@ in
automatic = lib.mkOption {
default = false;
type = lib.types.bool;
- description = lib.mdDoc "Automatically run the garbage collector at a specific time.";
+ description = "Automatically run the garbage collector at a specific time.";
};
dates = lib.mkOption {
type = lib.types.singleLineStr;
default = "03:15";
example = "weekly";
- description = lib.mdDoc ''
+ description = ''
How often or when garbage collection is performed. For most desktop and server systems
a sufficient garbage collection is once a week.
@@ -35,7 +35,7 @@ in
default = "0";
type = lib.types.singleLineStr;
example = "45min";
- description = lib.mdDoc ''
+ description = ''
Add a randomized delay before each garbage collection.
The delay will be chosen between zero and this value.
This value must be a time span in the format specified by
@@ -47,7 +47,7 @@ in
default = true;
type = lib.types.bool;
example = false;
- description = lib.mdDoc ''
+ description = ''
Takes a boolean argument. If true, the time when the service
unit was last triggered is stored on disk. When the timer is
activated, the service unit is triggered immediately if it
@@ -63,7 +63,7 @@ in
default = "";
example = "--max-freed $((64 * 1024**3))";
type = lib.types.singleLineStr;
- description = lib.mdDoc ''
+ description = ''
Options given to [`nix-collect-garbage`](https://nixos.org/manual/nix/stable/command-ref/nix-collect-garbage) when the garbage collector is run automatically.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/nix-optimise.nix b/third_party/nixpkgs/nixos/modules/services/misc/nix-optimise.nix
index 0398229a13..ed33f6746a 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/nix-optimise.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/nix-optimise.nix
@@ -10,13 +10,13 @@ in
automatic = lib.mkOption {
default = false;
type = lib.types.bool;
- description = lib.mdDoc "Automatically run the nix store optimiser at a specific time.";
+ description = "Automatically run the nix store optimiser at a specific time.";
};
dates = lib.mkOption {
default = ["03:45"];
type = with lib.types; listOf str;
- description = lib.mdDoc ''
+ description = ''
Specification (in the format described by
{manpage}`systemd.time(7)`) of the time at
which the optimiser will run.
@@ -42,9 +42,11 @@ in
startAt = lib.optionals cfg.automatic cfg.dates;
};
- timers.nix-optimise.timerConfig = {
- Persistent = true;
- RandomizedDelaySec = 1800;
+ timers.nix-optimise = lib.mkIf cfg.automatic {
+ timerConfig = {
+ Persistent = true;
+ RandomizedDelaySec = 1800;
+ };
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/nix-ssh-serve.nix b/third_party/nixpkgs/nixos/modules/services/misc/nix-ssh-serve.nix
index cf9d6339c6..f60736c688 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/nix-ssh-serve.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/nix-ssh-serve.nix
@@ -14,26 +14,26 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable serving the Nix store as a remote store via SSH.";
+ description = "Whether to enable serving the Nix store as a remote store via SSH.";
};
write = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable writing to the Nix store as a remote store via SSH. Note: the sshServe user is named nix-ssh and is not a trusted-user. nix-ssh should be added to the {option}`nix.settings.trusted-users` option in most use cases, such as allowing remote building of derivations.";
+ description = "Whether to enable writing to the Nix store as a remote store via SSH. Note: the sshServe user is named nix-ssh and is not a trusted-user. nix-ssh should be added to the {option}`nix.settings.trusted-users` option in most use cases, such as allowing remote building of derivations.";
};
keys = mkOption {
type = types.listOf types.str;
default = [];
example = [ "ssh-dss AAAAB3NzaC1k... alice@example.org" ];
- description = lib.mdDoc "A list of SSH public keys allowed to access the binary cache via SSH.";
+ description = "A list of SSH public keys allowed to access the binary cache via SSH.";
};
protocol = mkOption {
type = types.enum [ "ssh" "ssh-ng" ];
default = "ssh";
- description = lib.mdDoc "The specific Nix-over-SSH protocol to use.";
+ description = "The specific Nix-over-SSH protocol to use.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/novacomd.nix b/third_party/nixpkgs/nixos/modules/services/misc/novacomd.nix
index bde8328d46..7cfc68d2b6 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/novacomd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/novacomd.nix
@@ -10,7 +10,7 @@ in {
options = {
services.novacomd = {
- enable = mkEnableOption (lib.mdDoc "Novacom service for connecting to WebOS devices");
+ enable = mkEnableOption "Novacom service for connecting to WebOS devices";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/ntfy-sh.nix b/third_party/nixpkgs/nixos/modules/services/misc/ntfy-sh.nix
index b8b0772401..ae6ab9571d 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/ntfy-sh.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/ntfy-sh.nix
@@ -10,20 +10,20 @@ in
{
options.services.ntfy-sh = {
- enable = mkEnableOption (mdDoc "[ntfy-sh](https://ntfy.sh), a push notification service");
+ enable = mkEnableOption "[ntfy-sh](https://ntfy.sh), a push notification service";
package = mkPackageOption pkgs "ntfy-sh" { };
user = mkOption {
default = "ntfy-sh";
type = types.str;
- description = lib.mdDoc "User the ntfy-sh server runs under.";
+ description = "User the ntfy-sh server runs under.";
};
group = mkOption {
default = "ntfy-sh";
type = types.str;
- description = lib.mdDoc "Primary group of ntfy-sh user.";
+ description = "Primary group of ntfy-sh user.";
};
settings = mkOption {
@@ -33,7 +33,7 @@ in
base-url = mkOption {
type = types.str;
example = "https://ntfy.example";
- description = lib.mdDoc ''
+ description = ''
Public facing base URL of the service
This setting is required for any of the following features:
@@ -55,7 +55,7 @@ in
}
'';
- description = mdDoc ''
+ description = ''
Configuration for ntfy.sh, supported values are [here](https://ntfy.sh/docs/config/#config-options).
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/nzbget.nix b/third_party/nixpkgs/nixos/modules/services/misc/nzbget.nix
index d02fda62fa..c961fe9b28 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/nzbget.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/nzbget.nix
@@ -25,24 +25,24 @@ in
options = {
services.nzbget = {
- enable = mkEnableOption (lib.mdDoc "NZBGet");
+ enable = mkEnableOption "NZBGet, for downloading files from news servers";
user = mkOption {
type = types.str;
default = "nzbget";
- description = lib.mdDoc "User account under which NZBGet runs";
+ description = "User account under which NZBGet runs";
};
group = mkOption {
type = types.str;
default = "nzbget";
- description = lib.mdDoc "Group under which NZBGet runs";
+ description = "Group under which NZBGet runs";
};
settings = mkOption {
type = with types; attrsOf (oneOf [ bool int str ]);
default = {};
- description = lib.mdDoc ''
+ description = ''
NZBGet configuration, passed via command line using switch -o. Refer to
for details on supported values.
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/nzbhydra2.nix b/third_party/nixpkgs/nixos/modules/services/misc/nzbhydra2.nix
index 536a4e4b00..8246ea52f9 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/nzbhydra2.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/nzbhydra2.nix
@@ -7,19 +7,18 @@ let cfg = config.services.nzbhydra2;
in {
options = {
services.nzbhydra2 = {
- enable = mkEnableOption (lib.mdDoc "NZBHydra2");
+ enable = mkEnableOption "NZBHydra2, Usenet meta search";
dataDir = mkOption {
type = types.str;
default = "/var/lib/nzbhydra2";
- description = lib.mdDoc "The directory where NZBHydra2 stores its data files.";
+ description = "The directory where NZBHydra2 stores its data files.";
};
openFirewall = mkOption {
type = types.bool;
default = false;
- description =
- lib.mdDoc "Open ports in the firewall for the NZBHydra2 web interface.";
+ description = "Open ports in the firewall for the NZBHydra2 web interface.";
};
package = mkPackageOption pkgs "nzbhydra2" { };
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/octoprint.nix b/third_party/nixpkgs/nixos/modules/services/misc/octoprint.nix
index 43e0ce0c21..6290a6a7a5 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/octoprint.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/octoprint.nix
@@ -29,12 +29,12 @@ in
services.octoprint = {
- enable = mkEnableOption (lib.mdDoc "OctoPrint, web interface for 3D printers");
+ enable = mkEnableOption "OctoPrint, web interface for 3D printers";
host = mkOption {
type = types.str;
default = "0.0.0.0";
- description = lib.mdDoc ''
+ description = ''
Host to bind OctoPrint to.
'';
};
@@ -42,7 +42,7 @@ in
port = mkOption {
type = types.port;
default = 5000;
- description = lib.mdDoc ''
+ description = ''
Port to bind OctoPrint to.
'';
};
@@ -50,25 +50,25 @@ in
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Open ports in the firewall for OctoPrint.";
+ description = "Open ports in the firewall for OctoPrint.";
};
user = mkOption {
type = types.str;
default = "octoprint";
- description = lib.mdDoc "User for the daemon.";
+ description = "User for the daemon.";
};
group = mkOption {
type = types.str;
default = "octoprint";
- description = lib.mdDoc "Group for the daemon.";
+ description = "Group for the daemon.";
};
stateDir = mkOption {
type = types.path;
default = "/var/lib/octoprint";
- description = lib.mdDoc "State directory of the daemon.";
+ description = "State directory of the daemon.";
};
plugins = mkOption {
@@ -76,13 +76,13 @@ in
default = plugins: [ ];
defaultText = literalExpression "plugins: []";
example = literalExpression "plugins: with plugins; [ themeify stlviewer ]";
- description = lib.mdDoc "Additional plugins to be used. Available plugins are passed through the plugins input.";
+ description = "Additional plugins to be used. Available plugins are passed through the plugins input.";
};
extraConfig = mkOption {
type = types.attrs;
default = { };
- description = lib.mdDoc "Extra options which are added to OctoPrint's YAML configuration file.";
+ description = "Extra options which are added to OctoPrint's YAML configuration file.";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/ollama.nix b/third_party/nixpkgs/nixos/modules/services/misc/ollama.nix
index 3ac3beb4de..c0341984aa 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/ollama.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/ollama.nix
@@ -13,48 +13,115 @@ in
{
options = {
services.ollama = {
- enable = lib.mkEnableOption (
- lib.mdDoc "Server for local large language models"
- );
+ enable = lib.mkEnableOption "ollama server for local large language models";
+ package = lib.mkPackageOption pkgs "ollama" { };
+ home = lib.mkOption {
+ type = types.str;
+ default = "%S/ollama";
+ example = "/home/foo";
+ description = ''
+ The home directory that the ollama service is started in.
+
+ See also `services.ollama.writablePaths` and `services.ollama.sandbox`.
+ '';
+ };
+ models = lib.mkOption {
+ type = types.str;
+ default = "%S/ollama/models";
+ example = "/path/to/ollama/models";
+ description = ''
+ The directory that the ollama service will read models from and download new models to.
+
+ See also `services.ollama.writablePaths` and `services.ollama.sandbox`
+ if downloading models or other mutation of the filesystem is required.
+ '';
+ };
+ sandbox = lib.mkOption {
+ type = types.bool;
+ default = true;
+ example = false;
+ description = ''
+ Whether to enable systemd's sandboxing capabilities.
+
+ This sets [`DynamicUser`](
+ https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#DynamicUser=
+ ), which runs the server as a unique user with read-only access to most of the filesystem.
+
+ See also `services.ollama.writablePaths`.
+ '';
+ };
+ writablePaths = lib.mkOption {
+ type = types.listOf types.str;
+ default = [ ];
+ example = [ "/home/foo" "/mnt/foo" ];
+ description = ''
+ Paths that the server should have write access to.
+
+ This sets [`ReadWritePaths`](
+ https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#ReadWritePaths=
+ ), which allows specified paths to be written to through the default sandboxing.
+
+ See also `services.ollama.sandbox`.
+ '';
+ };
listenAddress = lib.mkOption {
type = types.str;
default = "127.0.0.1:11434";
- description = lib.mdDoc ''
- Specifies the bind address on which the ollama server HTTP interface listens.
+ example = "0.0.0.0:11111";
+ description = ''
+ The address which the ollama server HTTP interface binds and listens to.
'';
};
acceleration = lib.mkOption {
- type = types.nullOr (types.enum [ "rocm" "cuda" ]);
+ type = types.nullOr (types.enum [ false "rocm" "cuda" ]);
default = null;
example = "rocm";
- description = lib.mdDoc ''
- Specifies the interface to use for hardware acceleration.
+ description = ''
+ What interface to use for hardware acceleration.
- - `rocm`: supported by modern AMD GPUs
- - `cuda`: supported by modern NVIDIA GPUs
+ - `null`: default behavior
+ if `nixpkgs.config.rocmSupport` is enabled, uses `"rocm"`
+ if `nixpkgs.config.cudaSupport` is enabled, uses `"cuda"`
+ otherwise defaults to `false`
+ - `false`: disable GPU, only use CPU
+ - `"rocm"`: supported by most modern AMD GPUs
+ - `"cuda"`: supported by most modern NVIDIA GPUs
+ '';
+ };
+ environmentVariables = lib.mkOption {
+ type = types.attrsOf types.str;
+ default = { };
+ example = {
+ OLLAMA_LLM_LIBRARY = "cpu";
+ HIP_VISIBLE_DEVICES = "0,1";
+ };
+ description = ''
+ Set arbitrary environment variables for the ollama service.
+
+ Be aware that these are only seen by the ollama server (systemd service),
+ not normal invocations like `ollama run`.
+ Since `ollama run` is mostly a shell around the ollama server, this is usually sufficient.
'';
};
- package = lib.mkPackageOption pkgs "ollama" { };
};
};
config = lib.mkIf cfg.enable {
- systemd = {
- services.ollama = {
- wantedBy = [ "multi-user.target" ];
- description = "Server for local large language models";
- after = [ "network.target" ];
- environment = {
- HOME = "%S/ollama";
- OLLAMA_MODELS = "%S/ollama/models";
- OLLAMA_HOST = cfg.listenAddress;
- };
- serviceConfig = {
- ExecStart = "${lib.getExe ollamaPackage} serve";
- WorkingDirectory = "/var/lib/ollama";
- StateDirectory = [ "ollama" ];
- DynamicUser = true;
- };
+ systemd.services.ollama = {
+ description = "Server for local large language models";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network.target" ];
+ environment = cfg.environmentVariables // {
+ HOME = cfg.home;
+ OLLAMA_MODELS = cfg.models;
+ OLLAMA_HOST = cfg.listenAddress;
+ };
+ serviceConfig = {
+ ExecStart = "${lib.getExe ollamaPackage} serve";
+ WorkingDirectory = cfg.home;
+ StateDirectory = [ "ollama" ];
+ DynamicUser = cfg.sandbox;
+ ReadWritePaths = cfg.writablePaths;
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/ombi.nix b/third_party/nixpkgs/nixos/modules/services/misc/ombi.nix
index 8bf6a9b116..9b2e3cf84e 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/ombi.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/ombi.nix
@@ -7,40 +7,42 @@ let cfg = config.services.ombi;
in {
options = {
services.ombi = {
- enable = mkEnableOption (lib.mdDoc ''
- Ombi.
+ enable = mkEnableOption ''
+ Ombi, a web application that automatically gives your shared Plex or
+ Emby users the ability to request content by themselves!
+
Optionally see
on how to set up a reverse proxy
- '');
+ '';
dataDir = mkOption {
type = types.str;
default = "/var/lib/ombi";
- description = lib.mdDoc "The directory where Ombi stores its data files.";
+ description = "The directory where Ombi stores its data files.";
};
port = mkOption {
type = types.port;
default = 5000;
- description = lib.mdDoc "The port for the Ombi web interface.";
+ description = "The port for the Ombi web interface.";
};
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Open ports in the firewall for the Ombi web interface.";
+ description = "Open ports in the firewall for the Ombi web interface.";
};
user = mkOption {
type = types.str;
default = "ombi";
- description = lib.mdDoc "User account under which Ombi runs.";
+ description = "User account under which Ombi runs.";
};
group = mkOption {
type = types.str;
default = "ombi";
- description = lib.mdDoc "Group under which Ombi runs.";
+ description = "Group under which Ombi runs.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/osrm.nix b/third_party/nixpkgs/nixos/modules/services/misc/osrm.nix
index 12c908a761..a93337dc75 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/osrm.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/osrm.nix
@@ -11,44 +11,44 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enable the OSRM service.";
+ description = "Enable the OSRM service.";
};
address = mkOption {
type = types.str;
default = "0.0.0.0";
- description = lib.mdDoc "IP address on which the web server will listen.";
+ description = "IP address on which the web server will listen.";
};
port = mkOption {
type = types.port;
default = 5000;
- description = lib.mdDoc "Port on which the web server will run.";
+ description = "Port on which the web server will run.";
};
threads = mkOption {
type = types.int;
default = 4;
- description = lib.mdDoc "Number of threads to use.";
+ description = "Number of threads to use.";
};
algorithm = mkOption {
type = types.enum [ "CH" "CoreCH" "MLD" ];
default = "MLD";
- description = lib.mdDoc "Algorithm to use for the data. Must be one of CH, CoreCH, MLD";
+ description = "Algorithm to use for the data. Must be one of CH, CoreCH, MLD";
};
extraFlags = mkOption {
type = types.listOf types.str;
default = [];
example = [ "--max-table-size 1000" "--max-matching-size 1000" ];
- description = lib.mdDoc "Extra command line arguments passed to osrm-routed";
+ description = "Extra command line arguments passed to osrm-routed";
};
dataFile = mkOption {
type = types.path;
example = "/var/lib/osrm/berlin-latest.osrm";
- description = lib.mdDoc "Data file location";
+ description = "Data file location";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/owncast.nix b/third_party/nixpkgs/nixos/modules/services/misc/owncast.nix
index 01fe34cf50..94f0f4e998 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/owncast.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/owncast.nix
@@ -5,12 +5,12 @@ in {
options.services.owncast = {
- enable = mkEnableOption (lib.mdDoc "owncast");
+ enable = mkEnableOption "owncast, a video live streaming solution";
dataDir = mkOption {
type = types.str;
default = "/var/lib/owncast";
- description = lib.mdDoc ''
+ description = ''
The directory where owncast stores its data files. If left as the default value this directory will automatically be created before the owncast server starts, otherwise the sysadmin is responsible for ensuring the directory exists with appropriate ownership and permissions.
'';
};
@@ -18,7 +18,7 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open the appropriate ports in the firewall for owncast.
'';
};
@@ -26,26 +26,26 @@ in {
user = mkOption {
type = types.str;
default = "owncast";
- description = lib.mdDoc "User account under which owncast runs.";
+ description = "User account under which owncast runs.";
};
group = mkOption {
type = types.str;
default = "owncast";
- description = lib.mdDoc "Group under which owncast runs.";
+ description = "Group under which owncast runs.";
};
listen = mkOption {
type = types.str;
default = "127.0.0.1";
example = "0.0.0.0";
- description = lib.mdDoc "The IP address to bind the owncast web server to.";
+ description = "The IP address to bind the owncast web server to.";
};
port = mkOption {
type = types.port;
default = 8080;
- description = lib.mdDoc ''
+ description = ''
TCP port where owncast web-gui listens.
'';
};
@@ -53,7 +53,7 @@ in {
rtmp-port = mkOption {
type = types.port;
default = 1935;
- description = lib.mdDoc ''
+ description = ''
TCP port where owncast rtmp service listens.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/packagekit.nix b/third_party/nixpkgs/nixos/modules/services/misc/packagekit.nix
index f4191a4453..1be689794d 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/packagekit.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/packagekit.nix
@@ -39,22 +39,22 @@ in
];
options.services.packagekit = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
PackageKit, a cross-platform D-Bus abstraction layer for
installing software. Software utilizing PackageKit can install
software regardless of the package manager
- '');
+ '';
settings = mkOption {
type = iniFmt.type;
default = { };
- description = lib.mdDoc "Additional settings passed straight through to PackageKit.conf";
+ description = "Additional settings passed straight through to PackageKit.conf";
};
vendorSettings = mkOption {
type = iniFmt.type;
default = { };
- description = lib.mdDoc "Additional settings passed straight through to Vendor.conf";
+ description = "Additional settings passed straight through to Vendor.conf";
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/paperless.nix b/third_party/nixpkgs/nixos/modules/services/misc/paperless.nix
index ab042e4b6e..e564fe3b83 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/paperless.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/paperless.nix
@@ -3,7 +3,6 @@
with lib;
let
cfg = config.services.paperless;
- pkg = cfg.package;
defaultUser = "paperless";
defaultFont = "${pkgs.liberation_ttf}/share/fonts/truetype/LiberationSerif-Regular.ttf";
@@ -25,8 +24,10 @@ let
} // optionalAttrs (cfg.settings.PAPERLESS_ENABLE_NLTK or true) {
PAPERLESS_NLTK_DIR = pkgs.symlinkJoin {
name = "paperless_ngx_nltk_data";
- paths = pkg.nltkData;
+ paths = cfg.package.nltkData;
};
+ } // optionalAttrs (cfg.openMPThreadingWorkaround) {
+ OMP_NUM_THREADS = "1";
} // (lib.mapAttrs (_: s:
if (lib.isAttrs s || lib.isList s) then builtins.toJSON s
else if lib.isBool s then lib.boolToString s
@@ -36,7 +37,7 @@ let
manage = pkgs.writeShellScript "manage" ''
set -o allexport # Export the following env vars
${lib.toShellVars env}
- exec ${pkg}/bin/paperless-ngx "$@"
+ exec ${cfg.package}/bin/paperless-ngx "$@"
'';
# Secure the services
@@ -94,7 +95,7 @@ in
enable = mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable Paperless.
When started, the Paperless database is automatically created if it doesn't
@@ -109,34 +110,34 @@ in
dataDir = mkOption {
type = types.str;
default = "/var/lib/paperless";
- description = lib.mdDoc "Directory to store the Paperless data.";
+ description = "Directory to store the Paperless data.";
};
mediaDir = mkOption {
type = types.str;
default = "${cfg.dataDir}/media";
defaultText = literalExpression ''"''${dataDir}/media"'';
- description = lib.mdDoc "Directory to store the Paperless documents.";
+ description = "Directory to store the Paperless documents.";
};
consumptionDir = mkOption {
type = types.str;
default = "${cfg.dataDir}/consume";
defaultText = literalExpression ''"''${dataDir}/consume"'';
- description = lib.mdDoc "Directory from which new documents are imported.";
+ description = "Directory from which new documents are imported.";
};
consumptionDirIsPublic = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether all users can write to the consumption dir.";
+ description = "Whether all users can write to the consumption dir.";
};
passwordFile = mkOption {
type = types.nullOr types.path;
default = null;
example = "/run/keys/paperless-password";
- description = lib.mdDoc ''
+ description = ''
A file containing the superuser password.
A superuser is required to access the web interface.
@@ -157,13 +158,13 @@ in
address = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "Web interface address.";
+ description = "Web interface address.";
};
port = mkOption {
type = types.port;
default = 28981;
- description = lib.mdDoc "Web interface port.";
+ description = "Web interface port.";
};
settings = mkOption {
@@ -173,7 +174,7 @@ in
in oneOf (typeList ++ [ (listOf (oneOf typeList)) (attrsOf (oneOf typeList)) ]));
};
default = { };
- description = lib.mdDoc ''
+ description = ''
Extra paperless config options.
See [the documentation](https://docs.paperless-ngx.com/configuration/) for available options.
@@ -195,24 +196,52 @@ in
user = mkOption {
type = types.str;
default = defaultUser;
- description = lib.mdDoc "User under which Paperless runs.";
+ description = "User under which Paperless runs.";
};
- package = mkPackageOption pkgs "paperless-ngx" { };
+ package = mkPackageOption pkgs "paperless-ngx" { } // {
+ apply = pkg: pkg.override {
+ tesseract5 = pkg.tesseract5.override {
+ # always enable detection modules
+ # tesseract fails to build when eng is not present
+ enableLanguages = if cfg.settings ? PAPERLESS_OCR_LANGUAGE then
+ lists.unique (
+ [ "equ" "osd" "eng" ]
+ ++ lib.splitString "+" cfg.settings.PAPERLESS_OCR_LANGUAGE
+ )
+ else null;
+ };
+ };
+ };
+
+ openMPThreadingWorkaround = mkEnableOption ''
+ a workaround for document classifier timeouts.
+
+ Paperless uses OpenBLAS via scikit-learn for document classification.
+
+ The default is to use threading for OpenMP but this would cause the
+ document classifier to spin on one core seemingly indefinitely if there
+ are large amounts of classes per classification; causing it to
+ effectively never complete due to running into timeouts.
+
+ This sets `OMP_NUM_THREADS` to `1` in order to mitigate the issue. See
+ https://github.com/NixOS/nixpkgs/issues/240591 for more information.
+ '' // mkOption { default = true; };
};
config = mkIf cfg.enable {
services.redis.servers.paperless.enable = mkIf enableRedis true;
- systemd.tmpfiles.rules = [
- "d '${cfg.dataDir}' - ${cfg.user} ${config.users.users.${cfg.user}.group} - -"
- "d '${cfg.mediaDir}' - ${cfg.user} ${config.users.users.${cfg.user}.group} - -"
- (if cfg.consumptionDirIsPublic then
- "d '${cfg.consumptionDir}' 777 - - - -"
- else
- "d '${cfg.consumptionDir}' - ${cfg.user} ${config.users.users.${cfg.user}.group} - -"
- )
- ];
+ systemd.tmpfiles.settings."10-paperless" = let
+ defaultRule = {
+ inherit (cfg) user;
+ inherit (config.users.users.${cfg.user}) group;
+ };
+ in {
+ "${cfg.dataDir}".d = defaultRule;
+ "${cfg.mediaDir}".d = defaultRule;
+ "${cfg.consumptionDir}".d = if cfg.consumptionDirIsPublic then { mode = "777"; } else defaultRule;
+ };
systemd.services.paperless-scheduler = {
description = "Paperless Celery Beat";
@@ -220,8 +249,9 @@ in
wants = [ "paperless-consumer.service" "paperless-web.service" "paperless-task-queue.service" ];
serviceConfig = defaultServiceConfig // {
User = cfg.user;
- ExecStart = "${pkg}/bin/celery --app paperless beat --loglevel INFO";
+ ExecStart = "${cfg.package}/bin/celery --app paperless beat --loglevel INFO";
Restart = "on-failure";
+ LoadCredential = lib.optionalString (cfg.passwordFile != null) "PAPERLESS_ADMIN_PASSWORD:${cfg.passwordFile}";
};
environment = env;
@@ -232,8 +262,8 @@ in
versionFile="${cfg.dataDir}/src-version"
version=$(cat "$versionFile" 2>/dev/null || echo 0)
- if [[ $version != ${pkg.version} ]]; then
- ${pkg}/bin/paperless-ngx migrate
+ if [[ $version != ${cfg.package.version} ]]; then
+ ${cfg.package}/bin/paperless-ngx migrate
# Parse old version string format for backwards compatibility
version=$(echo "$version" | grep -ohP '[^-]+$')
@@ -246,20 +276,20 @@ in
if versionLessThan 1.12.0; then
# Reindex documents as mentioned in https://github.com/paperless-ngx/paperless-ngx/releases/tag/v1.12.1
echo "Reindexing documents, to allow searching old comments. Required after the 1.12.x upgrade."
- ${pkg}/bin/paperless-ngx document_index reindex
+ ${cfg.package}/bin/paperless-ngx document_index reindex
fi
- echo ${pkg.version} > "$versionFile"
+ echo ${cfg.package.version} > "$versionFile"
fi
''
+ optionalString (cfg.passwordFile != null) ''
export PAPERLESS_ADMIN_USER="''${PAPERLESS_ADMIN_USER:-admin}"
- export PAPERLESS_ADMIN_PASSWORD=$(cat "${cfg.dataDir}/superuser-password")
+ export PAPERLESS_ADMIN_PASSWORD=$(cat $CREDENTIALS_DIRECTORY/PAPERLESS_ADMIN_PASSWORD)
superuserState="$PAPERLESS_ADMIN_USER:$PAPERLESS_ADMIN_PASSWORD"
superuserStateFile="${cfg.dataDir}/superuser-state"
if [[ $(cat "$superuserStateFile" 2>/dev/null) != $superuserState ]]; then
- ${pkg}/bin/paperless-ngx manage_superuser
+ ${cfg.package}/bin/paperless-ngx manage_superuser
echo "$superuserState" > "$superuserStateFile"
fi
'';
@@ -272,7 +302,7 @@ in
after = [ "paperless-scheduler.service" ];
serviceConfig = defaultServiceConfig // {
User = cfg.user;
- ExecStart = "${pkg}/bin/celery --app paperless worker --loglevel INFO";
+ ExecStart = "${cfg.package}/bin/celery --app paperless worker --loglevel INFO";
Restart = "on-failure";
# The `mbind` syscall is needed for running the classifier.
SystemCallFilter = defaultServiceConfig.SystemCallFilter ++ [ "mbind" ];
@@ -282,19 +312,6 @@ in
environment = env;
};
- # Reading the user-provided password file requires root access
- systemd.services.paperless-copy-password = mkIf (cfg.passwordFile != null) {
- requiredBy = [ "paperless-scheduler.service" ];
- before = [ "paperless-scheduler.service" ];
- serviceConfig = {
- ExecStart = ''
- ${pkgs.coreutils}/bin/install --mode 600 --owner '${cfg.user}' --compare \
- '${cfg.passwordFile}' '${cfg.dataDir}/superuser-password'
- '';
- Type = "oneshot";
- };
- };
-
systemd.services.paperless-consumer = {
description = "Paperless document consumer";
# Bind to `paperless-scheduler` so that the consumer never runs
@@ -303,7 +320,7 @@ in
after = [ "paperless-scheduler.service" ];
serviceConfig = defaultServiceConfig // {
User = cfg.user;
- ExecStart = "${pkg}/bin/paperless-ngx document_consumer";
+ ExecStart = "${cfg.package}/bin/paperless-ngx document_consumer";
Restart = "on-failure";
};
environment = env;
@@ -335,13 +352,14 @@ in
echo "PAPERLESS_SECRET_KEY is empty, refusing to start."
exit 1
fi
- exec ${pkg.python.pkgs.gunicorn}/bin/gunicorn \
- -c ${pkg}/lib/paperless-ngx/gunicorn.conf.py paperless.asgi:application
+ exec ${cfg.package.python.pkgs.gunicorn}/bin/gunicorn \
+ -c ${cfg.package}/lib/paperless-ngx/gunicorn.conf.py paperless.asgi:application
'';
serviceConfig = defaultServiceConfig // {
User = cfg.user;
Restart = "on-failure";
+ LimitNOFILE = 65536;
# gunicorn needs setuid, liblapack needs mbind
SystemCallFilter = defaultServiceConfig.SystemCallFilter ++ [ "@setuid mbind" ];
# Needs to serve web page
@@ -351,7 +369,7 @@ in
CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];
};
environment = env // {
- PYTHONPATH = "${pkg.python.pkgs.makePythonPath pkg.propagatedBuildInputs}:${pkg}/lib/paperless-ngx/src";
+ PYTHONPATH = "${cfg.package.python.pkgs.makePythonPath cfg.package.propagatedBuildInputs}:${cfg.package}/lib/paperless-ngx/src";
};
# Allow the web interface to access the private /tmp directory of the server.
# This is required to support uploading files via the web interface.
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/parsoid.nix b/third_party/nixpkgs/nixos/modules/services/misc/parsoid.nix
index 6f4a340c8a..a1935d2021 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/parsoid.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/parsoid.nix
@@ -39,7 +39,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable Parsoid -- bidirectional
wikitext parser.
'';
@@ -48,7 +48,7 @@ in
wikis = mkOption {
type = types.listOf (types.either types.str types.attrs);
example = [ "http://localhost/api.php" ];
- description = lib.mdDoc ''
+ description = ''
Used MediaWiki API endpoints.
'';
};
@@ -56,7 +56,7 @@ in
workers = mkOption {
type = types.int;
default = 2;
- description = lib.mdDoc ''
+ description = ''
Number of Parsoid workers.
'';
};
@@ -64,7 +64,7 @@ in
interface = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc ''
+ description = ''
Interface to listen on.
'';
};
@@ -72,7 +72,7 @@ in
port = mkOption {
type = types.port;
default = 8000;
- description = lib.mdDoc ''
+ description = ''
Port to listen on.
'';
};
@@ -80,7 +80,7 @@ in
extraConfig = mkOption {
type = types.attrs;
default = {};
- description = lib.mdDoc ''
+ description = ''
Extra configuration to add to parsoid configuration.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/persistent-evdev.nix b/third_party/nixpkgs/nixos/modules/services/misc/persistent-evdev.nix
index b1f367fec7..650752abd2 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/persistent-evdev.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/persistent-evdev.nix
@@ -11,12 +11,12 @@ let
in
{
options.services.persistent-evdev = {
- enable = lib.mkEnableOption (lib.mdDoc "virtual input devices that persist even if the backing device is hotplugged");
+ enable = lib.mkEnableOption "virtual input devices that persist even if the backing device is hotplugged";
devices = lib.mkOption {
default = {};
type = with lib.types; attrsOf str;
- description = lib.mdDoc ''
+ description = ''
A set of virtual proxy device labels with backing physical device ids.
Physical devices should already exist in {file}`/dev/input/by-id/`.
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/pinnwand.nix b/third_party/nixpkgs/nixos/modules/services/misc/pinnwand.nix
index 5fca9f4125..9c26864dab 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/pinnwand.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/pinnwand.nix
@@ -10,17 +10,17 @@ let
in
{
options.services.pinnwand = {
- enable = mkEnableOption (lib.mdDoc "Pinnwand");
+ enable = mkEnableOption "Pinnwand, a pastebin";
port = mkOption {
type = types.port;
- description = lib.mdDoc "The port to listen on.";
+ description = "The port to listen on.";
default = 8000;
};
settings = mkOption {
default = {};
- description = lib.mdDoc ''
+ description = ''
Your {file}`pinnwand.toml` as a Nix attribute set. Look up
possible options in the [documentation](https://pinnwand.readthedocs.io/en/v${pkgs.pinnwand.version}/configuration.html).
'';
@@ -31,7 +31,7 @@ in
type = types.str;
default = "sqlite:////var/lib/pinnwand/pinnwand.db";
example = "sqlite:///:memory";
- description = lib.mdDoc ''
+ description = ''
Database URI compatible with [SQLAlchemyhttps://docs.sqlalchemy.org/en/14/core/engines.html#database-urls].
Additional packages may need to be introduced into the environment for certain databases.
@@ -42,7 +42,7 @@ in
type = types.ints.positive;
default = 262144;
example = 524288;
- description = lib.mdDoc ''
+ description = ''
Maximum size of a paste in bytes.
'';
};
@@ -51,7 +51,7 @@ in
default = ''
Welcome to pinnwand, this site is a pastebin. It allows you to share code with others. If you write code in the text area below and press the paste button you will be given a link you can share with others so they can view your code as well.
People with the link can view your pasted code, only you can remove your paste and it expires automatically. Note that anyone could guess the URI to your paste so don't rely on it being private.
'';
- description = lib.mdDoc ''
+ description = ''
Raw HTML help text shown in the header area.
'';
};
@@ -60,7 +60,7 @@ in
default = ''
View source code , the removal or expiry stories, or read the about page.
'';
- description = lib.mdDoc ''
+ description = ''
The footer in raw HTML.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/plex.nix b/third_party/nixpkgs/nixos/modules/services/misc/plex.nix
index 1648016057..fcd8ebbac6 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/plex.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/plex.nix
@@ -12,12 +12,12 @@ in
options = {
services.plex = {
- enable = mkEnableOption (lib.mdDoc "Plex Media Server");
+ enable = mkEnableOption "Plex Media Server";
dataDir = mkOption {
type = types.str;
default = "/var/lib/plex";
- description = lib.mdDoc ''
+ description = ''
The directory where Plex stores its data files.
'';
};
@@ -25,7 +25,7 @@ in
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open ports in the firewall for the media server.
'';
};
@@ -33,7 +33,7 @@ in
user = mkOption {
type = types.str;
default = "plex";
- description = lib.mdDoc ''
+ description = ''
User account under which Plex runs.
'';
};
@@ -41,7 +41,7 @@ in
group = mkOption {
type = types.str;
default = "plex";
- description = lib.mdDoc ''
+ description = ''
Group under which Plex runs.
'';
};
@@ -49,7 +49,7 @@ in
extraPlugins = mkOption {
type = types.listOf types.path;
default = [];
- description = lib.mdDoc ''
+ description = ''
A list of paths to extra plugin bundles to install in Plex's plugin
directory. Every time the systemd unit for Plex starts up, all of the
symlinks in Plex's plugin directory will be cleared and this module
@@ -73,7 +73,7 @@ in
extraScanners = mkOption {
type = types.listOf types.path;
default = [];
- description = lib.mdDoc ''
+ description = ''
A list of paths to extra scanners to install in Plex's scanners
directory.
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/plikd.nix b/third_party/nixpkgs/nixos/modules/services/misc/plikd.nix
index 9b0825bf40..ec94cfc029 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/plikd.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/plikd.nix
@@ -11,18 +11,18 @@ in
{
options = {
services.plikd = {
- enable = mkEnableOption (lib.mdDoc "the plikd server");
+ enable = mkEnableOption "plikd, a temporary file upload system";
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Open ports in the firewall for the plikd.";
+ description = "Open ports in the firewall for the plikd.";
};
settings = mkOption {
type = format.type;
default = {};
- description = lib.mdDoc ''
+ description = ''
Configuration for plikd, see
for supported values.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/podgrab.nix b/third_party/nixpkgs/nixos/modules/services/misc/podgrab.nix
index c596122fd3..50dc70e2bd 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/podgrab.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/podgrab.nix
@@ -1,16 +1,18 @@
{ config, lib, pkgs, ... }:
let
cfg = config.services.podgrab;
+
+ stateDir = "/var/lib/podgrab";
in
{
options.services.podgrab = with lib; {
- enable = mkEnableOption (lib.mdDoc "Podgrab, a self-hosted podcast manager");
+ enable = mkEnableOption "Podgrab, a self-hosted podcast manager";
passwordFile = mkOption {
type = with types; nullOr str;
default = null;
example = "/run/secrets/password.env";
- description = lib.mdDoc ''
+ description = ''
The path to a file containing the PASSWORD environment variable
definition for Podgrab's authentication.
'';
@@ -20,30 +22,61 @@ in
type = types.port;
default = 8080;
example = 4242;
- description = lib.mdDoc "The port on which Podgrab will listen for incoming HTTP traffic.";
+ description = "The port on which Podgrab will listen for incoming HTTP traffic.";
+ };
+
+ dataDirectory = mkOption {
+ type = types.path;
+ default = "${stateDir}/data";
+ example = "/mnt/podcasts";
+ description = "Directory to store downloads.";
+ };
+
+ user = mkOption {
+ type = types.str;
+ default = "podgrab";
+ description = "User under which Podgrab runs, and which owns the download directory.";
+ };
+
+ group = mkOption {
+ type = types.str;
+ default = "podgrab";
+ description = "Group under which Podgrab runs, and which owns the download directory.";
};
};
config = lib.mkIf cfg.enable {
+ systemd.tmpfiles.settings."10-pyload" = {
+ ${cfg.dataDirectory}.d = { inherit (cfg) user group; };
+ };
+
systemd.services.podgrab = {
description = "Podgrab podcast manager";
wantedBy = [ "multi-user.target" ];
environment = {
- CONFIG = "/var/lib/podgrab/config";
- DATA = "/var/lib/podgrab/data";
+ CONFIG = "${stateDir}/config";
+ DATA = cfg.dataDirectory;
GIN_MODE = "release";
PORT = toString cfg.port;
};
serviceConfig = {
- DynamicUser = true;
+ User = cfg.user;
+ Group = cfg.group;
EnvironmentFile = lib.optionals (cfg.passwordFile != null) [
cfg.passwordFile
];
ExecStart = "${pkgs.podgrab}/bin/podgrab";
WorkingDirectory = "${pkgs.podgrab}/share";
- StateDirectory = [ "podgrab/config" "podgrab/data" ];
+ StateDirectory = [ "podgrab/config" ];
};
};
+
+ users.users.podgrab = lib.mkIf (cfg.user == "podgrab") {
+ isSystemUser = true;
+ group = cfg.group;
+ };
+
+ users.groups.podgrab = lib.mkIf (cfg.group == "podgrab") { };
};
meta.maintainers = with lib.maintainers; [ ambroisie ];
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/polaris.nix b/third_party/nixpkgs/nixos/modules/services/misc/polaris.nix
index 83da486083..4ac99eaad3 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/polaris.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/polaris.nix
@@ -11,33 +11,33 @@ in
{
options = {
services.polaris = {
- enable = mkEnableOption (lib.mdDoc "Polaris Music Server");
+ enable = mkEnableOption "Polaris Music Server";
package = mkPackageOption pkgs "polaris" { };
user = mkOption {
type = types.str;
default = "polaris";
- description = lib.mdDoc "User account under which Polaris runs.";
+ description = "User account under which Polaris runs.";
};
group = mkOption {
type = types.str;
default = "polaris";
- description = lib.mdDoc "Group under which Polaris is run.";
+ description = "Group under which Polaris is run.";
};
extraGroups = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc "Polaris' auxiliary groups.";
+ description = "Polaris' auxiliary groups.";
example = literalExpression ''["media" "music"]'';
};
port = mkOption {
type = types.port;
default = 5050;
- description = lib.mdDoc ''
+ description = ''
The port which the Polaris REST api and web UI should listen to.
Note: polaris is hardcoded to listen to the hostname "0.0.0.0".
'';
@@ -46,7 +46,7 @@ in
settings = mkOption {
type = settingsFormat.type;
default = {};
- description = lib.mdDoc ''
+ description = ''
Contents for the TOML Polaris config, applied each start.
Although poorly documented, an example may be found here:
[test-config.toml](https://github.com/agersant/polaris/blob/374d0ca56fc0a466d797a4b252e2078607476797/test-data/config.toml)
@@ -73,7 +73,7 @@ in
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open the configured port in the firewall.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/portunus.nix b/third_party/nixpkgs/nixos/modules/services/misc/portunus.nix
index ebb3bc8f08..ab78479c96 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/portunus.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/portunus.nix
@@ -8,18 +8,18 @@ let
in
{
options.services.portunus = {
- enable = mkEnableOption (lib.mdDoc "Portunus, a self-contained user/group management and authentication service for LDAP");
+ enable = mkEnableOption "Portunus, a self-contained user/group management and authentication service for LDAP";
domain = mkOption {
type = types.str;
example = "sso.example.com";
- description = lib.mdDoc "Subdomain which gets reverse proxied to Portunus webserver.";
+ description = "Subdomain which gets reverse proxied to Portunus webserver.";
};
port = mkOption {
type = types.port;
default = 8080;
- description = lib.mdDoc ''
+ description = ''
Port where the Portunus webserver should listen on.
This must be put behind a TLS-capable reverse proxy because Portunus only listens on localhost.
@@ -31,7 +31,7 @@ in
seedPath = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Path to a portunus seed file in json format.
See for available options.
'';
@@ -40,7 +40,7 @@ in
seedSettings = lib.mkOption {
type = with lib.types; nullOr (attrsOf (listOf (attrsOf anything)));
default = null;
- description = lib.mdDoc ''
+ description = ''
Seed settings for users and groups.
See upstream for format
'';
@@ -49,40 +49,40 @@ in
stateDir = mkOption {
type = types.path;
default = "/var/lib/portunus";
- description = lib.mdDoc "Path where Portunus stores its state.";
+ description = "Path where Portunus stores its state.";
};
user = mkOption {
type = types.str;
default = "portunus";
- description = lib.mdDoc "User account under which Portunus runs its webserver.";
+ description = "User account under which Portunus runs its webserver.";
};
group = mkOption {
type = types.str;
default = "portunus";
- description = lib.mdDoc "Group account under which Portunus runs its webserver.";
+ description = "Group account under which Portunus runs its webserver.";
};
dex = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
Dex ldap connector.
To activate dex, first a search user must be created in the Portunus web ui
and then the password must to be set as the `DEX_SEARCH_USER_PASSWORD` environment variable
in the [](#opt-services.dex.environmentFile) setting.
- '');
+ '';
oidcClients = mkOption {
type = types.listOf (types.submodule {
options = {
callbackURL = mkOption {
type = types.str;
- description = lib.mdDoc "URL where the OIDC client should redirect";
+ description = "URL where the OIDC client should redirect";
};
id = mkOption {
type = types.str;
- description = lib.mdDoc "ID of the OIDC client";
+ description = "ID of the OIDC client";
};
};
});
@@ -93,7 +93,7 @@ in
id = "service";
}
];
- description = lib.mdDoc ''
+ description = ''
List of OIDC clients.
The OIDC secret must be set as the `DEX_CLIENT_''${id}` environment variable
@@ -104,7 +104,7 @@ in
port = mkOption {
type = types.port;
default = 5556;
- description = lib.mdDoc "Port where dex should listen on.";
+ description = "Port where dex should listen on.";
};
};
@@ -116,14 +116,14 @@ in
# TODO: remove in NixOS 24.11 (cf. same note on pkgs/servers/portunus/default.nix)
default = pkgs.openldap.override { libxcrypt = pkgs.libxcrypt-legacy; };
defaultText = lib.literalExpression "pkgs.openldap.override { libxcrypt = pkgs.libxcrypt-legacy; }";
- description = lib.mdDoc "The OpenLDAP package to use.";
+ description = "The OpenLDAP package to use.";
};
searchUserName = mkOption {
type = types.str;
default = "";
example = "admin";
- description = lib.mdDoc ''
+ description = ''
The login name of the search user.
This user account must be configured in Portunus either manually or via seeding.
'';
@@ -132,7 +132,7 @@ in
suffix = mkOption {
type = types.str;
example = "dc=example,dc=org";
- description = lib.mdDoc ''
+ description = ''
The DN of the topmost entry in your LDAP directory.
Please refer to the Portunus documentation for more information on how this impacts the structure of the LDAP directory.
'';
@@ -141,7 +141,7 @@ in
tls = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable LDAPS protocol.
This also adds two entries to the `/etc/hosts` file to point [](#opt-services.portunus.domain) to localhost,
so that CLIs and programs can use ldaps protocol and verify the certificate without opening the firewall port for the protocol.
@@ -153,13 +153,13 @@ in
user = mkOption {
type = types.str;
default = "openldap";
- description = lib.mdDoc "User account under which Portunus runs its LDAP server.";
+ description = "User account under which Portunus runs its LDAP server.";
};
group = mkOption {
type = types.str;
default = "openldap";
- description = lib.mdDoc "Group account under which Portunus runs its LDAP server.";
+ description = "Group account under which Portunus runs its LDAP server.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/prowlarr.nix b/third_party/nixpkgs/nixos/modules/services/misc/prowlarr.nix
index 84d3650039..c94882a4f7 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/prowlarr.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/prowlarr.nix
@@ -9,14 +9,14 @@ in
{
options = {
services.prowlarr = {
- enable = mkEnableOption (lib.mdDoc "Prowlarr");
+ enable = mkEnableOption "Prowlarr, an indexer manager/proxy for Torrent trackers and Usenet indexers";
package = mkPackageOption pkgs "prowlarr" { };
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Open ports in the firewall for the Prowlarr web interface.";
+ description = "Open ports in the firewall for the Prowlarr web interface.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/pufferpanel.nix b/third_party/nixpkgs/nixos/modules/services/misc/pufferpanel.nix
index b951d60cc5..3679d25861 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/pufferpanel.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/pufferpanel.nix
@@ -7,7 +7,7 @@ in
enable = lib.mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable PufferPanel game management server.
Note that [PufferPanel templates] and binaries downloaded by PufferPanel
@@ -39,7 +39,7 @@ in
type = lib.types.listOf lib.types.str;
default = [ ];
example = [ "podman" ];
- description = lib.mdDoc ''
+ description = ''
Additional groups for the systemd service.
'';
};
@@ -48,7 +48,7 @@ in
type = lib.types.listOf lib.types.package;
default = [ ];
example = lib.literalExpression "[ pkgs.jre ]";
- description = lib.mdDoc ''
+ description = ''
Packages to add to the PATH environment variable. Both the {file}`bin`
and {file}`sbin` subdirectories of each package are added.
'';
@@ -66,7 +66,7 @@ in
PUFFER_PANEL_REGISTRATIONENABLED = "false";
}
'';
- description = lib.mdDoc ''
+ description = ''
Environment variables to set for the service. Secrets should be
specified using {option}`environmentFile`.
@@ -93,7 +93,7 @@ in
environmentFile = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
File to load environment variables from. Loaded variables override
values set in {option}`environment`.
'';
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/pykms.nix b/third_party/nixpkgs/nixos/modules/services/misc/pykms.nix
index be3accc0d7..d1b209e389 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/pykms.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/pykms.nix
@@ -18,43 +18,43 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the PyKMS service.";
+ description = "Whether to enable the PyKMS service.";
};
listenAddress = mkOption {
type = types.str;
default = "0.0.0.0";
- description = lib.mdDoc "The IP address on which to listen.";
+ description = "The IP address on which to listen.";
};
port = mkOption {
type = types.port;
default = 1688;
- description = lib.mdDoc "The port on which to listen.";
+ description = "The port on which to listen.";
};
openFirewallPort = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether the listening port should be opened automatically.";
+ description = "Whether the listening port should be opened automatically.";
};
memoryLimit = mkOption {
type = types.str;
default = "64M";
- description = lib.mdDoc "How much memory to use at most.";
+ description = "How much memory to use at most.";
};
logLevel = mkOption {
type = types.enum [ "CRITICAL" "ERROR" "WARNING" "INFO" "DEBUG" "MININFO" ];
default = "INFO";
- description = lib.mdDoc "How much to log";
+ description = "How much to log";
};
extraArgs = mkOption {
type = types.listOf types.str;
default = [ ];
- description = lib.mdDoc "Additional arguments";
+ description = "Additional arguments";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/radarr.nix b/third_party/nixpkgs/nixos/modules/services/misc/radarr.nix
index a5f264331e..d9f78c4e8e 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/radarr.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/radarr.nix
@@ -9,32 +9,32 @@ in
{
options = {
services.radarr = {
- enable = mkEnableOption (lib.mdDoc "Radarr");
+ enable = mkEnableOption "Radarr, a UsetNet/BitTorrent movie downloader";
package = mkPackageOption pkgs "radarr" { };
dataDir = mkOption {
type = types.str;
default = "/var/lib/radarr/.config/Radarr";
- description = lib.mdDoc "The directory where Radarr stores its data files.";
+ description = "The directory where Radarr stores its data files.";
};
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Open ports in the firewall for the Radarr web interface.";
+ description = "Open ports in the firewall for the Radarr web interface.";
};
user = mkOption {
type = types.str;
default = "radarr";
- description = lib.mdDoc "User account under which Radarr runs.";
+ description = "User account under which Radarr runs.";
};
group = mkOption {
type = types.str;
default = "radarr";
- description = lib.mdDoc "Group under which Radarr runs.";
+ description = "Group under which Radarr runs.";
};
};
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/readarr.nix b/third_party/nixpkgs/nixos/modules/services/misc/readarr.nix
index 73868b4baa..b76a70859f 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/readarr.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/readarr.nix
@@ -8,12 +8,12 @@ in
{
options = {
services.readarr = {
- enable = mkEnableOption (lib.mdDoc "Readarr");
+ enable = mkEnableOption "Readarr, a Usenet/BitTorrent ebook downloader";
dataDir = mkOption {
type = types.str;
default = "/var/lib/readarr/";
- description = lib.mdDoc "The directory where Readarr stores its data files.";
+ description = "The directory where Readarr stores its data files.";
};
package = mkPackageOption pkgs "readarr" { };
@@ -21,7 +21,7 @@ in
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open ports in the firewall for Readarr
'';
};
@@ -29,7 +29,7 @@ in
user = mkOption {
type = types.str;
default = "readarr";
- description = lib.mdDoc ''
+ description = ''
User account under which Readarr runs.
'';
};
@@ -37,7 +37,7 @@ in
group = mkOption {
type = types.str;
default = "readarr";
- description = lib.mdDoc ''
+ description = ''
Group under which Readarr runs.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/redmine.nix b/third_party/nixpkgs/nixos/modules/services/misc/redmine.nix
index c1209e34a9..af1773dab2 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/redmine.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/redmine.nix
@@ -10,16 +10,22 @@ let
format = pkgs.formats.yaml {};
bundle = "${cfg.package}/share/redmine/bin/bundle";
- databaseYml = pkgs.writeText "database.yml" ''
- production:
- adapter: ${cfg.database.type}
- database: ${cfg.database.name}
- host: ${if (cfg.database.type == "postgresql" && cfg.database.socket != null) then cfg.database.socket else cfg.database.host}
- port: ${toString cfg.database.port}
- username: ${cfg.database.user}
- password: #dbpass#
- ${optionalString (cfg.database.type == "mysql2" && cfg.database.socket != null) "socket: ${cfg.database.socket}"}
- '';
+ databaseSettings = {
+ production = {
+ adapter = cfg.database.type;
+ database = if cfg.database.type == "sqlite3" then "${cfg.stateDir}/database.sqlite3" else cfg.database.name;
+ } // optionalAttrs (cfg.database.type != "sqlite3") {
+ host = if (cfg.database.type == "postgresql" && cfg.database.socket != null) then cfg.database.socket else cfg.database.host;
+ port = cfg.database.port;
+ username = cfg.database.user;
+ } // optionalAttrs (cfg.database.type != "sqlite3" && cfg.database.passwordFile != null) {
+ password = "#dbpass#";
+ } // optionalAttrs (cfg.database.type == "mysql2" && cfg.database.socket != null) {
+ socket = cfg.database.socket;
+ };
+ };
+
+ databaseYml = format.generate "database.yml" databaseSettings;
configurationYml = format.generate "configuration.yml" cfg.settings;
additionalEnvironment = pkgs.writeText "additional_environment.rb" cfg.extraEnv;
@@ -50,7 +56,7 @@ in
# interface
options = {
services.redmine = {
- enable = mkEnableOption (lib.mdDoc "Redmine");
+ enable = mkEnableOption "Redmine, a project management web application";
package = mkPackageOption pkgs "redmine" {
example = "redmine.override { ruby = pkgs.ruby_3_2; }";
@@ -59,31 +65,31 @@ in
user = mkOption {
type = types.str;
default = "redmine";
- description = lib.mdDoc "User under which Redmine is ran.";
+ description = "User under which Redmine is ran.";
};
group = mkOption {
type = types.str;
default = "redmine";
- description = lib.mdDoc "Group under which Redmine is ran.";
+ description = "Group under which Redmine is ran.";
};
port = mkOption {
type = types.port;
default = 3000;
- description = lib.mdDoc "Port on which Redmine is ran.";
+ description = "Port on which Redmine is ran.";
};
stateDir = mkOption {
type = types.str;
default = "/var/lib/redmine";
- description = lib.mdDoc "The state directory, logs and plugins are stored here.";
+ description = "The state directory, logs and plugins are stored here.";
};
settings = mkOption {
type = format.type;
default = {};
- description = lib.mdDoc ''
+ description = ''
Redmine configuration ({file}`configuration.yml`). Refer to
for details.
@@ -104,7 +110,7 @@ in
extraEnv = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra configuration in additional_environment.rb.
See
@@ -118,7 +124,7 @@ in
themes = mkOption {
type = types.attrsOf types.path;
default = {};
- description = lib.mdDoc "Set of themes.";
+ description = "Set of themes.";
example = literalExpression ''
{
dkuk-redmine_alex_skin = builtins.fetchurl {
@@ -132,7 +138,7 @@ in
plugins = mkOption {
type = types.attrsOf types.path;
default = {};
- description = lib.mdDoc "Set of plugins.";
+ description = "Set of plugins.";
example = literalExpression ''
{
redmine_env_auth = builtins.fetchurl {
@@ -145,42 +151,42 @@ in
database = {
type = mkOption {
- type = types.enum [ "mysql2" "postgresql" ];
+ type = types.enum [ "mysql2" "postgresql" "sqlite3" ];
example = "postgresql";
default = "mysql2";
- description = lib.mdDoc "Database engine to use.";
+ description = "Database engine to use.";
};
host = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "Database host address.";
+ description = "Database host address.";
};
port = mkOption {
type = types.port;
default = if cfg.database.type == "postgresql" then 5432 else 3306;
defaultText = literalExpression "3306";
- description = lib.mdDoc "Database host port.";
+ description = "Database host port.";
};
name = mkOption {
type = types.str;
default = "redmine";
- description = lib.mdDoc "Database name.";
+ description = "Database name.";
};
user = mkOption {
type = types.str;
default = "redmine";
- description = lib.mdDoc "Database user.";
+ description = "Database user.";
};
passwordFile = mkOption {
type = types.nullOr types.path;
default = null;
example = "/run/keys/redmine-dbpassword";
- description = lib.mdDoc ''
+ description = ''
A file containing the password corresponding to
{option}`database.user`.
'';
@@ -194,13 +200,13 @@ in
else null;
defaultText = literalExpression "/run/mysqld/mysqld.sock";
example = "/run/mysqld/mysqld.sock";
- description = lib.mdDoc "Path to the unix socket file to use for authentication.";
+ description = "Path to the unix socket file to use for authentication.";
};
createLocally = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Create the database and database user locally.";
+ description = "Create the database and database user locally.";
};
};
@@ -208,49 +214,49 @@ in
subversion = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Subversion integration.";
+ description = "Subversion integration.";
};
mercurial = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Mercurial integration.";
+ description = "Mercurial integration.";
};
git = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "git integration.";
+ description = "git integration.";
};
cvs = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "cvs integration.";
+ description = "cvs integration.";
};
breezy = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "bazaar integration.";
+ description = "bazaar integration.";
};
imagemagick = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Allows exporting Gant diagrams as PNG.";
+ description = "Allows exporting Gant diagrams as PNG.";
};
ghostscript = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Allows exporting Gant diagrams as PDF.";
+ description = "Allows exporting Gant diagrams as PDF.";
};
minimagick_font_path = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc "MiniMagick font path";
+ description = "MiniMagick font path";
example = "/run/current-system/sw/share/X11/fonts/LiberationSans-Regular.ttf";
};
};
@@ -261,7 +267,7 @@ in
config = mkIf cfg.enable {
assertions = [
- { assertion = cfg.database.passwordFile != null || cfg.database.socket != null;
+ { assertion = cfg.database.type != "sqlite3" -> cfg.database.passwordFile != null || cfg.database.socket != null;
message = "one of services.redmine.database.socket or services.redmine.database.passwordFile must be set";
}
{ assertion = cfg.database.createLocally -> cfg.database.user == cfg.user;
@@ -270,8 +276,8 @@ in
{ assertion = pgsqlLocal -> cfg.database.user == cfg.database.name;
message = "services.redmine.database.user and services.redmine.database.name must be the same when using a local postgresql database";
}
- { assertion = cfg.database.createLocally -> cfg.database.socket != null;
- message = "services.redmine.database.socket must be set if services.redmine.database.createLocally is set to true";
+ { assertion = (cfg.database.createLocally && cfg.database.type != "sqlite3") -> cfg.database.socket != null;
+ message = "services.redmine.database.socket must be set if services.redmine.database.createLocally is set to true and no sqlite database is used";
}
{ assertion = cfg.database.createLocally -> cfg.database.host == "localhost";
message = "services.redmine.database.host must be set to localhost if services.redmine.database.createLocally is set to true";
@@ -395,9 +401,13 @@ in
# handle database.passwordFile & permissions
- DBPASS=${optionalString (cfg.database.passwordFile != null) "$(head -n1 ${cfg.database.passwordFile})"}
cp -f ${databaseYml} "${cfg.stateDir}/config/database.yml"
- sed -e "s,#dbpass#,$DBPASS,g" -i "${cfg.stateDir}/config/database.yml"
+
+ ${optionalString ((cfg.database.type != "sqlite3") && (cfg.database.passwordFile != null)) ''
+ DBPASS="$(head -n1 ${cfg.database.passwordFile})"
+ sed -e "s,#dbpass#,$DBPASS,g" -i "${cfg.stateDir}/config/database.yml"
+ ''}
+
chmod 440 "${cfg.stateDir}/config/database.yml"
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/ripple-data-api.nix b/third_party/nixpkgs/nixos/modules/services/misc/ripple-data-api.nix
index 30623a3213..a699ce95cf 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/ripple-data-api.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/ripple-data-api.nix
@@ -35,47 +35,47 @@ let
in {
options = {
services.rippleDataApi = {
- enable = mkEnableOption (lib.mdDoc "ripple data api");
+ enable = mkEnableOption "ripple data api";
port = mkOption {
- description = lib.mdDoc "Ripple data api port";
+ description = "Ripple data api port";
default = 5993;
type = types.port;
};
importMode = mkOption {
- description = lib.mdDoc "Ripple data api import mode.";
+ description = "Ripple data api import mode.";
default = "liveOnly";
type = types.enum ["live" "liveOnly"];
};
minLedger = mkOption {
- description = lib.mdDoc "Ripple data api minimal ledger to fetch.";
+ description = "Ripple data api minimal ledger to fetch.";
default = null;
type = types.nullOr types.int;
};
maxLedger = mkOption {
- description = lib.mdDoc "Ripple data api maximal ledger to fetch.";
+ description = "Ripple data api maximal ledger to fetch.";
default = null;
type = types.nullOr types.int;
};
redis = {
enable = mkOption {
- description = lib.mdDoc "Whether to enable caching of ripple data to redis.";
+ description = "Whether to enable caching of ripple data to redis.";
default = true;
type = types.bool;
};
host = mkOption {
- description = lib.mdDoc "Ripple data api redis host.";
+ description = "Ripple data api redis host.";
default = "localhost";
type = types.str;
};
port = mkOption {
- description = lib.mdDoc "Ripple data api redis port.";
+ description = "Ripple data api redis port.";
default = 5984;
type = types.port;
};
@@ -83,44 +83,44 @@ in {
couchdb = {
host = mkOption {
- description = lib.mdDoc "Ripple data api couchdb host.";
+ description = "Ripple data api couchdb host.";
default = "localhost";
type = types.str;
};
port = mkOption {
- description = lib.mdDoc "Ripple data api couchdb port.";
+ description = "Ripple data api couchdb port.";
default = 5984;
type = types.port;
};
db = mkOption {
- description = lib.mdDoc "Ripple data api couchdb database.";
+ description = "Ripple data api couchdb database.";
default = "rippled";
type = types.str;
};
user = mkOption {
- description = lib.mdDoc "Ripple data api couchdb username.";
+ description = "Ripple data api couchdb username.";
default = "rippled";
type = types.str;
};
pass = mkOption {
- description = lib.mdDoc "Ripple data api couchdb password.";
+ description = "Ripple data api couchdb password.";
default = "";
type = types.str;
};
create = mkOption {
- description = lib.mdDoc "Whether to create couchdb database needed by ripple data api.";
+ description = "Whether to create couchdb database needed by ripple data api.";
type = types.bool;
default = true;
};
};
rippleds = mkOption {
- description = lib.mdDoc "List of rippleds to be used by ripple data api.";
+ description = "List of rippleds to be used by ripple data api.";
default = [
"http://s_east.ripple.com:51234"
"http://s_west.ripple.com:51234"
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/rippled.nix b/third_party/nixpkgs/nixos/modules/services/misc/rippled.nix
index 68a8318942..3a906f3e71 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/rippled.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/rippled.nix
@@ -92,41 +92,41 @@ let
ip = mkOption {
default = "127.0.0.1";
- description = lib.mdDoc "Ip where rippled listens.";
+ description = "Ip where rippled listens.";
type = types.str;
};
port = mkOption {
- description = lib.mdDoc "Port where rippled listens.";
+ description = "Port where rippled listens.";
type = types.port;
};
protocol = mkOption {
- description = lib.mdDoc "Protocols expose by rippled.";
+ description = "Protocols expose by rippled.";
type = types.listOf (types.enum ["http" "https" "ws" "wss" "peer"]);
};
user = mkOption {
- description = lib.mdDoc "When set, these credentials will be required on HTTP/S requests.";
+ description = "When set, these credentials will be required on HTTP/S requests.";
type = types.str;
default = "";
};
password = mkOption {
- description = lib.mdDoc "When set, these credentials will be required on HTTP/S requests.";
+ description = "When set, these credentials will be required on HTTP/S requests.";
type = types.str;
default = "";
};
admin = mkOption {
- description = lib.mdDoc "A comma-separated list of admin IP addresses.";
+ description = "A comma-separated list of admin IP addresses.";
type = types.listOf types.str;
default = ["127.0.0.1"];
};
ssl = {
key = mkOption {
- description = lib.mdDoc ''
+ description = ''
Specifies the filename holding the SSL key in PEM format.
'';
default = null;
@@ -134,7 +134,7 @@ let
};
cert = mkOption {
- description = lib.mdDoc ''
+ description = ''
Specifies the path to the SSL certificate file in PEM format.
This is not needed if the chain includes it.
'';
@@ -143,7 +143,7 @@ let
};
chain = mkOption {
- description = lib.mdDoc ''
+ description = ''
If you need a certificate chain, specify the path to the
certificate chain here. The chain may include the end certificate.
'';
@@ -157,33 +157,33 @@ let
dbOptions = {
options = {
type = mkOption {
- description = lib.mdDoc "Rippled database type.";
+ description = "Rippled database type.";
type = types.enum ["rocksdb" "nudb"];
default = "rocksdb";
};
path = mkOption {
- description = lib.mdDoc "Location to store the database.";
+ description = "Location to store the database.";
type = types.path;
default = cfg.databasePath;
defaultText = literalExpression "config.${opt.databasePath}";
};
compression = mkOption {
- description = lib.mdDoc "Whether to enable snappy compression.";
+ description = "Whether to enable snappy compression.";
type = types.nullOr types.bool;
default = null;
};
onlineDelete = mkOption {
- description = lib.mdDoc "Enable automatic purging of older ledger information.";
+ description = "Enable automatic purging of older ledger information.";
type = types.nullOr (types.addCheck types.int (v: v > 256));
default = cfg.ledgerHistory;
defaultText = literalExpression "config.${opt.ledgerHistory}";
};
advisoryDelete = mkOption {
- description = lib.mdDoc ''
+ description = ''
If set, then require administrative RPC call "can_delete"
to enable online deletion of ledger records.
'';
@@ -192,7 +192,7 @@ let
};
extraOpts = mkOption {
- description = lib.mdDoc "Extra database options.";
+ description = "Extra database options.";
type = types.lines;
default = "";
};
@@ -207,12 +207,12 @@ in
options = {
services.rippled = {
- enable = mkEnableOption (lib.mdDoc "rippled");
+ enable = mkEnableOption "rippled, a decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++";
package = mkPackageOption pkgs "rippled" { };
ports = mkOption {
- description = lib.mdDoc "Ports exposed by rippled";
+ description = "Ports exposed by rippled";
type = with types; attrsOf (submodule portOptions);
default = {
rpc = {
@@ -236,7 +236,7 @@ in
};
nodeDb = mkOption {
- description = lib.mdDoc "Rippled main database options.";
+ description = "Rippled main database options.";
type = with types; nullOr (submodule dbOptions);
default = {
type = "rocksdb";
@@ -251,19 +251,19 @@ in
};
tempDb = mkOption {
- description = lib.mdDoc "Rippled temporary database options.";
+ description = "Rippled temporary database options.";
type = with types; nullOr (submodule dbOptions);
default = null;
};
importDb = mkOption {
- description = lib.mdDoc "Settings for performing a one-time import.";
+ description = "Settings for performing a one-time import.";
type = with types; nullOr (submodule dbOptions);
default = null;
};
nodeSize = mkOption {
- description = lib.mdDoc ''
+ description = ''
Rippled size of the node you are running.
"tiny", "small", "medium", "large", and "huge"
'';
@@ -272,7 +272,7 @@ in
};
ips = mkOption {
- description = lib.mdDoc ''
+ description = ''
List of hostnames or ips where the Ripple protocol is served.
For a starter list, you can either copy entries from:
https://ripple.com/ripple.txt or if you prefer you can let it
@@ -287,7 +287,7 @@ in
};
ipsFixed = mkOption {
- description = lib.mdDoc ''
+ description = ''
List of IP addresses or hostnames to which rippled should always
attempt to maintain peer connections with. This is useful for
manually forming private networks, for example to configure a
@@ -301,7 +301,7 @@ in
};
validators = mkOption {
- description = lib.mdDoc ''
+ description = ''
List of nodes to always accept as validators. Nodes are specified by domain
or public key.
'';
@@ -316,7 +316,7 @@ in
};
databasePath = mkOption {
- description = lib.mdDoc ''
+ description = ''
Path to the ripple database.
'';
type = types.path;
@@ -324,7 +324,7 @@ in
};
validationQuorum = mkOption {
- description = lib.mdDoc ''
+ description = ''
The minimum number of trusted validations a ledger must have before
the server considers it fully validated.
'';
@@ -333,7 +333,7 @@ in
};
ledgerHistory = mkOption {
- description = lib.mdDoc ''
+ description = ''
The number of past ledgers to acquire on server startup and the minimum
to maintain while running.
'';
@@ -342,7 +342,7 @@ in
};
fetchDepth = mkOption {
- description = lib.mdDoc ''
+ description = ''
The number of past ledgers to serve to other peers that request historical
ledger data (or "full" for no limit).
'';
@@ -351,7 +351,7 @@ in
};
sntpServers = mkOption {
- description = lib.mdDoc ''
+ description = ''
IP address or domain of NTP servers to use for time synchronization.;
'';
type = types.listOf types.str;
@@ -364,22 +364,22 @@ in
};
logLevel = mkOption {
- description = lib.mdDoc "Logging verbosity.";
+ description = "Logging verbosity.";
type = types.enum ["debug" "error" "info"];
default = "error";
};
statsd = {
- enable = mkEnableOption (lib.mdDoc "statsd monitoring for rippled");
+ enable = mkEnableOption "statsd monitoring for rippled";
address = mkOption {
- description = lib.mdDoc "The UDP address and port of the listening StatsD server.";
+ description = "The UDP address and port of the listening StatsD server.";
default = "127.0.0.1:8125";
type = types.str;
};
prefix = mkOption {
- description = lib.mdDoc "A string prepended to each collected metric.";
+ description = "A string prepended to each collected metric.";
default = "";
type = types.str;
};
@@ -388,7 +388,7 @@ in
extraConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Extra lines to be added verbatim to the rippled.cfg configuration file.
'';
};
diff --git a/third_party/nixpkgs/nixos/modules/services/misc/rkvm.nix b/third_party/nixpkgs/nixos/modules/services/misc/rkvm.nix
index 582e8511ed..9d41669e00 100644
--- a/third_party/nixpkgs/nixos/modules/services/misc/rkvm.nix
+++ b/third_party/nixpkgs/nixos/modules/services/misc/rkvm.nix
@@ -14,7 +14,7 @@ in
default = cfg.server.enable || cfg.client.enable;
defaultText = literalExpression "config.${opt.server.enable} || config.${opt.client.enable}";
type = types.bool;
- description = mdDoc ''
+ description = ''
Whether to enable rkvm, a Virtual KVM switch for Linux machines.
'';
};
@@ -32,7 +32,7 @@ in
listen = mkOption {
type = types.str;
default = "0.0.0.0:5258";
- description = mdDoc ''
+ description = ''
An internet socket address to listen on, either IPv4 or IPv6.
'';
};
@@ -40,7 +40,7 @@ in
switch-keys = mkOption {
type = types.listOf types.str;
default = [ "left-alt" "left-ctrl" ];
- description = mdDoc ''
+ description = ''
A key list specifying a host switch combination.
_A list of key names is available in