diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
index b7da3c84fc17..219efb6e2a54 100644
--- a/.git-blame-ignore-revs
+++ b/.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/.github/CODEOWNERS b/.github/CODEOWNERS
index 15e253be5b80..109b64d7392a 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -13,7 +13,6 @@
# GitHub actions
/.github/workflows @NixOS/Security @Mic92 @zowoq
-/.github/workflows/merge-staging @FRidh
# EditorConfig
/.editorconfig @Mic92 @zowoq
@@ -55,7 +54,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
@@ -125,10 +124,8 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @raitobezarius @ma27
/pkgs/common-updater/scripts/update-source-version @jtojnar
# Python-related code and docs
-/maintainers/scripts/update-python-libraries @FRidh
-/pkgs/development/interpreters/python @FRidh
-/doc/languages-frameworks/python.section.md @FRidh @mweinelt
-/pkgs/development/interpreters/python/hooks @FRidh @jonringer
+/doc/languages-frameworks/python.section.md @mweinelt
+/pkgs/development/interpreters/python/hooks @jonringer
# Haskell
/doc/languages-frameworks/haskell.section.md @sternenseemann @maralorn @ncfavier
@@ -148,10 +145,6 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @raitobezarius @ma27
/pkgs/applications/science/math/R @jbedo
/pkgs/development/r-modules @jbedo
-# Ruby
-/pkgs/development/interpreters/ruby @marsam
-/pkgs/development/ruby-modules @marsam
-
# Rust
/pkgs/development/compilers/rust @Mic92 @zowoq @winterqt @figsoda
/pkgs/build-support/rust @zowoq @winterqt @figsoda
@@ -159,7 +152,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,28 +178,24 @@ 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
+/pkgs/servers/sql/postgresql @thoughtpolice
/nixos/modules/services/databases/postgresql.xml @thoughtpolice
/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 +225,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 +291,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
@@ -364,3 +354,16 @@ pkgs/development/tools/continuous-integration/buildbot @Mic92 @zowoq
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/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 40ea13f131e8..7b68fbd77b74 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.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/.github/labeler.yml b/.github/labeler.yml
index a6e8d734382e..b88f7f5179ec 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -95,6 +95,14 @@
- 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":
- any:
- changed-files:
@@ -122,6 +130,7 @@
- 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/**/*
@@ -360,3 +369,8 @@
- changed-files:
- any-glob-to-any-file:
- nixos/modules/**/*
+"8.has: maintainer-list (update)":
+ - any:
+ - changed-files:
+ - any-glob-to-any-file:
+ - maintainers/maintainer-list.nix
diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml
index 3a93eb4fd624..7a168d14a479 100644
--- a/.github/workflows/backport.yml
+++ b/.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@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
+ - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Create backport PRs
- uses: korthout/backport-action@e8161d6a0dbfa2651b7daa76cbb75bc7c925bbf3 # v2.4.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/.github/workflows/basic-eval.yml b/.github/workflows/basic-eval.yml
index 9008ca208e17..6059ba784959 100644
--- a/.github/workflows/basic-eval.yml
+++ b/.github/workflows/basic-eval.yml
@@ -18,7 +18,7 @@ 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@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
+ - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
- uses: cachix/cachix-action@18cf96c7c98e048e10a83abd92116114cd8504be # v14
with:
@@ -26,4 +26,4 @@ jobs:
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/.github/workflows/check-by-name.yml b/.github/workflows/check-by-name.yml
index bf6acf3701da..8e2011cb6d52 100644
--- a/.github/workflows/check-by-name.yml
+++ b/.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:
@@ -22,10 +20,16 @@ permissions:
# We need this permission to cancel the workflow run if there's a merge conflict
actions: write
+# Create a check-by-name concurrency group based on the pull request number. if
+# an event triggers a run on the same PR while a previous run is still in
+# progress, the previous run will be canceled and the new one will start.
+concurrency:
+ group: check-by-name-${{ github.event.pull_request.number }}
+ cancel-in-progress: true
+
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
@@ -42,7 +46,7 @@ jobs:
# https://docs.github.com/en/rest/guides/using-the-rest-api-to-interact-with-your-git-database?apiVersion=2022-11-28#checking-mergeability-of-pull-requests
# Retry the API query this many times
- retryCount=3
+ retryCount=5
# Start with 5 seconds, but double every retry
retryInterval=5
while true; do
@@ -87,7 +91,7 @@ jobs:
exit 1
fi
echo "mergedSha=$mergedSha" >> "$GITHUB_ENV"
- - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
+ - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
# pull_request_target checks out the base branch by default
ref: ${{ env.mergedSha }}
@@ -100,13 +104,20 @@ jobs:
echo "base=$base" >> "$GITHUB_ENV"
- 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/.github/workflows/editorconfig.yml b/.github/workflows/editorconfig.yml
index 168e5bccaea4..bb864ace316b 100644
--- a/.github/workflows/editorconfig.yml
+++ b/.github/workflows/editorconfig.yml
@@ -24,7 +24,7 @@ jobs:
- name: print list of changed files
run: |
cat "$HOME/changed_files"
- - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
+ - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
diff --git a/.github/workflows/manual-nixos.yml b/.github/workflows/manual-nixos.yml
index 545f0c95c47b..ac5532a25370 100644
--- a/.github/workflows/manual-nixos.yml
+++ b/.github/workflows/manual-nixos.yml
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
steps:
- - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
+ - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
@@ -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/.github/workflows/manual-nixpkgs.yml b/.github/workflows/manual-nixpkgs.yml
index 9d675c385feb..672ebf61ac77 100644
--- a/.github/workflows/manual-nixpkgs.yml
+++ b/.github/workflows/manual-nixpkgs.yml
@@ -9,13 +9,14 @@ on:
paths:
- 'doc/**'
- 'lib/**'
+ - 'pkgs/tools/nix/nixdoc/**'
jobs:
nixpkgs:
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
steps:
- - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
+ - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
@@ -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/.github/workflows/nix-parse.yml b/.github/workflows/nix-parse.yml
index da2e942414e2..b86594e0d53b 100644
--- a/.github/workflows/nix-parse.yml
+++ b/.github/workflows/nix-parse.yml
@@ -24,7 +24,7 @@ jobs:
if [[ -s "$HOME/changed_files" ]]; then
echo "CHANGED_FILES=$HOME/changed_files" > "$GITHUB_ENV"
fi
- - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
+ - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
diff --git a/.github/workflows/periodic-merge-24h.yml b/.github/workflows/periodic-merge-24h.yml
index 6adada59c5a5..d9ad593618ae 100644
--- a/.github/workflows/periodic-merge-24h.yml
+++ b/.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@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
+ - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f # 1.4.0
diff --git a/.github/workflows/periodic-merge-6h.yml b/.github/workflows/periodic-merge-6h.yml
index 6f188ee28d17..a3131e802534 100644
--- a/.github/workflows/periodic-merge-6h.yml
+++ b/.github/workflows/periodic-merge-6h.yml
@@ -39,7 +39,7 @@ jobs:
into: staging
name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
steps:
- - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
+ - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f # 1.4.0
diff --git a/.github/workflows/update-terraform-providers.yml b/.github/workflows/update-terraform-providers.yml
index 9b7ec5cc59b0..36d84d617dc4 100644
--- a/.github/workflows/update-terraform-providers.yml
+++ b/.github/workflows/update-terraform-providers.yml
@@ -16,7 +16,7 @@ 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@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
+ - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
@@ -46,7 +46,7 @@ jobs:
run: |
git clean -f
- name: create PR
- uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2
+ uses: peter-evans/create-pull-request@9153d834b60caba6d51c9b9510b087acf9f33f83 # v6.0.4
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/CONTRIBUTING.md b/CONTRIBUTING.md
index 115dd993ea62..8d54124acfd7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -512,6 +512,7 @@ To get a sense for what changes are considered mass rebuilds, see [previously me
- Check for unnecessary whitespace with `git diff --check` before committing.
- If you have commits `pkg-name: oh, forgot to insert whitespace`: squash commits in this case. Use `git rebase -i`.
+ See [Squashing Commits](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#_squashing) for additional information.
- For consistency, there should not be a period at the end of the commit message's summary line (the first line of the commit message).
@@ -557,7 +558,7 @@ Names of files and directories should be in lowercase, with dashes between words
```nix
foo {
- arg = ...;
+ arg = <...>;
}
```
@@ -566,14 +567,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 +582,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 +654,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 +662,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 +705,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 +715,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/README.md b/README.md
index 481ada0565f8..5e6a8c54832b 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
-
+
-
+
@@ -14,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.
@@ -29,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/doc/README.md b/doc/README.md
index 1e9305d040ba..41afc090b374 100644
--- a/doc/README.md
+++ b/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/doc/build-helpers/fetchers.chapter.md b/doc/build-helpers/fetchers.chapter.md
index b326f189d50e..cb37dca06d48 100644
--- a/doc/build-helpers/fetchers.chapter.md
+++ b/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";
@@ -270,7 +863,7 @@ It produces packages that cannot be built automatically.
`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/doc/build-helpers/images/dockertools.section.md b/doc/build-helpers/images/dockertools.section.md
index 001d5695290e..527e623e7898 100644
--- a/doc/build-helpers/images/dockertools.section.md
+++ b/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/doc/build-helpers/special/checkpoint-build.section.md b/doc/build-helpers/special/checkpoint-build.section.md
index f60afe801ed4..a1ce5608f246 100644
--- a/doc/build-helpers/special/checkpoint-build.section.md
+++ b/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/doc/build-helpers/special/fhs-environments.section.md b/doc/build-helpers/special/fhs-environments.section.md
index 8145fbd730f7..918d1e8c2951 100644
--- a/doc/build-helpers/special/fhs-environments.section.md
+++ b/doc/build-helpers/special/fhs-environments.section.md
@@ -6,7 +6,11 @@ It uses Linux' namespaces feature to create temporary lightweight environments w
Accepted arguments are:
- `name`
- The name of the environment and the wrapper executable.
+ The name of the environment, and the wrapper executable if `pname` is unset.
+- `pname`
+ The pname of the environment and the wrapper executable.
+- `version`
+ The version of the environment.
- `targetPkgs`
Packages to be installed for the main host's architecture (i.e. x86_64 on x86_64 installations). Along with libraries binaries are also installed.
- `multiPkgs`
diff --git a/doc/build-helpers/testers.chapter.md b/doc/build-helpers/testers.chapter.md
index 35f9290ecbfb..b734cbbbd4e2 100644
--- a/doc/build-helpers/testers.chapter.md
+++ b/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/doc/build-helpers/trivial-build-helpers.chapter.md b/doc/build-helpers/trivial-build-helpers.chapter.md
index 6d14db639938..4f2754903f9b 100644
--- a/doc/build-helpers/trivial-build-helpers.chapter.md
+++ b/doc/build-helpers/trivial-build-helpers.chapter.md
@@ -76,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";
+ };
}
```
@@ -90,7 +92,7 @@ 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
-'';
+''
```
::::
@@ -287,7 +289,7 @@ writeTextFile {
};
allowSubstitutes = true;
preferLocalBuild = false;
-};
+}
```
:::
@@ -351,7 +353,7 @@ Write the string `Contents of File` to `/nix/store/`:
writeText "my-file"
''
Contents of File
- '';
+ ''
```
:::
@@ -391,7 +393,7 @@ Write the string `Contents of File` to `/nix/store//share/my-file`:
writeTextDir "share/my-file"
''
Contents of File
- '';
+ ''
```
:::
@@ -433,7 +435,7 @@ Write the string `Contents of File` to `/nix/store/` and make the fi
writeScript "my-file"
''
Contents of File
- '';
+ ''
```
:::
@@ -475,7 +477,7 @@ The store path will include the the name, and it will be a directory.
writeScriptBin "my-script"
''
echo "hi"
- '';
+ ''
```
:::
@@ -488,7 +490,7 @@ writeTextFile {
echo "hi"
'';
executable = true;
- destination = "bin/my-script"
+ destination = "bin/my-script";
}
```
@@ -519,7 +521,7 @@ This function is almost exactly like [](#trivial-builder-writeScript), except th
writeShellScript "my-script"
''
echo "hi"
- '';
+ ''
```
:::
@@ -562,7 +564,7 @@ This function is a combination of [](#trivial-builder-writeShellScript) and [](#
writeShellScriptBin "my-script"
''
echo "hi"
- '';
+ ''
```
:::
@@ -576,7 +578,7 @@ writeTextFile {
echo "hi"
'';
executable = true;
- destination = "bin/my-script"
+ destination = "bin/my-script";
}
```
@@ -674,7 +676,7 @@ 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
@@ -700,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/doc/functions/nix-gitignore.section.md b/doc/functions/nix-gitignore.section.md
index 8eb4081d2878..8532ab68ac04 100644
--- a/doc/functions/nix-gitignore.section.md
+++ b/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/doc/hooks/breakpoint.section.md b/doc/hooks/breakpoint.section.md
index 424a9424b55e..b7f1979586de 100644
--- a/doc/hooks/breakpoint.section.md
+++ b/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/doc/hooks/installShellFiles.section.md b/doc/hooks/installShellFiles.section.md
index 2567098116dd..834c6a37df15 100644
--- a/doc/hooks/installShellFiles.section.md
+++ b/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/doc/hooks/mpi-check-hook.section.md b/doc/hooks/mpi-check-hook.section.md
index 586ee2cc7c2d..c182c4cc6195 100644
--- a/doc/hooks/mpi-check-hook.section.md
+++ b/doc/hooks/mpi-check-hook.section.md
@@ -12,13 +12,14 @@ Example:
```nix
{ mpiCheckPhaseHook, mpi, ... }:
+ {
+ # ...
- ...
-
- nativeCheckInputs = [
- openssh
- mpiCheckPhaseHook
- ];
+ nativeCheckInputs = [
+ openssh
+ mpiCheckPhaseHook
+ ];
+ }
```
diff --git a/doc/languages-frameworks/agda.section.md b/doc/languages-frameworks/agda.section.md
index cb1f12eec234..33fffc60c8db 100644
--- a/doc/languages-frameworks/agda.section.md
+++ b/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/doc/languages-frameworks/android.section.md b/doc/languages-frameworks/android.section.md
index 6f9717ca09cc..1c5687f8ebf1 100644
--- a/doc/languages-frameworks/android.section.md
+++ b/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/doc/languages-frameworks/beam.section.md b/doc/languages-frameworks/beam.section.md
index 992149090c63..3653cdb337d1 100644
--- a/doc/languages-frameworks/beam.section.md
+++ b/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/doc/languages-frameworks/bower.section.md b/doc/languages-frameworks/bower.section.md
index fceb6aaccb6d..20c142dad5b9 100644
--- a/doc/languages-frameworks/bower.section.md
+++ b/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/doc/languages-frameworks/chicken.section.md b/doc/languages-frameworks/chicken.section.md
index 72c2642a6478..16b00b3f5b5d 100644
--- a/doc/languages-frameworks/chicken.section.md
+++ b/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/doc/languages-frameworks/coq.section.md b/doc/languages-frameworks/coq.section.md
index db3724773345..fdc824781cd1 100644
--- a/doc/languages-frameworks/coq.section.md
+++ b/doc/languages-frameworks/coq.section.md
@@ -56,22 +56,17 @@ Here is a simple package example. It is a pure Coq library, thus it depends on C
{ lib, mkCoqDerivation, version ? null
, coq, mathcomp, mathcomp-finmap, mathcomp-bigenough }:
-let
- inherit (lib) licenses maintainers switch;
- inherit (lib.versions) range;
-in
-
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";
@@ -90,7 +85,7 @@ mkCoqDerivation {
meta = {
description = "A Coq/SSReflect Library for Monoidal Rings and Multinomials";
- license = licenses.cecill-c;
+ license = lib.licenses.cecill-c;
};
}
```
diff --git a/doc/languages-frameworks/crystal.section.md b/doc/languages-frameworks/crystal.section.md
index b97e75a58da1..9953f357048a 100644
--- a/doc/languages-frameworks/crystal.section.md
+++ b/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/doc/languages-frameworks/cuda.section.md b/doc/languages-frameworks/cuda.section.md
index 09af824531a2..1b2005bb1edd 100644
--- a/doc/languages-frameworks/cuda.section.md
+++ b/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.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.
+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 [`autoAddDriverRunpath`](https://search.nixos.org/packages?channel=unstable&type=packages&query=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/doc/languages-frameworks/cuelang.section.md b/doc/languages-frameworks/cuelang.section.md
index 86304208aa20..70329b15fd7d 100644
--- a/doc/languages-frameworks/cuelang.section.md
+++ b/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/doc/languages-frameworks/dhall.section.md b/doc/languages-frameworks/dhall.section.md
index 83567ab17ace..8d85c9f1daf7 100644
--- a/doc/languages-frameworks/dhall.section.md
+++ b/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/doc/languages-frameworks/dlang.section.md b/doc/languages-frameworks/dlang.section.md
new file mode 100644
index 000000000000..6e9edefc5e0f
--- /dev/null
+++ b/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/doc/languages-frameworks/dotnet.section.md b/doc/languages-frameworks/dotnet.section.md
index 7466c8cdc228..a4e9d6cf9a6c 100644
--- a/doc/languages-frameworks/dotnet.section.md
+++ b/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";
@@ -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/doc/languages-frameworks/gnome.section.md b/doc/languages-frameworks/gnome.section.md
index 5208f1013cbd..e158cea0e512 100644
--- a/doc/languages-frameworks/gnome.section.md
+++ b/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/doc/languages-frameworks/go.section.md b/doc/languages-frameworks/go.section.md
index 369eb88d331f..2f4cb0326a8a 100644
--- a/doc/languages-frameworks/go.section.md
+++ b/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 = {
- description = "Simple command-line snippet manager, written in Go";
- homepage = "https://github.com/knqyf263/pet";
- license = lib.licenses.mit;
- maintainers = with lib.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/doc/languages-frameworks/idris.section.md b/doc/languages-frameworks/idris.section.md
index e30a849dd456..0fa828825749 100644
--- a/doc/languages-frameworks/idris.section.md
+++ b/doc/languages-frameworks/idris.section.md
@@ -134,9 +134,9 @@ For example you could set
```nix
build-idris-package {
- idrisBuildOptions = [ "--log" "1" "--verbose" ]
+ idrisBuildOptions = [ "--log" "1" "--verbose" ];
- ...
+ # ...
}
```
diff --git a/doc/languages-frameworks/index.md b/doc/languages-frameworks/index.md
index 67107fb5b687..920e5e7bd431 100644
--- a/doc/languages-frameworks/index.md
+++ b/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/doc/languages-frameworks/java.section.md b/doc/languages-frameworks/java.section.md
index 0ce1442cca68..6d56ffcd4503 100644
--- a/doc/languages-frameworks/java.section.md
+++ b/doc/languages-frameworks/java.section.md
@@ -7,7 +7,7 @@ stdenv.mkDerivation {
pname = "...";
version = "...";
- src = fetchurl { ... };
+ src = fetchurl { /* ... */ };
nativeBuildInputs = [
ant
@@ -48,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
@@ -62,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,
@@ -92,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
@@ -116,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/doc/languages-frameworks/javascript.section.md b/doc/languages-frameworks/javascript.section.md
index d553444d53b0..f706f92c6691 100644
--- a/doc/languages-frameworks/javascript.section.md
+++ b/doc/languages-frameworks/javascript.section.md
@@ -46,7 +46,7 @@ If a particular lock file is present, it is a strong indication of which package
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).
+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.
@@ -54,8 +54,8 @@ Those files are fairly large, so when packaging for nixpkgs, this approach does
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}
@@ -76,11 +76,13 @@ 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.
@@ -95,12 +97,12 @@ 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.
+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`.
@@ -115,15 +117,17 @@ After you have identified the correct system, you need to override your package
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:
@@ -150,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
@@ -303,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}
@@ -315,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}
@@ -328,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 `distPhase` is packing the package's dependencies in a tarball using `yarn pack`. You can disable it using:
```nix
-doDist = false;
+{
+ 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}
@@ -394,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/doc/languages-frameworks/lisp.section.md b/doc/languages-frameworks/lisp.section.md
index 09193093b08f..73f20436c76f 100644
--- a/doc/languages-frameworks/lisp.section.md
+++ b/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/doc/languages-frameworks/lua.section.md b/doc/languages-frameworks/lua.section.md
index a6577a56a436..87bf7ce885bc 100644
--- a/doc/languages-frameworks/lua.section.md
+++ b/doc/languages-frameworks/lua.section.md
@@ -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;
@@ -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 = {
- homepage = "https://github.com/luaposix/luaposix/";
- description = "Lua bindings for POSIX";
- maintainers = with lib.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:
diff --git a/doc/languages-frameworks/maven.section.md b/doc/languages-frameworks/maven.section.md
index 2ec419e010eb..e56beb102570 100644
--- a/doc/languages-frameworks/maven.section.md
+++ b/doc/languages-frameworks/maven.section.md
@@ -40,7 +40,7 @@ maven.buildMavenPackage rec {
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/doc/languages-frameworks/ocaml.section.md b/doc/languages-frameworks/ocaml.section.md
index 4f3b6e0264f7..44f514e90a1b 100644
--- a/doc/languages-frameworks/ocaml.section.md
+++ b/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.
diff --git a/doc/languages-frameworks/perl.section.md b/doc/languages-frameworks/perl.section.md
index c188e228112c..4ef6d173a178 100644
--- a/doc/languages-frameworks/perl.section.md
+++ b/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/doc/languages-frameworks/php.section.md b/doc/languages-frameworks/php.section.md
index 154d8174f9aa..c1493588a606 100644
--- a/doc/languages-frameworks/php.section.md
+++ b/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/doc/languages-frameworks/pkg-config.section.md b/doc/languages-frameworks/pkg-config.section.md
index 75cbdaeb6fe8..e5a2b85b6576 100644
--- a/doc/languages-frameworks/pkg-config.section.md
+++ b/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/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md
index 049b395dcc25..6fcae4b6520d 100644
--- a/doc/languages-frameworks/python.section.md
+++ b/doc/languages-frameworks/python.section.md
@@ -254,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.
@@ -322,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
@@ -342,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}
@@ -354,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!
@@ -489,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}
@@ -859,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}
@@ -905,7 +878,6 @@ buildPythonPackage rec {
homepage = "https://github.com/pytoolz/toolz";
description = "List processing tools and functional utilities";
license = lib.licenses.bsd3;
- maintainers = with lib.maintainers; [ fridh ];
};
}
```
@@ -1040,7 +1012,6 @@ buildPythonPackage rec {
homepage = "https://github.com/ContinuumIO/datashape";
description = "A data description language";
license = lib.licenses.bsd2;
- maintainers = with lib.maintainers; [ fridh ];
};
}
```
@@ -1161,7 +1132,6 @@ buildPythonPackage rec {
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 lib.licenses; [ bsd2 bsd3 ];
- maintainers = with lib.maintainers; [ fridh ];
};
}
```
@@ -1197,7 +1167,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
@@ -1206,6 +1177,7 @@ test run would be:
runHook postCheck
'';
+}
```
However, many repositories' test suites do not translate well to nix's build
@@ -1213,7 +1185,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 = ''
@@ -1223,6 +1196,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
@@ -1248,7 +1222,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
];
@@ -1268,12 +1243,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"
@@ -1285,6 +1262,7 @@ for example:
# can fail when building with other packages
"socket"
];
+}
```
Trying to concatenate the related strings to disable tests in a regular
@@ -1298,20 +1276,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).
@@ -1342,7 +1324,8 @@ pkg3>=1.0,<=2.0
we can do:
-```
+```nix
+{
nativeBuildInputs = [
pythonRelaxDepsHook
];
@@ -1353,6 +1336,7 @@ we can do:
pythonRemoveDeps = [
"pkg2"
];
+}
```
which would result in the following `requirements.txt` file:
@@ -1365,9 +1349,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:
@@ -1392,7 +1378,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
];
@@ -1400,6 +1387,7 @@ work with any of the [existing hooks](#setup-hooks).
unittestFlagsArray = [
"-s" "tests" "-v"
];
+}
```
#### Using sphinxHook {#using-sphinxhook}
@@ -1409,7 +1397,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"
@@ -1418,13 +1407,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"
@@ -1436,58 +1427,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
@@ -1536,7 +1491,6 @@ buildPythonPackage rec {
homepage = "https://github.com/pytoolz/toolz/";
description = "List processing tools and functional utilities";
license = lib.licenses.bsd3;
- maintainers = with lib.maintainers; [ fridh ];
};
}
```
@@ -1827,6 +1781,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: {
@@ -1841,6 +1796,7 @@ If you need to change a package's attribute(s) from `configuration.nix` you coul
};
};
};
+}
```
`python3Packages.twisted` is now globally overridden.
@@ -1853,11 +1809,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}
@@ -1893,7 +1851,7 @@ final: prev: {
(
python-final: python-prev: {
foo = python-prev.foo.overridePythonAttrs (oldAttrs: {
- ...
+ # ...
});
}
)
@@ -1920,7 +1878,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 {
@@ -1938,17 +1896,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.
diff --git a/doc/languages-frameworks/ruby.section.md b/doc/languages-frameworks/ruby.section.md
index 9527395de58f..7dede6944a3d 100644
--- a/doc/languages-frameworks/ruby.section.md
+++ b/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/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md
index 75e57a8bb574..8a1007b7bb8a 100644
--- a/doc/languages-frameworks/rust.section.md
+++ b/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`.
@@ -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}
diff --git a/doc/languages-frameworks/swift.section.md b/doc/languages-frameworks/swift.section.md
index 213d444f499f..88d98deeb2dd 100644
--- a/doc/languages-frameworks/swift.section.md
+++ b/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/doc/languages-frameworks/vim.section.md b/doc/languages-frameworks/vim.section.md
index 1f3727f552c8..69031ccbd340 100644
--- a/doc/languages-frameworks/vim.section.md
+++ b/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/doc/manpage-urls.json b/doc/manpage-urls.json
index 2cc03af4360f..e878caf042a4 100644
--- a/doc/manpage-urls.json
+++ b/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/doc/packages/darwin-builder.section.md b/doc/packages/darwin-builder.section.md
index 3a547de53705..ca8519c5bf5f 100644
--- a/doc/packages/darwin-builder.section.md
+++ b/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/doc/packages/eclipse.section.md b/doc/packages/eclipse.section.md
index e19510e131a0..acf34b57571a 100644
--- a/doc/packages/eclipse.section.md
+++ b/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/doc/packages/emacs.section.md b/doc/packages/emacs.section.md
index c50c7815537d..2ced251f3e46 100644
--- a/doc/packages/emacs.section.md
+++ b/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/doc/packages/index.md b/doc/packages/index.md
index 1f45018ffc4a..38dba5b3498f 100644
--- a/doc/packages/index.md
+++ b/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/doc/packages/krita.section.md b/doc/packages/krita.section.md
new file mode 100644
index 000000000000..ba427bd62ba1
--- /dev/null
+++ b/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/doc/packages/steam.section.md b/doc/packages/steam.section.md
index a1e88b0d9710..c9a09962f62d 100644
--- a/doc/packages/steam.section.md
+++ b/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/doc/packages/urxvt.section.md b/doc/packages/urxvt.section.md
index 7aff0997dd2b..1d40c92ed73f 100644
--- a/doc/packages/urxvt.section.md
+++ b/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/doc/packages/weechat.section.md b/doc/packages/weechat.section.md
index 755b6e6ad1ea..295397f476b0 100644
--- a/doc/packages/weechat.section.md
+++ b/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/doc/stdenv/cross-compilation.chapter.md b/doc/stdenv/cross-compilation.chapter.md
index e659e1803807..76c931ba047a 100644
--- a/doc/stdenv/cross-compilation.chapter.md
+++ b/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/doc/stdenv/meta.chapter.md b/doc/stdenv/meta.chapter.md
index 4a3b04b8f6e4..7f57eda791ea 100644
--- a/doc/stdenv/meta.chapter.md
+++ b/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 = {
- 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 = {
+ 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/doc/stdenv/multiple-output.chapter.md b/doc/stdenv/multiple-output.chapter.md
index 1ee063c0c2f4..5e86d2aa3d56 100644
--- a/doc/stdenv/multiple-output.chapter.md
+++ b/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/doc/stdenv/stdenv.chapter.md b/doc/stdenv/stdenv.chapter.md
index a948c6757c4a..f3cdb1f2dc0c 100644
--- a/doc/stdenv/stdenv.chapter.md
+++ b/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/doc/style.css b/doc/style.css
index fddf4f4823c7..5bc587a6ee30 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -347,6 +347,22 @@ div.appendix div.example {
margin-top: 1.5em;
}
+div.book div.example details,
+div.appendix div.example details {
+ padding: 5px;
+}
+
+div.book div.example details[open],
+div.appendix div.example details[open] {
+ border: 1px solid #aaa;
+ border-radius: 4px;
+}
+
+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;
@@ -414,3 +430,12 @@ 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/doc/using/configuration.chapter.md b/doc/using/configuration.chapter.md
index 8d246b117b05..05a8fa5517cc 100644
--- a/doc/using/configuration.chapter.md
+++ b/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/doc/using/overlays.chapter.md b/doc/using/overlays.chapter.md
index 1bec6586f28e..46200730f0b2 100644
--- a/doc/using/overlays.chapter.md
+++ b/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/doc/using/overrides.chapter.md b/doc/using/overrides.chapter.md
index a1ef9afb0b69..8c6ed79076c2 100644
--- a/doc/using/overrides.chapter.md
+++ b/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/lib/attrsets.nix b/lib/attrsets.nix
index de5968b95348..83f8d0f34186 100644
--- a/lib/attrsets.nix
+++ b/lib/attrsets.nix
@@ -5,7 +5,7 @@
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
@@ -87,9 +87,9 @@ rec {
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
+ (x?a.b) == hasAttrByPath ["a" "b"] x
# and
- (x?${f p}."example.com") == hasAttryByPath [ (f p) "example.com" ] x
+ (x?${f p}."example.com") == hasAttrByPath [ (f p) "example.com" ] x
```
**Laws**:
@@ -885,15 +885,15 @@ rec {
# Type
```
- cartesianProductOfSets :: AttrSet -> [AttrSet]
+ cartesianProduct :: AttrSet -> [AttrSet]
```
# Examples
:::{.example}
- ## `lib.attrsets.cartesianProductOfSets` usage example
+ ## `lib.attrsets.cartesianProduct` usage example
```nix
- cartesianProductOfSets { a = [ 1 2 ]; b = [ 10 20 ]; }
+ cartesianProduct { a = [ 1 2 ]; b = [ 10 20 ]; }
=> [
{ a = 1; b = 10; }
{ a = 1; b = 20; }
@@ -904,7 +904,7 @@ rec {
:::
*/
- cartesianProductOfSets =
+ cartesianProduct =
attrsOfLists:
foldl' (listOfAttrs: attrName:
concatMap (attrs:
@@ -913,6 +913,40 @@ rec {
) [{}] (attrNames attrsOfLists);
+ /**
+ Return the result of function f applied to the cartesian product of attribute set value combinations.
+ Equivalent to using cartesianProduct followed by map.
+
+ # Inputs
+
+ `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`.
@@ -1999,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/lib/cli.nix b/lib/cli.nix
index c96d4dbb0432..fcffacb5ea99 100644
--- a/lib/cli.nix
+++ b/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/lib/customisation.nix b/lib/customisation.nix
index 66638b63342a..0e0d79120296 100644
--- a/lib/customisation.nix
+++ b/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,12 +269,31 @@ 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
@@ -233,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
@@ -269,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
@@ -443,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/lib/default.nix b/lib/default.nix
index 668c29640f9f..d5d47defb8e6 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -47,7 +47,7 @@ let
# misc
asserts = callLibs ./asserts.nix;
debug = callLibs ./debug.nix;
- misc = callLibs ./deprecated.nix;
+ misc = callLibs ./deprecated/misc.nix;
# domain-specific
fetchers = callLibs ./fetchers.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,10 +86,10 @@ 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
+ ifilter0 concatMap flatten remove findSingle findFirst any all count
optional optionals toList range replicate partition zipListsWith zipLists
reverseList listDfs toposort sort sortOn naturalSort compareLists take
drop sublist last init crossLists unique allUnique intersectLists
@@ -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/lib/deprecated/README.md b/lib/deprecated/README.md
new file mode 100644
index 000000000000..afeb34d449f5
--- /dev/null
+++ b/lib/deprecated/README.md
@@ -0,0 +1,11 @@
+
+# lib/deprecated
+
+Do not add any new functions to this directory.
+
+This directory contains the `lib.misc` sublibrary, which - as a location - is deprecated.
+Furthermore, some of the functions inside are of *dubious* utility, and should perhaps be avoided,
+while some functions *may still be needed*.
+
+This directory does not play a role in the deprecation process for library functions.
+They should be deprecated in place, by putting a `lib.warn` or `lib.warnIf` call around the function.
diff --git a/lib/deprecated.nix b/lib/deprecated/misc.nix
similarity index 98%
rename from lib/deprecated.nix
rename to lib/deprecated/misc.nix
index b76622b5d842..d556bccbec0b 100644
--- a/lib/deprecated.nix
+++ b/lib/deprecated/misc.nix
@@ -314,12 +314,13 @@ let
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;
diff --git a/lib/fileset/default.nix b/lib/fileset/default.nix
index ce9afc796a3f..e29f30251c69 100644
--- a/lib/fileset/default.nix
+++ b/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/lib/kernel.nix b/lib/kernel.nix
index 7391f9e5d079..d03d0103a678 100644
--- a/lib/kernel.nix
+++ b/lib/kernel.nix
@@ -16,9 +16,8 @@ in
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/lib/licenses.nix b/lib/licenses.nix
index 4cda7e5c01a3..49c7a4a353ec 100644
--- a/lib/licenses.nix
+++ b/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";
@@ -1162,6 +1168,11 @@ in mkLicense lset) ({
# channel and NixOS images.
};
+ unicode-30 = {
+ spdxId = "Unicode-3.0";
+ fullName = "Unicode License v3";
+ };
+
unicode-dfs-2015 = {
spdxId = "Unicode-DFS-2015";
fullName = "Unicode License Agreement - Data Files and Software (2015)";
@@ -1266,6 +1277,18 @@ in mkLicense lset) ({
};
} // {
# TODO: remove legacy aliases
+ 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 = {
spdxId = "GPL-2.0";
fullName = "GNU General Public License v2.0";
diff --git a/lib/lists.nix b/lib/lists.nix
index c162f921280d..ca436d7a9c94 100644
--- a/lib/lists.nix
+++ b/lib/lists.nix
@@ -4,7 +4,7 @@
{ lib }:
let
inherit (lib.strings) toInt;
- inherit (lib.trivial) compare min id warn;
+ inherit (lib.trivial) compare min id warn pipe;
inherit (lib.attrsets) mapAttrs;
in
rec {
@@ -333,6 +333,54 @@ rec {
*/
imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
+ /**
+ Filter a list for elements that satisfy a predicate function.
+ The predicate function is called with both the index and value for each element.
+ It must return `true`/`false` to include/exclude a given element in the result.
+ This function is strict in the result of the predicate function for each element.
+ This function has O(n) complexity.
+
+ Also see [`builtins.filter`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-filter) (available as `lib.lists.filter`),
+ which can be used instead when the index isn't needed.
+
+ # Inputs
+
+ `ipred`
+
+ : The predicate function, it takes two arguments:
+ - 1. (int): the index of the element.
+ - 2. (a): the value of the element.
+
+ It must return `true`/`false` to include/exclude a given element from the result.
+
+ `list`
+
+ : The list to filter using the predicate.
+
+ # Type
+ ```
+ ifilter0 :: (int -> a -> bool) -> [a] -> [a]
+ ```
+
+ # Examples
+ :::{.example}
+ ## `lib.lists.ifilter0` usage example
+
+ ```nix
+ ifilter0 (i: v: i == 0 || v > 2) [ 1 2 3 ]
+ => [ 1 3 ]
+ ```
+ :::
+ */
+ ifilter0 =
+ ipred:
+ input:
+ map (idx: elemAt input idx) (
+ filter (idx: ipred idx (elemAt input idx)) (
+ genList (x: x) (length input)
+ )
+ );
+
/**
Map and concatenate the result.
@@ -1688,16 +1736,32 @@ rec {
## `lib.lists.crossLists` usage example
```nix
- crossLists (x:y: "${toString x}${toString y}") [[1 2] [3 4]]
+ 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."
- (f: foldl (fs: args: concatMap (f: map f args) fs) [f]);
+ ''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.
diff --git a/lib/modules.nix b/lib/modules.nix
index 61964d466781..79892f50c4fe 100644
--- a/lib/modules.nix
+++ b/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/lib/options.nix b/lib/options.nix
index 0d1d90efe217..7e64e6e510fb 100644
--- a/lib/options.nix
+++ b/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/lib/strings.nix b/lib/strings.nix
index 32efc9bdb70e..67bb669d04e0 100644
--- a/lib/strings.nix
+++ b/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.
diff --git a/lib/systems/default.nix b/lib/systems/default.nix
index 6137d47e91a2..7e9aadeef72e 100644
--- a/lib/systems/default.nix
+++ b/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/lib/systems/examples.nix b/lib/systems/examples.nix
index 75578b974945..b16445eadfea 100644
--- a/lib/systems/examples.nix
+++ b/lib/systems/examples.nix
@@ -235,6 +235,11 @@ rec {
libc = "newlib";
};
+ microblaze-embedded = {
+ config = "microblazeel-none-elf";
+ libc = "newlib";
+ };
+
#
# Redox
#
diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix
index c6a33781ae28..ebc7ab366876 100644
--- a/lib/systems/inspect.nix
+++ b/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/lib/systems/parse.nix b/lib/systems/parse.nix
index b69ad669e187..191e9734b879 100644
--- a/lib/systems/parse.nix
+++ b/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/lib/tests/misc.nix b/lib/tests/misc.nix
index 6f1d9039db80..6774939023d2 100644
--- a/lib/tests/misc.nix
+++ b/lib/tests/misc.nix
@@ -1,17 +1,21 @@
-/*
-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
*/
let
@@ -29,7 +33,7 @@ let
boolToString
callPackagesWith
callPackageWith
- cartesianProductOfSets
+ cartesianProduct
cli
composeExtensions
composeManyExtensions
@@ -59,17 +63,20 @@ let
hasAttrByPath
hasInfix
id
+ ifilter0
isStorePath
lazyDerivation
+ length
lists
listToAttrs
makeExtensible
+ makeIncludePath
makeOverridable
mapAttrs
+ mapCartesianProduct
matchAttrs
mergeAttrs
meta
- mkOption
mod
nameValuePair
optionalDrvAttr
@@ -101,6 +108,7 @@ let
types
updateManyAttrsByPath
versions
+ xor
;
testingThrow = expr: {
@@ -111,7 +119,6 @@ let
expr = (builtins.tryEval expr).success;
expected = true;
};
- testingDeepThrow = expr: testingThrow (builtins.deepSeq expr expr);
testSanitizeDerivationName = { name, expected }:
let
@@ -198,10 +205,10 @@ runTests {
};
/*
- testOr = {
- expr = or true false;
- expected = true;
- };
+ testOr = {
+ expr = or true false;
+ expected = true;
+ };
*/
testAnd = {
@@ -209,6 +216,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";};
@@ -296,6 +318,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";
@@ -602,6 +653,31 @@ runTests {
expected = ["b" "c"];
};
+ testIfilter0Example = {
+ expr = ifilter0 (i: v: i == 0 || v > 2) [ 1 2 3 ];
+ expected = [ 1 3 ];
+ };
+ testIfilter0Empty = {
+ expr = ifilter0 (i: v: abort "shouldn't be evaluated!") [ ];
+ expected = [ ];
+ };
+ testIfilter0IndexOnly = {
+ expr = length (ifilter0 (i: v: mod i 2 == 0) [ (throw "0") (throw "1") (throw "2") (throw "3")]);
+ expected = 2;
+ };
+ testIfilter0All = {
+ expr = ifilter0 (i: v: true) [ 10 11 12 13 14 15 ];
+ expected = [ 10 11 12 13 14 15 ];
+ };
+ testIfilter0First = {
+ expr = ifilter0 (i: v: i == 0) [ 10 11 12 13 14 15 ];
+ expected = [ 10 ];
+ };
+ testIfilter0Last = {
+ expr = ifilter0 (i: v: i == 5) [ 10 11 12 13 14 15 ];
+ expected = [ 15 ];
+ };
+
testFold =
let
f = op: fold: fold op 0 (range 0 100);
@@ -1267,7 +1343,7 @@ runTests {
'';
};
- /* right now only invocation check */
+ # right now only invocation check
testToJSONSimple =
let val = {
foobar = [ "baz" 1 2 3 ];
@@ -1278,7 +1354,7 @@ runTests {
expected = builtins.toJSON val;
};
- /* right now only invocation check */
+ # right now only invocation check
testToYAMLSimple =
let val = {
list = [ { one = 1; } { two = 2; } ];
@@ -1365,7 +1441,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";
@@ -1379,7 +1455,7 @@ runTests {
there
test'';
};
- expected = rec {
+ expected = {
list = ''
[
3
@@ -1417,13 +1493,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;
@@ -1636,17 +1709,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; }
@@ -1654,12 +1727,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 ];
@@ -1703,6 +1776,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" ];
diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh
index b3bbdf9485ac..750b1d025e02 100755
--- a/lib/tests/modules.sh
+++ b/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/lib/tests/modules/doRename-condition.nix b/lib/tests/modules/doRename-condition.nix
index c08b3035be6f..176c21a01a17 100644
--- a/lib/tests/modules/doRename-condition.nix
+++ b/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/lib/tests/modules/docs.nix b/lib/tests/modules/docs.nix
new file mode 100644
index 000000000000..225aa7eac1de
--- /dev/null
+++ b/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/lib/tests/modules/types-attrTag-wrong-decl.nix b/lib/tests/modules/types-attrTag-wrong-decl.nix
new file mode 100644
index 000000000000..d03370bc10da
--- /dev/null
+++ b/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/lib/tests/modules/types-attrTag.nix b/lib/tests/modules/types-attrTag.nix
new file mode 100644
index 000000000000..b2e5158bb44b
--- /dev/null
+++ b/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/lib/trivial.nix b/lib/trivial.nix
index 936ad207c03d..5b7a1ee30f7a 100644
--- a/lib/trivial.nix
+++ b/lib/trivial.nix
@@ -199,6 +199,24 @@ in {
*/
and = x: y: x && y;
+ /**
+ 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”
*/
diff --git a/lib/types.nix b/lib/types.nix
index 12bf18633e3a..518b987dcd92 100644
--- a/lib/types.nix
+++ b/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/maintainers/README.md b/maintainers/README.md
index f121ec756413..848cb9fed9b5 100644
--- a/maintainers/README.md
+++ b/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/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 307c33318bc9..7edf4202b1e3 100644
--- a/maintainers/maintainer-list.nix
+++ b/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";
@@ -772,6 +800,12 @@
githubId = 20405311;
name = "Aksh Gupta";
};
+ aktaboot = {
+ email = "akhtaboo@protonmail.com";
+ github = "aktaboot";
+ githubId = 120214979;
+ name = "aktaboot";
+ };
al3xtjames = {
email = "nix@alextjam.es";
github = "al3xtjames";
@@ -1052,12 +1086,6 @@
githubId = 153175;
name = "Andrew Marshall";
};
- amaxine = {
- email = "max@ine.dev";
- github = "amaxine";
- githubId = 35892750;
- name = "Maxine Aubrey";
- };
ambroisie = {
email = "bruno.nixpkgs@belanyi.fr";
github = "ambroisie";
@@ -1213,12 +1241,6 @@
githubId = 962885;
name = "Andrew Chambers";
};
- andrew-d = {
- email = "andrew@du.nham.ca";
- github = "andrew-d";
- githubId = 1079173;
- name = "Andrew Dunham";
- };
andrewrk = {
email = "superjoe30@gmail.com";
github = "andrewrk";
@@ -1231,12 +1253,6 @@
githubId = 29887;
name = "Andrew Smith";
};
- andsild = {
- email = "andsild@gmail.com";
- github = "andsild";
- githubId = 3808928;
- name = "Anders Sildnes";
- };
andys8 = {
github = "andys8";
githubId = 13085980;
@@ -1330,12 +1346,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";
@@ -1382,6 +1392,7 @@
github = "anthonyroussel";
githubId = 220084;
name = "Anthony Roussel";
+ matrix = "@anthonyrsl:matrix.org";
keys = [{
fingerprint = "472D 368A F107 F443 F3A5 C712 9DC4 987B 1A55 E75E";
}];
@@ -1425,6 +1436,18 @@
githubId = 4194320;
name = "Anton Schirg";
};
+ anytimetraveler = {
+ email = "simon@simonscode.org";
+ github = "AnyTimeTraveler";
+ githubId = 19378309;
+ name = "Simon Struck";
+ };
+ aorith = {
+ email = "aomanu+nixpkgs@gmail.com";
+ github = "aorith";
+ githubId = 5411704;
+ name = "Manuel Sanchez Pinar";
+ };
apeschar = {
email = "albert@peschar.net";
github = "apeschar";
@@ -1546,6 +1569,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";
@@ -1752,10 +1781,15 @@
githubId = 11037075;
name = "Ashley Hooper";
};
- ashvith-shetty = {
- github = "Ashvith10";
- githubId = 113123021;
- name = "Ashvith Shetty";
+ 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";
+ }];
};
asininemonkey = {
email = "nixpkgs@asininemonkey.com";
@@ -1784,12 +1818,25 @@
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";
githubId = 7745457;
name = "Astavie";
};
+ astindev = {
+ email = "astindev@pm.me";
+ github = "astindev";
+ githubId = 52360869;
+ name = "Astin";
+ };
astro = {
email = "astro@spaceboyz.net";
github = "astro";
@@ -1971,10 +2018,10 @@
name = "averelld";
};
avery = {
- email = "averyl+nixos@protonmail.com";
- github = "AveryLychee";
- githubId = 9147625;
- name = "Avery Lychee";
+ email = "nixpkgs@avery.cafe";
+ github = "coolavery";
+ githubId = 76545554;
+ name = "Avery";
};
avh4 = {
email = "gruen0aermel@gmail.com";
@@ -2544,6 +2591,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";
@@ -2586,6 +2639,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";
@@ -2674,6 +2733,12 @@
github = "bmwalters";
githubId = 4380777;
};
+ bnlrnz = {
+ github = "bnlrnz";
+ githubId = 11310385;
+ name = "Ben Lorenz";
+ email = "bnlrnz@gmail.com";
+ };
bobakker = {
email = "bobakk3r@gmail.com";
github = "bobakker";
@@ -2711,6 +2776,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";
@@ -2958,6 +3029,12 @@
github = "bycEEE";
githubId = 8891115;
name = "Brian Choy";
+ };
+ ByteSudoer = {
+ email = "bytesudoer@gmail.com";
+ github = "bytesudoer";
+ githubId = 88513682;
+ name = "ByteSudoer";
};
bzizou = {
email = "Bruno@bzizou.net";
@@ -3217,6 +3294,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";
@@ -3463,12 +3546,6 @@
githubId = 1118859;
name = "Scott Worley";
};
- ChlorideCull = {
- email = "nixrelated@chcl.se";
- github = "ChlorideCull";
- githubId = 4977063;
- name = "Sebastian Johansson";
- };
choochootrain = {
email = "hurshal@imap.cc";
github = "choochootrain";
@@ -3674,6 +3751,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";
@@ -4118,6 +4202,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";
@@ -4246,12 +4341,6 @@
githubId = 990767;
name = "Daniel Olsen";
};
- danderson = {
- email = "dave@natulte.net";
- github = "danderson";
- githubId = 1918;
- name = "David Anderson";
- };
daneads = {
email = "me@daneads.com";
github = "daneads";
@@ -4322,6 +4411,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";
@@ -4335,6 +4431,12 @@
github = "DarkOnion0";
githubId = 68606322;
};
+ daru-san = {
+ name = "Daru";
+ email = "zadarumaka@proton.me";
+ github = "Daru-san";
+ githubId = 135046711;
+ };
das-g = {
email = "nixpkgs@raphael.dasgupta.ch";
github = "das-g";
@@ -4468,6 +4570,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";
@@ -4649,12 +4757,6 @@
githubId = 150736012;
email = "me+git@delliott.xyz";
};
- delroth = {
- email = "delroth@gmail.com";
- github = "delroth";
- githubId = 202798;
- name = "Pierre Bourdon";
- };
delta = {
email = "d4delta@outlook.fr";
github = "D4Delta";
@@ -4739,6 +4841,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";
@@ -4820,6 +4928,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";
@@ -4832,6 +4946,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";
@@ -4911,6 +5031,12 @@
github = "DimitarNestorov";
githubId = 8790386;
};
+ diniamo = {
+ name = "diniamo";
+ email = "diniamo53@gmail.com";
+ github = "diniamo";
+ githubId = 55629891;
+ };
diogotcorreia = {
name = "Diogo Correia";
email = "me@diogotc.com";
@@ -5199,6 +5325,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";
@@ -5293,6 +5425,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";
@@ -5336,6 +5474,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";
@@ -5423,6 +5567,7 @@
name = "Florentin Eckl";
};
eclairevoyant = {
+ email = "contactmeongithubinstead@proton.me";
github = "eclairevoyant";
githubId = 848000;
name = "éclairevoyant";
@@ -5695,6 +5840,12 @@
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";
@@ -5783,12 +5934,6 @@
name = "Zhenbo Li";
matrix = "@zhenbo:matrix.org";
};
- endocrimes = {
- email = "dani@builds.terrible.systems";
- github = "endocrimes";
- githubId = 1330683;
- name = "Danielle Lancashire";
- };
enorris = {
name = "Eric Norris";
email = "erictnorris@gmail.com";
@@ -5812,6 +5957,13 @@
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";
@@ -6186,7 +6338,7 @@
};
eymeric = {
name = "Eymeric Dechelette";
- email = "hatchchcien@protonmail.com";
+ email = "hatchchien@protonmail.com";
github = "hatch01";
githubId = 42416805;
};
@@ -6293,6 +6445,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";
@@ -6305,16 +6463,6 @@
githubId = 541748;
name = "Felipe Espinoza";
};
- federicoschonborn = {
- name = "Federico Damián Schonborn";
- email = "federicoschonborn@disroot.org";
- github = "FedericoSchonborn";
- githubId = 62166915;
- matrix = "@FedericoDSchonborn:matrix.org";
- keys = [
- { fingerprint = "C43F 4052 D289 3B73 33F8 0259 E4F6 F544 DE9E 29E8"; }
- ];
- };
fedx-sudo = {
email = "fedx-sudo@pm.me";
github = "FedX-sudo";
@@ -6384,6 +6532,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";
@@ -6547,12 +6701,6 @@
githubId = 5918766;
name = "Franz Thoma";
};
- fogti = {
- name = "Alain Fogtia Zscheile";
- email = "fogti+devel@ytrizja.de";
- github = "fogti";
- githubId = 1618343;
- };
foo-dogsquared = {
email = "foodogsquared@foodogsquared.one";
github = "foo-dogsquared";
@@ -6782,6 +6930,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";
@@ -6866,6 +7023,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";
@@ -6996,6 +7162,12 @@
githubId = 40209356;
name = "Gabriel Doriath Döhler";
};
+ gdifolco = {
+ email = "gautier.difolco@gmail.com";
+ github = "blackheaven";
+ githubId = 1362807;
+ name = "Gautier Di Folco";
+ };
gdinh = {
email = "nix@contact.dinh.ai";
github = "gdinh";
@@ -7176,18 +7348,18 @@
githubId = 104317939;
name = "gilice";
};
- gilligan = {
- email = "tobias.pflug@gmail.com";
- github = "gilligan";
- githubId = 27668;
- name = "Tobias Pflug";
- };
gin66 = {
email = "jochen@kiemes.de";
github = "gin66";
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";
@@ -7446,6 +7618,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";
@@ -7600,6 +7779,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";
@@ -7775,6 +7960,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";
@@ -8226,6 +8417,12 @@
github = "Icy-Thought";
githubId = 53710398;
};
+ id3v1669 = {
+ name = "id3v1669";
+ email = "id3v1669@gmail.com";
+ github = "id3v1669";
+ githubId = 57532211;
+ };
idlip = {
name = "Dilip";
email = "igoldlip@gmail.com";
@@ -8384,6 +8581,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";
@@ -8500,6 +8703,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";
@@ -8641,12 +8850,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";
@@ -8864,6 +9094,12 @@
github = "joshua-cooper";
githubId = 35612334;
};
+ jcaesar = {
+ name = "Julius Michaelis";
+ matrix = "@julius:mtx.liftm.de";
+ github = "jcaesar";
+ githubId = 1753388;
+ };
jceb = {
name = "Jan Christoph Ebersbach";
email = "jceb@e-jc.de";
@@ -9033,6 +9269,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";
@@ -9451,6 +9693,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";
@@ -9524,6 +9772,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";
@@ -9604,6 +9858,11 @@
github = "jpagex";
githubId = 635768;
};
+ jpaju = {
+ name = "Jaakko Paju";
+ github = "jpaju";
+ githubId = 36770267;
+ };
jpas = {
name = "Jarrod Pas";
email = "jarrod@jarrodpas.com";
@@ -9950,6 +10209,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";
@@ -10030,6 +10294,11 @@
githubId = 15855440;
name = "Keanu Ashwell";
};
+ katanallama = {
+ github = "katanallama";
+ githubId = 70604257;
+ name = "katanallama";
+ };
katexochen = {
github = "katexochen";
githubId = 49727155;
@@ -10078,15 +10347,6 @@
github = "keenanweaver";
githubId = 37268985;
};
- keksbg = {
- email = "keksbg@riseup.net";
- name = "Stella";
- github = "keksbg";
- githubId = 10682187;
- keys = [{
- fingerprint = "AB42 1F18 5A19 A160 AD77 9885 3D6D CA5B 6F2C 2A7A";
- }];
- };
keldu = {
email = "mail@keldu.de";
github = "keldu";
@@ -10244,6 +10504,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";
@@ -10298,6 +10564,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";
@@ -10521,6 +10793,12 @@
githubId = 2037002;
name = "Konstantinos";
};
+ kotatsuyaki = {
+ email = "kotatsuyaki@mail.kotatsu.dev";
+ github = "kotatsuyaki";
+ githubId = 17219127;
+ name = "kotatsuyaki";
+ };
kouyk = {
email = "skykinetic@stevenkou.xyz";
github = "kouyk";
@@ -10752,6 +11030,12 @@
}];
name = "Yaroslav Bolyukin";
};
+ lachrymal = {
+ email = "lachrymalfutura@gmail.com";
+ name = "lachrymaL";
+ github = "lachrymaLF";
+ githubId = 13716477;
+ };
lafrenierejm = {
email = "joseph@lafreniere.xyz";
github = "lafrenierejm";
@@ -10790,6 +11074,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";
@@ -11148,6 +11438,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";
@@ -11189,6 +11485,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";
@@ -11293,12 +11596,6 @@
githubId = 918448;
name = "Anthony Lodi";
};
- loewenheim = {
- email = "loewenheim@mailbox.org";
- github = "loewenheim";
- githubId = 7622248;
- name = "Sebastian Zivota";
- };
logo = {
email = "logo4poop@protonmail.com";
matrix = "@logo4poop:matrix.org";
@@ -11328,6 +11625,12 @@
github = "LongerHV";
githubId = 46924944;
};
+ lonyelon = {
+ email = "sergio@lony.xyz";
+ name = "Sergio Miguéns Iglesias";
+ github = "lonyelon";
+ githubId = 18664655;
+ };
lopsided98 = {
email = "benwolsieffer@gmail.com";
github = "lopsided98";
@@ -11466,6 +11769,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";
@@ -11532,12 +11844,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";
@@ -11582,6 +11888,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";
@@ -12022,10 +12334,11 @@
githubId = 26470037;
name = "Markus Kowalewski";
};
- marsam = {
- github = "marsam";
- githubId = 65531;
- name = "Mario Rodas";
+ marmolak = {
+ email = "hack.robin@gmail.com";
+ github = "marmolak";
+ githubId = 1709273;
+ name = "Robin Hack";
};
marsupialgutz = {
email = "mars@possums.xyz";
@@ -12464,6 +12777,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";
@@ -12495,6 +12814,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";
@@ -12537,6 +12862,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";
@@ -13033,6 +13367,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";
@@ -13042,6 +13382,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";
@@ -13181,6 +13527,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";
@@ -13230,12 +13582,6 @@
githubId = 20026143;
name = "Katona László";
};
- MP2E = {
- email = "MP2E@archlinux.us";
- github = "MP2E";
- githubId = 167708;
- name = "Cray Elliott";
- };
mpcsh = {
email = "m@mpc.sh";
github = "mpcsh";
@@ -13351,15 +13697,6 @@
githubId = 3856390;
email = "mschwaig+nixpkgs@eml.cc";
};
- msfjarvis = {
- github = "msfjarvis";
- githubId = 13348378;
- name = "Harsh Shandilya";
- email = "nixos@msfjarvis.dev";
- keys = [{
- fingerprint = "8F87 050B 0F9C B841 1515 7399 B784 3F82 3355 E9B9";
- }];
- };
msiedlarek = {
email = "mikolaj@siedlarek.pl";
github = "msiedlarek";
@@ -13569,6 +13906,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;
@@ -13680,6 +14025,10 @@
githubId = 56316606;
name = "Amneesh Singh";
};
+ nayala = {
+ name = "Nia";
+ matrix = "@fly:asra.gr";
+ };
nazarewk = {
name = "Krzysztof Nazarewski";
matrix = "@nazarewk:matrix.org";
@@ -14159,6 +14508,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";
@@ -14177,6 +14532,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";
@@ -14255,12 +14616,6 @@
githubId = 126072875;
name = "nova madeline";
};
- novenary = {
- email = "streetwalkermc@gmail.com";
- github = "9ary";
- githubId = 1155030;
- name = "novenary";
- };
novoxd = {
email = "radnovox@gmail.com";
github = "novoxd";
@@ -14385,6 +14740,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";
@@ -14410,6 +14771,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";
@@ -14514,6 +14881,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";
@@ -14623,6 +14996,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";
@@ -14927,12 +15306,6 @@
githubId = 72527881;
name = "PassiveLemon";
};
- patka = {
- email = "patka@patka.dev";
- github = "patka-123";
- githubId = 69802930;
- name = "patka";
- };
patricksjackson = {
email = "patrick@jackson.dev";
github = "patricksjackson";
@@ -14989,12 +15362,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-";
@@ -15017,6 +15384,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";
@@ -15066,6 +15439,12 @@
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";
@@ -15198,6 +15577,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";
@@ -15623,6 +16008,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";
@@ -15916,6 +16307,12 @@
githubId = 5636;
name = "Steve Purcell";
};
+ purrpurrn = {
+ email = "scrcpynovideoaudiocodecraw+nixpkgs@gmail.com";
+ github = "purrpurrn";
+ githubId = 142632643;
+ name = "purrpurrn";
+ };
putchar = {
email = "slim.cadoux@gmail.com";
matrix = "@putch4r:matrix.org";
@@ -15941,6 +16338,16 @@
githubId = 4579165;
name = "Danny Bautista";
};
+ pyrox0 = {
+ name = "Pyrox";
+ email = "pyrox@pyrox.dev";
+ matrix = "@pyrox:pyrox.dev";
+ github = "pyrox0";
+ githubId = 35778371;
+ keys = [{
+ fingerprint = "4CA9 72FB ADC8 1416 0F10 3138 FE1D 8A7D 620C 611F";
+ }];
+ };
pyxels = {
email = "pyxels.dev@gmail.com";
github = "Pyxels";
@@ -16006,6 +16413,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";
@@ -16039,6 +16452,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";
@@ -16049,6 +16468,13 @@
fingerprint = "7573 56D7 79BB B888 773E 415E 736C CDF9 EF51 BD97";
}];
};
+ qyriad = {
+ email = "qyriad@qyriad.me";
+ github = "Qyriad";
+ githubId = 1542224;
+ matrix = "@qyriad:katesiria.org";
+ name = "Qyriad";
+ };
r3dl3g = {
email = "redleg@rothfuss-web.de";
github = "r3dl3g";
@@ -16148,6 +16574,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";
@@ -16232,12 +16667,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";
@@ -16480,6 +16927,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";
@@ -16516,6 +16970,11 @@
githubId = 61013287;
name = "Ricardo Steijn";
};
+ richar = {
+ github = "ri-char";
+ githubId = 17962023;
+ name = "richar";
+ };
richardipsum = {
email = "richardipsum@fastmail.co.uk";
github = "richardipsum";
@@ -16565,6 +17024,12 @@
githubId = 37246692;
name = "Riley Inman";
};
+ rinx = {
+ email = "rintaro.okamura@gmail.com";
+ github = "rinx";
+ githubId = 1588935;
+ name = "Rintaro Okamura";
+ };
riotbib = {
email = "lennart@cope.cool";
github = "riotbib";
@@ -16898,6 +17363,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";
@@ -16990,6 +17466,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";
@@ -17281,6 +17763,12 @@
githubId = 92817635;
name = "Sanskar Gurdasani";
};
+ sarahec = {
+ email = "seclark@nextquestion.net";
+ github = "sarahec";
+ githubId = 11277967;
+ name = "Sarah Clark";
+ };
sarcasticadmin = {
email = "rob@sarcasticadmin.com";
github = "sarcasticadmin";
@@ -17521,6 +18009,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";
@@ -17636,6 +18135,11 @@
githubId = 863807;
name = "Serge Guelton";
};
+ sergioribera = {
+ github = "SergioRibera";
+ githubId = 56278796;
+ name = "Sergio Ribera";
+ };
sersorrel = {
email = "ash@sorrel.sh";
github = "sersorrel";
@@ -17951,6 +18455,16 @@
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";
@@ -18369,6 +18883,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";
@@ -18433,6 +18953,21 @@
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;
@@ -18462,12 +18997,6 @@
githubId = 16364318;
name = "Jeffrey Harmon";
};
- srapenne = {
- email = "solene@perso.pw";
- github = "rapenne-s";
- githubId = 248016;
- name = "Solène Rapenne";
- };
srghma = {
email = "srghma@gmail.com";
github = "srghma";
@@ -18538,11 +19067,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";
@@ -18612,6 +19147,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";
@@ -18748,6 +19292,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";
@@ -18784,6 +19338,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";
@@ -18882,6 +19442,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";
@@ -18965,6 +19531,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";
@@ -19007,6 +19579,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";
@@ -19150,6 +19728,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";
@@ -19375,16 +19959,6 @@
github = "thefossguy";
githubId = 44400303;
};
- thehedgeh0g = {
- name = "The Hedgehog";
- email = "hedgehog@mrhedgehog.xyz";
- matrix = "@mrhedgehog:jupiterbroadcasting.com";
- github = "pyrox0";
- githubId = 35778371;
- keys = [{
- fingerprint = "38A0 29B0 4A7E 4C13 A4BB 86C8 7D51 0786 6B1C 6752";
- }];
- };
thekostins = {
name = "Konstantin";
email = "anisimovkosta19@gmail.com";
@@ -19659,12 +20233,6 @@
github = "tirimia";
githubId = 11174371;
};
- titanous = {
- email = "jonathan@titanous.com";
- github = "titanous";
- githubId = 13026;
- name = "Jonathan Rudenberg";
- };
tjni = {
email = "43ngvg@masqt.com";
matrix = "@tni:matrix.org";
@@ -19727,6 +20295,11 @@
githubId = 9853194;
name = "Philipp Bartsch";
};
+ toast = {
+ name = "Toast";
+ github = "toast003";
+ githubId = 39011842;
+ };
toastal = {
email = "toastal+nix@posteo.net";
matrix = "@toastal:mozilla.org";
@@ -19755,12 +20328,6 @@
githubId = 74688871;
name = "Tochukwu Ahanonu";
};
- tokudan = {
- email = "git@danielfrank.net";
- github = "tokudan";
- githubId = 692610;
- name = "Daniel Frank";
- };
tomahna = {
email = "kevin.rauscher@tomahna.fr";
github = "Tomahna";
@@ -20080,12 +20647,6 @@
githubId = 131159000;
name = "Nitin Passa";
};
- twitchyliquid64 = {
- name = "Tom";
- email = "twitchyliquid64@ciphersink.net";
- github = "twitchyliquid64";
- githubId = 6328589;
- };
twz123 = {
name = "Tom Wieczorek";
email = "tom@bibbu.net";
@@ -20161,6 +20722,12 @@
githubId = 20206121;
name = "umlx5h";
};
+ uncenter = {
+ name = "uncenter";
+ email = "uncenter@uncenter.dev";
+ github = "uncenter";
+ githubId = 47499684;
+ };
unclamped = {
name = "Maru";
email = "clear6860@tutanota.com";
@@ -20699,6 +21266,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";
@@ -20951,6 +21524,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;
@@ -21087,6 +21670,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";
@@ -21244,12 +21836,6 @@
githubId = 36407913;
name = "Uli Baum";
};
- xfix = {
- email = "kamila@borowska.pw";
- github = "KamilaBorowska";
- githubId = 1297598;
- name = "Kamila Borowska";
- };
xfnw = {
email = "xfnw+nixos@riseup.net";
github = "xfnw";
@@ -21264,7 +21850,8 @@
};
xgwq = {
name = "XGWQ";
- email = "nixos@xnee.de";
+ email = "nixos.xgwq@xnee.net";
+ keys = [{ fingerprint = "6489 9EF2 A256 5C04 7426 686C 8337 A748 74EB E129"; }];
matrix = "@xgwq:nerdberg.de";
github = "peterablehmann";
githubId = 36541313;
@@ -21293,6 +21880,12 @@
githubId = 3028542;
name = "Guillermo NWDD";
};
+ xokdvium = {
+ email = "xokdvium@proton.me";
+ github = "xokdvium";
+ githubId = 145775305;
+ name = "Sergei Zimmerman";
+ };
xrelkd = {
github = "xrelkd";
githubId = 46590321;
@@ -21644,6 +22237,12 @@
githubId = 179548;
name = "Yves Fischer";
};
+ YvesStraten = {
+ email = "yves.straten@gmail.com";
+ github = "YvesStraten";
+ githubId = 65394961;
+ name = "Yves Straten";
+ };
yvt = {
email = "i@yvt.jp";
github = "yvt";
@@ -21826,6 +22425,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";
@@ -21866,12 +22471,6 @@
githubId = 51886259;
name = "Zokre Zyl";
};
- zombiezen = {
- name = "Ross Light";
- email = "ross@zombiezen.com";
- github = "zombiezen";
- githubId = 181535;
- };
zookatron = {
email = "tim@zookatron.com";
github = "zookatron";
@@ -21913,12 +22512,6 @@
githubId = 393108;
name = "Damien Diederen";
};
- zumorica = {
- name = "Vera Aguilera Puerto";
- email = "gradientvera+nix@outlook.com";
- github = "Zumorica";
- githubId = 6766154;
- };
zupo = {
name = "Nejc Zupan";
email = "nejczupan+nix@gmail.com";
diff --git a/maintainers/scripts/README.md b/maintainers/scripts/README.md
index f8fc7aff955d..1af4715b05be 100644
--- a/maintainers/scripts/README.md
+++ b/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/maintainers/scripts/check-by-name.sh b/maintainers/scripts/check-by-name.sh
index 545dbedf0a31..d267ed9352a0 120000
--- a/maintainers/scripts/check-by-name.sh
+++ b/maintainers/scripts/check-by-name.sh
@@ -1 +1 @@
-../../pkgs/test/nixpkgs-check-by-name/scripts/run-local.sh
\ No newline at end of file
+../../pkgs/test/check-by-name/run-local.sh
\ No newline at end of file
diff --git a/maintainers/scripts/check-cherry-picks.sh b/maintainers/scripts/check-cherry-picks.sh
new file mode 100755
index 000000000000..e7ffe2bf4c73
--- /dev/null
+++ b/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/maintainers/scripts/eval-release.nix b/maintainers/scripts/eval-release.nix
index 10acfe328447..fb830981683f 100644
--- a/maintainers/scripts/eval-release.nix
+++ b/maintainers/scripts/eval-release.nix
@@ -5,7 +5,7 @@ let
trace = if builtins.getEnv "VERBOSE" == "1" then builtins.trace else (x: y: y);
- rel = removeAttrs (import ../../pkgs/top-level/release.nix { }) [ "tarball" "unstable" "xbursttools" ];
+ rel = removeAttrs (import ../../pkgs/top-level/release.nix { }) [ "tarball" "unstable" ];
# Add the ‘recurseForDerivations’ attribute to ensure that
# nix-instantiate recurses into nested attribute sets.
diff --git a/maintainers/scripts/haskell/hydra-report.hs b/maintainers/scripts/haskell/hydra-report.hs
index e911830e8b3e..debf684abf50 100755
--- a/maintainers/scripts/haskell/hydra-report.hs
+++ b/maintainers/scripts/haskell/hydra-report.hs
@@ -78,6 +78,7 @@ 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)
@@ -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 ]
diff --git a/maintainers/scripts/kde/generate-sources.py b/maintainers/scripts/kde/generate-sources.py
index 7b3b2ac35d26..4f43710997f4 100755
--- a/maintainers/scripts/kde/generate-sources.py
+++ b/maintainers/scripts/kde/generate-sources.py
@@ -1,5 +1,5 @@
#!/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
diff --git a/maintainers/scripts/kde/utils.py b/maintainers/scripts/kde/utils.py
index 7a82c4955c6b..b3a00093d703 100644
--- a/maintainers/scripts/kde/utils.py
+++ b/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/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv
index fd6c59c0b46f..4b41b7887512 100644
--- a/maintainers/scripts/luarocks-packages.csv
+++ b/maintainers/scripts/luarocks-packages.csv
@@ -5,10 +5,11 @@ argparse,,,,,,
basexx,,,,,,
binaryheap,,,,,,vcunat
busted,,,,,,
-cassowary,,,,,,marsam alerque
+cassowary,,,,,,alerque
cldr,,,,,,alerque
compat53,,,,,,vcunat
-cosmo,,,,,,marsam
+commons.nvim,,,,,,mrcjkb
+cosmo,,,,,,
coxpcall,,,,1.17.0-1,,
cqueues,,,,,,vcunat
cyan,,,,,,
@@ -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,,
@@ -98,15 +102,21 @@ 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
diff --git a/maintainers/scripts/mdize-module.sh b/maintainers/scripts/mdize-module.sh
deleted file mode 100755
index e2d2e5467aa9..000000000000
--- a/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/maintainers/scripts/pluginupdate.py b/maintainers/scripts/pluginupdate.py
index 056abda85bfd..239f529f9eaa 100644
--- a/maintainers/scripts/pluginupdate.py
+++ b/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/maintainers/team-list.nix b/maintainers/team-list.nix
index 0f481ed3eb9d..08aa297a7c10 100644
--- a/maintainers/team-list.nix
+++ b/maintainers/team-list.nix
@@ -32,7 +32,6 @@ with lib.maintainers; {
acme = {
members = [
aanderse
- andrew-d
arianvp
emily
flokli
@@ -46,7 +45,6 @@ with lib.maintainers; {
bazel = {
members = [
mboes
- marsam
uri-canva
cbley
olebedev
@@ -99,7 +97,6 @@ with lib.maintainers; {
budgie = {
members = [
bobby285271
- federicoschonborn
];
scope = "Maintain Budgie desktop environment";
shortName = "Budgie";
@@ -146,6 +143,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
@@ -256,10 +262,7 @@ with lib.maintainers; {
};
docs = {
- members = [
- asymmetric
- ryantm
- ];
+ members = [ ];
scope = "Maintain nixpkgs/NixOS documentation and tools for building it.";
shortName = "Docs";
enableFeatureFreezePing = true;
@@ -352,6 +355,7 @@ with lib.maintainers; {
geospatial = {
members = [
imincik
+ l0b0
nh2
nialov
sikmir
@@ -371,7 +375,6 @@ with lib.maintainers; {
krav
talyz
yayayayaka
- yuka
];
scope = "Maintain gitlab packages.";
shortName = "gitlab";
@@ -399,7 +402,6 @@ with lib.maintainers; {
hedning
jtojnar
dasj19
- amaxine
];
githubTeams = [
"gnome"
@@ -442,6 +444,7 @@ with lib.maintainers; {
# Verify additions to this team with at least one already existing member of the team.
members = [
das_j
+ conni2461
];
scope = "Group registration for packages maintained by Helsinki Systems";
shortName = "Helsinki Systems employees";
@@ -475,6 +478,7 @@ with lib.maintainers; {
ryantm
lassulus
yayayayaka
+ asymmetric
];
scope = "Maintain Jitsi.";
shortName = "Jitsi";
@@ -507,6 +511,7 @@ with lib.maintainers; {
cpages
dschrempf
edwtjo
+ kazenyuk
minijackson
peterhoeg
sephalon
@@ -519,7 +524,6 @@ with lib.maintainers; {
members = [
aanderse
edwtjo
- MP2E
thiagokokada
];
scope = "Maintain Libretro, RetroArch and related packages.";
@@ -559,10 +563,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;
@@ -721,7 +728,6 @@ with lib.maintainers; {
node = {
members = [
lilyinstarlight
- marsam
winter
];
scope = "Maintain Node.js runtimes and build tooling.";
@@ -819,7 +825,6 @@ with lib.maintainers; {
python = {
members = [
- fridh
hexa
jonringer
tjni
@@ -891,7 +896,6 @@ with lib.maintainers; {
ruby = {
members = [
- marsam
];
scope = "Maintain the Ruby interpreter and related packages.";
shortName = "Ruby";
diff --git a/nixos/doc/manual/administration/cleaning-store.chapter.md b/nixos/doc/manual/administration/cleaning-store.chapter.md
index c9140d0869c7..4f404882055a 100644
--- a/nixos/doc/manual/administration/cleaning-store.chapter.md
+++ b/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/nixos/doc/manual/administration/container-networking.section.md b/nixos/doc/manual/administration/container-networking.section.md
index 0873768376cc..723cf211d872 100644
--- a/nixos/doc/manual/administration/container-networking.section.md
+++ b/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/nixos/doc/manual/administration/control-groups.chapter.md b/nixos/doc/manual/administration/control-groups.chapter.md
index abe8dd80b5ab..8682236ca1a9 100644
--- a/nixos/doc/manual/administration/control-groups.chapter.md
+++ b/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/nixos/doc/manual/administration/declarative-containers.section.md b/nixos/doc/manual/administration/declarative-containers.section.md
index eaa50d3c663d..f16fa8332b51 100644
--- a/nixos/doc/manual/administration/declarative-containers.section.md
+++ b/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/nixos/doc/manual/administration/service-mgmt.chapter.md b/nixos/doc/manual/administration/service-mgmt.chapter.md
index bc9bdbe3708b..49e8d801fb80 100644
--- a/nixos/doc/manual/administration/service-mgmt.chapter.md
+++ b/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/nixos/doc/manual/administration/system-state.chapter.md b/nixos/doc/manual/administration/system-state.chapter.md
index 6840cc390257..89013933cda5 100644
--- a/nixos/doc/manual/administration/system-state.chapter.md
+++ b/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/nixos/doc/manual/configuration/abstractions.section.md b/nixos/doc/manual/configuration/abstractions.section.md
index bf26e4c51ed3..06356c472ba9 100644
--- a/nixos/doc/manual/configuration/abstractions.section.md
+++ b/nixos/doc/manual/configuration/abstractions.section.md
@@ -35,7 +35,7 @@ in
{
services.httpd.virtualHosts =
{ "blog.example.org" = (commonConfig // { documentRoot = "/webroot/blog.example.org"; });
- "wiki.example.org" = (commonConfig // { documentRoot = "/webroot/wiki.example.com"; });
+ "wiki.example.org" = (commonConfig // { documentRoot = "/webroot/wiki.example.org"; });
};
}
```
@@ -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/nixos/doc/manual/configuration/ad-hoc-network-config.section.md b/nixos/doc/manual/configuration/ad-hoc-network-config.section.md
index 4478d77f361d..ecb06ad984a3 100644
--- a/nixos/doc/manual/configuration/ad-hoc-network-config.section.md
+++ b/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/nixos/doc/manual/configuration/adding-custom-packages.section.md b/nixos/doc/manual/configuration/adding-custom-packages.section.md
index 2340723e07c6..f9a5221d6c93 100644
--- a/nixos/doc/manual/configuration/adding-custom-packages.section.md
+++ b/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/nixos/doc/manual/configuration/config-file.section.md b/nixos/doc/manual/configuration/config-file.section.md
index b010026c5828..e213aae29ae3 100644
--- a/nixos/doc/manual/configuration/config-file.section.md
+++ b/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/nixos/doc/manual/configuration/customizing-packages.section.md b/nixos/doc/manual/configuration/customizing-packages.section.md
index 76413b7d84fb..074932b3f110 100644
--- a/nixos/doc/manual/configuration/customizing-packages.section.md
+++ b/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/nixos/doc/manual/configuration/declarative-packages.section.md b/nixos/doc/manual/configuration/declarative-packages.section.md
index 480e250da8c7..6cdd520dcf15 100644
--- a/nixos/doc/manual/configuration/declarative-packages.section.md
+++ b/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/nixos/doc/manual/configuration/file-systems.chapter.md b/nixos/doc/manual/configuration/file-systems.chapter.md
index 3dfdd20ac33e..4bdd9c60e327 100644
--- a/nixos/doc/manual/configuration/file-systems.chapter.md
+++ b/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/nixos/doc/manual/configuration/firewall.section.md b/nixos/doc/manual/configuration/firewall.section.md
index dbf0ffb9273e..9a71217944ee 100644
--- a/nixos/doc/manual/configuration/firewall.section.md
+++ b/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/nixos/doc/manual/configuration/gpu-accel.chapter.md b/nixos/doc/manual/configuration/gpu-accel.chapter.md
index aa63aec61669..3b98bdd97c68 100644
--- a/nixos/doc/manual/configuration/gpu-accel.chapter.md
+++ b/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/nixos/doc/manual/configuration/ipv4-config.section.md b/nixos/doc/manual/configuration/ipv4-config.section.md
index c73024b856d7..0464f5389855 100644
--- a/nixos/doc/manual/configuration/ipv4-config.section.md
+++ b/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/nixos/doc/manual/configuration/ipv6-config.section.md b/nixos/doc/manual/configuration/ipv6-config.section.md
index ce66f53ed472..b4fe0d759b8a 100644
--- a/nixos/doc/manual/configuration/ipv6-config.section.md
+++ b/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/nixos/doc/manual/configuration/kubernetes.chapter.md b/nixos/doc/manual/configuration/kubernetes.chapter.md
index f39726090e43..fba40b648752 100644
--- a/nixos/doc/manual/configuration/kubernetes.chapter.md
+++ b/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/nixos/doc/manual/configuration/linux-kernel.chapter.md b/nixos/doc/manual/configuration/linux-kernel.chapter.md
index 31d8d1a7d0cf..3bc97446f452 100644
--- a/nixos/doc/manual/configuration/linux-kernel.chapter.md
+++ b/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/nixos/doc/manual/configuration/luks-file-systems.section.md b/nixos/doc/manual/configuration/luks-file-systems.section.md
index 7615b95aef42..4d2f625073d4 100644
--- a/nixos/doc/manual/configuration/luks-file-systems.section.md
+++ b/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/nixos/doc/manual/configuration/modularity.section.md b/nixos/doc/manual/configuration/modularity.section.md
index f4a566d66973..ba3bc79a3631 100644
--- a/nixos/doc/manual/configuration/modularity.section.md
+++ b/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/nixos/doc/manual/configuration/network-manager.section.md b/nixos/doc/manual/configuration/network-manager.section.md
index 4bda21d34a10..8e8dfabbf3cd 100644
--- a/nixos/doc/manual/configuration/network-manager.section.md
+++ b/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/nixos/doc/manual/configuration/overlayfs.section.md b/nixos/doc/manual/configuration/overlayfs.section.md
index 592fb7c2e6f7..7027a6f426d4 100644
--- a/nixos/doc/manual/configuration/overlayfs.section.md
+++ b/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/nixos/doc/manual/configuration/profiles.chapter.md b/nixos/doc/manual/configuration/profiles.chapter.md
index 9f6c11b0d59d..6161d48e353f 100644
--- a/nixos/doc/manual/configuration/profiles.chapter.md
+++ b/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/nixos/doc/manual/configuration/profiles/demo.section.md b/nixos/doc/manual/configuration/profiles/demo.section.md
index 0a0df483c123..720fc101dc18 100644
--- a/nixos/doc/manual/configuration/profiles/demo.section.md
+++ b/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/nixos/doc/manual/configuration/profiles/graphical.section.md b/nixos/doc/manual/configuration/profiles/graphical.section.md
index aaea5c8c0288..84fad5c0a612 100644
--- a/nixos/doc/manual/configuration/profiles/graphical.section.md
+++ b/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
+and [](#opt-services.libinput.enable) to true. It also
includes glxinfo and firefox in the system packages list.
diff --git a/nixos/doc/manual/configuration/renaming-interfaces.section.md b/nixos/doc/manual/configuration/renaming-interfaces.section.md
index 5b515e9f82a0..4804e35f8a24 100644
--- a/nixos/doc/manual/configuration/renaming-interfaces.section.md
+++ b/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/nixos/doc/manual/configuration/ssh.section.md b/nixos/doc/manual/configuration/ssh.section.md
index 9e239a848178..8754e3d9ccaf 100644
--- a/nixos/doc/manual/configuration/ssh.section.md
+++ b/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/nixos/doc/manual/configuration/sshfs-file-systems.section.md b/nixos/doc/manual/configuration/sshfs-file-systems.section.md
index e2e37454b7ea..32b4aac78304 100644
--- a/nixos/doc/manual/configuration/sshfs-file-systems.section.md
+++ b/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/nixos/doc/manual/configuration/subversion.chapter.md b/nixos/doc/manual/configuration/subversion.chapter.md
index ff870f5c40b9..2436138669fe 100644
--- a/nixos/doc/manual/configuration/subversion.chapter.md
+++ b/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/nixos/doc/manual/configuration/user-mgmt.chapter.md b/nixos/doc/manual/configuration/user-mgmt.chapter.md
index 71d61ce4c641..7d83121d41e0 100644
--- a/nixos/doc/manual/configuration/user-mgmt.chapter.md
+++ b/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/nixos/doc/manual/configuration/wayland.chapter.md b/nixos/doc/manual/configuration/wayland.chapter.md
index 0f195bd66567..27c027d38514 100644
--- a/nixos/doc/manual/configuration/wayland.chapter.md
+++ b/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/nixos/doc/manual/configuration/wireless.section.md b/nixos/doc/manual/configuration/wireless.section.md
index 3299d2d7ecb8..df828698cf03 100644
--- a/nixos/doc/manual/configuration/wireless.section.md
+++ b/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/nixos/doc/manual/configuration/x-windows.chapter.md b/nixos/doc/manual/configuration/x-windows.chapter.md
index bf1872ae01ac..31752330dd9a 100644
--- a/nixos/doc/manual/configuration/x-windows.chapter.md
+++ b/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,17 +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 = [ "nvidiaLegacy470" ];
-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
@@ -168,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
@@ -180,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.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.libinput.touchpad.tapping = false;
+}
```
Note: the use of `services.xserver.synaptics` is deprecated since NixOS
@@ -200,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}
@@ -219,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
@@ -236,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}
@@ -277,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;
@@ -287,7 +321,7 @@ xkb_keycodes "media"
Now use the newly define keycodes in `media-sym`:
-```nix
+```
xkb_symbols "media"
{
key.type = "ONE_LEVEL";
@@ -299,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}
@@ -320,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/nixos/doc/manual/configuration/xfce.chapter.md b/nixos/doc/manual/configuration/xfce.chapter.md
index 9ec4a51d6e35..302cf9fa093d 100644
--- a/nixos/doc/manual/configuration/xfce.chapter.md
+++ b/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/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix
index 5f51bb53ad7f..558fec4cab92 100644
--- a/nixos/doc/manual/default.nix
+++ b/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"];
}
@@ -114,8 +122,8 @@ in rec {
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 highlightjs/mono-blue.css \
--script ./highlightjs/highlight.pack.js \
@@ -147,7 +155,7 @@ in rec {
xml:id="book-nixos-manual">
NixOS Manual
- Version ${lib.version}
+ Version ${pkgs.lib.version}
Temporarily unavailable
@@ -199,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/nixos/doc/manual/development/activation-script.section.md b/nixos/doc/manual/development/activation-script.section.md
index cc317a6a01aa..f771c3524b79 100644
--- a/nixos/doc/manual/development/activation-script.section.md
+++ b/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/nixos/doc/manual/development/assertions.section.md b/nixos/doc/manual/development/assertions.section.md
index cc6d81e56990..eb5158c90f98 100644
--- a/nixos/doc/manual/development/assertions.section.md
+++ b/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/nixos/doc/manual/development/etc-overlay.section.md b/nixos/doc/manual/development/etc-overlay.section.md
index e6f6d8d4ca1e..d8588f508a26 100644
--- a/nixos/doc/manual/development/etc-overlay.section.md
+++ b/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/nixos/doc/manual/development/meta-attributes.section.md b/nixos/doc/manual/development/meta-attributes.section.md
index 33b41fe74d29..b2ad23e58b94 100644
--- a/nixos/doc/manual/development/meta-attributes.section.md
+++ b/nixos/doc/manual/development/meta-attributes.section.md
@@ -14,11 +14,11 @@ file.
{ config, lib, pkgs, ... }:
{
options = {
- ...
+ # ...
};
config = {
- ...
+ # ...
};
meta = {
diff --git a/nixos/doc/manual/development/non-switchable-systems.section.md b/nixos/doc/manual/development/non-switchable-systems.section.md
index 87bb46c78909..a51e8233f30b 100644
--- a/nixos/doc/manual/development/non-switchable-systems.section.md
+++ b/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/nixos/doc/manual/development/option-declarations.section.md b/nixos/doc/manual/development/option-declarations.section.md
index 762070416187..325f4d11cb08 100644
--- a/nixos/doc/manual/development/option-declarations.section.md
+++ b/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/nixos/doc/manual/development/option-def.section.md b/nixos/doc/manual/development/option-def.section.md
index 6a3dc26b99be..227f41d812ff 100644
--- a/nixos/doc/manual/development/option-def.section.md
+++ b/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/nixos/doc/manual/development/option-types.section.md b/nixos/doc/manual/development/option-types.section.md
index 04edf99e70b0..b44a84553b37 100644
--- a/nixos/doc/manual/development/option-types.section.md
+++ b/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/nixos/doc/manual/development/settings-options.section.md b/nixos/doc/manual/development/settings-options.section.md
index 71ec9bbc8892..806eee563790 100644
--- a/nixos/doc/manual/development/settings-options.section.md
+++ b/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/nixos/doc/manual/development/unit-handling.section.md b/nixos/doc/manual/development/unit-handling.section.md
index d5ba6a9529d0..1f6a30d6ef34 100644
--- a/nixos/doc/manual/development/unit-handling.section.md
+++ b/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/nixos/doc/manual/development/writing-modules.chapter.md b/nixos/doc/manual/development/writing-modules.chapter.md
index 20157a21e890..67a5cc23a6aa 100644
--- a/nixos/doc/manual/development/writing-modules.chapter.md
+++ b/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
};
}
```
diff --git a/nixos/doc/manual/development/writing-nixos-tests.section.md b/nixos/doc/manual/development/writing-nixos-tests.section.md
index 50886376c240..3ce12f41c60f 100644
--- a/nixos/doc/manual/development/writing-nixos-tests.section.md
+++ b/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…
};
}
```
diff --git a/nixos/doc/manual/installation/building-images-via-systemd-repart.chapter.md b/nixos/doc/manual/installation/building-images-via-systemd-repart.chapter.md
index 10bee156d113..5a552a54f531 100644
--- a/nixos/doc/manual/installation/building-images-via-systemd-repart.chapter.md
+++ b/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/nixos/doc/manual/installation/changing-config.chapter.md b/nixos/doc/manual/installation/changing-config.chapter.md
index 9e56b15a880f..07a0074d17e7 100644
--- a/nixos/doc/manual/installation/changing-config.chapter.md
+++ b/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/nixos/doc/manual/installation/installing-behind-a-proxy.section.md b/nixos/doc/manual/installation/installing-behind-a-proxy.section.md
index aca151531d0f..691f9c9ccf6d 100644
--- a/nixos/doc/manual/installation/installing-behind-a-proxy.section.md
+++ b/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/nixos/doc/manual/installation/installing-from-other-distro.section.md b/nixos/doc/manual/installation/installing-from-other-distro.section.md
index 921592fe5357..10ac2be4e161 100644
--- a/nixos/doc/manual/installation/installing-from-other-distro.section.md
+++ b/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/nixos/doc/manual/installation/installing-virtualbox-guest.section.md b/nixos/doc/manual/installation/installing-virtualbox-guest.section.md
index 004838e586be..4b9ae0a9c55f 100644
--- a/nixos/doc/manual/installation/installing-virtualbox-guest.section.md
+++ b/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/nixos/doc/manual/installation/installing.chapter.md b/nixos/doc/manual/installation/installing.chapter.md
index c7deb07352f1..b6db40878ba7 100644
--- a/nixos/doc/manual/installation/installing.chapter.md
+++ b/nixos/doc/manual/installation/installing.chapter.md
@@ -376,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
@@ -572,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/nixos/doc/manual/installation/upgrading.chapter.md b/nixos/doc/manual/installation/upgrading.chapter.md
index 79cd4e55be5c..09338bf8723d 100644
--- a/nixos/doc/manual/installation/upgrading.chapter.md
+++ b/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/nixos/doc/manual/release-notes/rl-1509.section.md b/nixos/doc/manual/release-notes/rl-1509.section.md
index f47d13008185..c2ac89a09518 100644
--- a/nixos/doc/manual/release-notes/rl-1509.section.md
+++ b/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/nixos/doc/manual/release-notes/rl-1703.section.md b/nixos/doc/manual/release-notes/rl-1703.section.md
index b82c41e28ca3..e20d84d306e8 100644
--- a/nixos/doc/manual/release-notes/rl-1703.section.md
+++ b/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/nixos/doc/manual/release-notes/rl-1909.section.md b/nixos/doc/manual/release-notes/rl-1909.section.md
index 2bd04f8dd40a..49fc98c313ac 100644
--- a/nixos/doc/manual/release-notes/rl-1909.section.md
+++ b/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/nixos/doc/manual/release-notes/rl-2009.section.md b/nixos/doc/manual/release-notes/rl-2009.section.md
index eac02a8ff445..900c20dbe717 100644
--- a/nixos/doc/manual/release-notes/rl-2009.section.md
+++ b/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/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md
index 6f5a807f478a..3a2c70fb7a31 100644
--- a/nixos/doc/manual/release-notes/rl-2205.section.md
+++ b/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/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md
index 1c73d0c9790d..77cb6c9baadb 100644
--- a/nixos/doc/manual/release-notes/rl-2211.section.md
+++ b/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/nixos/doc/manual/release-notes/rl-2305.section.md b/nixos/doc/manual/release-notes/rl-2305.section.md
index 21c798b3b4a4..f5d1d3016a78 100644
--- a/nixos/doc/manual/release-notes/rl-2305.section.md
+++ b/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/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md
index 1aef1828908f..d837e0ff68b7 100644
--- a/nixos/doc/manual/release-notes/rl-2311.section.md
+++ b/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/nixos/doc/manual/release-notes/rl-2405.section.md b/nixos/doc/manual/release-notes/rl-2405.section.md
index 6ed47c4ba969..cbbfb346dfb8 100644
--- a/nixos/doc/manual/release-notes/rl-2405.section.md
+++ b/nixos/doc/manual/release-notes/rl-2405.section.md
@@ -32,14 +32,21 @@ 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.
-- 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. `hardware.nvidia-container-toolkit.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.
-- `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.
-
-- A new option `system.etc.overlay.enable` was added. If enabled, `/etc` is
+- `system.etc.overlay.enable` option 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.
@@ -52,53 +59,88 @@ In addition to numerous new and upgraded packages, this release has the followin
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), a rule-based proxy in Go. Available as [services.mihomo.enable](#opt-services.mihomo.enable).
+- [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).
@@ -107,36 +149,87 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- [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).
+
+- [inadyn](https://github.com/troglobit/inadyn), a Dynamic DNS client with built-in support for multiple providers. Available as [services.inadyn](#opt-services.inadyn.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).
+
+- [isolate](https://github.com/ioi/isolate), a sandbox for securely executing untrusted programs. Available as [security.isolate](#opt-security.isolate.enable).
+
## Backward Incompatibilities {#sec-release-24.05-incompatibilities}
- `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.3`, which introduces breaking changes. Check out the [release note](https://github.com/soywod/himalaya/releases/tag/v1.0.0-beta.3) for details.
+- `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.
+
+- `security.pam.enableSSHAgentAuth` was replaced by the `sshAgentAuth` attrset, and **only**
+ `authorized_keys` files listed in [`sshAgentAuth.authorizedKeysFiles`] are trusted,
+ defaulting to `/etc/ssh/authorized_keys.d/%u`.
+ ::: {.warning}
+ Users of {manpage}`pam_ssh_agent_auth(8)` must take care that the pubkeys they use (for instance with `sudo`)
+ are listed in [`sshAgentAuth.authorizedKeysFiles`]..
+ :::
+ ::: {.note}
+ Previously, all `services.openssh.authorizedKeysFiles` were trusted, including `~/.ssh/authorized_keys`,
+ which results in an **insecure** configuration; see [#31611](https://github.com/NixOS/nixpkgs/issues/31611).
+ :::
+
+[`sshAgentAuth.authorizedKeysFiles`]: #opt-security.pam.sshAgentAuth.authorizedKeysFiles
- 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.
+
+- `appimageTools.wrapAppImage` now create the binary at `$out/bin/${pname}` rather than `$out/bin/${pname}-${version}`, which will break downstream workarounds.
+
- `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
@@ -158,34 +251,57 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `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/)
+- `neo4j` has been updated to version 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.
- `services.aria2.rpcSecret` has been replaced with `services.aria2.rpcSecretFile`.
This was done so that secrets aren't stored in the world-readable nix store.
- To migrate, you will have create a file with the same exact string, and change
+ To migrate, you will have to create a file with the same exact string, and change
your module options to point to that file. For example, `services.aria2.rpcSecret =
"mysecret"` becomes `services.aria2.rpcSecretFile = "/path/to/secret_file"`
where the file `secret_file` contains the string `mysecret`.
-- 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)
+- `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. However, for the time being it is possible to restore DSA key support using `override` to set `dsaKeysSupport = true`.
+
+- `buildGoModule` now throws an error when `vendorHash` is not specified. `vendorSha256`, deprecated in Nixpkgs 23.11, is now ignored and is no longer a `vendorHash` alias.
+
+- `services.invidious.settings.db.user`, the default database username has changed 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`.
+- `paperless`' `services.paperless.extraConfig` setting has been removed and converted to the free-form type and option named `services.paperless.settings`.
-- `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.
+- `davfs2`' `services.davfs2.extraConfig` setting has been deprecated and converted to the free-form type option named `services.davfs2.settings` according to RFC42.
+
+- `services.homepage-dashboard` now takes its 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.
+- `network-interfaces.target` system target was removed as it has been deprecated for a long time. Use `network.target` instead.
+
+- `services.redis.vmOverCommit` now defaults to `true` and no longer enforces Transparent Hugepages (THP) to be disabled. Redis only works with THP configured to `madvise` which is the kernel's default.
+
+- `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`.
@@ -197,36 +313,43 @@ 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.
-- The `services.vikunja` systemd service now uses `vikunja` as dynamic user instead of `vikunja-api`. Database users might need to be changed.
+- `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.setupNginx` setting has been removed. Users now need to setup the webserver configuration on their own with a proxy pass to the vikunja service.
+- `services.vikunja` systemd service now uses `vikunja` as dynamic user instead of `vikunja-api`. Database users might need to be changed.
-- The `woodpecker-*` packages have been updated to v2 which includes [breaking changes](https://woodpecker-ci.org/docs/next/migrations#200).
+- `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.
+
+- `services.vmagent` module deprecates `dataDir`, `group` and `user` setting in favor of systemd provided CacheDirectory and DynamicUser.
+
+- `services.vmagent.remoteWriteUrl` setting has been renamed to `services.vmagent.remoteWrite.url` and now defaults to `null`.
+
+- `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.
+- `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.
-- The `kanata` package has been updated to v1.5.0, which includes [breaking changes](https://github.com/jtroo/kanata/releases/tag/v1.5.0).
+- `kanata` package has been updated to v1.5.0, which includes [breaking changes](https://github.com/jtroo/kanata/releases/tag/v1.5.0).
-- The `craftos-pc` package has been updated to v2.8, which includes [breaking changes](https://github.com/MCJack123/craftos2/releases/tag/v2.8).
+- `craftos-pc` package has been updated to v2.8, which includes [breaking changes](https://github.com/MCJack123/craftos2/releases/tag/v2.8).
- Files are now handled in binary mode; this could break programs with embedded UTF-8 characters.
- The ROM was updated to match ComputerCraft version v1.109.2.
- The bundled Lua was updated to Lua v5.2, which includes breaking changes. See the [Lua manual](https://www.lua.org/manual/5.2/manual.html#8) for more information.
- The WebSocket API [was rewritten](https://github.com/MCJack123/craftos2/issues/337), which introduced breaking changes.
-- The `gtest` package has been updated past v1.13.0, which requires C++14 or higher.
+- `gtest` package has been updated past v1.13.0, which requires C++14 or higher.
- The latest available version of Nextcloud is v28 (available as `pkgs.nextcloud28`). The installation logic is as follows:
- If [`services.nextcloud.package`](#opt-services.nextcloud.package) is specified explicitly, this package will be installed (**recommended**)
@@ -236,17 +359,35 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- The vendored third party libraries have been mostly removed from `cudaPackages.nsight_systems`, which we now only ship for `cudaPackages_11_8` and later due to outdated dependencies. Users comfortable with the vendored dependencies may use `overrideAttrs` to amend the `postPatch` phase and the `meta.broken` correspondingly. Alternatively, one could package the deprecated `boost170` locally, as required for `cudaPackages_11_4.nsight_systems`.
-- The `cudaPackages` package scope has been updated to `cudaPackages_12`.
+- `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`.
+
+- `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.
+- Paths provided as `restartTriggers` and `reloadTriggers` for systemd units will now be copied into the nix store to make the behavior consistent.
+ Previously, `restartTriggers = [ ./config.txt ]`, if defined in a flake, would trigger a restart when any part of the flake changed; and if not defined in a flake, would never trigger a restart even if the contents of `config.txt` changed.
+
- `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).
+- `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).
- `services.zope2` has been removed as `zope2` is unmaintained and was relying on Python2.
@@ -263,6 +404,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.
@@ -276,14 +421,18 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
upgrade NetBox by changing `services.netbox.package`. Database migrations
will be run automatically.
-- The executable file names for `firefox-devedition`, `firefox-beta`, `firefox-esr` now matches their package names, which is consistent with the `firefox-*-bin` packages. The desktop entries are also updated so that you can have multiple editions of firefox in your app launcher.
+- `gauge` now supports installing plugins using nix. For the old imperative approach, switch to `gauge-unwrapped`.
+ You can load plugins from an existing gauge manifest file using `gauge.fromManifest ./path/to/manifest.json` or
+ specify plugins in nix using `gauge.withPlugins (p: with p; [ js html-report xml-report ])`.
+
+- `firefox-devedition`, `firefox-beta`, `firefox-esr` executable file names for now match their package names, which is consistent with the `firefox-*-bin` packages. The desktop entries are also updated so that you can have multiple editions of firefox in your app launcher.
- switch-to-configuration does not directly call systemd-tmpfiles anymore.
Instead, the new artificial sysinit-reactivation.target is introduced which
allows to restart multiple services that are ordered before sysinit.target
and respect the ordering between the services.
-- The `systemd.oomd` module behavior is changed as:
+- `systemd.oomd` module behavior is changed as:
- Raise ManagedOOMMemoryPressureLimit from 50% to 80%. This should make systemd-oomd kill things less often, and fix issues like [this](https://pagure.io/fedora-workstation/issue/358).
Reference: [commit](https://src.fedoraproject.org/rpms/systemd/c/806c95e1c70af18f81d499b24cd7acfa4c36ffd6?branch=806c95e1c70af18f81d499b24cd7acfa4c36ffd6)
@@ -303,7 +452,7 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- [watchdogd](https://troglobit.com/projects/watchdogd/), a system and process supervisor using watchdog timers. Available as [services.watchdogd](#opt-services.watchdogd.enable).
-- The `jdt-language-server` package now uses upstream's provided python wrapper instead of our own custom wrapper. This results in the following breaking and notable changes:
+- `jdt-language-server` package now uses upstream's provided python wrapper instead of our own custom wrapper. This results in the following breaking and notable changes:
- The main binary for the package is now named `jdtls` instead of `jdt-language-server`, equivalent to what most editors expect the binary to be named.
@@ -317,27 +466,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.
-- The `livebook` package is now built as a `mix release` instead of an `escript`.
+- 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.
+
+- `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.
+- `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.
+
+- `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))
+
+- `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 and could potentially [affect Xorg sessions](https://blog.linuxmint.com/?p=4639). We suggest a reboot when switching between sessions.
+- `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.
+- (TODO awaiting feedback on code-casing package names) 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).
+- `services.xserver.desktopManager.budgie` installs `gnome.gnome-terminal` by default (instead of `mate.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.
@@ -346,14 +512,21 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `services.postgresql.extraPlugins` changed its type from just a list of packages to also a function that returns such a list.
For example a config line like ``services.postgresql.extraPlugins = with pkgs.postgresql_11.pkgs; [ postgis ];`` is recommended to be changed to ``services.postgresql.extraPlugins = ps: with ps; [ postgis ];``;
-- 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.
+- [`matrix-synapse`](https://element-hq.github.io/synapse/) homeserver 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.
+- `boot.initrd.network.ssh.authorizedKeyFiles` is a new option in the initrd ssh daemon module, for adding authorized keys via list of files.
+
+- `appimage`, `appimageTools.wrapAppImage` and `buildFHSEnvBubblewrap` now properly accepts `pname` and `version`.
+
- 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.
-- [Portunus](https://github.com/majewsky/portunus) has been updated to major version 2.
+- [TODO: reword to place an attribute at the front] 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.
Support for weak password hashes will be removed in NixOS 24.11.
@@ -362,9 +535,11 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `libass` now uses the native CoreText backend on Darwin, which may fix subtitle rendering issues with `mpv`, `ffmpeg`, etc.
-- [Lilypond](https://lilypond.org/index.html) and [Denemo](https://www.denemo.org) are now compiled with Guile 3.0.
+- [`lilypond`](https://lilypond.org/index.html) and [`denemo`](https://www.denemo.org) are now compiled with Guile 3.0.
-- The EC2 image module now enables the [Amazon SSM Agent](https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-agent.html) by default.
+- `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.
+
+- [TODO: reword to place an attribute at the front] 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),
@@ -376,7 +551,7 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `extraTrustedDomains` -> [`trusted_domains`](#opt-services.nextcloud.settings.trusted_domains) and
- `trustedProxies` -> [`trusted_proxies`](#opt-services.nextcloud.settings.trusted_proxies).
-- The option [`services.nextcloud.config.dbport`] of the Nextcloud module was removed to match upstream.
+- `services.nextcloud.config.dbport` option of the Nextcloud module was removed to match upstream.
The port can be specified in [`services.nextcloud.config.dbhost`](#opt-services.nextcloud.config.dbhost).
- A new abstraction to create both read-only as well as writable overlay file
@@ -384,7 +559,7 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
[fileSystems.overlay](#opt-fileSystems._name_.overlay.lowerdir). See also the
[NixOS docs](#sec-overlayfs).
-- systemd units can now specify the `Upholds=` and `UpheldBy=` unit dependencies via the aptly
+- `systemd` units can now specify the `Upholds=` and `UpheldBy=` unit dependencies via the aptly
named `upholds` and `upheldBy` options. These options get systemd to enforce that the
dependencies remain continuosly running for as long as the dependent unit is in a running state.
@@ -397,71 +572,88 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- 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.
-- With a bump to `sonarr` v4, existing config database files will be upgraded automatically, but note that some old apparently-working configs [might actually be corrupt and fail to upgrade cleanly](https://forums.sonarr.tv/t/sonarr-v4-released/33089).
+- `sonarr` version bumped to from 3.0.10 to 4.0.3. Consequently existing config database files will be upgraded automatically, but note that some old apparently-working configs [might actually be corrupt and fail to upgrade cleanly](https://forums.sonarr.tv/t/sonarr-v4-released/33089).
-- The Yama LSM is now enabled by default in the kernel, which prevents ptracing
+- [TODO: reword to place an attribute at the front] The Yama LSM is now enabled by default in the kernel, which prevents ptracing
non-child processes. This means you will not be able to attach gdb to an
existing process, but will need to start that process from gdb (so it is a
child). Or you can set `boot.kernel.sysctl."kernel.yama.ptrace_scope"` to 0.
-- The netbird module now allows running multiple tunnels in parallel through [`services.netbird.tunnels`](#opt-services.netbird.tunnels).
+- `netbird` module now allows running multiple tunnels in parallel through [`services.netbird.tunnels`](#opt-services.netbird.tunnels).
- [Nginx virtual hosts](#opt-services.nginx.virtualHosts) using `forceSSL` or
- `globalRedirect` can now have redirect codes other than 301 through
+ `globalRedirect` can now have redirect codes other than 301 through `redirectCode`.
- `bacula` now allows to configure `TLS` for encrypted communication.
- `redirectCode`.
+- `libjxl` version bumped from 0.8.2 to 0.9.1 [dropped support for the butteraugli API](https://github.com/libjxl/libjxl/pull/2576). You will no longer be able to set `enableButteraugli` on `libaom`.
-- `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`.
-
-- The source of the `mockgen` package has changed to the [go.uber.org/mock](https://github.com/uber-go/mock) fork because [the original repository is no longer maintained](https://github.com/golang/mock#gomock).
-
-- `security.pam.enableSSHAgentAuth` was renamed to `security.pam.sshAgentAuth.enable` and an `authorizedKeysFiles`
- option was added, to control which `authorized_keys` files are trusted. It defaults to the previous behaviour,
- **which is insecure**: see [#31611](https://github.com/NixOS/nixpkgs/issues/31611).
+- `mockgen` package source has changed to the [go.uber.org/mock](https://github.com/uber-go/mock) fork because [the original repository is no longer maintained](https://github.com/golang/mock#gomock).
- [](#opt-boot.kernel.sysctl._net.core.wmem_max_) changed from a string to an integer because of the addition of a custom merge option (taking the highest value defined to avoid conflicts between 2 services trying to set that value), just as [](#opt-boot.kernel.sysctl._net.core.rmem_max_) since 22.11.
-- A new top-level package set, `pkgsExtraHardening` is added. This is a set of packages built with stricter hardening flags - those that have not yet received enough testing to be applied universally, those that are more likely to cause build failures or those that have drawbacks to their use (e.g. performance or required hardware features).
+- [TODO: reword to place an attribute at the front] A new top-level package set, `pkgsExtraHardening` is added. This is a set of packages built with stricter hardening flags - those that have not yet received enough testing to be applied universally, those that are more likely to cause build failures or those that have drawbacks to their use (e.g. performance or required hardware features).
- `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.
-- 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.kavita` now uses the free-form 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.
-- Gitea 1.21 upgrade has several breaking changes, including:
+- `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.
+
+- `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` upgrade to 1.21 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.
-- The `services.paperless` module no longer uses the previously downloaded NLTK data stored in `/var/cache/paperless/nltk`. This directory can be removed.
+- `services.paperless` module no longer uses the previously downloaded NLTK data stored in `/var/cache/paperless/nltk`. This directory can be removed.
-- The `services.teeworlds` module now has a wealth of configuration options, including a new `package` option.
+- `services.teeworlds` module now has a wealth of configuration options, including a new `package` option.
-- 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).
+- `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 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.
+- `services.networkmanager.extraConfig` was renamed to `services.networkmanager.settings` and was changed to use the ini type instead of using a multiline string.
-- The `btrbk` module now automatically selects and provides required compression
+- `services.github-runner` module has been removed. To configure a single GitHub Actions Runner refer to `services.github-runners.*`. Note that this will trigger a new runner registration.
+
+- `services.slskd` has been refactored to include more configuation options in
+ the free-form `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.
+
+- `services.btrbk` 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
deprecated in future releases.
-- The `mpich` package expression now requires `withPm` to be a list, e.g. `"hydra:gforker"` becomes `[ "hydra" "gforker" ]`.
+- `mpich` package expression now requires `withPm` to be a list, e.g. `"hydra:gforker"` becomes `[ "hydra" "gforker" ]`.
-- When merging systemd unit options (of type `unitOption`),
+- `systemd`: when merging unit options (of type `unitOption`),
if at least one definition is a list, all those which aren't are now lifted into a list,
making it possible to accumulate definitions without resorting to `mkForce`,
hence to retain the definitions not anticipating that need.
-- YouTrack is bumped to 2023.3. The update is not performed automatically, it requires manual interaction. See the YouTrack section in the manual for details.
+- `youtrack` is bumped to 2023.3. The update is not performed automatically, it requires manual interaction. See the YouTrack section in the manual for details.
- 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's c++ version is now available as `oils-for-unix`. The python version is still available as `oil`
+- `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.
+
+- [TODO: reword to place an attribute at the front] 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.
+
+- `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/nixos/lib/make-options-doc/default.nix b/nixos/lib/make-options-doc/default.nix
index 09a4022845e0..17e03baf3bb7 100644
--- a/nixos/lib/make-options-doc/default.nix
+++ b/nixos/lib/make-options-doc/default.nix
@@ -117,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
}:
@@ -232,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/nixos/lib/qemu-common.nix b/nixos/lib/qemu-common.nix
index b946f62d93dc..f1e19c5b3b72 100644
--- a/nixos/lib/qemu-common.nix
+++ b/nixos/lib/qemu-common.nix
@@ -35,6 +35,8 @@ rec {
aarch64-linux = "${qemuPkg}/bin/qemu-system-aarch64 -machine virt,gic-version=max,accel=kvm:tcg -cpu max";
powerpc64le-linux = "${qemuPkg}/bin/qemu-system-ppc64 -machine powernv";
powerpc64-linux = "${qemuPkg}/bin/qemu-system-ppc64 -machine powernv";
+ riscv32-linux = "${qemuPkg}/bin/qemu-system-riscv32 -machine virt";
+ riscv64-linux = "${qemuPkg}/bin/qemu-system-riscv64 -machine virt";
x86_64-darwin = "${qemuPkg}/bin/qemu-kvm -cpu max";
};
otherHostGuestMatrix = {
diff --git a/nixos/lib/systemd-lib.nix b/nixos/lib/systemd-lib.nix
index c00b2d0f207c..eef49f8c4ef3 100644
--- a/nixos/lib/systemd-lib.nix
+++ b/nixos/lib/systemd-lib.nix
@@ -1,8 +1,50 @@
-{ config, lib, pkgs }:
-
-with lib;
+{ config, lib, pkgs, utils }:
let
+ inherit (lib)
+ all
+ attrByPath
+ attrNames
+ concatLists
+ concatMap
+ concatMapStrings
+ concatStrings
+ concatStringsSep
+ const
+ elem
+ filter
+ filterAttrs
+ flatten
+ flip
+ head
+ isInt
+ isList
+ isPath
+ length
+ makeBinPath
+ makeSearchPathOutput
+ mapAttrs
+ mapAttrsToList
+ mkAfter
+ mkIf
+ optional
+ optionalAttrs
+ optionalString
+ pipe
+ 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 +52,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)";
@@ -109,6 +151,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}";
@@ -133,7 +179,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"
@@ -220,7 +266,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
@@ -243,7 +289,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
@@ -323,9 +369,17 @@ in rec {
// optionalAttrs (config.requisite != [])
{ Requisite = toString config.requisite; }
// optionalAttrs (config ? restartTriggers && config.restartTriggers != [])
- { X-Restart-Triggers = "${pkgs.writeText "X-Restart-Triggers-${name}" (toString config.restartTriggers)}"; }
+ { X-Restart-Triggers = "${pkgs.writeText "X-Restart-Triggers-${name}" (pipe config.restartTriggers [
+ flatten
+ (map (x: if isPath x then "${x}" else x))
+ toString
+ ])}"; }
// optionalAttrs (config ? reloadTriggers && config.reloadTriggers != [])
- { X-Reload-Triggers = "${pkgs.writeText "X-Reload-Triggers-${name}" (toString config.reloadTriggers)}"; }
+ { X-Reload-Triggers = "${pkgs.writeText "X-Reload-Triggers-${name}" (pipe config.reloadTriggers [
+ flatten
+ (map (x: if isPath x then "${x}" else x))
+ toString
+ ])}"; }
// optionalAttrs (config.description != "") {
Description = config.description; }
// optionalAttrs (config.documentation != []) {
@@ -342,8 +396,41 @@ in rec {
};
};
- serviceConfig = { config, ... }: {
- config.environment.PATH = mkIf (config.path != []) "${makeBinPath config.path}:${makeSearchPathOutput "bin" "sbin" config.path}";
+ serviceConfig = { name, config, ... }: {
+ config = {
+ name = "${name}.service";
+ environment.PATH = mkIf (config.path != []) "${makeBinPath config.path}:${makeSearchPathOutput "bin" "sbin" config.path}";
+ };
+ };
+
+ pathConfig = { name, config, ... }: {
+ config = {
+ name = "${name}.path";
+ };
+ };
+
+ socketConfig = { name, config, ... }: {
+ config = {
+ name = "${name}.socket";
+ };
+ };
+
+ sliceConfig = { name, config, ... }: {
+ config = {
+ name = "${name}.slice";
+ };
+ };
+
+ targetConfig = { name, config, ... }: {
+ config = {
+ name = "${name}.target";
+ };
+ };
+
+ timerConfig = { name, config, ... }: {
+ config = {
+ name = "${name}.timer";
+ };
};
stage2ServiceConfig = {
@@ -362,6 +449,7 @@ in rec {
mountConfig = { config, ... }: {
config = {
+ name = "${utils.escapeSystemdPath config.where}.mount";
mountConfig =
{ What = config.what;
Where = config.where;
@@ -375,6 +463,7 @@ in rec {
automountConfig = { config, ... }: {
config = {
+ name = "${utils.escapeSystemdPath config.where}.automount";
automountConfig =
{ Where = config.where;
};
@@ -384,14 +473,14 @@ in rec {
commonUnitText = def: lines: ''
[Unit]
${attrsToSection def.unitConfig}
- '' + lines + lib.optionalString (def.wantedBy != [ ]) ''
+ '' + lines + optionalString (def.wantedBy != [ ]) ''
[Install]
WantedBy=${concatStringsSep " " def.wantedBy}
'';
- targetToUnit = name: def:
- { inherit (def) aliases wantedBy requiredBy upheldBy enable overrideStrategy;
+ targetToUnit = def:
+ { inherit (def) name aliases wantedBy requiredBy upheldBy enable overrideStrategy;
text =
''
[Unit]
@@ -399,17 +488,17 @@ in rec {
'';
};
- serviceToUnit = name: def:
- { inherit (def) aliases wantedBy requiredBy upheldBy enable overrideStrategy;
+ serviceToUnit = def:
+ { inherit (def) name aliases wantedBy requiredBy upheldBy enable overrideStrategy;
text = commonUnitText def (''
[Service]
'' + (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))
+ in if stringLength s >= 1048576 then throw "The value of the environment variable ‘${n}’ in systemd service ‘${def.name}.service’ is too long." else s) (attrNames env))
+ (if def ? reloadIfChanged && def.reloadIfChanged then ''
X-ReloadIfChanged=true
'' else if (def ? restartIfChanged && !def.restartIfChanged) then ''
@@ -420,8 +509,8 @@ in rec {
'' + attrsToSection def.serviceConfig);
};
- socketToUnit = name: def:
- { inherit (def) aliases wantedBy requiredBy upheldBy enable overrideStrategy;
+ socketToUnit = def:
+ { inherit (def) name aliases wantedBy requiredBy upheldBy enable overrideStrategy;
text = commonUnitText def ''
[Socket]
${attrsToSection def.socketConfig}
@@ -430,40 +519,40 @@ in rec {
'';
};
- timerToUnit = name: def:
- { inherit (def) aliases wantedBy requiredBy upheldBy enable overrideStrategy;
+ timerToUnit = def:
+ { inherit (def) name aliases wantedBy requiredBy upheldBy enable overrideStrategy;
text = commonUnitText def ''
[Timer]
${attrsToSection def.timerConfig}
'';
};
- pathToUnit = name: def:
- { inherit (def) aliases wantedBy requiredBy upheldBy enable overrideStrategy;
+ pathToUnit = def:
+ { inherit (def) name aliases wantedBy requiredBy upheldBy enable overrideStrategy;
text = commonUnitText def ''
[Path]
${attrsToSection def.pathConfig}
'';
};
- mountToUnit = name: def:
- { inherit (def) aliases wantedBy requiredBy upheldBy enable overrideStrategy;
+ mountToUnit = def:
+ { inherit (def) name aliases wantedBy requiredBy upheldBy enable overrideStrategy;
text = commonUnitText def ''
[Mount]
${attrsToSection def.mountConfig}
'';
};
- automountToUnit = name: def:
- { inherit (def) aliases wantedBy requiredBy upheldBy enable overrideStrategy;
+ automountToUnit = def:
+ { inherit (def) name aliases wantedBy requiredBy upheldBy enable overrideStrategy;
text = commonUnitText def ''
[Automount]
${attrsToSection def.automountConfig}
'';
};
- sliceToUnit = name: def:
- { inherit (def) aliases wantedBy requiredBy upheldBy enable overrideStrategy;
+ sliceToUnit = def:
+ { inherit (def) name aliases wantedBy requiredBy upheldBy enable overrideStrategy;
text = commonUnitText def ''
[Slice]
${attrsToSection def.sliceConfig}
@@ -475,15 +564,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/nixos/lib/systemd-network-units.nix b/nixos/lib/systemd-network-units.nix
index 1d5f823f3678..ae581495772a 100644
--- a/nixos/lib/systemd-network-units.nix
+++ b/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/nixos/lib/systemd-types.nix b/nixos/lib/systemd-types.nix
index a109f248b170..f3bc8e06d9cb 100644
--- a/nixos/lib/systemd-types.nix
+++ b/nixos/lib/systemd-types.nix
@@ -1,47 +1,98 @@
{ lib, systemdUtils, pkgs }:
-with systemdUtils.lib;
-with systemdUtils.unitOptions;
-with lib;
+let
+ inherit (systemdUtils.lib)
+ automountConfig
+ makeUnit
+ mountConfig
+ pathConfig
+ sliceConfig
+ socketConfig
+ stage1ServiceConfig
+ stage2ServiceConfig
+ targetConfig
+ timerConfig
+ unitConfig
+ ;
-rec {
- units = with types;
- attrsOf (submodule ({ name, config, ... }: {
- options = concreteUnitOptions;
- config = { unit = mkDefault (systemdUtils.lib.makeUnit name config); };
- }));
+ inherit (systemdUtils.unitOptions)
+ concreteUnitOptions
+ stage1AutomountOptions
+ stage1CommonUnitOptions
+ stage1MountOptions
+ stage1PathOptions
+ stage1ServiceOptions
+ stage1SliceOptions
+ stage1SocketOptions
+ stage1TimerOptions
+ stage2AutomountOptions
+ stage2CommonUnitOptions
+ stage2MountOptions
+ stage2PathOptions
+ stage2ServiceOptions
+ stage2SliceOptions
+ stage2SocketOptions
+ stage2TimerOptions
+ ;
- services = with types; attrsOf (submodule [ stage2ServiceOptions unitConfig stage2ServiceConfig ]);
- initrdServices = with types; attrsOf (submodule [ stage1ServiceOptions unitConfig stage1ServiceConfig ]);
+ inherit (lib)
+ mkDefault
+ mkDerivedConfig
+ mkEnableOption
+ mkIf
+ mkOption
+ ;
- targets = with types; attrsOf (submodule [ stage2CommonUnitOptions unitConfig ]);
- initrdTargets = with types; attrsOf (submodule [ stage1CommonUnitOptions unitConfig ]);
+ inherit (lib.types)
+ attrsOf
+ lines
+ listOf
+ nullOr
+ path
+ submodule
+ ;
+in
- sockets = with types; attrsOf (submodule [ stage2SocketOptions unitConfig ]);
- initrdSockets = with types; attrsOf (submodule [ stage1SocketOptions unitConfig ]);
+{
+ units = attrsOf (submodule ({ name, config, ... }: {
+ options = concreteUnitOptions;
+ config = {
+ name = mkDefault name;
+ unit = mkDefault (makeUnit name config);
+ };
+ }));
- timers = with types; attrsOf (submodule [ stage2TimerOptions unitConfig ]);
- initrdTimers = with types; attrsOf (submodule [ stage1TimerOptions unitConfig ]);
+ services = attrsOf (submodule [ stage2ServiceOptions unitConfig stage2ServiceConfig ]);
+ initrdServices = attrsOf (submodule [ stage1ServiceOptions unitConfig stage1ServiceConfig ]);
- paths = with types; attrsOf (submodule [ stage2PathOptions unitConfig ]);
- initrdPaths = with types; attrsOf (submodule [ stage1PathOptions unitConfig ]);
+ targets = attrsOf (submodule [ stage2CommonUnitOptions unitConfig targetConfig ]);
+ initrdTargets = attrsOf (submodule [ stage1CommonUnitOptions unitConfig targetConfig ]);
- slices = with types; attrsOf (submodule [ stage2SliceOptions unitConfig ]);
- initrdSlices = with types; attrsOf (submodule [ stage1SliceOptions unitConfig ]);
+ sockets = attrsOf (submodule [ stage2SocketOptions unitConfig socketConfig]);
+ initrdSockets = attrsOf (submodule [ stage1SocketOptions unitConfig socketConfig ]);
- mounts = with types; listOf (submodule [ stage2MountOptions unitConfig mountConfig ]);
- initrdMounts = with types; listOf (submodule [ stage1MountOptions unitConfig mountConfig ]);
+ timers = attrsOf (submodule [ stage2TimerOptions unitConfig timerConfig ]);
+ initrdTimers = attrsOf (submodule [ stage1TimerOptions unitConfig timerConfig ]);
- automounts = with types; listOf (submodule [ stage2AutomountOptions unitConfig automountConfig ]);
- initrdAutomounts = with types; attrsOf (submodule [ stage1AutomountOptions unitConfig automountConfig ]);
+ paths = attrsOf (submodule [ stage2PathOptions unitConfig pathConfig ]);
+ initrdPaths = attrsOf (submodule [ stage1PathOptions unitConfig pathConfig ]);
- initrdContents = types.attrsOf (types.submodule ({ config, options, name, ... }: {
+ slices = attrsOf (submodule [ stage2SliceOptions unitConfig sliceConfig ]);
+ initrdSlices = attrsOf (submodule [ stage1SliceOptions unitConfig sliceConfig ]);
+
+ mounts = listOf (submodule [ stage2MountOptions unitConfig mountConfig ]);
+ initrdMounts = listOf (submodule [ stage1MountOptions unitConfig mountConfig ]);
+
+ automounts = listOf (submodule [ stage2AutomountOptions unitConfig automountConfig ]);
+ initrdAutomounts = attrsOf (submodule [ stage1AutomountOptions unitConfig automountConfig ]);
+
+ 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 +100,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/nixos/lib/systemd-unit-options.nix b/nixos/lib/systemd-unit-options.nix
index e4953ba72dd9..160f2bf9483a 100644
--- a/nixos/lib/systemd-unit-options.nix
+++ b/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
@@ -42,10 +65,18 @@ in rec {
'';
};
+ name = lib.mkOption {
+ type = lib.types.str;
+ description = ''
+ The name of this systemd unit, including its extension.
+ This can be used to refer to this unit from other systemd units.
+ '';
+ };
+
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 +92,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 +102,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 +111,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 +129,7 @@ in rec {
aliases = mkOption {
default = [];
type = types.listOf unitNameType;
- description = lib.mdDoc "Aliases of that unit.";
+ description = "Aliases of that unit.";
};
};
@@ -108,12 +139,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 +155,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 +176,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 +184,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 +192,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 +201,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 +210,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 +219,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 +228,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 +237,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 +247,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 +257,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 +266,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 +274,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 +283,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 +302,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 +312,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 +330,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 +350,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 +360,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 +376,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 +385,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 +394,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 +403,7 @@ in rec {
preStop = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Shell commands executed to stop the service.
'';
};
@@ -380,7 +411,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 +420,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 +465,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 +474,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 +490,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 +506,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 +533,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 +543,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 +553,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 +585,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 +618,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 +649,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 +665,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 +709,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 +719,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 +750,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/nixos/lib/test-driver/test_driver/machine.py b/nixos/lib/test-driver/test_driver/machine.py
index df8628bce956..652cc600fad5 100644
--- a/nixos/lib/test-driver/test_driver/machine.py
+++ b/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/nixos/lib/testing/driver.nix b/nixos/lib/testing/driver.nix
index b6f01c38191d..7eb06e023918 100644
--- a/nixos/lib/testing/driver.nix
+++ b/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/nixos/lib/testing/interactive.nix b/nixos/lib/testing/interactive.nix
index 317ed4241882..0b1209669282 100644
--- a/nixos/lib/testing/interactive.nix
+++ b/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/nixos/lib/testing/meta.nix b/nixos/lib/testing/meta.nix
index 805b7520edff..bdf313e5b119 100644
--- a/nixos/lib/testing/meta.nix
+++ b/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/nixos/lib/testing/name.nix b/nixos/lib/testing/name.nix
index 0af593169eec..0682873c7bcd 100644
--- a/nixos/lib/testing/name.nix
+++ b/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/nixos/lib/testing/network.nix b/nixos/lib/testing/network.nix
index 1edc9e276530..0f1615a0ad3b 100644
--- a/nixos/lib/testing/network.nix
+++ b/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/nixos/lib/testing/nodes.nix b/nixos/lib/testing/nodes.nix
index 7941d69e38d2..9aecca10ac6b 100644
--- a/nixos/lib/testing/nodes.nix
+++ b/nixos/lib/testing/nodes.nix
@@ -5,7 +5,6 @@ let
literalExpression
literalMD
mapAttrs
- mdDoc
mkDefault
mkIf
mkOption mkForce
@@ -76,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.
@@ -88,7 +87,7 @@ in
};
defaults = mkOption {
- description = mdDoc ''
+ description = ''
NixOS configuration that is applied to all [{option}`nodes`](#test-opt-nodes).
'';
type = types.deferredModule;
@@ -96,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;
@@ -104,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.
@@ -117,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.
@@ -130,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.
@@ -139,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/nixos/lib/testing/run.nix b/nixos/lib/testing/run.nix
index de5a9b97e61d..218292121ee7 100644
--- a/nixos/lib/testing/run.nix
+++ b/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
diff --git a/nixos/lib/testing/testScript.nix b/nixos/lib/testing/testScript.nix
index 5c36d754d79d..09964777bd92 100644
--- a/nixos/lib/testing/testScript.nix
+++ b/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/nixos/lib/utils.nix b/nixos/lib/utils.nix
index 49ba2e5c8386..c1c1828a2c12 100644
--- a/nixos/lib/utils.nix
+++ b/nixos/lib/utils.nix
@@ -1,9 +1,45 @@
-{ lib, config, pkgs }: with lib;
+{ lib, config, pkgs }:
-rec {
+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
+
+let
+utils = 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 +82,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 +98,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 +233,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 +241,7 @@ rec {
".")
+ ''
<<'EOF'
- ${builtins.toJSON set}
+ ${toJSON set}
EOF
(( ! $inherit_errexit_enabled )) && shopt -u inherit_errexit
'';
@@ -222,16 +258,17 @@ 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; };
+ lib = import ./systemd-lib.nix { inherit lib config pkgs utils; };
unitOptions = import ./systemd-unit-options.nix { inherit lib systemdUtils; };
types = import ./systemd-types.nix { inherit lib systemdUtils pkgs; };
network = {
units = import ./systemd-network-units.nix { inherit lib systemdUtils; };
};
};
-}
+};
+in utils
diff --git a/nixos/maintainers/scripts/ec2/amazon-image.nix b/nixos/maintainers/scripts/ec2/amazon-image.nix
index 055d44ba6576..357b86367d98 100644
--- a/nixos/maintainers/scripts/ec2/amazon-image.nix
+++ b/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/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix b/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix
index 60f0535854dd..9799f333aec0 100644
--- a/nixos/maintainers/scripts/openstack/openstack-image-zfs.nix
+++ b/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/nixos/modules/config/appstream.nix b/nixos/modules/config/appstream.nix
index 5b48f6e1705d..1712273eff7d 100644
--- a/nixos/modules/config/appstream.nix
+++ b/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/nixos/modules/config/console.nix b/nixos/modules/config/console.nix
index 0a931c6918f8..5aadc0836fe7 100644
--- a/nixos/modules/config/console.nix
+++ b/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/nixos/modules/config/debug-info.nix b/nixos/modules/config/debug-info.nix
index 78de26fda440..05a2fd2ceeea 100644
--- a/nixos/modules/config/debug-info.nix
+++ b/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/nixos/modules/config/fanout.nix b/nixos/modules/config/fanout.nix
index 60ee145f19af..f775d2e9f22d 100644
--- a/nixos/modules/config/fanout.nix
+++ b/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/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix
index 5e2e054f7c4e..9a9ac08eefeb 100644
--- a/nixos/modules/config/fonts/fontconfig.nix
+++ b/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/nixos/modules/config/fonts/fontdir.nix b/nixos/modules/config/fonts/fontdir.nix
index 3b5eaf5b2d7f..7b21fe30f607 100644
--- a/nixos/modules/config/fonts/fontdir.nix
+++ b/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/nixos/modules/config/fonts/ghostscript.nix b/nixos/modules/config/fonts/ghostscript.nix
index c41fcdaaa329..a5508b948990 100644
--- a/nixos/modules/config/fonts/ghostscript.nix
+++ b/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/nixos/modules/config/fonts/packages.nix b/nixos/modules/config/fonts/packages.nix
index 37b705ecb345..36eaa5791d67 100644
--- a/nixos/modules/config/fonts/packages.nix
+++ b/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/nixos/modules/config/gtk/gtk-icon-cache.nix b/nixos/modules/config/gtk/gtk-icon-cache.nix
index 62f0cc3f090f..0898260d4a59 100644
--- a/nixos/modules/config/gtk/gtk-icon-cache.nix
+++ b/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/nixos/modules/config/i18n.nix b/nixos/modules/config/i18n.nix
index b19d38091e75..9d2d3c23beb3 100644
--- a/nixos/modules/config/i18n.nix
+++ b/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/nixos/modules/config/iproute2.nix b/nixos/modules/config/iproute2.nix
index 0cde57b759be..90f53c0eab69 100644
--- a/nixos/modules/config/iproute2.nix
+++ b/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/nixos/modules/config/ldap.nix b/nixos/modules/config/ldap.nix
index e374e4a7a27e..7f79db8d0a60 100644
--- a/nixos/modules/config/ldap.nix
+++ b/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/nixos/modules/config/ldso.nix b/nixos/modules/config/ldso.nix
index bd6f0dc5a83b..60156dd04098 100644
--- a/nixos/modules/config/ldso.nix
+++ b/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/nixos/modules/config/locale.nix b/nixos/modules/config/locale.nix
index 7716e121c712..486246081ec6 100644
--- a/nixos/modules/config/locale.nix
+++ b/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/nixos/modules/config/malloc.nix b/nixos/modules/config/malloc.nix
index 043f78c8214e..e414970b0be5 100644
--- a/nixos/modules/config/malloc.nix
+++ b/nixos/modules/config/malloc.nix
@@ -9,8 +9,23 @@ let
graphene-hardened = {
libPath = "${pkgs.graphene-hardened-malloc}/lib/libhardened_malloc.so";
description = ''
- An allocator designed to mitigate memory corruption attacks, such as
- those caused by use-after-free bugs.
+ Hardened memory allocator coming from GrapheneOS project.
+ The default configuration template has all normal optional security
+ features enabled and is quite aggressive in terms of sacrificing
+ performance and memory usage for security.
+ '';
+ };
+
+ graphene-hardened-light = {
+ libPath = "${pkgs.graphene-hardened-malloc}/lib/libhardened_malloc-light.so";
+ description = ''
+ Hardened memory allocator coming from GrapheneOS project.
+ The light configuration template disables the slab quarantines,
+ write after free check, slot randomization and raises the guard
+ slab interval from 1 to 8 but leaves zero-on-free and slab canaries enabled.
+ The light configuration has solid performance and memory usage while still
+ being far more secure than mainstream allocators with much better security
+ properties.
'';
};
@@ -77,7 +92,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/nixos/modules/config/mysql.nix b/nixos/modules/config/mysql.nix
index 4f72d22c4f0e..e1f9e223cc59 100644
--- a/nixos/modules/config/mysql.nix
+++ b/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/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix
index aa6d75e199f9..72242b263ce0 100644
--- a/nixos/modules/config/networking.nix
+++ b/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/nixos/modules/config/nix-channel.nix b/nixos/modules/config/nix-channel.nix
index dd97cb730ae4..6498ce6c469c 100644
--- a/nixos/modules/config/nix-channel.nix
+++ b/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/nixos/modules/config/nix-flakes.nix b/nixos/modules/config/nix-flakes.nix
index 242d8d3b82b7..d6c31735a6ca 100644
--- a/nixos/modules/config/nix-flakes.nix
+++ b/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/nixos/modules/config/nix-remote-build.nix b/nixos/modules/config/nix-remote-build.nix
index 98c8fc06d2ee..e8aa438a262d 100644
--- a/nixos/modules/config/nix-remote-build.nix
+++ b/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/nixos/modules/config/nix.nix b/nixos/modules/config/nix.nix
index a40953a3a3c9..b5fe0a3bd1ce 100644
--- a/nixos/modules/config/nix.nix
+++ b/nixos/modules/config/nix.nix
@@ -154,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.
'';
};
@@ -162,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.
'';
};
@@ -174,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 {
@@ -186,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
@@ -199,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
@@ -211,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
@@ -224,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
@@ -247,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.
'';
@@ -255,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.
@@ -267,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
@@ -278,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
@@ -290,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
@@ -304,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
@@ -318,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.
@@ -333,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
@@ -355,7 +355,7 @@ in
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/nixos/modules/config/no-x-libs.nix b/nixos/modules/config/no-x-libs.nix
index fea6e0c4110b..c9a133d0558a 100644
--- a/nixos/modules/config/no-x-libs.nix
+++ b/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
diff --git a/nixos/modules/config/nsswitch.nix b/nixos/modules/config/nsswitch.nix
index b004072813bd..c7ba9b8eec6a 100644
--- a/nixos/modules/config/nsswitch.nix
+++ b/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/nixos/modules/config/power-management.nix b/nixos/modules/config/power-management.nix
index e7fd02920e0d..70f2d199df10 100644
--- a/nixos/modules/config/power-management.nix
+++ b/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/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix
index 662959bf0071..7c3a284e8780 100644
--- a/nixos/modules/config/pulseaudio.nix
+++ b/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/nixos/modules/config/qt.nix b/nixos/modules/config/qt.nix
index f82b7ab85a8c..bf050f17620c 100644
--- a/nixos/modules/config/qt.nix
+++ b/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/nixos/modules/config/resolvconf.nix b/nixos/modules/config/resolvconf.nix
index 3b8cc0cb8f42..002a06be39a3 100644
--- a/nixos/modules/config/resolvconf.nix
+++ b/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,9 +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'
- '' + optionalString (cfg.useLocalResolver && config.networking.enableIPv6) ''
- name_servers='::1'
+ name_servers='127.0.0.1${optionalString config.networking.enableIPv6 " ::1"}'
'' + cfg.extraConfig;
in
@@ -51,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.
'';
};
@@ -60,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.
@@ -72,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
@@ -85,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,
@@ -97,7 +96,7 @@ in
type = types.lines;
default = "";
example = "libc=NO";
- description = lib.mdDoc ''
+ description = ''
Extra configuration to append to {file}`resolvconf.conf`.
'';
};
@@ -106,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`.
'';
};
@@ -114,7 +113,7 @@ in
useLocalResolver = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Use local DNS server for resolving.
'';
};
diff --git a/nixos/modules/config/shells-environment.nix b/nixos/modules/config/shells-environment.nix
index a8476bd2aaed..2c19fb8a029d 100644
--- a/nixos/modules/config/shells-environment.nix
+++ b/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/nixos/modules/config/stevenblack.nix b/nixos/modules/config/stevenblack.nix
index 7e6235169847..5b85073c6908 100644
--- a/nixos/modules/config/stevenblack.nix
+++ b/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/nixos/modules/config/stub-ld.nix b/nixos/modules/config/stub-ld.nix
index 14c07466d061..87b7bdf07a2d 100644
--- a/nixos/modules/config/stub-ld.nix
+++ b/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/nixos/modules/config/swap.nix b/nixos/modules/config/swap.nix
index 21046d6f1697..a606ebd76759 100644
--- a/nixos/modules/config/swap.nix
+++ b/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/nixos/modules/config/sysctl.nix b/nixos/modules/config/sysctl.nix
index bedba984a3c2..34028ce82dd7 100644
--- a/nixos/modules/config/sysctl.nix
+++ b/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/nixos/modules/config/system-environment.nix b/nixos/modules/config/system-environment.nix
index 399304185223..3fd4ac730ab9 100644
--- a/nixos/modules/config/system-environment.nix
+++ b/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/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix
index 71274ea8999f..562100ad6201 100644
--- a/nixos/modules/config/system-path.nix
+++ b/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/nixos/modules/config/terminfo.nix b/nixos/modules/config/terminfo.nix
index ebd1aaea8f04..4b58605aa7f1 100644
--- a/nixos/modules/config/terminfo.nix
+++ b/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/nixos/modules/config/unix-odbc-drivers.nix b/nixos/modules/config/unix-odbc-drivers.nix
index 7bd3fa1600b0..28cf7e84b7bc 100644
--- a/nixos/modules/config/unix-odbc-drivers.nix
+++ b/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/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix
index 02cd1a17f538..3ef8993fa665 100644
--- a/nixos/modules/config/users-groups.nix
+++ b/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,24 +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}
- for user in ${lingerDir}/*; do
- if ! id "$user" >/dev/null 2>&1; then
+ for user in $(ls); do
+ if ! id "$user" >/dev/null; then
+ echo "Removing linger for missing user $user"
rm --force -- "$user"
fi
done
- 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
- '';
+ 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
@@ -863,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/nixos/modules/config/vte.nix b/nixos/modules/config/vte.nix
index 48f85246560a..e0b48c3fb4a8 100644
--- a/nixos/modules/config/vte.nix
+++ b/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/nixos/modules/config/xdg/autostart.nix b/nixos/modules/config/xdg/autostart.nix
index a4fdbda911a2..acdb7cd3adc6 100644
--- a/nixos/modules/config/xdg/autostart.nix
+++ b/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/nixos/modules/config/xdg/icons.nix b/nixos/modules/config/xdg/icons.nix
index 8d44a431445b..3f198101d306 100644
--- a/nixos/modules/config/xdg/icons.nix
+++ b/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/nixos/modules/config/xdg/menus.nix b/nixos/modules/config/xdg/menus.nix
index b8f829e81547..8510c2db654e 100644
--- a/nixos/modules/config/xdg/menus.nix
+++ b/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/nixos/modules/config/xdg/mime.nix b/nixos/modules/config/xdg/mime.nix
index 3aa863083219..2cd88be5b023 100644
--- a/nixos/modules/config/xdg/mime.nix
+++ b/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/nixos/modules/config/xdg/portal.nix b/nixos/modules/config/xdg/portal.nix
index 5aa23377f9ff..2c4d07c4953c 100644
--- a/nixos/modules/config/xdg/portal.nix
+++ b/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/nixos/modules/config/xdg/portals/lxqt.nix b/nixos/modules/config/xdg/portals/lxqt.nix
index 18fcf3d81c02..23a1622308bd 100644
--- a/nixos/modules/config/xdg/portals/lxqt.nix
+++ b/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/nixos/modules/config/xdg/portals/wlr.nix b/nixos/modules/config/xdg/portals/wlr.nix
index d84ae794e3bc..954830eff2d3 100644
--- a/nixos/modules/config/xdg/portals/wlr.nix
+++ b/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/nixos/modules/config/xdg/sounds.nix b/nixos/modules/config/xdg/sounds.nix
index 713d68131fc0..0aae77fe0107 100644
--- a/nixos/modules/config/xdg/sounds.nix
+++ b/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/nixos/modules/config/zram.nix b/nixos/modules/config/zram.nix
index ec8b4ed6e931..1846ac51eea6 100644
--- a/nixos/modules/config/zram.nix
+++ b/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/nixos/modules/hardware/acpilight.nix b/nixos/modules/hardware/acpilight.nix
index d8d82b0e81a4..2de448a265c7 100644
--- a/nixos/modules/hardware/acpilight.nix
+++ b/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/nixos/modules/hardware/bladeRF.nix b/nixos/modules/hardware/bladeRF.nix
index 52a1f52024c8..35b74b8382e3 100644
--- a/nixos/modules/hardware/bladeRF.nix
+++ b/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/nixos/modules/hardware/brillo.nix b/nixos/modules/hardware/brillo.nix
index 612061718fad..8e36022a9a30 100644
--- a/nixos/modules/hardware/brillo.nix
+++ b/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/nixos/modules/hardware/ckb-next.nix b/nixos/modules/hardware/ckb-next.nix
index 34f951a7446f..65e73833a759 100644
--- a/nixos/modules/hardware/ckb-next.nix
+++ b/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/nixos/modules/hardware/corectrl.nix b/nixos/modules/hardware/corectrl.nix
index b1d3f2f0ce7e..9e8b69cf6277 100644
--- a/nixos/modules/hardware/corectrl.nix
+++ b/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/nixos/modules/hardware/cpu/amd-microcode.nix b/nixos/modules/hardware/cpu/amd-microcode.nix
index 3f52cb1fca3e..621c7066bfe1 100644
--- a/nixos/modules/hardware/cpu/amd-microcode.nix
+++ b/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/nixos/modules/hardware/cpu/amd-ryzen-smu.nix b/nixos/modules/hardware/cpu/amd-ryzen-smu.nix
new file mode 100644
index 000000000000..b1a5895aaa24
--- /dev/null
+++ b/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/nixos/modules/hardware/cpu/amd-sev.nix b/nixos/modules/hardware/cpu/amd-sev.nix
index 08e1de496383..d6225bc35a1e 100644
--- a/nixos/modules/hardware/cpu/amd-sev.nix
+++ b/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/nixos/modules/hardware/cpu/intel-microcode.nix b/nixos/modules/hardware/cpu/intel-microcode.nix
index d30ebfefeeac..acce565fd808 100644
--- a/nixos/modules/hardware/cpu/intel-microcode.nix
+++ b/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/nixos/modules/hardware/cpu/intel-sgx.nix b/nixos/modules/hardware/cpu/intel-sgx.nix
index 38a484cb126e..c66b43a2ec27 100644
--- a/nixos/modules/hardware/cpu/intel-sgx.nix
+++ b/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/nixos/modules/hardware/cpu/x86-msr.nix b/nixos/modules/hardware/cpu/x86-msr.nix
index 554bec1b7db1..95e1be23cd95 100644
--- a/nixos/modules/hardware/cpu/x86-msr.nix
+++ b/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/nixos/modules/hardware/device-tree.nix b/nixos/modules/hardware/device-tree.nix
index 6ab13c0eb709..a29cc76ea8f9 100644
--- a/nixos/modules/hardware/device-tree.nix
+++ b/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/nixos/modules/hardware/digitalbitbox.nix b/nixos/modules/hardware/digitalbitbox.nix
index ea04d72a63a5..7df15288ecfe 100644
--- a/nixos/modules/hardware/digitalbitbox.nix
+++ b/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/nixos/modules/hardware/flipperzero.nix b/nixos/modules/hardware/flipperzero.nix
index 82f9b76fa3a7..3a6d29d0f9eb 100644
--- a/nixos/modules/hardware/flipperzero.nix
+++ b/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/nixos/modules/hardware/flirc.nix b/nixos/modules/hardware/flirc.nix
index 2fe40db947e4..94ec715b9fa5 100644
--- a/nixos/modules/hardware/flirc.nix
+++ b/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/nixos/modules/hardware/gkraken.nix b/nixos/modules/hardware/gkraken.nix
index f427fec0a7cc..97d15369db0a 100644
--- a/nixos/modules/hardware/gkraken.nix
+++ b/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/nixos/modules/hardware/glasgow.nix b/nixos/modules/hardware/glasgow.nix
index f8ebb772c47b..e63aa8bdb4bd 100644
--- a/nixos/modules/hardware/glasgow.nix
+++ b/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/nixos/modules/hardware/gpgsmartcards.nix b/nixos/modules/hardware/gpgsmartcards.nix
index 68e1e5f74e2e..cc3f4c769976 100644
--- a/nixos/modules/hardware/gpgsmartcards.nix
+++ b/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/nixos/modules/hardware/hackrf.nix b/nixos/modules/hardware/hackrf.nix
index 38ef7fa6d3d4..7f03b765bbda 100644
--- a/nixos/modules/hardware/hackrf.nix
+++ b/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/nixos/modules/hardware/i2c.nix b/nixos/modules/hardware/i2c.nix
index bd4c4ebe21bd..b1e5cfd9e025 100644
--- a/nixos/modules/hardware/i2c.nix
+++ b/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/nixos/modules/hardware/infiniband.nix b/nixos/modules/hardware/infiniband.nix
index 962883fa7972..6780aee9f36b 100644
--- a/nixos/modules/hardware/infiniband.nix
+++ b/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/nixos/modules/hardware/keyboard/qmk.nix b/nixos/modules/hardware/keyboard/qmk.nix
index d95d36dedb44..b3e752ad66c5 100644
--- a/nixos/modules/hardware/keyboard/qmk.nix
+++ b/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/nixos/modules/hardware/keyboard/teck.nix b/nixos/modules/hardware/keyboard/teck.nix
index 8376c6b9c50b..8cb736dedac4 100644
--- a/nixos/modules/hardware/keyboard/teck.nix
+++ b/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/nixos/modules/hardware/keyboard/uhk.nix b/nixos/modules/hardware/keyboard/uhk.nix
index ff984fa5daa6..a5bd35c2a550 100644
--- a/nixos/modules/hardware/keyboard/uhk.nix
+++ b/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/nixos/modules/hardware/keyboard/zsa.nix b/nixos/modules/hardware/keyboard/zsa.nix
index 191fb12cca4f..42fac3b45bb9 100644
--- a/nixos/modules/hardware/keyboard/zsa.nix
+++ b/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/nixos/modules/hardware/ksm.nix b/nixos/modules/hardware/ksm.nix
index 82d94e6ab57c..e0b5949ffb21 100644
--- a/nixos/modules/hardware/ksm.nix
+++ b/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/nixos/modules/hardware/ledger.nix b/nixos/modules/hardware/ledger.nix
index fcce4f61a870..41abe74315a0 100644
--- a/nixos/modules/hardware/ledger.nix
+++ b/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/nixos/modules/hardware/logitech.nix b/nixos/modules/hardware/logitech.nix
index 9b06eb8a8b01..94a1287e051c 100644
--- a/nixos/modules/hardware/logitech.nix
+++ b/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/nixos/modules/hardware/mcelog.nix b/nixos/modules/hardware/mcelog.nix
index be8fc8cd1925..13ad238870c2 100644
--- a/nixos/modules/hardware/mcelog.nix
+++ b/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/nixos/modules/hardware/network/ath-user-regd.nix b/nixos/modules/hardware/network/ath-user-regd.nix
index a7f023d26ce7..b5ade5ed5010 100644
--- a/nixos/modules/hardware/network/ath-user-regd.nix
+++ b/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/nixos/modules/hardware/network/b43.nix b/nixos/modules/hardware/network/b43.nix
index 7f045f7b70f9..eb03bf223ccf 100644
--- a/nixos/modules/hardware/network/b43.nix
+++ b/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/nixos/modules/hardware/network/intel-2200bg.nix b/nixos/modules/hardware/network/intel-2200bg.nix
index e1ec8134129e..17b973474c93 100644
--- a/nixos/modules/hardware/network/intel-2200bg.nix
+++ b/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/nixos/modules/hardware/new-lg4ff.nix b/nixos/modules/hardware/new-lg4ff.nix
index fac376eb7a75..3c7f66f8d89b 100644
--- a/nixos/modules/hardware/new-lg4ff.nix
+++ b/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/nixos/modules/hardware/nitrokey.nix b/nixos/modules/hardware/nitrokey.nix
index e2e88a8eade4..9bc8da41a4a7 100644
--- a/nixos/modules/hardware/nitrokey.nix
+++ b/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/nixos/modules/hardware/onlykey/default.nix b/nixos/modules/hardware/onlykey/default.nix
index 59e159dce482..07358c8a8782 100644
--- a/nixos/modules/hardware/onlykey/default.nix
+++ b/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/nixos/modules/hardware/opengl.nix b/nixos/modules/hardware/opengl.nix
index 0ff018ddc47d..25324fd8b0af 100644
--- a/nixos/modules/hardware/opengl.nix
+++ b/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/nixos/modules/hardware/openrazer.nix b/nixos/modules/hardware/openrazer.nix
index abbafaee8950..99b551054323 100644
--- a/nixos/modules/hardware/openrazer.nix
+++ b/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/nixos/modules/hardware/opentabletdriver.nix b/nixos/modules/hardware/opentabletdriver.nix
index f103da14c9dd..d8958ed4f68d 100644
--- a/nixos/modules/hardware/opentabletdriver.nix
+++ b/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/nixos/modules/hardware/pcmcia.nix b/nixos/modules/hardware/pcmcia.nix
index f7a5565d773e..aef35a28e54d 100644
--- a/nixos/modules/hardware/pcmcia.nix
+++ b/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/nixos/modules/hardware/printers.nix b/nixos/modules/hardware/printers.nix
index 4fb6a192cdd2..de2f84d4831b 100644
--- a/nixos/modules/hardware/printers.nix
+++ b/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/nixos/modules/hardware/raid/hpsa.nix b/nixos/modules/hardware/raid/hpsa.nix
index 2934cd19a8c1..120348a74bfb 100644
--- a/nixos/modules/hardware/raid/hpsa.nix
+++ b/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/nixos/modules/hardware/rtl-sdr.nix b/nixos/modules/hardware/rtl-sdr.nix
index 7f462005f157..e85fc04e29bb 100644
--- a/nixos/modules/hardware/rtl-sdr.nix
+++ b/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/nixos/modules/hardware/saleae-logic.nix b/nixos/modules/hardware/saleae-logic.nix
index f144814a06b7..a3810d640c48 100644
--- a/nixos/modules/hardware/saleae-logic.nix
+++ b/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/nixos/modules/hardware/sata.nix b/nixos/modules/hardware/sata.nix
index 5330ba9268b5..81592997d6e3 100644
--- a/nixos/modules/hardware/sata.nix
+++ b/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/nixos/modules/hardware/sensor/hddtemp.nix b/nixos/modules/hardware/sensor/hddtemp.nix
index 1a3d211b858b..8ee60dc4d6dd 100644
--- a/nixos/modules/hardware/sensor/hddtemp.nix
+++ b/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/nixos/modules/hardware/sensor/iio.nix b/nixos/modules/hardware/sensor/iio.nix
index 6f7b1dc1f7f8..8b3ba87a7d9c 100644
--- a/nixos/modules/hardware/sensor/iio.nix
+++ b/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/nixos/modules/hardware/steam-hardware.nix b/nixos/modules/hardware/steam-hardware.nix
index 07edf6870390..6218c9ffbb9b 100644
--- a/nixos/modules/hardware/steam-hardware.nix
+++ b/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/nixos/modules/hardware/system-76.nix b/nixos/modules/hardware/system-76.nix
index 3fb2c10a6e3b..ca40ee0ebb37 100644
--- a/nixos/modules/hardware/system-76.nix
+++ b/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/nixos/modules/hardware/tuxedo-keyboard.nix b/nixos/modules/hardware/tuxedo-keyboard.nix
index fd8b48a5e9ea..f90dfc6e3134 100644
--- a/nixos/modules/hardware/tuxedo-keyboard.nix
+++ b/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/nixos/modules/hardware/ubertooth.nix b/nixos/modules/hardware/ubertooth.nix
index e2db2068d900..f65c2da25522 100644
--- a/nixos/modules/hardware/ubertooth.nix
+++ b/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/nixos/modules/hardware/uinput.nix b/nixos/modules/hardware/uinput.nix
index 15fa66b8d83c..55e86bfa6bdb 100644
--- a/nixos/modules/hardware/uinput.nix
+++ b/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/nixos/modules/hardware/uni-sync.nix b/nixos/modules/hardware/uni-sync.nix
new file mode 100644
index 000000000000..dd230ae419a1
--- /dev/null
+++ b/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/nixos/modules/hardware/usb-modeswitch.nix b/nixos/modules/hardware/usb-modeswitch.nix
index 773891b0032f..f36d293a867f 100644
--- a/nixos/modules/hardware/usb-modeswitch.nix
+++ b/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/nixos/modules/hardware/usb-storage.nix b/nixos/modules/hardware/usb-storage.nix
index 3cb2c60d7ccd..6e20b93d2262 100644
--- a/nixos/modules/hardware/usb-storage.nix
+++ b/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/nixos/modules/hardware/video/bumblebee.nix b/nixos/modules/hardware/video/bumblebee.nix
index 75f71d499e66..b6af4f80445a 100644
--- a/nixos/modules/hardware/video/bumblebee.nix
+++ b/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/nixos/modules/hardware/video/capture/mwprocapture.nix b/nixos/modules/hardware/video/capture/mwprocapture.nix
index ddd3f3ec7f32..c63535f0faa7 100644
--- a/nixos/modules/hardware/video/capture/mwprocapture.nix
+++ b/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/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix
index 3b983f768f91..37d8e53a2e04 100644
--- a/nixos/modules/hardware/video/nvidia.nix
+++ b/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/nixos/modules/hardware/video/uvcvideo/default.nix b/nixos/modules/hardware/video/uvcvideo/default.nix
index 6cfb8cc6ad29..901ff938d90e 100644
--- a/nixos/modules/hardware/video/uvcvideo/default.nix
+++ b/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/nixos/modules/hardware/video/webcam/facetimehd.nix b/nixos/modules/hardware/video/webcam/facetimehd.nix
index a0ec9c98a54c..1e6e6442c372 100644
--- a/nixos/modules/hardware/video/webcam/facetimehd.nix
+++ b/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/nixos/modules/hardware/video/webcam/ipu6.nix b/nixos/modules/hardware/video/webcam/ipu6.nix
index a7767e446bd4..de47fe3f6b5a 100644
--- a/nixos/modules/hardware/video/webcam/ipu6.nix
+++ b/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,
diff --git a/nixos/modules/hardware/wooting.nix b/nixos/modules/hardware/wooting.nix
index 78bbcb61aca7..56ef77d31ef2 100644
--- a/nixos/modules/hardware/wooting.nix
+++ b/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/nixos/modules/hardware/xone.nix b/nixos/modules/hardware/xone.nix
index 211d3fce8679..89690d8c6fb1 100644
--- a/nixos/modules/hardware/xone.nix
+++ b/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/nixos/modules/hardware/xpadneo.nix b/nixos/modules/hardware/xpadneo.nix
index a66e81d8b15b..474f0f7fcf64 100644
--- a/nixos/modules/hardware/xpadneo.nix
+++ b/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/nixos/modules/i18n/input-method/default.md b/nixos/modules/i18n/input-method/default.md
index 42cb8a8d7b6a..6d12462b788e 100644
--- a/nixos/modules/i18n/input-method/default.md
+++ b/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/nixos/modules/i18n/input-method/default.nix b/nixos/modules/i18n/input-method/default.nix
index d967d4335c70..3b439c4231b3 100644
--- a/nixos/modules/i18n/input-method/default.nix
+++ b/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/nixos/modules/i18n/input-method/fcitx5.nix b/nixos/modules/i18n/input-method/fcitx5.nix
index 755336220520..bb6661e248f2 100644
--- a/nixos/modules/i18n/input-method/fcitx5.nix
+++ b/nixos/modules/i18n/input-method/fcitx5.nix
@@ -18,14 +18,14 @@ 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).
'';
@@ -34,7 +34,7 @@ in
type = types.bool;
default = config.services.desktopManager.plasma6.enable;
defaultText = literalExpression "config.services.desktopManager.plasma6.enable";
- description = lib.mdDoc ''
+ description = ''
Use qt6 versions of fcitx5 packages.
Required for configuring fcitx5 in KDE System Settings.
'';
@@ -48,7 +48,7 @@ in
angry = "( ̄ー ̄)";
}
'';
- description = lib.mdDoc "Quick phrases.";
+ description = "Quick phrases.";
};
quickPhraseFiles = mkOption {
type = with types; attrsOf path;
@@ -59,7 +59,7 @@ in
numbers = ./numbers.mb;
}
'';
- description = lib.mdDoc "Quick phrase files.";
+ description = "Quick phrase files.";
};
settings = {
globalOptions = lib.mkOption {
@@ -67,7 +67,7 @@ in
freeformType = settingsFormat.type;
};
default = { };
- description = lib.mdDoc ''
+ description = ''
The global options in `config` file in ini format.
'';
};
@@ -76,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.
'';
@@ -93,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/nixos/modules/i18n/input-method/ibus.nix b/nixos/modules/i18n/input-method/ibus.nix
index a81ce828b13d..c82f0099253b 100644
--- a/nixos/modules/i18n/input-method/ibus.nix
+++ b/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/nixos/modules/i18n/input-method/kime.nix b/nixos/modules/i18n/input-method/kime.nix
index e82996926b28..1fea3aeccf0a 100644
--- a/nixos/modules/i18n/input-method/kime.nix
+++ b/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/nixos/modules/i18n/input-method/uim.nix b/nixos/modules/i18n/input-method/uim.nix
index 7225783b2a6f..6a636a771c1f 100644
--- a/nixos/modules/i18n/input-method/uim.nix
+++ b/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/nixos/modules/image/repart-image.nix b/nixos/modules/image/repart-image.nix
index 83e766268cf0..59d5fc26efe9 100644
--- a/nixos/modules/image/repart-image.nix
+++ b/nixos/modules/image/repart-image.nix
@@ -41,6 +41,25 @@
}:
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
@@ -99,6 +118,7 @@ in
finalRepartDefinitions = "repart.d";
systemdRepartFlags = [
+ "--architecture=${systemdArch}"
"--dry-run=no"
"--size=auto"
"--seed=${seed}"
diff --git a/nixos/modules/image/repart.nix b/nixos/modules/image/repart.nix
index 1a43297f4b43..e471f9485cd0 100644
--- a/nixos/modules/image/repart.nix
+++ b/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.
@@ -71,7 +73,7 @@ in
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,
@@ -83,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`).
'';
};
@@ -97,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.
'';
};
@@ -124,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.
'';
@@ -133,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.
@@ -144,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.
'';
@@ -182,7 +184,7 @@ in
};
};
'';
- description = lib.mdDoc ''
+ description = ''
Specify partitions as a set of the names of the partitions with their
configuration as the key.
'';
@@ -196,7 +198,7 @@ in
vfat = [ "-S 512" "-c" ];
}
'';
- description = lib.mdDoc ''
+ description = ''
Specify extra options for created file systems. The specified options
are converted to individual environment variables of the format
`SYSTEMD_REPART_MKFS_OPTIONS_`.
@@ -215,7 +217,7 @@ in
type = lib.types.attrs;
internal = true;
readOnly = true;
- description = lib.mdDoc ''
+ description = ''
Convenience option to access partitions with added closures.
'';
};
@@ -224,6 +226,42 @@ in
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;
diff --git a/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix
index d1a4c27432c2..1de5ba113875 100644
--- a/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix
+++ b/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/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix
index a4c46d58c85a..61e94ffed889 100644
--- a/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix
+++ b/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/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix
index 11118db3aae2..bdcf751bf629 100644
--- a/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix
+++ b/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/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix
index 573b31b439c2..b3c605e3f94d 100644
--- a/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix
+++ b/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/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix
index 5c7617c9f8c1..ce111bcebd5c 100644
--- a/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix
+++ b/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/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix
index f5b6af3a6b7f..06949bda1cb2 100644
--- a/nixos/modules/installer/cd-dvd/iso-image.nix
+++ b/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.
diff --git a/nixos/modules/installer/netboot/netboot.nix b/nixos/modules/installer/netboot/netboot.nix
index 028a2d74041e..c88a53393d13 100644
--- a/nixos/modules/installer/netboot/netboot.nix
+++ b/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/nixos/modules/installer/sd-card/sd-image.nix b/nixos/modules/installer/sd-card/sd-image.nix
index ad9b803b1d1e..1c79bf4ac3ef 100644
--- a/nixos/modules/installer/sd-card/sd-image.nix
+++ b/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/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl
index 2f9edba4f0c9..cf4173638b1a 100644
--- a/nixos/modules/installer/tools/nixos-generate-config.pl
+++ b/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/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix
index a7d11370d445..7f16b97440c1 100644
--- a/nixos/modules/installer/tools/tools.nix
+++ b/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,11 +177,15 @@ 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;
+ # services.libinput.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
# users.users.alice = {
diff --git a/nixos/modules/installer/virtualbox-demo.nix b/nixos/modules/installer/virtualbox-demo.nix
index 01931b2acfca..289a8cf9e506 100644
--- a/nixos/modules/installer/virtualbox-demo.nix
+++ b/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/nixos/modules/misc/assertions.nix b/nixos/modules/misc/assertions.nix
index 364bb02be82d..550b3ac97f6a 100644
--- a/nixos/modules/misc/assertions.nix
+++ b/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/nixos/modules/misc/crashdump.nix b/nixos/modules/misc/crashdump.nix
index 4ae18984ee5f..b0f75d9caaa3 100644
--- a/nixos/modules/misc/crashdump.nix
+++ b/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/nixos/modules/misc/documentation.nix b/nixos/modules/misc/documentation.nix
index f3e698468e64..26323e14b901 100644
--- a/nixos/modules/misc/documentation.nix
+++ b/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
)
@@ -77,6 +101,7 @@ let
libPath = filter (pkgs.path + "/lib");
pkgsLibPath = filter (pkgs.path + "/pkgs/pkgs-lib");
nixosPath = filter (pkgs.path + "/nixos");
+ NIX_ABORT_ON_WARN = warningsAreErrors;
modules =
"[ "
+ concatMapStringsSep " " (p: ''"${removePrefix "${modulesPath}/" (toString p)}"'') docModules.lazy
@@ -176,7 +201,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 +213,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 +222,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 +234,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 +243,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 +253,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 +267,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 +281,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 +289,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 +299,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 +308,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 +319,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/nixos/modules/misc/documentation/test.nix b/nixos/modules/misc/documentation/test.nix
index dd1588abdb43..1eaa63b1fb6c 100644
--- a/nixos/modules/misc/documentation/test.nix
+++ b/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/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix
index cfa98c838af5..f26917c0bad5 100644
--- a/nixos/modules/misc/ids.nix
+++ b/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/nixos/modules/misc/label.nix b/nixos/modules/misc/label.nix
index 44ee812249ce..c7177f65a0fd 100644
--- a/nixos/modules/misc/label.nix
+++ b/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/nixos/modules/misc/lib.nix b/nixos/modules/misc/lib.nix
index f97e9209e2f1..121f396701ea 100644
--- a/nixos/modules/misc/lib.nix
+++ b/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/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix
index 0dd4bf3f16f3..84c711c2b4ef 100644
--- a/nixos/modules/misc/locate.nix
+++ b/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/nixos/modules/misc/man-db.nix b/nixos/modules/misc/man-db.nix
index 2b9805612186..d557b5e20b0f 100644
--- a/nixos/modules/misc/man-db.nix
+++ b/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/nixos/modules/misc/meta.nix b/nixos/modules/misc/meta.nix
index 95f2765aff1e..e5ab3a951537 100644
--- a/nixos/modules/misc/meta.nix
+++ b/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/nixos/modules/misc/nixops-autoluks.nix b/nixos/modules/misc/nixops-autoluks.nix
index e6817633119d..9b5a376027f5 100644
--- a/nixos/modules/misc/nixops-autoluks.nix
+++ b/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/nixos/modules/misc/nixpkgs-flake.nix b/nixos/modules/misc/nixpkgs-flake.nix
index 8bfe05ca1994..f58c3fbbe2e2 100644
--- a/nixos/modules/misc/nixpkgs-flake.nix
+++ b/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/nixos/modules/misc/nixpkgs.nix b/nixos/modules/misc/nixpkgs.nix
index 10f800cd741a..60a6fb57c7a2 100644
--- a/nixos/modules/misc/nixpkgs.nix
+++ b/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`.
@@ -215,7 +214,7 @@ in
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
@@ -238,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`.
@@ -267,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.
@@ -306,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/nixos/modules/misc/nixpkgs/read-only.nix b/nixos/modules/misc/nixpkgs/read-only.nix
index 2a783216a9d5..e3c4525e7db3 100644
--- a/nixos/modules/misc/nixpkgs/read-only.nix
+++ b/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/nixos/modules/misc/passthru.nix b/nixos/modules/misc/passthru.nix
index beb9d7829037..4e99631fdd85 100644
--- a/nixos/modules/misc/passthru.nix
+++ b/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/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix
index 79b95ac654d5..d582e0c162de 100644
--- a/nixos/modules/misc/version.nix
+++ b/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/nixos/modules/misc/wordlist.nix b/nixos/modules/misc/wordlist.nix
index f01fcb6f5a91..988b522d7431 100644
--- a/nixos/modules/misc/wordlist.nix
+++ b/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/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index d17e638a0883..ef25a7f3e75a 100644
--- a/nixos/modules/module-list.nix
+++ b/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
@@ -176,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
@@ -193,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
@@ -209,6 +214,8 @@
./programs/kbdlight.nix
./programs/kclock.nix
./programs/kdeconnect.nix
+ ./programs/lazygit.nix
+ ./programs/kubeswitch.nix
./programs/less.nix
./programs/liboping.nix
./programs/light.nix
@@ -227,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
@@ -248,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
@@ -257,6 +266,7 @@
./programs/skim.nix
./programs/slock.nix
./programs/sniffnet.nix
+ ./programs/soundmodem.nix
./programs/spacefm.nix
./programs/ssh.nix
./programs/starship.nix
@@ -278,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
@@ -315,6 +325,7 @@
./security/duosec.nix
./security/google_oslogin.nix
./security/ipa.nix
+ ./security/isolate.nix
./security/krb5
./security/lock-kernel-modules.nix
./security/misc.nix
@@ -330,6 +341,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
@@ -339,7 +351,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
@@ -361,9 +372,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
@@ -508,7 +516,9 @@
./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
@@ -549,8 +559,9 @@
./services/hardware/joycond.nix
./services/hardware/kanata.nix
./services/hardware/lcd.nix
+ ./services/hardware/libinput.nix
./services/hardware/lirc.nix
- ./services/hardware/nvidia-container-toolkit-cdi-generator
+ ./services/hardware/nvidia-container-toolkit
./services/hardware/monado.nix
./services/hardware/nvidia-optimus.nix
./services/hardware/openrgb.nix
@@ -586,8 +597,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
@@ -649,6 +663,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
@@ -679,6 +694,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
@@ -704,6 +720,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
@@ -711,6 +728,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
@@ -727,6 +745,7 @@
./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
@@ -794,7 +813,9 @@
./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
@@ -834,6 +855,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
@@ -944,6 +966,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
@@ -991,6 +1014,7 @@
./services/networking/icecream/daemon.nix
./services/networking/icecream/scheduler.nix
./services/networking/imaginary.nix
+ ./services/networking/inadyn.nix
./services/networking/inspircd.nix
./services/networking/iodine.nix
./services/networking/iperf3.nix
@@ -1019,6 +1043,7 @@
./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
@@ -1048,6 +1073,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
@@ -1105,6 +1131,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
@@ -1133,15 +1164,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
@@ -1194,6 +1228,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
@@ -1273,6 +1308,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
@@ -1288,12 +1324,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
@@ -1301,6 +1340,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
@@ -1340,12 +1380,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
@@ -1369,6 +1411,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
@@ -1422,7 +1465,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
@@ -1432,7 +1474,6 @@
./services/x11/gdk-pixbuf.nix
./services/x11/hardware/cmt.nix
./services/x11/hardware/digimend.nix
- ./services/x11/hardware/libinput.nix
./services/x11/hardware/synaptics.nix
./services/x11/hardware/wacom.nix
./services/x11/imwheel.nix
diff --git a/nixos/modules/profiles/all-hardware.nix b/nixos/modules/profiles/all-hardware.nix
index 4857ea4dbeae..249b767593f2 100644
--- a/nixos/modules/profiles/all-hardware.nix
+++ b/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/nixos/modules/profiles/clone-config.nix b/nixos/modules/profiles/clone-config.nix
index ba65a250d25a..3f669ba7d2e1 100644
--- a/nixos/modules/profiles/clone-config.nix
+++ b/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/nixos/modules/profiles/demo.nix b/nixos/modules/profiles/demo.nix
index 4e8c74deedba..52ba40902e87 100644
--- a/nixos/modules/profiles/demo.nix
+++ b/nixos/modules/profiles/demo.nix
@@ -11,7 +11,7 @@
uid = 1000;
};
- services.xserver.displayManager = {
+ services.displayManager = {
autoLogin = {
enable = true;
user = "demo";
diff --git a/nixos/modules/profiles/graphical.nix b/nixos/modules/profiles/graphical.nix
index d80456cede56..72b865c584f0 100644
--- a/nixos/modules/profiles/graphical.nix
+++ b/nixos/modules/profiles/graphical.nix
@@ -6,10 +6,11 @@
{
services.xserver = {
enable = true;
+ desktopManager.plasma5.enable = true;
+ };
+
+ services = {
displayManager.sddm.enable = true;
- desktopManager.plasma5 = {
- enable = true;
- };
libinput.enable = true; # for touchpad support on many laptops
};
diff --git a/nixos/modules/profiles/macos-builder.nix b/nixos/modules/profiles/macos-builder.nix
index 6c2602881d6b..786e26cf98f7 100644
--- a/nixos/modules/profiles/macos-builder.nix
+++ b/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/nixos/modules/programs/_1password-gui.nix b/nixos/modules/programs/_1password-gui.nix
index eb2effee4326..b21e8783f660 100644
--- a/nixos/modules/programs/_1password-gui.nix
+++ b/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.
'';
};
diff --git a/nixos/modules/programs/_1password.nix b/nixos/modules/programs/_1password.nix
index 91246150755d..b87e9b776e85 100644
--- a/nixos/modules/programs/_1password.nix
+++ b/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/nixos/modules/programs/adb.nix b/nixos/modules/programs/adb.nix
index e5b0abd9fcfe..d8c700bc36b6 100644
--- a/nixos/modules/programs/adb.nix
+++ b/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/nixos/modules/programs/alvr.nix b/nixos/modules/programs/alvr.nix
index c01b74ad3a51..e5de06f1157a 100644
--- a/nixos/modules/programs/alvr.nix
+++ b/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/nixos/modules/programs/appgate-sdp.nix b/nixos/modules/programs/appgate-sdp.nix
index bdd538dc2f1f..6d61c87eeb61 100644
--- a/nixos/modules/programs/appgate-sdp.nix
+++ b/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/nixos/modules/programs/appimage.nix b/nixos/modules/programs/appimage.nix
new file mode 100644
index 000000000000..0011c2ff578d
--- /dev/null
+++ b/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/nixos/modules/programs/atop.nix b/nixos/modules/programs/atop.nix
index 003cfdbfc8fa..618b64114359 100644
--- a/nixos/modules/programs/atop.nix
+++ b/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/nixos/modules/programs/ausweisapp.nix b/nixos/modules/programs/ausweisapp.nix
index 91870df20246..0359e58c554c 100644
--- a/nixos/modules/programs/ausweisapp.nix
+++ b/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/nixos/modules/programs/autojump.nix b/nixos/modules/programs/autojump.nix
index dde6870d9890..ecfc2f658079 100644
--- a/nixos/modules/programs/autojump.nix
+++ b/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/nixos/modules/programs/bandwhich.nix b/nixos/modules/programs/bandwhich.nix
index aa6a0dfb6ffd..2c78584f2d24 100644
--- a/nixos/modules/programs/bandwhich.nix
+++ b/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/nixos/modules/programs/bash-my-aws.nix b/nixos/modules/programs/bash-my-aws.nix
index 10f16cae651b..15e429a75497 100644
--- a/nixos/modules/programs/bash-my-aws.nix
+++ b/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/nixos/modules/programs/bash/bash-completion.nix b/nixos/modules/programs/bash/bash-completion.nix
index 96fbe0126d66..b8e5b1bfa336 100644
--- a/nixos/modules/programs/bash/bash-completion.nix
+++ b/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/nixos/modules/programs/bash/bash.nix b/nixos/modules/programs/bash/bash.nix
index 7d3322ea5e50..21ef8338d8dd 100644
--- a/nixos/modules/programs/bash/bash.nix
+++ b/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/nixos/modules/programs/bash/blesh.nix b/nixos/modules/programs/bash/blesh.nix
index 8fa51bef7744..ea342b0ce3ee 100644
--- a/nixos/modules/programs/bash/blesh.nix
+++ b/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/nixos/modules/programs/bash/ls-colors.nix b/nixos/modules/programs/bash/ls-colors.nix
index 6a5253a3cca2..254ee14c477d 100644
--- a/nixos/modules/programs/bash/ls-colors.nix
+++ b/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/nixos/modules/programs/bash/undistract-me.nix b/nixos/modules/programs/bash/undistract-me.nix
index 587b649377df..0e6465e048a1 100644
--- a/nixos/modules/programs/bash/undistract-me.nix
+++ b/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/nixos/modules/programs/bcc.nix b/nixos/modules/programs/bcc.nix
index ff29d56bedb9..f799524b9c07 100644
--- a/nixos/modules/programs/bcc.nix
+++ b/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/nixos/modules/programs/browserpass.nix b/nixos/modules/programs/browserpass.nix
index a9670a37e618..2894e237e3d4 100644
--- a/nixos/modules/programs/browserpass.nix
+++ b/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/nixos/modules/programs/calls.nix b/nixos/modules/programs/calls.nix
index 3d757bc1fc32..0cf05f8a2ea0 100644
--- a/nixos/modules/programs/calls.nix
+++ b/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/nixos/modules/programs/captive-browser.nix b/nixos/modules/programs/captive-browser.nix
index 1c3ee7638ee0..8f0aa2fe1e6a 100644
--- a/nixos/modules/programs/captive-browser.nix
+++ b/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/nixos/modules/programs/ccache.nix b/nixos/modules/programs/ccache.nix
index 7972b2ac4a56..bfcbe39b3ff0 100644
--- a/nixos/modules/programs/ccache.nix
+++ b/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/nixos/modules/programs/cdemu.nix b/nixos/modules/programs/cdemu.nix
index 7eba4d29d83b..3ee8b2d8fcd6 100644
--- a/nixos/modules/programs/cdemu.nix
+++ b/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/nixos/modules/programs/cfs-zen-tweaks.nix b/nixos/modules/programs/cfs-zen-tweaks.nix
index fc05bcd11ecb..28d1ef5992d7 100644
--- a/nixos/modules/programs/cfs-zen-tweaks.nix
+++ b/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/nixos/modules/programs/chromium.nix b/nixos/modules/programs/chromium.nix
index 5e8983730048..fa5abe957a90 100644
--- a/nixos/modules/programs/chromium.nix
+++ b/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:
@@ -101,7 +101,7 @@ in
initialPrefs = mkOption {
type = types.attrs;
- description = lib.mdDoc ''
+ 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:
diff --git a/nixos/modules/programs/clash-verge.nix b/nixos/modules/programs/clash-verge.nix
index e1afafa7cadc..4425fe1a9fe7 100644
--- a/nixos/modules/programs/clash-verge.nix
+++ b/nixos/modules/programs/clash-verge.nix
@@ -2,10 +2,10 @@
{
options.programs.clash-verge = {
- enable = lib.mkEnableOption (lib.mdDoc "Clash Verge");
+ enable = lib.mkEnableOption "Clash Verge";
package = lib.mkPackageOption pkgs "clash-verge" {};
- autoStart = lib.mkEnableOption (lib.mdDoc "Clash Verge auto launch");
- tunMode = lib.mkEnableOption (lib.mdDoc "Clash Verge TUN mode");
+ autoStart = lib.mkEnableOption "Clash Verge auto launch";
+ tunMode = lib.mkEnableOption "Clash Verge TUN mode";
};
config =
diff --git a/nixos/modules/programs/cnping.nix b/nixos/modules/programs/cnping.nix
index 143267fc9a42..77cbf4d82086 100644
--- a/nixos/modules/programs/cnping.nix
+++ b/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/nixos/modules/programs/command-not-found/command-not-found.nix b/nixos/modules/programs/command-not-found/command-not-found.nix
index b5c7626bd207..4d2a89b51584 100644
--- a/nixos/modules/programs/command-not-found/command-not-found.nix
+++ b/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/nixos/modules/programs/coolercontrol.nix b/nixos/modules/programs/coolercontrol.nix
index 6e7299ad16b7..8c9a39d2eba9 100644
--- a/nixos/modules/programs/coolercontrol.nix
+++ b/nixos/modules/programs/coolercontrol.nix
@@ -10,28 +10,50 @@ in
{
##### interface
options = {
- programs.coolercontrol.enable = lib.mkEnableOption (lib.mdDoc "CoolerControl GUI & its background services");
- };
+ programs.coolercontrol = {
+ enable = lib.mkEnableOption "CoolerControl GUI & its background services";
- ##### implementation
- config = lib.mkIf cfg.enable {
- 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" ];
+ 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/nixos/modules/programs/criu.nix b/nixos/modules/programs/criu.nix
index 9f03b0c6431a..9414d0b27f0d 100644
--- a/nixos/modules/programs/criu.nix
+++ b/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/nixos/modules/programs/darling.nix b/nixos/modules/programs/darling.nix
index 589a9dd5d603..194b1648b78f 100644
--- a/nixos/modules/programs/darling.nix
+++ b/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/nixos/modules/programs/dconf.nix b/nixos/modules/programs/dconf.nix
index cf53658c4fad..e6738617c8e3 100644
--- a/nixos/modules/programs/dconf.nix
+++ b/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/nixos/modules/programs/digitalbitbox/default.md b/nixos/modules/programs/digitalbitbox/default.md
index 9bca14e97ffe..5147bb971e3a 100644
--- a/nixos/modules/programs/digitalbitbox/default.md
+++ b/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/nixos/modules/programs/digitalbitbox/default.nix b/nixos/modules/programs/digitalbitbox/default.nix
index bdacbc010c41..10b5a88171fc 100644
--- a/nixos/modules/programs/digitalbitbox/default.nix
+++ b/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/nixos/modules/programs/direnv.nix b/nixos/modules/programs/direnv.nix
index fdc646eb4b16..6061de58eb8e 100644
--- a/nixos/modules/programs/direnv.nix
+++ b/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/nixos/modules/programs/dmrconfig.nix b/nixos/modules/programs/dmrconfig.nix
index 29268cdfeb50..15338681e642 100644
--- a/nixos/modules/programs/dmrconfig.nix
+++ b/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/nixos/modules/programs/droidcam.nix b/nixos/modules/programs/droidcam.nix
index c9b4457d1d18..9843a1f5be25 100644
--- a/nixos/modules/programs/droidcam.nix
+++ b/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/nixos/modules/programs/dublin-traceroute.nix b/nixos/modules/programs/dublin-traceroute.nix
index cfcd6e8308ff..6ff8a5bdefc3 100644
--- a/nixos/modules/programs/dublin-traceroute.nix
+++ b/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/nixos/modules/programs/ecryptfs.nix b/nixos/modules/programs/ecryptfs.nix
index 63c1a3ad4419..ced5eb26fb9a 100644
--- a/nixos/modules/programs/ecryptfs.nix
+++ b/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/nixos/modules/programs/evince.nix b/nixos/modules/programs/evince.nix
index ed543d35cc5e..cffc5127f10a 100644
--- a/nixos/modules/programs/evince.nix
+++ b/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/nixos/modules/programs/extra-container.nix b/nixos/modules/programs/extra-container.nix
index 5e717c4d8223..c10ccd769168 100644
--- a/nixos/modules/programs/extra-container.nix
+++ b/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/nixos/modules/programs/fcast-receiver.nix b/nixos/modules/programs/fcast-receiver.nix
new file mode 100644
index 000000000000..2e4e6bf8b242
--- /dev/null
+++ b/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/nixos/modules/programs/feedbackd.nix b/nixos/modules/programs/feedbackd.nix
index 010287e5cd56..9de604c34a7e 100644
--- a/nixos/modules/programs/feedbackd.nix
+++ b/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/nixos/modules/programs/file-roller.nix b/nixos/modules/programs/file-roller.nix
index a343d4a261c9..4799f42d630b 100644
--- a/nixos/modules/programs/file-roller.nix
+++ b/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/nixos/modules/programs/firefox.nix b/nixos/modules/programs/firefox.nix
index 29c567783e27..39b30be48de9 100644
--- a/nixos/modules/programs/firefox.nix
+++ b/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/nixos/modules/programs/firejail.nix b/nixos/modules/programs/firejail.nix
index 046c31ce64f6..0510cf8c610d 100644
--- a/nixos/modules/programs/firejail.nix
+++ b/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/nixos/modules/programs/fish.nix b/nixos/modules/programs/fish.nix
index a4c20560bc9b..2102a07cd0bc 100644
--- a/nixos/modules/programs/fish.nix
+++ b/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/nixos/modules/programs/flashrom.nix b/nixos/modules/programs/flashrom.nix
index f954bc2197b1..1b9b4493ef20 100644
--- a/nixos/modules/programs/flashrom.nix
+++ b/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/nixos/modules/programs/flexoptix-app.nix b/nixos/modules/programs/flexoptix-app.nix
index 6f37fe54667c..47a76da125f0 100644
--- a/nixos/modules/programs/flexoptix-app.nix
+++ b/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/nixos/modules/programs/freetds.nix b/nixos/modules/programs/freetds.nix
index 98274fa9b562..8b52fc37c5e0 100644
--- a/nixos/modules/programs/freetds.nix
+++ b/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/nixos/modules/programs/fuse.nix b/nixos/modules/programs/fuse.nix
index b82d37a051e7..c15896efbb51 100644
--- a/nixos/modules/programs/fuse.nix
+++ b/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/nixos/modules/programs/fzf.nix b/nixos/modules/programs/fzf.nix
index 7c4f338e29b3..66ad7d418de6 100644
--- a/nixos/modules/programs/fzf.nix
+++ b/nixos/modules/programs/fzf.nix
@@ -1,32 +1,39 @@
{ 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 = {
+ # load after programs.bash.enableCompletion
+ bash.promptPluginInit = lib.mkAfter (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/nixos/modules/programs/gamemode.nix b/nixos/modules/programs/gamemode.nix
index 2bb92ed8e0ef..878f785074f1 100644
--- a/nixos/modules/programs/gamemode.nix
+++ b/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/nixos/modules/programs/gamescope.nix b/nixos/modules/programs/gamescope.nix
index 594e5be5fd58..af9ced471539 100644
--- a/nixos/modules/programs/gamescope.nix
+++ b/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/nixos/modules/programs/geary.nix b/nixos/modules/programs/geary.nix
index d9454a2247fd..6103ee7df859 100644
--- a/nixos/modules/programs/geary.nix
+++ b/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/nixos/modules/programs/git.nix b/nixos/modules/programs/git.nix
index 8fb69cbae28f..2a5d52f2d191 100644
--- a/nixos/modules/programs/git.nix
+++ b/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/nixos/modules/programs/gnome-disks.nix b/nixos/modules/programs/gnome-disks.nix
index dcb20bd6037c..4b128b471265 100644
--- a/nixos/modules/programs/gnome-disks.nix
+++ b/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/nixos/modules/programs/gnome-terminal.nix b/nixos/modules/programs/gnome-terminal.nix
index a8d82e0b018c..71a6b217880c 100644
--- a/nixos/modules/programs/gnome-terminal.nix
+++ b/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/nixos/modules/programs/gnupg.nix b/nixos/modules/programs/gnupg.nix
index 66be1f247fbd..c755d110170c 100644
--- a/nixos/modules/programs/gnupg.nix
+++ b/nixos/modules/programs/gnupg.nix
@@ -36,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.
'';
};
@@ -44,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.
@@ -54,7 +54,7 @@ in
agent.enableExtraSocket = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable extra socket for GnuPG agent.
'';
};
@@ -62,7 +62,7 @@ in
agent.enableBrowserSocket = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable browser socket for GnuPG agent.
'';
};
@@ -72,7 +72,7 @@ in
example = lib.literalMD "pkgs.pinentry-gnome3";
default = pkgs.pinentry-curses;
defaultText = lib.literalMD "matching the configured desktop environment or `pkgs.pinentry-curses`";
- description = lib.mdDoc ''
+ 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
@@ -87,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.
'';
@@ -96,7 +96,7 @@ 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.
'';
};
diff --git a/nixos/modules/programs/goldwarden.nix b/nixos/modules/programs/goldwarden.nix
new file mode 100644
index 000000000000..26f9a87c1986
--- /dev/null
+++ b/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/nixos/modules/programs/gpaste.nix b/nixos/modules/programs/gpaste.nix
index 37172c9583a3..1c34c86eb853 100644
--- a/nixos/modules/programs/gpaste.nix
+++ b/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/nixos/modules/programs/gphoto2.nix b/nixos/modules/programs/gphoto2.nix
index f31b1863963d..d99259b54582 100644
--- a/nixos/modules/programs/gphoto2.nix
+++ b/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/nixos/modules/programs/haguichi.nix b/nixos/modules/programs/haguichi.nix
index 699327c28c61..4f48551cf1da 100644
--- a/nixos/modules/programs/haguichi.nix
+++ b/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/nixos/modules/programs/hamster.nix b/nixos/modules/programs/hamster.nix
index f50438cc1704..0bb56ad7ff36 100644
--- a/nixos/modules/programs/hamster.nix
+++ b/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/nixos/modules/programs/htop.nix b/nixos/modules/programs/htop.nix
index 9dbab954b2bb..bf3d85108170 100644
--- a/nixos/modules/programs/htop.nix
+++ b/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/nixos/modules/programs/i3lock.nix b/nixos/modules/programs/i3lock.nix
index 44e2e04c2799..8068ecaf08ca 100644
--- a/nixos/modules/programs/i3lock.nix
+++ b/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/nixos/modules/programs/iay.nix b/nixos/modules/programs/iay.nix
index 1fa00e43795a..bbd401144311 100644
--- a/nixos/modules/programs/iay.nix
+++ b/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/nixos/modules/programs/iftop.nix b/nixos/modules/programs/iftop.nix
index 1db018858b65..c74714a9a6d6 100644
--- a/nixos/modules/programs/iftop.nix
+++ b/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/nixos/modules/programs/iotop.nix b/nixos/modules/programs/iotop.nix
index 0eb60b989eb3..b7c1c69f9ddd 100644
--- a/nixos/modules/programs/iotop.nix
+++ b/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/nixos/modules/programs/java.nix b/nixos/modules/programs/java.nix
index 251192183ebf..f201f67b42e4 100644
--- a/nixos/modules/programs/java.nix
+++ b/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/nixos/modules/programs/joycond-cemuhook.nix b/nixos/modules/programs/joycond-cemuhook.nix
index 7b129868db28..ebb0198ee60c 100644
--- a/nixos/modules/programs/joycond-cemuhook.nix
+++ b/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/nixos/modules/programs/k3b.nix b/nixos/modules/programs/k3b.nix
index 5d19e4f1cc4f..4d6385dab4f0 100644
--- a/nixos/modules/programs/k3b.nix
+++ b/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/nixos/modules/programs/k40-whisperer.nix b/nixos/modules/programs/k40-whisperer.nix
index 96cf159f2cf7..156ded6c39fe 100644
--- a/nixos/modules/programs/k40-whisperer.nix
+++ b/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/nixos/modules/programs/kbdlight.nix b/nixos/modules/programs/kbdlight.nix
index 6c3c79ddb4aa..8a2a0057cf2d 100644
--- a/nixos/modules/programs/kbdlight.nix
+++ b/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/nixos/modules/programs/kclock.nix b/nixos/modules/programs/kclock.nix
index 63d6fb1e2d7f..c2299a3f1b03 100644
--- a/nixos/modules/programs/kclock.nix
+++ b/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/nixos/modules/programs/kdeconnect.nix b/nixos/modules/programs/kdeconnect.nix
index 8cdf1eb4e645..143128140596 100644
--- a/nixos/modules/programs/kdeconnect.nix
+++ b/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";
};
diff --git a/nixos/modules/programs/kubeswitch.nix b/nixos/modules/programs/kubeswitch.nix
new file mode 100644
index 000000000000..304df48e3c11
--- /dev/null
+++ b/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/nixos/modules/programs/lazygit.nix b/nixos/modules/programs/lazygit.nix
new file mode 100644
index 000000000000..3e36a0e0c4a8
--- /dev/null
+++ b/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/nixos/modules/programs/less.nix b/nixos/modules/programs/less.nix
index 81c68307aee1..2cb762007511 100644
--- a/nixos/modules/programs/less.nix
+++ b/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/nixos/modules/programs/liboping.nix b/nixos/modules/programs/liboping.nix
index 39e75ba90c9d..4433f9767d6e 100644
--- a/nixos/modules/programs/liboping.nix
+++ b/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/nixos/modules/programs/light.nix b/nixos/modules/programs/light.nix
index 1cdf22a7699d..b1584a1b3d28 100644
--- a/nixos/modules/programs/light.nix
+++ b/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/nixos/modules/programs/mdevctl.nix b/nixos/modules/programs/mdevctl.nix
index 2b7285233350..be33835639d2 100644
--- a/nixos/modules/programs/mdevctl.nix
+++ b/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/nixos/modules/programs/mepo.nix b/nixos/modules/programs/mepo.nix
index 4b1706a2a0e5..22596892ff5d 100644
--- a/nixos/modules/programs/mepo.nix
+++ b/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/nixos/modules/programs/mininet.nix b/nixos/modules/programs/mininet.nix
index 3568736854d8..a9190ed98900 100644
--- a/nixos/modules/programs/mininet.nix
+++ b/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/nixos/modules/programs/minipro.nix b/nixos/modules/programs/minipro.nix
index 8cb64866a84c..e5846d13fa40 100644
--- a/nixos/modules/programs/minipro.nix
+++ b/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/nixos/modules/programs/miriway.nix b/nixos/modules/programs/miriway.nix
index e8a10770b6a3..00c1356ab083 100644
--- a/nixos/modules/programs/miriway.nix
+++ b/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/nixos/modules/programs/mosh.nix b/nixos/modules/programs/mosh.nix
index 593246ab6dcd..897bcf941a5d 100644
--- a/nixos/modules/programs/mosh.nix
+++ b/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/nixos/modules/programs/msmtp.nix b/nixos/modules/programs/msmtp.nix
index a9aed027bdb7..9c067bdc9695 100644
--- a/nixos/modules/programs/msmtp.nix
+++ b/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/nixos/modules/programs/mtr.nix b/nixos/modules/programs/mtr.nix
index e247d645b861..6a767df15f09 100644
--- a/nixos/modules/programs/mtr.nix
+++ b/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/nixos/modules/programs/nano.nix b/nixos/modules/programs/nano.nix
index 461681b59863..10fa2a0dfbcd 100644
--- a/nixos/modules/programs/nano.nix
+++ b/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/nixos/modules/programs/nautilus-open-any-terminal.nix b/nixos/modules/programs/nautilus-open-any-terminal.nix
index d205fb3ec916..8a38c4cb5e48 100644
--- a/nixos/modules/programs/nautilus-open-any-terminal.nix
+++ b/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/nixos/modules/programs/nbd.nix b/nixos/modules/programs/nbd.nix
index a44403021e35..fea9bc1ff71a 100644
--- a/nixos/modules/programs/nbd.nix
+++ b/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/nixos/modules/programs/neovim.nix b/nixos/modules/programs/neovim.nix
index 77abec7ef7e9..6f6829444a64 100644
--- a/nixos/modules/programs/neovim.nix
+++ b/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/nixos/modules/programs/nethoscope.nix b/nixos/modules/programs/nethoscope.nix
index d8ece61c90a2..495548e9c656 100644
--- a/nixos/modules/programs/nethoscope.nix
+++ b/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/nixos/modules/programs/nexttrace.nix b/nixos/modules/programs/nexttrace.nix
index 09143c5f861d..9380a988088b 100644
--- a/nixos/modules/programs/nexttrace.nix
+++ b/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/nixos/modules/programs/nh.nix b/nixos/modules/programs/nh.nix
new file mode 100644
index 000000000000..c42fb2fc724a
--- /dev/null
+++ b/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/nixos/modules/programs/nix-index.nix b/nixos/modules/programs/nix-index.nix
index f3e7d22737fa..76d7c3d8c532 100644
--- a/nixos/modules/programs/nix-index.nix
+++ b/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/nixos/modules/programs/nix-ld.nix b/nixos/modules/programs/nix-ld.nix
index 6f36ce33640c..770cccd13b50 100644
--- a/nixos/modules/programs/nix-ld.nix
+++ b/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/nixos/modules/programs/nm-applet.nix b/nixos/modules/programs/nm-applet.nix
index 4b09b1884d7e..ed048192e2e0 100644
--- a/nixos/modules/programs/nm-applet.nix
+++ b/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/nixos/modules/programs/nncp.nix b/nixos/modules/programs/nncp.nix
index e078b718410c..aa2e7c7a6e5b 100644
--- a/nixos/modules/programs/nncp.nix
+++ b/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/nixos/modules/programs/noisetorch.nix b/nixos/modules/programs/noisetorch.nix
index d8135877d02f..70a0441bd767 100644
--- a/nixos/modules/programs/noisetorch.nix
+++ b/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/nixos/modules/programs/npm.nix b/nixos/modules/programs/npm.nix
index 8113ea1ba4ea..b379f0165bfe 100644
--- a/nixos/modules/programs/npm.nix
+++ b/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/nixos/modules/programs/ns-usbloader.nix b/nixos/modules/programs/ns-usbloader.nix
index 8d0b698d6b4c..1f4b931e1cc1 100644
--- a/nixos/modules/programs/ns-usbloader.nix
+++ b/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/nixos/modules/programs/oddjobd.nix b/nixos/modules/programs/oddjobd.nix
index 08bb8b268473..019ca58a6048 100644
--- a/nixos/modules/programs/oddjobd.nix
+++ b/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/nixos/modules/programs/openvpn3.nix b/nixos/modules/programs/openvpn3.nix
index 37a1bfeb0c3e..6415cccecb4f 100644
--- a/nixos/modules/programs/openvpn3.nix
+++ b/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/nixos/modules/programs/pantheon-tweaks.nix b/nixos/modules/programs/pantheon-tweaks.nix
index 82f93619db15..0b8a19ea22c0 100644
--- a/nixos/modules/programs/pantheon-tweaks.nix
+++ b/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/nixos/modules/programs/partition-manager.nix b/nixos/modules/programs/partition-manager.nix
index cf0491ff028f..1a66a3f04c41 100644
--- a/nixos/modules/programs/partition-manager.nix
+++ b/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/nixos/modules/programs/plotinus.md b/nixos/modules/programs/plotinus.md
index fac3bbad1e08..0a2c688c722c 100644
--- a/nixos/modules/programs/plotinus.md
+++ b/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/nixos/modules/programs/plotinus.nix b/nixos/modules/programs/plotinus.nix
index c2b6884d6490..41c75b69a2d2 100644
--- a/nixos/modules/programs/plotinus.nix
+++ b/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/nixos/modules/programs/projecteur.nix b/nixos/modules/programs/projecteur.nix
index 140de0209e68..af186e3d250b 100644
--- a/nixos/modules/programs/projecteur.nix
+++ b/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/nixos/modules/programs/proxychains.nix b/nixos/modules/programs/proxychains.nix
index acd41f355244..b15475dac075 100644
--- a/nixos/modules/programs/proxychains.nix
+++ b/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/nixos/modules/programs/qdmr.nix b/nixos/modules/programs/qdmr.nix
index 03ad4d008873..efd0e1fc9885 100644
--- a/nixos/modules/programs/qdmr.nix
+++ b/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/nixos/modules/programs/regreet.nix b/nixos/modules/programs/regreet.nix
index 55d0c11781ab..0db1f59e5912 100644
--- a/nixos/modules/programs/regreet.nix
+++ b/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/nixos/modules/programs/rog-control-center.nix b/nixos/modules/programs/rog-control-center.nix
index 4aef5143ac7f..7413ca3daf05 100644
--- a/nixos/modules/programs/rog-control-center.nix
+++ b/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/nixos/modules/programs/rust-motd.nix b/nixos/modules/programs/rust-motd.nix
index 4c9b1018596b..93240fcdd85e 100644
--- a/nixos/modules/programs/rust-motd.nix
+++ b/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/nixos/modules/programs/ryzen-monitor-ng.nix b/nixos/modules/programs/ryzen-monitor-ng.nix
new file mode 100644
index 000000000000..cb0c391ce6b1
--- /dev/null
+++ b/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/nixos/modules/programs/screen.nix b/nixos/modules/programs/screen.nix
index 41bfb5d7809a..01af5b4c9597 100644
--- a/nixos/modules/programs/screen.nix
+++ b/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/nixos/modules/programs/seahorse.nix b/nixos/modules/programs/seahorse.nix
index 5e179c1446ed..c0a356bff57c 100644
--- a/nixos/modules/programs/seahorse.nix
+++ b/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/nixos/modules/programs/sedutil.nix b/nixos/modules/programs/sedutil.nix
index d5e20a8815d4..c62ca24eaa01 100644
--- a/nixos/modules/programs/sedutil.nix
+++ b/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/nixos/modules/programs/shadow.nix b/nixos/modules/programs/shadow.nix
index b232767385c5..2d20644ec51e 100644
--- a/nixos/modules/programs/shadow.nix
+++ b/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/nixos/modules/programs/sharing.nix b/nixos/modules/programs/sharing.nix
index 9ab51859dc51..211dc9815166 100644
--- a/nixos/modules/programs/sharing.nix
+++ b/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/nixos/modules/programs/singularity.nix b/nixos/modules/programs/singularity.nix
index 7f285ab05537..f4c0a6fe487e 100644
--- a/nixos/modules/programs/singularity.nix
+++ b/nixos/modules/programs/singularity.nix
@@ -1,4 +1,9 @@
-{ config, pkgs, lib, ... }:
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}:
with lib;
let
@@ -7,18 +12,16 @@ 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.
'';
};
- package = mkPackageOption pkgs "singularity" {
- example = "apptainer";
- };
+ package = mkPackageOption pkgs "singularity" { example = "apptainer"; };
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 +46,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 +58,7 @@ in
type = types.bool;
default = true;
example = false;
- description = mdDoc ''
+ description = ''
Whether to enable the `--fakeroot` support of Singularity/Apptainer.
'';
};
@@ -68,24 +71,26 @@ 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.
'';
};
};
config = mkIf cfg.enable {
- programs.singularity.packageOverriden = (cfg.package.override (
- optionalAttrs cfg.enableExternalLocalStateDir {
- externalLocalStateDir = "/var/lib";
- } // optionalAttrs cfg.enableFakeroot {
- newuidmapPath = "/run/wrappers/bin/newuidmap";
- newgidmapPath = "/run/wrappers/bin/newgidmap";
- } // optionalAttrs cfg.enableSuid {
- enableSuid = true;
- starterSuidPath = "/run/wrappers/bin/${cfg.package.projectName}-suid";
- }
- ));
+ programs.singularity.packageOverriden = (
+ cfg.package.override (
+ optionalAttrs cfg.enableExternalLocalStateDir { externalLocalStateDir = "/var/lib"; }
+ // optionalAttrs cfg.enableFakeroot {
+ newuidmapPath = "/run/wrappers/bin/newuidmap";
+ newgidmapPath = "/run/wrappers/bin/newgidmap";
+ }
+ // optionalAttrs cfg.enableSuid {
+ enableSuid = true;
+ starterSuidPath = "/run/wrappers/bin/${cfg.package.projectName}-suid";
+ }
+ )
+ );
environment.systemPackages = [ cfg.packageOverriden ];
security.wrappers."${cfg.packageOverriden.projectName}-suid" = mkIf cfg.enableSuid {
setuid = true;
@@ -97,5 +102,4 @@ in
"d /var/lib/${cfg.packageOverriden.projectName}/mnt/session 0770 root root -"
];
};
-
}
diff --git a/nixos/modules/programs/skim.nix b/nixos/modules/programs/skim.nix
index 57a5d68ec3d5..9c573b39bbbc 100644
--- a/nixos/modules/programs/skim.nix
+++ b/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/nixos/modules/programs/slock.nix b/nixos/modules/programs/slock.nix
index 3db9866d9f1c..f39b4d5e9280 100644
--- a/nixos/modules/programs/slock.nix
+++ b/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/nixos/modules/programs/sniffnet.nix b/nixos/modules/programs/sniffnet.nix
index 98e9f628a9bc..631a155e35b5 100644
--- a/nixos/modules/programs/sniffnet.nix
+++ b/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/nixos/modules/programs/soundmodem.nix b/nixos/modules/programs/soundmodem.nix
new file mode 100644
index 000000000000..ab992c63c608
--- /dev/null
+++ b/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/nixos/modules/programs/spacefm.nix b/nixos/modules/programs/spacefm.nix
index b4ba9dcdea56..fec14fca48e1 100644
--- a/nixos/modules/programs/spacefm.nix
+++ b/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/nixos/modules/programs/ssh.nix b/nixos/modules/programs/ssh.nix
index 0c1461709c22..2d25c7a93662 100644
--- a/nixos/modules/programs/ssh.nix
+++ b/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/nixos/modules/programs/steam.nix b/nixos/modules/programs/steam.nix
index c93a34f61849..58aa0aa25b08 100644
--- a/nixos/modules/programs/steam.nix
+++ b/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;
@@ -45,6 +45,8 @@ 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 [ ];
@@ -59,10 +61,8 @@ in {
# use the setuid wrapped bubblewrap
bubblewrap = "${config.security.wrapperDir}/..";
};
- } // optionalAttrs cfg.extest.enable {
- extraEnv.LD_PRELOAD = "${pkgs.pkgsi686Linux.extest}/lib/libextest.so";
});
- description = lib.mdDoc ''
+ description = ''
The Steam package to use. Additional libraries are added from the system
configuration to ensure graphics work properly.
@@ -79,7 +79,7 @@ in {
proton-ge-bin
]
'';
- description = lib.mdDoc ''
+ 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.
@@ -91,7 +91,7 @@ in {
remotePlay.openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open ports in the firewall for Steam Remote Play.
'';
};
@@ -99,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.
'';
};
@@ -107,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.
'';
};
@@ -129,7 +129,7 @@ in {
env = mkOption {
type = types.attrsOf types.str;
default = { };
- description = mdDoc ''
+ description = ''
Environmental variables to be passed to GameScope for the session.
'';
};
@@ -137,10 +137,10 @@ in {
};
};
- extest.enable = mkEnableOption (lib.mdDoc ''
+ 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 {
@@ -161,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;
diff --git a/nixos/modules/programs/streamdeck-ui.nix b/nixos/modules/programs/streamdeck-ui.nix
index 47b1681cd634..6bec2abdfbec 100644
--- a/nixos/modules/programs/streamdeck-ui.nix
+++ b/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/nixos/modules/programs/sysdig.nix b/nixos/modules/programs/sysdig.nix
index ccb1e1d4c5f1..cf2cbab5cf6e 100644
--- a/nixos/modules/programs/sysdig.nix
+++ b/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/nixos/modules/programs/system-config-printer.nix b/nixos/modules/programs/system-config-printer.nix
index 7c7eea580545..34592dd7064b 100644
--- a/nixos/modules/programs/system-config-printer.nix
+++ b/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/nixos/modules/programs/systemtap.nix b/nixos/modules/programs/systemtap.nix
index cbb9ec164c6c..d23bd13fdd85 100644
--- a/nixos/modules/programs/systemtap.nix
+++ b/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/nixos/modules/programs/thefuck.nix b/nixos/modules/programs/thefuck.nix
index e057d1ca657d..ba2e39c013ae 100644
--- a/nixos/modules/programs/thefuck.nix
+++ b/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/nixos/modules/programs/thunar.nix b/nixos/modules/programs/thunar.nix
index cb85b3886c13..5ea2982dd93c 100644
--- a/nixos/modules/programs/thunar.nix
+++ b/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/nixos/modules/programs/tmux.nix b/nixos/modules/programs/tmux.nix
index 0d1c7c9cdf0f..b4b476a801dd 100644
--- a/nixos/modules/programs/tmux.nix
+++ b/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/nixos/modules/programs/traceroute.nix b/nixos/modules/programs/traceroute.nix
index df5f10b87d5f..6e04057ac503 100644
--- a/nixos/modules/programs/traceroute.nix
+++ b/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/nixos/modules/programs/trippy.nix b/nixos/modules/programs/trippy.nix
index 6e31aea43e75..707370fb31a5 100644
--- a/nixos/modules/programs/trippy.nix
+++ b/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/nixos/modules/programs/tsm-client.nix b/nixos/modules/programs/tsm-client.nix
index d31a1fb3f375..82fbc9b26e2d 100644
--- a/nixos/modules/programs/tsm-client.nix
+++ b/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/nixos/modules/programs/turbovnc.nix b/nixos/modules/programs/turbovnc.nix
index 511b6badc041..fbb3a7bf22e9 100644
--- a/nixos/modules/programs/turbovnc.nix
+++ b/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/nixos/modules/programs/udevil.nix b/nixos/modules/programs/udevil.nix
index b0f00b4b541b..44b9dd9234b3 100644
--- a/nixos/modules/programs/udevil.nix
+++ b/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/nixos/modules/programs/usbtop.nix b/nixos/modules/programs/usbtop.nix
index e262ae3745be..4f13ce5f6262 100644
--- a/nixos/modules/programs/usbtop.nix
+++ b/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/nixos/modules/programs/vim.nix b/nixos/modules/programs/vim.nix
index da2813f4bb53..eb3499fd243f 100644
--- a/nixos/modules/programs/vim.nix
+++ b/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/nixos/modules/programs/wavemon.nix b/nixos/modules/programs/wavemon.nix
index 4dbf2748913e..e5ccacba75d4 100644
--- a/nixos/modules/programs/wavemon.nix
+++ b/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/nixos/modules/programs/wayland/cardboard.nix b/nixos/modules/programs/wayland/cardboard.nix
index 77a094a71700..96089bdf94ed 100644
--- a/nixos/modules/programs/wayland/cardboard.nix
+++ b/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/nixos/modules/programs/wayland/hyprland.nix b/nixos/modules/programs/wayland/hyprland.nix
index 9061ce5da83a..e648eaa1b68e 100644
--- a/nixos/modules/programs/wayland/hyprland.nix
+++ b/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,33 @@ 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; };
+
+ envVars.enable = mkEnableOption null // {
+ default = true;
+ example = false;
+ description = ''
+ Set environment variables for Hyprland to work properly.
+ Enabled by default.
+ '';
+ };
+
+ 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 +75,28 @@ 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 ];
};
+
+ environment.sessionVariables = mkIf cfg.envVars.enable {
+ XDG_CURRENT_DESKTOP = "Hyprland";
+ XDG_SESSION_DESKTOP = "Hyprland";
+ XDG_SESSION_TYPE = "wayland";
+ GDK_BACKEND = "wayland,x11";
+ QT_QPA_PLATFORM = "wayland;xcb";
+ _JAVA_AWT_WM_NONREPARENTING = "1"; # Fix for Java applications on tiling window managers
+ };
+
+ 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/nixos/modules/programs/wayland/labwc.nix b/nixos/modules/programs/wayland/labwc.nix
index d0806c3aa5d0..c09ab8240d9f 100644
--- a/nixos/modules/programs/wayland/labwc.nix
+++ b/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/nixos/modules/programs/wayland/river.nix b/nixos/modules/programs/wayland/river.nix
index 995129b9710a..d0e309646b0e 100644
--- a/nixos/modules/programs/wayland/river.nix
+++ b/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/nixos/modules/programs/wayland/sway.nix b/nixos/modules/programs/wayland/sway.nix
index 2bd297af5254..348e1db7cdc1 100644
--- a/nixos/modules/programs/wayland/sway.nix
+++ b/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
@@ -174,7 +174,7 @@ in {
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/nixos/modules/programs/wayland/waybar.nix b/nixos/modules/programs/wayland/waybar.nix
index ec60b84f6997..ffe889504cd3 100644
--- a/nixos/modules/programs/wayland/waybar.nix
+++ b/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/nixos/modules/programs/wayland/wayfire.nix b/nixos/modules/programs/wayland/wayfire.nix
index 0840246e5e3e..7acc5b2739cb 100644
--- a/nixos/modules/programs/wayland/wayfire.nix
+++ b/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/nixos/modules/programs/weylus.nix b/nixos/modules/programs/weylus.nix
index f40dfd5c9613..a47dccb95cd9 100644
--- a/nixos/modules/programs/weylus.nix
+++ b/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/nixos/modules/programs/wireshark.nix b/nixos/modules/programs/wireshark.nix
index c0dc349cca4a..2d947154e822 100644
--- a/nixos/modules/programs/wireshark.nix
+++ b/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/nixos/modules/programs/wshowkeys.nix b/nixos/modules/programs/wshowkeys.nix
index ebb5c5509442..1fef33e04717 100644
--- a/nixos/modules/programs/wshowkeys.nix
+++ b/nixos/modules/programs/wshowkeys.nix
@@ -1,27 +1,31 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
let
cfg = config.programs.wshowkeys;
-in {
- meta.maintainers = with maintainers; [ primeos ];
-
+in
+{
options = {
programs.wshowkeys = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = lib.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'';
+ package = lib.mkPackageOption pkgs "wshowkeys" { };
};
};
- config = mkIf cfg.enable {
- security.wrappers.wshowkeys =
- { setuid = true;
- owner = "root";
- group = "root";
- source = "${pkgs.wshowkeys}/bin/wshowkeys";
- };
+ config = lib.mkIf cfg.enable {
+ security.wrappers.wshowkeys = {
+ setuid = true;
+ owner = "root";
+ group = "root";
+ source = lib.getExe cfg.package;
+ };
};
+
+ meta.maintainers = with lib.maintainers; [ primeos ];
}
diff --git a/nixos/modules/programs/xastir.nix b/nixos/modules/programs/xastir.nix
index 6d5fc59aac50..d9c687289ec2 100644
--- a/nixos/modules/programs/xastir.nix
+++ b/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/nixos/modules/programs/xfconf.nix b/nixos/modules/programs/xfconf.nix
index b0f45339335d..8e854b40e513 100644
--- a/nixos/modules/programs/xfconf.nix
+++ b/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/nixos/modules/programs/xfs_quota.nix b/nixos/modules/programs/xfs_quota.nix
index 0fc2958b3f38..8f70cc2d9416 100644
--- a/nixos/modules/programs/xfs_quota.nix
+++ b/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/nixos/modules/programs/xonsh.nix b/nixos/modules/programs/xonsh.nix
index 2ece772c929e..fefe6b456c96 100644
--- a/nixos/modules/programs/xonsh.nix
+++ b/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/nixos/modules/programs/xss-lock.nix b/nixos/modules/programs/xss-lock.nix
index 87b3957ab834..1bb73905599f 100644
--- a/nixos/modules/programs/xss-lock.nix
+++ b/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/nixos/modules/programs/xwayland.nix b/nixos/modules/programs/xwayland.nix
index 8d13e4c22b5b..3a8080fa4c4d 100644
--- a/nixos/modules/programs/xwayland.nix
+++ b/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/nixos/modules/programs/yabar.nix b/nixos/modules/programs/yabar.nix
index 58ffe555715d..6e117506a2dc 100644
--- a/nixos/modules/programs/yabar.nix
+++ b/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/nixos/modules/programs/yazi.nix b/nixos/modules/programs/yazi.nix
index 338eddb60d80..5905f2afb946 100644
--- a/nixos/modules/programs/yazi.nix
+++ b/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/nixos/modules/programs/zmap.nix b/nixos/modules/programs/zmap.nix
index 056f78883061..827d9bedca13 100644
--- a/nixos/modules/programs/zmap.nix
+++ b/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/nixos/modules/programs/zsh/oh-my-zsh.md b/nixos/modules/programs/zsh/oh-my-zsh.md
index 6a310006edbf..7e4a41641eea 100644
--- a/nixos/modules/programs/zsh/oh-my-zsh.md
+++ b/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/nixos/modules/programs/zsh/oh-my-zsh.nix b/nixos/modules/programs/zsh/oh-my-zsh.nix
index 09c3bb974a50..f2a5a7560e40 100644
--- a/nixos/modules/programs/zsh/oh-my-zsh.nix
+++ b/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/nixos/modules/programs/zsh/zsh-autoenv.nix b/nixos/modules/programs/zsh/zsh-autoenv.nix
index 0894bfc3fdda..f07fb5c24d7b 100644
--- a/nixos/modules/programs/zsh/zsh-autoenv.nix
+++ b/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/nixos/modules/programs/zsh/zsh-autosuggestions.nix b/nixos/modules/programs/zsh/zsh-autosuggestions.nix
index d3a9c372e89b..2e53e907d547 100644
--- a/nixos/modules/programs/zsh/zsh-autosuggestions.nix
+++ b/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/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix
index cec4be1cb01e..46bc4fcb87f4 100644
--- a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix
+++ b/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/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix
index cad639f299c8..d7e300b50136 100644
--- a/nixos/modules/programs/zsh/zsh.nix
+++ b/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/nixos/modules/rename.nix b/nixos/modules/rename.nix
index 0a975fcd98c8..01985995a651 100644
--- a/nixos/modules/rename.nix
+++ b/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/nixos/modules/security/acme/default.md b/nixos/modules/security/acme/default.md
index 38fbfbf0caec..a6ef2a3fdf18 100644
--- a/nixos/modules/security/acme/default.md
+++ b/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/nixos/modules/security/acme/default.nix b/nixos/modules/security/acme/default.nix
index 19297d267851..5ffafdc37fef 100644
--- a/nixos/modules/security/acme/default.nix
+++ b/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/nixos/modules/security/apparmor.nix b/nixos/modules/security/apparmor.nix
index ea1af6c6e2f2..a4b3807e4e0f 100644
--- a/nixos/modules/security/apparmor.nix
+++ b/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/nixos/modules/security/audit.nix b/nixos/modules/security/audit.nix
index afc7dd13039d..403aeff020dc 100644
--- a/nixos/modules/security/audit.nix
+++ b/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/nixos/modules/security/auditd.nix b/nixos/modules/security/auditd.nix
index 253ee1d4dd0e..cd377c66f86d 100644
--- a/nixos/modules/security/auditd.nix
+++ b/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/nixos/modules/security/ca.nix b/nixos/modules/security/ca.nix
index ae188ea709dd..af5d91b35f2e 100644
--- a/nixos/modules/security/ca.nix
+++ b/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/nixos/modules/security/chromium-suid-sandbox.nix b/nixos/modules/security/chromium-suid-sandbox.nix
index cab4b9f8d3ab..bb99c053f718 100644
--- a/nixos/modules/security/chromium-suid-sandbox.nix
+++ b/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/nixos/modules/security/dhparams.nix b/nixos/modules/security/dhparams.nix
index 9fed7e012b1e..738062c95c47 100644
--- a/nixos/modules/security/dhparams.nix
+++ b/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/nixos/modules/security/doas.nix b/nixos/modules/security/doas.nix
index 115ca33efb5c..457a48a987aa 100644
--- a/nixos/modules/security/doas.nix
+++ b/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/nixos/modules/security/duosec.nix b/nixos/modules/security/duosec.nix
index ef76bfeb6d66..e755b5f0ee53 100644
--- a/nixos/modules/security/duosec.nix
+++ b/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/nixos/modules/security/google_oslogin.nix b/nixos/modules/security/google_oslogin.nix
index 95975943ff80..227e3b5bc4b9 100644
--- a/nixos/modules/security/google_oslogin.nix
+++ b/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/nixos/modules/security/ipa.nix b/nixos/modules/security/ipa.nix
index 3bf8b11f8626..543b1abfa672 100644
--- a/nixos/modules/security/ipa.nix
+++ b/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/nixos/modules/security/isolate.nix b/nixos/modules/security/isolate.nix
new file mode 100644
index 000000000000..3cc0176f3db3
--- /dev/null
+++ b/nixos/modules/security/isolate.nix
@@ -0,0 +1,133 @@
+{ config, lib, pkgs, ... }:
+
+let
+ inherit (lib) mkEnableOption mkPackageOption mkOption types mkIf maintainers;
+
+ cfg = config.security.isolate;
+ configFile = pkgs.writeText "isolate-config.cf" ''
+ box_root=${cfg.boxRoot}
+ lock_root=${cfg.lockRoot}
+ cg_root=${cfg.cgRoot}
+ first_uid=${toString cfg.firstUid}
+ first_gid=${toString cfg.firstGid}
+ num_boxes=${toString cfg.numBoxes}
+ restricted_init=${if cfg.restrictedInit then "1" else "0"}
+ ${cfg.extraConfig}
+ '';
+ isolate = pkgs.symlinkJoin {
+ name = "isolate-wrapped-${pkgs.isolate.version}";
+
+ paths = [ pkgs.isolate ];
+
+ nativeBuildInputs = [ pkgs.makeWrapper ];
+
+ postBuild = ''
+ wrapProgram $out/bin/isolate \
+ --set ISOLATE_CONFIG_FILE ${configFile}
+
+ wrapProgram $out/bin/isolate-cg-keeper \
+ --set ISOLATE_CONFIG_FILE ${configFile}
+ '';
+ };
+in
+{
+ options.security.isolate = {
+ enable = mkEnableOption ''
+ Sandbox for securely executing untrusted programs
+ '';
+
+ package = mkPackageOption pkgs "isolate-unwrapped" { };
+
+ boxRoot = mkOption {
+ type = types.path;
+ default = "/var/lib/isolate/boxes";
+ description = ''
+ All sandboxes are created under this directory.
+ To avoid symlink attacks, this directory and all its ancestors
+ must be writeable only by root.
+ '';
+ };
+
+ lockRoot = mkOption {
+ type = types.path;
+ default = "/run/isolate/locks";
+ description = ''
+ Directory where lock files are created.
+ '';
+ };
+
+ cgRoot = mkOption {
+ type = types.str;
+ default = "auto:/run/isolate/cgroup";
+ description = ''
+ Control group which subgroups are placed under.
+ Either an explicit path to a subdirectory in cgroupfs, or "auto:file" to read
+ the path from "file", where it is put by `isolate-cg-helper`.
+ '';
+ };
+
+ firstUid = mkOption {
+ type = types.numbers.between 1000 65533;
+ default = 60000;
+ description = ''
+ Start of block of UIDs reserved for sandboxes.
+ '';
+ };
+
+ firstGid = mkOption {
+ type = types.numbers.between 1000 65533;
+ default = 60000;
+ description = ''
+ Start of block of GIDs reserved for sandboxes.
+ '';
+ };
+
+ numBoxes = mkOption {
+ type = types.numbers.between 1000 65533;
+ default = 1000;
+ description = ''
+ Number of UIDs and GIDs to reserve, starting from
+ {option}`firstUid` and {option}`firstGid`.
+ '';
+ };
+
+ restrictedInit = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ If true, only root can create sandboxes.
+ '';
+ };
+
+ extraConfig = mkOption {
+ type = types.str;
+ default = "";
+ description = ''
+ Extra configuration to append to the configuration file.
+ '';
+ };
+ };
+
+ config = mkIf cfg.enable {
+ environment.systemPackages = [
+ isolate
+ ];
+
+ systemd.services.isolate = {
+ description = "Isolate control group hierarchy daemon";
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ Type = "notify";
+ ExecStart = "${isolate}/bin/isolate-cg-keeper";
+ Slice = "isolate.slice";
+ Delegate = true;
+ };
+ };
+
+ systemd.slices.isolate = {
+ description = "Isolate sandbox slice";
+ };
+
+ meta.maintainers = with maintainers; [ virchau13 ];
+ };
+}
diff --git a/nixos/modules/security/krb5/default.nix b/nixos/modules/security/krb5/default.nix
index 5921982f954c..78426c07cbc9 100644
--- a/nixos/modules/security/krb5/default.nix
+++ b/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/nixos/modules/security/krb5/krb5-conf-format.nix b/nixos/modules/security/krb5/krb5-conf-format.nix
index d01e47a40be0..5a6bbed9fd18 100644
--- a/nixos/modules/security/krb5/krb5-conf-format.nix
+++ b/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/nixos/modules/security/lock-kernel-modules.nix b/nixos/modules/security/lock-kernel-modules.nix
index 461b9ffe7ee0..3a1ad4d8b374 100644
--- a/nixos/modules/security/lock-kernel-modules.nix
+++ b/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/nixos/modules/security/misc.nix b/nixos/modules/security/misc.nix
index cd48eade7784..5e13b4caddd8 100644
--- a/nixos/modules/security/misc.nix
+++ b/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/nixos/modules/security/oath.nix b/nixos/modules/security/oath.nix
index 334286653846..93bdc851117a 100644
--- a/nixos/modules/security/oath.nix
+++ b/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/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix
index 560e5eff5c39..5d3bed2fb02c 100644
--- a/nixos/modules/security/pam.nix
+++ b/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`.
'';
@@ -1045,34 +1044,30 @@ in
See [issue #31611](https://github.com/NixOS/nixpkgs/issues/31611)
:::
'';
- example = [ "/etc/ssh/authorized_keys.d/%u" ];
- default = config.services.openssh.authorizedKeysFiles;
- defaultText = literalExpression "config.services.openssh.authorizedKeysFiles";
+ default = [ "/etc/ssh/authorized_keys.d/%u" ];
};
};
- 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 +1079,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 +1098,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 +1110,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 +1127,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 +1147,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 +1168,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 +1182,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 +1198,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 +1212,7 @@ in
debug = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Debug output to stderr.
'';
};
@@ -1225,7 +1220,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 +1229,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 +1244,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 +1261,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 +1273,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 +1289,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 +1304,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 +1313,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 +1330,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 +1345,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 +1358,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 +1387,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 +1399,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 +1408,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 +1417,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.";
};
};
diff --git a/nixos/modules/security/pam_mount.nix b/nixos/modules/security/pam_mount.nix
index 26f906f2a76a..bc0c5c5fbfbc 100644
--- a/nixos/modules/security/pam_mount.nix
+++ b/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/nixos/modules/security/please.nix b/nixos/modules/security/please.nix
index ff4bfc9f1be1..39df5dfd50d5 100644
--- a/nixos/modules/security/please.nix
+++ b/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/nixos/modules/security/polkit.nix b/nixos/modules/security/polkit.nix
index 327f49c0b637..f7ee4f0068dd 100644
--- a/nixos/modules/security/polkit.nix
+++ b/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/nixos/modules/security/rtkit.nix b/nixos/modules/security/rtkit.nix
index 0f58b4dce84a..ad8746808e85 100644
--- a/nixos/modules/security/rtkit.nix
+++ b/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/nixos/modules/security/sudo-rs.nix b/nixos/modules/security/sudo-rs.nix
index b4376562c34d..6ccf42ed7f08 100644
--- a/nixos/modules/security/sudo-rs.nix
+++ b/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/nixos/modules/security/sudo.nix b/nixos/modules/security/sudo.nix
index 6aa9445eab65..2959efd05091 100644
--- a/nixos/modules/security/sudo.nix
+++ b/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/nixos/modules/security/systemd-confinement.nix b/nixos/modules/security/systemd-confinement.nix
index cdf6c22ef1b6..0304749b8d10 100644
--- a/nixos/modules/security/systemd-confinement.nix
+++ b/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/nixos/modules/security/tpm2.nix b/nixos/modules/security/tpm2.nix
index 708c3a69d174..bd3c8a5b0c43 100644
--- a/nixos/modules/security/tpm2.nix
+++ b/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/nixos/modules/security/wrappers/default.nix b/nixos/modules/security/wrappers/default.nix
index a298686b34e9..606b620ef120 100644
--- a/nixos/modules/security/wrappers/default.nix
+++ b/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/nixos/modules/services/admin/docuum.nix b/nixos/modules/services/admin/docuum.nix
new file mode 100644
index 000000000000..6f6cd4e02733
--- /dev/null
+++ b/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/nixos/modules/services/admin/meshcentral.nix b/nixos/modules/services/admin/meshcentral.nix
index d056356568da..25779e01123e 100644
--- a/nixos/modules/services/admin/meshcentral.nix
+++ b/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/nixos/modules/services/admin/oxidized.nix b/nixos/modules/services/admin/oxidized.nix
index 56f33031498a..49ea3ced76a4 100644
--- a/nixos/modules/services/admin/oxidized.nix
+++ b/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/nixos/modules/services/admin/pgadmin.nix b/nixos/modules/services/admin/pgadmin.nix
index 20b6b6670d9c..ead0c3c6c9a3 100644
--- a/nixos/modules/services/admin/pgadmin.nix
+++ b/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/nixos/modules/services/admin/salt/master.nix b/nixos/modules/services/admin/salt/master.nix
index 4346022970e1..c447540da1f8 100644
--- a/nixos/modules/services/admin/salt/master.nix
+++ b/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/nixos/modules/services/admin/salt/minion.nix b/nixos/modules/services/admin/salt/minion.nix
index 3ae02a4cc5d5..5d4efc6541c7 100644
--- a/nixos/modules/services/admin/salt/minion.nix
+++ b/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/nixos/modules/services/amqp/activemq/default.nix b/nixos/modules/services/amqp/activemq/default.nix
index b1f9b7a3bb1f..5c886161e44c 100644
--- a/nixos/modules/services/amqp/activemq/default.nix
+++ b/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/nixos/modules/services/amqp/rabbitmq.nix b/nixos/modules/services/amqp/rabbitmq.nix
index f2dee07c91ab..b5aebaaf1275 100644
--- a/nixos/modules/services/amqp/rabbitmq.nix
+++ b/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/nixos/modules/services/audio/alsa.nix b/nixos/modules/services/audio/alsa.nix
index 155780199fd6..e53da4b64e7b 100644
--- a/nixos/modules/services/audio/alsa.nix
+++ b/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/nixos/modules/services/audio/botamusique.nix b/nixos/modules/services/audio/botamusique.nix
index 42227cb14722..c764a79b1166 100644
--- a/nixos/modules/services/audio/botamusique.nix
+++ b/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/nixos/modules/services/audio/gmediarender.nix b/nixos/modules/services/audio/gmediarender.nix
index a4cb89098db7..3f031aeedb7b 100644
--- a/nixos/modules/services/audio/gmediarender.nix
+++ b/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/nixos/modules/services/audio/gonic.nix b/nixos/modules/services/audio/gonic.nix
index 66daeb60b503..15a35571acba 100644
--- a/nixos/modules/services/audio/gonic.nix
+++ b/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/nixos/modules/services/audio/goxlr-utility.nix b/nixos/modules/services/audio/goxlr-utility.nix
index c047dbb221b1..6081b3707f54 100644
--- a/nixos/modules/services/audio/goxlr-utility.nix
+++ b/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/nixos/modules/services/audio/hqplayerd.nix b/nixos/modules/services/audio/hqplayerd.nix
index d54400b18e30..d6ac8c58c03a 100644
--- a/nixos/modules/services/audio/hqplayerd.nix
+++ b/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/nixos/modules/services/audio/icecast.nix b/nixos/modules/services/audio/icecast.nix
index 63049bd93ab9..9237baa007da 100644
--- a/nixos/modules/services/audio/icecast.nix
+++ b/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/nixos/modules/services/audio/jack.nix b/nixos/modules/services/audio/jack.nix
index 3869bd974cce..20ba091542fe 100644
--- a/nixos/modules/services/audio/jack.nix
+++ b/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/nixos/modules/services/audio/jmusicbot.nix b/nixos/modules/services/audio/jmusicbot.nix
index e7803677d0fd..5507f4859058 100644
--- a/nixos/modules/services/audio/jmusicbot.nix
+++ b/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/nixos/modules/services/audio/liquidsoap.nix b/nixos/modules/services/audio/liquidsoap.nix
index 9e61a7979619..bd35e01b60d6 100644
--- a/nixos/modules/services/audio/liquidsoap.nix
+++ b/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/nixos/modules/services/audio/mopidy.nix b/nixos/modules/services/audio/mopidy.nix
index 8eebf0f9d1e1..1d6c45b64a16 100644
--- a/nixos/modules/services/audio/mopidy.nix
+++ b/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/nixos/modules/services/audio/mpd.nix b/nixos/modules/services/audio/mpd.nix
index 3c853973c872..b5e33f3c0986 100644
--- a/nixos/modules/services/audio/mpd.nix
+++ b/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/nixos/modules/services/audio/mpdscribble.nix b/nixos/modules/services/audio/mpdscribble.nix
index 132d9ad32588..3c7270a3a4a4 100644
--- a/nixos/modules/services/audio/mpdscribble.nix
+++ b/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/nixos/modules/services/audio/mympd.nix b/nixos/modules/services/audio/mympd.nix
index f1c7197085d7..cb1357b61a80 100644
--- a/nixos/modules/services/audio/mympd.nix
+++ b/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/nixos/modules/services/audio/navidrome.nix b/nixos/modules/services/audio/navidrome.nix
index 912edb03aa4c..a5a7e805e3d6 100644
--- a/nixos/modules/services/audio/navidrome.nix
+++ b/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/nixos/modules/services/audio/networkaudiod.nix b/nixos/modules/services/audio/networkaudiod.nix
index 11486429e667..265a4e1d95d6 100644
--- a/nixos/modules/services/audio/networkaudiod.nix
+++ b/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/nixos/modules/services/audio/roon-bridge.nix b/nixos/modules/services/audio/roon-bridge.nix
index 027b0332fd1e..218bbb2a4845 100644
--- a/nixos/modules/services/audio/roon-bridge.nix
+++ b/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/nixos/modules/services/audio/roon-server.nix b/nixos/modules/services/audio/roon-server.nix
index 8691c08b0d36..d3b3752dd728 100644
--- a/nixos/modules/services/audio/roon-server.nix
+++ b/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/nixos/modules/services/audio/slimserver.nix b/nixos/modules/services/audio/slimserver.nix
index 73cda08c5742..a7f8968ef017 100644
--- a/nixos/modules/services/audio/slimserver.nix
+++ b/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/nixos/modules/services/audio/snapserver.nix b/nixos/modules/services/audio/snapserver.nix
index dbab741bf6fc..f79fb7a07d79 100644
--- a/nixos/modules/services/audio/snapserver.nix
+++ b/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/nixos/modules/services/audio/spotifyd.nix b/nixos/modules/services/audio/spotifyd.nix
index 04bb523e25b1..60a7f0fd4e94 100644
--- a/nixos/modules/services/audio/spotifyd.nix
+++ b/nixos/modules/services/audio/spotifyd.nix
@@ -17,12 +17,12 @@ 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,7 +32,7 @@ in
default = {};
type = toml.type;
example = { global.bitrate = 320; };
- description = lib.mdDoc ''
+ description = ''
Configuration for Spotifyd. For syntax and directives, see
.
'';
diff --git a/nixos/modules/services/audio/squeezelite.nix b/nixos/modules/services/audio/squeezelite.nix
index 30dc12552f00..36295e21c60f 100644
--- a/nixos/modules/services/audio/squeezelite.nix
+++ b/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/nixos/modules/services/audio/tts.nix b/nixos/modules/services/audio/tts.nix
index 0d93224ec030..4db624229aa8 100644
--- a/nixos/modules/services/audio/tts.nix
+++ b/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/nixos/modules/services/audio/ympd.nix b/nixos/modules/services/audio/ympd.nix
index 6e8d22dab3c8..ebbe59ca67c3 100644
--- a/nixos/modules/services/audio/ympd.nix
+++ b/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/nixos/modules/services/backup/automysqlbackup.nix b/nixos/modules/services/backup/automysqlbackup.nix
index 27bbff813b10..cf3b6b8d13a4 100644
--- a/nixos/modules/services/backup/automysqlbackup.nix
+++ b/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/nixos/modules/services/backup/bacula.nix b/nixos/modules/services/backup/bacula.nix
index 39975adf5909..94f6e6ba4fd5 100644
--- a/nixos/modules/services/backup/bacula.nix
+++ b/nixos/modules/services/backup/bacula.nix
@@ -10,7 +10,6 @@ let
concatStringsSep
literalExpression
mapAttrsToList
- mdDoc
mkIf
mkOption
optional
@@ -147,7 +146,7 @@ let
enable = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ 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.
'';
@@ -155,7 +154,7 @@ let
require = mkOption {
type = types.nullOr types.bool;
default = null;
- description = mdDoc ''
+ 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
@@ -168,7 +167,7 @@ let
certificate = mkOption {
type = types.nullOr types.path;
default = null;
- description = mdDoc ''
+ 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.
@@ -179,7 +178,7 @@ let
};
key = mkOption {
type = types.path;
- description = mdDoc ''
+ description = ''
The path of a PEM encoded TLS private key.
It must correspond to the TLS certificate.
'';
@@ -187,7 +186,7 @@ let
verifyPeer = mkOption {
type = types.nullOr types.bool;
default = null;
- description = mdDoc ''
+ 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.
@@ -203,7 +202,7 @@ let
allowedCN = mkOption {
type = types.listOf types.str;
default = [ ];
- description = mdDoc ''
+ 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.
@@ -214,7 +213,7 @@ let
caCertificateFile = mkOption {
type = types.nullOr types.path;
default = null;
- description = mdDoc ''
+ 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
@@ -230,7 +229,7 @@ let
password = mkOption {
type = types.str;
# TODO: required?
- description = 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
@@ -251,7 +250,7 @@ let
type = types.enum [ "no" "yes" ];
default = "no";
example = "yes";
- description = 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
@@ -265,7 +264,7 @@ let
tls = mkOption {
type = types.submodule (tlsOptions "${submodulePath}.director.");
- description = mdDoc ''
+ description = ''
TLS Options for the Director in this Configuration.
'';
};
@@ -277,7 +276,7 @@ let
options = {
changerDevice = mkOption {
type = types.str;
- description = 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
@@ -296,7 +295,7 @@ let
changerCommand = mkOption {
type = types.str;
- description = 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
@@ -318,14 +317,14 @@ let
};
devices = mkOption {
- description = mdDoc "";
+ description = "";
type = types.listOf types.str;
};
extraAutochangerConfig = mkOption {
default = "";
type = types.lines;
- description = mdDoc ''
+ description = ''
Extra configuration to be passed in Autochanger directive.
'';
example = ''
@@ -342,7 +341,7 @@ let
archiveDevice = mkOption {
# TODO: required?
type = types.str;
- description = 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
@@ -359,7 +358,7 @@ let
mediaType = mkOption {
# TODO: required?
type = types.str;
- description = 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
@@ -397,7 +396,7 @@ let
extraDeviceConfig = mkOption {
default = "";
type = types.lines;
- description = mdDoc ''
+ description = ''
Extra configuration to be passed in Device directive.
'';
example = ''
@@ -418,7 +417,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Whether to enable the Bacula File Daemon.
'';
};
@@ -427,7 +426,7 @@ in {
default = "${config.networking.hostName}-fd";
defaultText = literalExpression ''"''${config.networking.hostName}-fd"'';
type = types.str;
- description = 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
@@ -438,7 +437,7 @@ in {
port = mkOption {
default = 9102;
type = types.port;
- description = 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.
@@ -447,7 +446,7 @@ in {
director = mkOption {
default = {};
- description = mdDoc ''
+ description = ''
This option defines director resources in Bacula File Daemon.
'';
type = types.attrsOf (types.submodule (directorOptions "services.bacula-fd"));
@@ -457,7 +456,7 @@ in {
tls = mkOption {
type = types.submodule (tlsOptions "services.bacula-fd");
default = { };
- description = mdDoc ''
+ description = ''
TLS Options for the File Daemon.
Important notice: The backup won't be encrypted.
'';
@@ -466,7 +465,7 @@ in {
extraClientConfig = mkOption {
default = "";
type = types.lines;
- description = mdDoc ''
+ description = ''
Extra configuration to be passed in Client directive.
'';
example = ''
@@ -478,7 +477,7 @@ in {
extraMessagesConfig = mkOption {
default = "";
type = types.lines;
- description = mdDoc ''
+ description = ''
Extra configuration to be passed in Messages directive.
'';
example = ''
@@ -491,7 +490,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Whether to enable Bacula Storage Daemon.
'';
};
@@ -500,7 +499,7 @@ in {
default = "${config.networking.hostName}-sd";
defaultText = literalExpression ''"''${config.networking.hostName}-sd"'';
type = types.str;
- description = mdDoc ''
+ description = ''
Specifies the Name of the Storage daemon.
'';
};
@@ -508,7 +507,7 @@ in {
port = mkOption {
default = 9103;
type = types.port;
- description = mdDoc ''
+ description = ''
Specifies port number on which the Storage daemon listens for
Director connections.
'';
@@ -516,7 +515,7 @@ in {
director = mkOption {
default = {};
- description = mdDoc ''
+ description = ''
This option defines Director resources in Bacula Storage Daemon.
'';
type = types.attrsOf (types.submodule (directorOptions "services.bacula-sd"));
@@ -524,7 +523,7 @@ in {
device = mkOption {
default = {};
- description = mdDoc ''
+ description = ''
This option defines Device resources in Bacula Storage Daemon.
'';
type = types.attrsOf (types.submodule deviceOptions);
@@ -532,7 +531,7 @@ in {
autochanger = mkOption {
default = {};
- description = mdDoc ''
+ description = ''
This option defines Autochanger resources in Bacula Storage Daemon.
'';
type = types.attrsOf (types.submodule autochangerOptions);
@@ -541,7 +540,7 @@ in {
extraStorageConfig = mkOption {
default = "";
type = types.lines;
- description = mdDoc ''
+ description = ''
Extra configuration to be passed in Storage directive.
'';
example = ''
@@ -553,7 +552,7 @@ in {
extraMessagesConfig = mkOption {
default = "";
type = types.lines;
- description = mdDoc ''
+ description = ''
Extra configuration to be passed in Messages directive.
'';
example = ''
@@ -563,7 +562,7 @@ in {
tls = mkOption {
type = types.submodule (tlsOptions "services.bacula-sd");
default = { };
- description = mdDoc ''
+ description = ''
TLS Options for the Storage Daemon.
Important notice: The backup won't be encrypted.
'';
@@ -575,7 +574,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = mdDoc ''
+ description = ''
Whether to enable Bacula Director Daemon.
'';
};
@@ -584,7 +583,7 @@ in {
default = "${config.networking.hostName}-dir";
defaultText = literalExpression ''"''${config.networking.hostName}-dir"'';
type = types.str;
- description = mdDoc ''
+ description = ''
The director name used by the system administrator. This directive is
required.
'';
@@ -593,7 +592,7 @@ in {
port = mkOption {
default = 9101;
type = types.port;
- description = 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
@@ -606,7 +605,7 @@ in {
password = mkOption {
# TODO: required?
type = types.str;
- description = mdDoc ''
+ description = ''
Specifies the password that must be supplied for a Director.
'';
};
@@ -614,7 +613,7 @@ in {
extraMessagesConfig = mkOption {
default = "";
type = types.lines;
- description = mdDoc ''
+ description = ''
Extra configuration to be passed in Messages directive.
'';
example = ''
@@ -625,7 +624,7 @@ in {
extraDirectorConfig = mkOption {
default = "";
type = types.lines;
- description = mdDoc ''
+ description = ''
Extra configuration to be passed in Director directive.
'';
example = ''
@@ -637,7 +636,7 @@ in {
extraConfig = mkOption {
default = "";
type = types.lines;
- description = mdDoc ''
+ description = ''
Extra configuration for Bacula Director Daemon.
'';
example = ''
@@ -648,7 +647,7 @@ in {
tls = mkOption {
type = types.submodule (tlsOptions "services.bacula-dir");
default = { };
- description = mdDoc ''
+ description = ''
TLS Options for the Director.
Important notice: The backup won't be encrypted.
'';
diff --git a/nixos/modules/services/backup/borgbackup.md b/nixos/modules/services/backup/borgbackup.md
index 39141f6ec858..2c91174732e1 100644
--- a/nixos/modules/services/backup/borgbackup.md
+++ b/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/nixos/modules/services/backup/borgbackup.nix b/nixos/modules/services/backup/borgbackup.nix
index 6f4455d3be60..570f8931bd9e 100644
--- a/nixos/modules/services/backup/borgbackup.nix
+++ b/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/nixos/modules/services/backup/borgmatic.nix b/nixos/modules/services/backup/borgmatic.nix
index b27dd2817120..5da78828bfa8 100644
--- a/nixos/modules/services/backup/borgmatic.nix
+++ b/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/nixos/modules/services/backup/btrbk.nix b/nixos/modules/services/backup/btrbk.nix
index 364b77b6a21c..06ca4236eaf2 100644
--- a/nixos/modules/services/backup/btrbk.nix
+++ b/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/nixos/modules/services/backup/duplicati.nix b/nixos/modules/services/backup/duplicati.nix
index bd433b777ec4..2b9e171d7d80 100644
--- a/nixos/modules/services/backup/duplicati.nix
+++ b/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/nixos/modules/services/backup/duplicity.nix b/nixos/modules/services/backup/duplicity.nix
index 05ec997ab66b..033d0cffd8d6 100644
--- a/nixos/modules/services/backup/duplicity.nix
+++ b/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/nixos/modules/services/backup/mysql-backup.nix b/nixos/modules/services/backup/mysql-backup.nix
index 9fbc599cd41a..00381be4b75d 100644
--- a/nixos/modules/services/backup/mysql-backup.nix
+++ b/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/nixos/modules/services/backup/postgresql-backup.nix b/nixos/modules/services/backup/postgresql-backup.nix
index 82067d8ade34..5dd9e075862d 100644
--- a/nixos/modules/services/backup/postgresql-backup.nix
+++ b/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/nixos/modules/services/backup/postgresql-wal-receiver.nix b/nixos/modules/services/backup/postgresql-wal-receiver.nix
index 332a32d37052..a8f2cf514d54 100644
--- a/nixos/modules/services/backup/postgresql-wal-receiver.nix
+++ b/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/nixos/modules/services/backup/restic-rest-server.nix b/nixos/modules/services/backup/restic-rest-server.nix
index 105a05caf304..935907643bd2 100644
--- a/nixos/modules/services/backup/restic-rest-server.nix
+++ b/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/nixos/modules/services/backup/restic.nix b/nixos/modules/services/backup/restic.nix
index b222dd952d15..8b56636c7969 100644
--- a/nixos/modules/services/backup/restic.nix
+++ b/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/nixos/modules/services/backup/rsnapshot.nix b/nixos/modules/services/backup/rsnapshot.nix
index 0b9bb60af0ea..6635a51ec2c6 100644
--- a/nixos/modules/services/backup/rsnapshot.nix
+++ b/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/nixos/modules/services/backup/sanoid.nix b/nixos/modules/services/backup/sanoid.nix
index 46d1de4ed934..1b9ace358cab 100644
--- a/nixos/modules/services/backup/sanoid.nix
+++ b/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/nixos/modules/services/backup/snapraid.nix b/nixos/modules/services/backup/snapraid.nix
index c9b2550e80e8..a621c9f62ff7 100644
--- a/nixos/modules/services/backup/snapraid.nix
+++ b/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/nixos/modules/services/backup/syncoid.nix b/nixos/modules/services/backup/syncoid.nix
index 4a04f0aa1622..ec9ccaa46d42 100644
--- a/nixos/modules/services/backup/syncoid.nix
+++ b/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.
'';
@@ -135,7 +135,7 @@ in
type = types.listOf types.str;
# Permissions snapshot and destroy are in case --no-sync-snap is not used
default = [ "bookmark" "hold" "send" "snapshot" "destroy" "mount" ];
- description = lib.mdDoc ''
+ 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/nixos/modules/services/backup/tarsnap.nix b/nixos/modules/services/backup/tarsnap.nix
index 9e1db23ca22a..b8f848451d40 100644
--- a/nixos/modules/services/backup/tarsnap.nix
+++ b/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/nixos/modules/services/backup/tsm.nix b/nixos/modules/services/backup/tsm.nix
index 2d727dccdece..dc5d8f09e069 100644
--- a/nixos/modules/services/backup/tsm.nix
+++ b/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/nixos/modules/services/backup/zfs-replication.nix b/nixos/modules/services/backup/zfs-replication.nix
index 8e7059e5b59d..c89d6fb8ad60 100644
--- a/nixos/modules/services/backup/zfs-replication.nix
+++ b/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/nixos/modules/services/backup/znapzend.nix b/nixos/modules/services/backup/znapzend.nix
index 2ebe8ad2f69a..71e5977c4464 100644
--- a/nixos/modules/services/backup/znapzend.nix
+++ b/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/nixos/modules/services/backup/zrepl.nix b/nixos/modules/services/backup/zrepl.nix
index 8475a347429e..a0e9a0da7e49 100644
--- a/nixos/modules/services/backup/zrepl.nix
+++ b/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/nixos/modules/services/blockchain/ethereum/erigon.nix b/nixos/modules/services/blockchain/ethereum/erigon.nix
index b8edee33e7c6..24705b3433df 100644
--- a/nixos/modules/services/blockchain/ethereum/erigon.nix
+++ b/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/nixos/modules/services/blockchain/ethereum/geth.nix b/nixos/modules/services/blockchain/ethereum/geth.nix
index f07dfa4dc711..f2a7e080ada1 100644
--- a/nixos/modules/services/blockchain/ethereum/geth.nix
+++ b/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/nixos/modules/services/blockchain/ethereum/lighthouse.nix b/nixos/modules/services/blockchain/ethereum/lighthouse.nix
index 863e737d908a..dcf56e187eae 100644
--- a/nixos/modules/services/blockchain/ethereum/lighthouse.nix
+++ b/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/nixos/modules/services/cluster/corosync/default.nix b/nixos/modules/services/cluster/corosync/default.nix
index 477ffbcdb7c7..cf3448620a5d 100644
--- a/nixos/modules/services/cluster/corosync/default.nix
+++ b/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/nixos/modules/services/cluster/hadoop/default.nix b/nixos/modules/services/cluster/hadoop/default.nix
index 6fa91d2f047e..4b255a97f561 100644
--- a/nixos/modules/services/cluster/hadoop/default.nix
+++ b/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/nixos/modules/services/cluster/hadoop/hbase.nix b/nixos/modules/services/cluster/hadoop/hbase.nix
index 6801e505db64..8eb8d83fd84c 100644
--- a/nixos/modules/services/cluster/hadoop/hbase.nix
+++ b/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/nixos/modules/services/cluster/hadoop/hdfs.nix b/nixos/modules/services/cluster/hadoop/hdfs.nix
index 4a49bd0ddd43..1f61acf4012d 100644
--- a/nixos/modules/services/cluster/hadoop/hdfs.nix
+++ b/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/nixos/modules/services/cluster/hadoop/yarn.nix b/nixos/modules/services/cluster/hadoop/yarn.nix
index a49aafbd1dca..0a7b4b7e67b0 100644
--- a/nixos/modules/services/cluster/hadoop/yarn.nix
+++ b/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/nixos/modules/services/cluster/k3s/default.nix b/nixos/modules/services/cluster/k3s/default.nix
index dc71f1372d7a..040cf7640de1 100644
--- a/nixos/modules/services/cluster/k3s/default.nix
+++ b/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/nixos/modules/services/cluster/kubernetes/addon-manager.nix b/nixos/modules/services/cluster/kubernetes/addon-manager.nix
index dc851688fbec..522cb0dd16da 100644
--- a/nixos/modules/services/cluster/kubernetes/addon-manager.nix
+++ b/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/nixos/modules/services/cluster/kubernetes/addons/dns.nix b/nixos/modules/services/cluster/kubernetes/addons/dns.nix
index 1c00329e6ccf..f18003527064 100644
--- a/nixos/modules/services/cluster/kubernetes/addons/dns.nix
+++ b/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/nixos/modules/services/cluster/kubernetes/apiserver.nix b/nixos/modules/services/cluster/kubernetes/apiserver.nix
index d5ec1e5e6d26..fe9dacb8b93d 100644
--- a/nixos/modules/services/cluster/kubernetes/apiserver.nix
+++ b/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/nixos/modules/services/cluster/kubernetes/controller-manager.nix b/nixos/modules/services/cluster/kubernetes/controller-manager.nix
index 18c82fc23593..453043e507d9 100644
--- a/nixos/modules/services/cluster/kubernetes/controller-manager.nix
+++ b/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/nixos/modules/services/cluster/kubernetes/default.nix b/nixos/modules/services/cluster/kubernetes/default.nix
index a920b6cb1268..89bbedf4d040 100644
--- a/nixos/modules/services/cluster/kubernetes/default.nix
+++ b/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/nixos/modules/services/cluster/kubernetes/flannel.nix b/nixos/modules/services/cluster/kubernetes/flannel.nix
index dca8996df083..93a460971055 100644
--- a/nixos/modules/services/cluster/kubernetes/flannel.nix
+++ b/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/nixos/modules/services/cluster/kubernetes/kubelet.nix b/nixos/modules/services/cluster/kubernetes/kubelet.nix
index 313dbe234018..c841f4e5f186 100644
--- a/nixos/modules/services/cluster/kubernetes/kubelet.nix
+++ b/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/nixos/modules/services/cluster/kubernetes/pki.nix b/nixos/modules/services/cluster/kubernetes/pki.nix
index a4b5cb8eda86..5e725df41f43 100644
--- a/nixos/modules/services/cluster/kubernetes/pki.nix
+++ b/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/nixos/modules/services/cluster/kubernetes/proxy.nix b/nixos/modules/services/cluster/kubernetes/proxy.nix
index 015784f7e311..c09e7695f2a4 100644
--- a/nixos/modules/services/cluster/kubernetes/proxy.nix
+++ b/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/nixos/modules/services/cluster/kubernetes/scheduler.nix b/nixos/modules/services/cluster/kubernetes/scheduler.nix
index f31a92f36840..da2f39226a24 100644
--- a/nixos/modules/services/cluster/kubernetes/scheduler.nix
+++ b/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/nixos/modules/services/cluster/pacemaker/default.nix b/nixos/modules/services/cluster/pacemaker/default.nix
index 255bb107796f..005a952e8025 100644
--- a/nixos/modules/services/cluster/pacemaker/default.nix
+++ b/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/nixos/modules/services/cluster/patroni/default.nix b/nixos/modules/services/cluster/patroni/default.nix
index 5ab016a9f59f..d1a165603fda 100644
--- a/nixos/modules/services/cluster/patroni/default.nix
+++ b/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/nixos/modules/services/cluster/spark/default.nix b/nixos/modules/services/cluster/spark/default.nix
index b3e1ac399ae9..7a3f768471c2 100644
--- a/nixos/modules/services/cluster/spark/default.nix
+++ b/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/nixos/modules/services/computing/boinc/client.nix b/nixos/modules/services/computing/boinc/client.nix
index c2132149a3f5..f5d7ab8d8cb2 100644
--- a/nixos/modules/services/computing/boinc/client.nix
+++ b/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/nixos/modules/services/computing/foldingathome/client.nix b/nixos/modules/services/computing/foldingathome/client.nix
index 09f31cda769c..8d330fd8717b 100644
--- a/nixos/modules/services/computing/foldingathome/client.nix
+++ b/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/nixos/modules/services/computing/slurm/slurm.nix b/nixos/modules/services/computing/slurm/slurm.nix
index 9212fe39fd83..360a72677ce0 100644
--- a/nixos/modules/services/computing/slurm/slurm.nix
+++ b/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/nixos/modules/services/computing/torque/mom.nix b/nixos/modules/services/computing/torque/mom.nix
index 5dd41429bf81..6747bd4b0d5a 100644
--- a/nixos/modules/services/computing/torque/mom.nix
+++ b/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/nixos/modules/services/computing/torque/server.nix b/nixos/modules/services/computing/torque/server.nix
index 02f20fb37c10..8d923fc04d46 100644
--- a/nixos/modules/services/computing/torque/server.nix
+++ b/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/nixos/modules/services/continuous-integration/buildbot/master.nix b/nixos/modules/services/continuous-integration/buildbot/master.nix
index 9f702b17937c..a4a9eee672cf 100644
--- a/nixos/modules/services/continuous-integration/buildbot/master.nix
+++ b/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/nixos/modules/services/continuous-integration/buildbot/worker.nix b/nixos/modules/services/continuous-integration/buildbot/worker.nix
index 9c7b2bdd06e0..1534ca6f5785 100644
--- a/nixos/modules/services/continuous-integration/buildbot/worker.nix
+++ b/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/nixos/modules/services/continuous-integration/buildkite-agents.nix b/nixos/modules/services/continuous-integration/buildkite-agents.nix
index 2e488f83d4c3..fc30172c6499 100644
--- a/nixos/modules/services/continuous-integration/buildkite-agents.nix
+++ b/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/nixos/modules/services/continuous-integration/gitea-actions-runner.nix b/nixos/modules/services/continuous-integration/gitea-actions-runner.nix
index 06f0da3451a6..30be56f8eeab 100644
--- a/nixos/modules/services/continuous-integration/gitea-actions-runner.nix
+++ b/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/nixos/modules/services/continuous-integration/github-runner/options.nix b/nixos/modules/services/continuous-integration/github-runner/options.nix
index 193261fc2a9f..6ace6a1b187f 100644
--- a/nixos/modules/services/continuous-integration/github-runner/options.nix
+++ b/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/nixos/modules/services/continuous-integration/gitlab-runner.nix b/nixos/modules/services/continuous-integration/gitlab-runner.nix
index 05b2449936bc..62c62c5d2360 100644
--- a/nixos/modules/services/continuous-integration/gitlab-runner.nix
+++ b/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/nixos/modules/services/continuous-integration/gocd-agent/default.nix b/nixos/modules/services/continuous-integration/gocd-agent/default.nix
index c0d752443a16..0e61b253f17e 100644
--- a/nixos/modules/services/continuous-integration/gocd-agent/default.nix
+++ b/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/nixos/modules/services/continuous-integration/gocd-server/default.nix b/nixos/modules/services/continuous-integration/gocd-server/default.nix
index bf7fd529bfca..a1fb740c269d 100644
--- a/nixos/modules/services/continuous-integration/gocd-server/default.nix
+++ b/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/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix b/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix
index 7d33989044de..a0d4a78a5f34 100644
--- a/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix
+++ b/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/nixos/modules/services/continuous-integration/hercules-ci-agent/settings.nix b/nixos/modules/services/continuous-integration/hercules-ci-agent/settings.nix
index 8eb902313ee8..e6e73090d4be 100644
--- a/nixos/modules/services/continuous-integration/hercules-ci-agent/settings.nix
+++ b/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/nixos/modules/services/continuous-integration/hydra/default.nix b/nixos/modules/services/continuous-integration/hydra/default.nix
index 10e1f0532c84..23f07eb64b92 100644
--- a/nixos/modules/services/continuous-integration/hydra/default.nix
+++ b/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,42 +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 = lib.mdDoc "Maximum number of starman workers to spawn.";
+ description = "Maximum number of starman workers to spawn.";
};
minSpareServers = mkOption {
type = types.int;
default = 4;
- description = lib.mdDoc "Minimum number of spare starman workers to keep.";
+ description = "Minimum number of spare starman workers to keep.";
};
maxSpareServers = mkOption {
type = types.int;
default = 5;
- description = lib.mdDoc "Maximum number of spare starman workers to keep.";
+ 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 {
@@ -218,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.
diff --git a/nixos/modules/services/continuous-integration/jenkins/default.nix b/nixos/modules/services/continuous-integration/jenkins/default.nix
index d69cf4587aab..7b671ba9ed9d 100644
--- a/nixos/modules/services/continuous-integration/jenkins/default.nix
+++ b/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/nixos/modules/services/continuous-integration/jenkins/job-builder.nix b/nixos/modules/services/continuous-integration/jenkins/job-builder.nix
index a8e3effd1f72..6400da13d3a8 100644
--- a/nixos/modules/services/continuous-integration/jenkins/job-builder.nix
+++ b/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/nixos/modules/services/continuous-integration/jenkins/slave.nix b/nixos/modules/services/continuous-integration/jenkins/slave.nix
index 82d34a058c57..c0599a65b480 100644
--- a/nixos/modules/services/continuous-integration/jenkins/slave.nix
+++ b/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/nixos/modules/services/continuous-integration/woodpecker/agents.nix b/nixos/modules/services/continuous-integration/woodpecker/agents.nix
index ef7bf3fd2a6e..ce5926a246bb 100644
--- a/nixos/modules/services/continuous-integration/woodpecker/agents.nix
+++ b/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/nixos/modules/services/continuous-integration/woodpecker/server.nix b/nixos/modules/services/continuous-integration/woodpecker/server.nix
index 4a0f15756c30..54d8da8a59e5 100644
--- a/nixos/modules/services/continuous-integration/woodpecker/server.nix
+++ b/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/nixos/modules/services/databases/aerospike.nix b/nixos/modules/services/databases/aerospike.nix
index 4923c0f00ddb..676341084acb 100644
--- a/nixos/modules/services/databases/aerospike.nix
+++ b/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/nixos/modules/services/databases/cassandra.nix b/nixos/modules/services/databases/cassandra.nix
index adf7213dd13f..c8fce9b939db 100644
--- a/nixos/modules/services/databases/cassandra.nix
+++ b/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/nixos/modules/services/databases/clickhouse.nix b/nixos/modules/services/databases/clickhouse.nix
index 288046677721..37a1fe5d5b6c 100644
--- a/nixos/modules/services/databases/clickhouse.nix
+++ b/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/nixos/modules/services/databases/cockroachdb.nix b/nixos/modules/services/databases/cockroachdb.nix
index 789f086158db..34e4e8760742 100644
--- a/nixos/modules/services/databases/cockroachdb.nix
+++ b/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/nixos/modules/services/databases/couchdb.nix b/nixos/modules/services/databases/couchdb.nix
index 72212c390413..e007bfce77ab 100644
--- a/nixos/modules/services/databases/couchdb.nix
+++ b/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/nixos/modules/services/databases/dgraph.nix b/nixos/modules/services/databases/dgraph.nix
index 479754a6447d..00a11d6b686e 100644
--- a/nixos/modules/services/databases/dgraph.nix
+++ b/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/nixos/modules/services/databases/dragonflydb.nix b/nixos/modules/services/databases/dragonflydb.nix
index 46a0c188c3ae..220605c8b475 100644
--- a/nixos/modules/services/databases/dragonflydb.nix
+++ b/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/nixos/modules/services/databases/etcd.nix b/nixos/modules/services/databases/etcd.nix
index a5b3abdbcb59..ebc905ad08f6 100644
--- a/nixos/modules/services/databases/etcd.nix
+++ b/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/nixos/modules/services/databases/firebird.nix b/nixos/modules/services/databases/firebird.nix
index 431233ce5ed4..17606218b633 100644
--- a/nixos/modules/services/databases/firebird.nix
+++ b/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/nixos/modules/services/databases/foundationdb.md b/nixos/modules/services/databases/foundationdb.md
index 0815c139152f..9f7addc9c140 100644
--- a/nixos/modules/services/databases/foundationdb.md
+++ b/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/nixos/modules/services/databases/foundationdb.nix b/nixos/modules/services/databases/foundationdb.nix
index 48e9898a68c2..670a149ea5e7 100644
--- a/nixos/modules/services/databases/foundationdb.nix
+++ b/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/nixos/modules/services/databases/hbase-standalone.nix b/nixos/modules/services/databases/hbase-standalone.nix
index 08ae7625d50a..ac37e3932932 100644
--- a/nixos/modules/services/databases/hbase-standalone.nix
+++ b/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/nixos/modules/services/databases/influxdb.nix b/nixos/modules/services/databases/influxdb.nix
index adb212ab08d0..6dd4ca3b71cd 100644
--- a/nixos/modules/services/databases/influxdb.nix
+++ b/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/nixos/modules/services/databases/influxdb2.nix b/nixos/modules/services/databases/influxdb2.nix
index 2a67d87d4bbb..a534cdfbe165 100644
--- a/nixos/modules/services/databases/influxdb2.nix
+++ b/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/nixos/modules/services/databases/lldap.nix b/nixos/modules/services/databases/lldap.nix
index 033de7af886f..e014a88b3c4f 100644
--- a/nixos/modules/services/databases/lldap.nix
+++ b/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";
};
diff --git a/nixos/modules/services/databases/memcached.nix b/nixos/modules/services/databases/memcached.nix
index fd943c20091a..e38931b6b7ea 100644
--- a/nixos/modules/services/databases/memcached.nix
+++ b/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 Domain Socket at /run/memcached/memcached.sock instead of listening on an IP address and port. The `listen` and `port` options are ignored.");
+ 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/nixos/modules/services/databases/monetdb.nix b/nixos/modules/services/databases/monetdb.nix
index 1dddeda0959c..5025eb30369b 100644
--- a/nixos/modules/services/databases/monetdb.nix
+++ b/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/nixos/modules/services/databases/mongodb.nix b/nixos/modules/services/databases/mongodb.nix
index f10364bc76c1..8b8a664107f2 100644
--- a/nixos/modules/services/databases/mongodb.nix
+++ b/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/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix
index a6d71cca88de..4b2e83e71e20 100644
--- a/nixos/modules/services/databases/mysql.nix
+++ b/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/nixos/modules/services/databases/neo4j.nix b/nixos/modules/services/databases/neo4j.nix
index 45630e2d4488..4369ec2007dc 100644
--- a/nixos/modules/services/databases/neo4j.nix
+++ b/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/nixos/modules/services/databases/openldap.nix b/nixos/modules/services/databases/openldap.nix
index df36e37976a4..feb974cdf6d3 100644
--- a/nixos/modules/services/databases/openldap.nix
+++ b/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/nixos/modules/services/databases/opentsdb.nix b/nixos/modules/services/databases/opentsdb.nix
index 25f413db809f..e104c42f8b24 100644
--- a/nixos/modules/services/databases/opentsdb.nix
+++ b/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/nixos/modules/services/databases/pgbouncer.nix b/nixos/modules/services/databases/pgbouncer.nix
index 157d49c13161..32538789fb17 100644
--- a/nixos/modules/services/databases/pgbouncer.nix
+++ b/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/nixos/modules/services/databases/pgmanage.nix b/nixos/modules/services/databases/pgmanage.nix
index 4b963aee4640..c405162ed87e 100644
--- a/nixos/modules/services/databases/pgmanage.nix
+++ b/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/nixos/modules/services/databases/postgresql.md b/nixos/modules/services/databases/postgresql.md
index 3ff1f00fa9cf..8a587832cd8c 100644
--- a/nixos/modules/services/databases/postgresql.md
+++ b/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,7 +289,7 @@ self: super: {
```
Here's a recipe on how to override a particular plugin through an overlay:
-```
+```nix
self: super: {
postgresql_15 = super.postgresql_15// {
pkgs = super.postgresql_15.pkgs // {
diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix
index c3f3b98ae5e7..8a386b4848b9 100644
--- a/nixos/modules/services/databases/postgresql.nix
+++ b/nixos/modules/services/databases/postgresql.nix
@@ -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,7 +151,7 @@ in
options = {
name = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Name of the user to ensure.
'';
};
@@ -164,7 +159,7 @@ in
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).
@@ -172,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:
@@ -197,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,
@@ -214,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
@@ -233,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
@@ -248,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
@@ -263,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
@@ -285,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
@@ -301,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
@@ -321,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.
@@ -345,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`.
@@ -399,7 +414,7 @@ in
recoveryConfig = mkOption {
type = types.nullOr types.lines;
default = null;
- description = lib.mdDoc ''
+ description = ''
Contents of the {file}`recovery.conf` file.
'';
};
@@ -409,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.
'';
@@ -439,9 +454,7 @@ in
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");
};
@@ -524,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
diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix
index 2e644895a260..ad88a4f589a2 100644
--- a/nixos/modules/services/databases/redis.nix
+++ b/nixos/modules/services/databases/redis.nix
@@ -56,22 +56,22 @@ in {
services.redis = {
package = mkPackageOption pkgs "redis" { };
- vmOverCommit = mkEnableOption (lib.mdDoc ''
- setting of vm.overcommit_memory to 1
+ vmOverCommit = mkEnableOption ''
+ set `vm.overcommit_memory` sysctl to 1
(Suggested for Background Saving: )
- '');
+ '' // { default = true; };
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 = {};
};
};
@@ -312,10 +312,9 @@ in {
'';
}) enabledServers);
- boot.kernel.sysctl = mkMerge [
- { "vm.nr_hugepages" = "0"; }
- ( mkIf cfg.vmOverCommit { "vm.overcommit_memory" = "1"; } )
- ];
+ boot.kernel.sysctl = mkIf cfg.vmOverCommit {
+ "vm.overcommit_memory" = "1";
+ };
networking.firewall.allowedTCPPorts = concatMap (conf:
optional conf.openFirewall conf.port
@@ -338,7 +337,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 +390,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/nixos/modules/services/databases/rethinkdb.nix b/nixos/modules/services/databases/rethinkdb.nix
index f5391b48e89c..c764d6c21c6c 100644
--- a/nixos/modules/services/databases/rethinkdb.nix
+++ b/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/nixos/modules/services/databases/surrealdb.nix b/nixos/modules/services/databases/surrealdb.nix
index 55216d022d1c..08a6cca043ca 100644
--- a/nixos/modules/services/databases/surrealdb.nix
+++ b/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/nixos/modules/services/databases/tigerbeetle.md b/nixos/modules/services/databases/tigerbeetle.md
index 47394d443059..12d920e7bcc7 100644
--- a/nixos/modules/services/databases/tigerbeetle.md
+++ b/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/nixos/modules/services/databases/tigerbeetle.nix b/nixos/modules/services/databases/tigerbeetle.nix
index b90a0703175f..a9c7a24250a6 100644
--- a/nixos/modules/services/databases/tigerbeetle.nix
+++ b/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/nixos/modules/services/databases/victoriametrics.nix b/nixos/modules/services/databases/victoriametrics.nix
index 0ad2028c95b0..923163a8049e 100644
--- a/nixos/modules/services/databases/victoriametrics.nix
+++ b/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/nixos/modules/services/desktop-managers/lomiri.nix b/nixos/modules/services/desktop-managers/lomiri.nix
new file mode 100644
index 000000000000..e11867b69107
--- /dev/null
+++ b/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/nixos/modules/services/desktop-managers/plasma6.nix b/nixos/modules/services/desktop-managers/plasma6.nix
index e20b431f0b58..08507b4d370a 100644
--- a/nixos/modules/services/desktop-managers/plasma6.nix
+++ b/nixos/modules/services/desktop-managers/plasma6.nix
@@ -20,13 +20,13 @@ in {
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" {
@@ -36,7 +36,7 @@ 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 ]";
@@ -170,7 +170,17 @@ in {
breeze.qt5
plasma-integration.qt5
pkgs.plasma5Packages.kwayland-integration
- pkgs.plasma5Packages.kio
+ (
+ # 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
@@ -228,7 +238,7 @@ in {
services.system-config-printer.enable = mkIf config.services.printing.enable (mkDefault true);
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
- services.xserver.libinput.enable = mkDefault true;
+ services.libinput.enable = mkDefault true;
# Extra UDEV rules used by Solid
services.udev.packages = [
@@ -246,11 +256,11 @@ 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";
@@ -286,6 +296,7 @@ in {
};
programs.kdeconnect.package = kdePackages.kdeconnect-kde;
+ programs.partition-manager.package = kdePackages.partitionmanager;
# FIXME: ugly hack. See #292632 for details.
system.userActivationScripts.rebuildSycoca = activationScript;
diff --git a/nixos/modules/services/desktops/accountsservice.nix b/nixos/modules/services/desktops/accountsservice.nix
index af62850acdc1..ae2ecb5ffeb7 100644
--- a/nixos/modules/services/desktops/accountsservice.nix
+++ b/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/nixos/modules/services/desktops/ayatana-indicators.nix b/nixos/modules/services/desktops/ayatana-indicators.nix
index abc687bbd43d..613a2f03ea05 100644
--- a/nixos/modules/services/desktops/ayatana-indicators.nix
+++ b/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/nixos/modules/services/desktops/bamf.nix b/nixos/modules/services/desktops/bamf.nix
index 3e40a7055348..13de3a44328f 100644
--- a/nixos/modules/services/desktops/bamf.nix
+++ b/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/nixos/modules/services/desktops/blueman.nix b/nixos/modules/services/desktops/blueman.nix
index fad2f21bce5b..28c2daa7191d 100644
--- a/nixos/modules/services/desktops/blueman.nix
+++ b/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/nixos/modules/services/desktops/cpupower-gui.nix b/nixos/modules/services/desktops/cpupower-gui.nix
index 47071aebce8d..f66afc0a3dc1 100644
--- a/nixos/modules/services/desktops/cpupower-gui.nix
+++ b/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/nixos/modules/services/desktops/deepin/app-services.nix b/nixos/modules/services/desktops/deepin/app-services.nix
index a6c33af03e95..4702274df374 100644
--- a/nixos/modules/services/desktops/deepin/app-services.nix
+++ b/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/nixos/modules/services/desktops/deepin/dde-api.nix b/nixos/modules/services/desktops/deepin/dde-api.nix
index 459876febf21..36f9881fc766 100644
--- a/nixos/modules/services/desktops/deepin/dde-api.nix
+++ b/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/nixos/modules/services/desktops/deepin/dde-daemon.nix b/nixos/modules/services/desktops/deepin/dde-daemon.nix
index 356d323bcbdf..ed4cd15bc271 100644
--- a/nixos/modules/services/desktops/deepin/dde-daemon.nix
+++ b/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/nixos/modules/services/desktops/dleyna-renderer.nix b/nixos/modules/services/desktops/dleyna-renderer.nix
index daf65180b36f..7f88605f627c 100644
--- a/nixos/modules/services/desktops/dleyna-renderer.nix
+++ b/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/nixos/modules/services/desktops/dleyna-server.nix b/nixos/modules/services/desktops/dleyna-server.nix
index 9cbcd2a9cdae..9a131a5e700f 100644
--- a/nixos/modules/services/desktops/dleyna-server.nix
+++ b/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/nixos/modules/services/desktops/espanso.nix b/nixos/modules/services/desktops/espanso.nix
index cbc48034795e..4ef6724dda0a 100644
--- a/nixos/modules/services/desktops/espanso.nix
+++ b/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/nixos/modules/services/desktops/flatpak.md b/nixos/modules/services/desktops/flatpak.md
index af71d85b5a15..5299b32a03c7 100644
--- a/nixos/modules/services/desktops/flatpak.md
+++ b/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/nixos/modules/services/desktops/flatpak.nix b/nixos/modules/services/desktops/flatpak.nix
index 4c26e6874023..cda0a17d0475 100644
--- a/nixos/modules/services/desktops/flatpak.nix
+++ b/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/nixos/modules/services/desktops/geoclue2.nix b/nixos/modules/services/desktops/geoclue2.nix
index 2a68bb0b55f3..72a26933b222 100644
--- a/nixos/modules/services/desktops/geoclue2.nix
+++ b/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/nixos/modules/services/desktops/gnome/at-spi2-core.nix b/nixos/modules/services/desktops/gnome/at-spi2-core.nix
index d0320c1e6307..446f363fce83 100644
--- a/nixos/modules/services/desktops/gnome/at-spi2-core.nix
+++ b/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/nixos/modules/services/desktops/gnome/evolution-data-server.nix b/nixos/modules/services/desktops/gnome/evolution-data-server.nix
index a8db7dce8fdf..34a91170d424 100644
--- a/nixos/modules/services/desktops/gnome/evolution-data-server.nix
+++ b/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/nixos/modules/services/desktops/gnome/glib-networking.nix b/nixos/modules/services/desktops/gnome/glib-networking.nix
index 6b54f46f0cf5..1039605391ab 100644
--- a/nixos/modules/services/desktops/gnome/glib-networking.nix
+++ b/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/nixos/modules/services/desktops/gnome/gnome-browser-connector.nix b/nixos/modules/services/desktops/gnome/gnome-browser-connector.nix
index 4f680eabbe15..34fc24f7d574 100644
--- a/nixos/modules/services/desktops/gnome/gnome-browser-connector.nix
+++ b/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/nixos/modules/services/desktops/gnome/gnome-initial-setup.nix b/nixos/modules/services/desktops/gnome/gnome-initial-setup.nix
index 6eaf861e4974..ceda49337472 100644
--- a/nixos/modules/services/desktops/gnome/gnome-initial-setup.nix
+++ b/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/nixos/modules/services/desktops/gnome/gnome-keyring.nix b/nixos/modules/services/desktops/gnome/gnome-keyring.nix
index 6c7e713b32d5..d821da164beb 100644
--- a/nixos/modules/services/desktops/gnome/gnome-keyring.nix
+++ b/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/nixos/modules/services/desktops/gnome/gnome-online-accounts.nix b/nixos/modules/services/desktops/gnome/gnome-online-accounts.nix
index ed5e000cae3e..01f7e3695cf0 100644
--- a/nixos/modules/services/desktops/gnome/gnome-online-accounts.nix
+++ b/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/nixos/modules/services/desktops/gnome/gnome-online-miners.nix b/nixos/modules/services/desktops/gnome/gnome-online-miners.nix
index 7cf1bfa1b046..5f9039f68c4e 100644
--- a/nixos/modules/services/desktops/gnome/gnome-online-miners.nix
+++ b/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/nixos/modules/services/desktops/gnome/gnome-remote-desktop.nix b/nixos/modules/services/desktops/gnome/gnome-remote-desktop.nix
index 0a5b67eb2722..b5573d2fc21b 100644
--- a/nixos/modules/services/desktops/gnome/gnome-remote-desktop.nix
+++ b/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/nixos/modules/services/desktops/gnome/gnome-settings-daemon.nix b/nixos/modules/services/desktops/gnome/gnome-settings-daemon.nix
index ca739b06a5a5..9c68c9b76e9e 100644
--- a/nixos/modules/services/desktops/gnome/gnome-settings-daemon.nix
+++ b/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/nixos/modules/services/desktops/gnome/gnome-user-share.nix b/nixos/modules/services/desktops/gnome/gnome-user-share.nix
index 0c88d13b343d..38256af309cc 100644
--- a/nixos/modules/services/desktops/gnome/gnome-user-share.nix
+++ b/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/nixos/modules/services/desktops/gnome/rygel.nix b/nixos/modules/services/desktops/gnome/rygel.nix
index 9c0faaa4885b..8932d438cf1e 100644
--- a/nixos/modules/services/desktops/gnome/rygel.nix
+++ b/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/nixos/modules/services/desktops/gnome/sushi.nix b/nixos/modules/services/desktops/gnome/sushi.nix
index 446851f434d8..3133a3a0d985 100644
--- a/nixos/modules/services/desktops/gnome/sushi.nix
+++ b/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/nixos/modules/services/desktops/gnome/tracker-miners.nix b/nixos/modules/services/desktops/gnome/tracker-miners.nix
index a3c58f374208..9351007d30b5 100644
--- a/nixos/modules/services/desktops/gnome/tracker-miners.nix
+++ b/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/nixos/modules/services/desktops/gnome/tracker.nix b/nixos/modules/services/desktops/gnome/tracker.nix
index e6404c84a26f..fef399d0112e 100644
--- a/nixos/modules/services/desktops/gnome/tracker.nix
+++ b/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/nixos/modules/services/desktops/gsignond.nix b/nixos/modules/services/desktops/gsignond.nix
index cf80fd75452b..465acd73fa64 100644
--- a/nixos/modules/services/desktops/gsignond.nix
+++ b/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/nixos/modules/services/desktops/gvfs.nix b/nixos/modules/services/desktops/gvfs.nix
index a4770d703f54..09ac06d9f6fe 100644
--- a/nixos/modules/services/desktops/gvfs.nix
+++ b/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/nixos/modules/services/desktops/malcontent.nix b/nixos/modules/services/desktops/malcontent.nix
index 27b4577f4c2a..1fbeb17e6aeb 100644
--- a/nixos/modules/services/desktops/malcontent.nix
+++ b/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/nixos/modules/services/desktops/neard.nix b/nixos/modules/services/desktops/neard.nix
index 9130b8d3d216..5459d2e5a1e5 100644
--- a/nixos/modules/services/desktops/neard.nix
+++ b/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/nixos/modules/services/desktops/pipewire/pipewire.nix b/nixos/modules/services/desktops/pipewire/pipewire.nix
index 182615cd4d6c..5c6eba889ebe 100644
--- a/nixos/modules/services/desktops/pipewire/pipewire.nix
+++ b/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,58 +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 = lib.types.bool;
+ type = bool;
default = false;
- description = lib.mdDoc ''
+ 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
@@ -124,7 +131,7 @@ in {
extraConfig = {
pipewire = mkOption {
- type = lib.types.attrsOf json.type;
+ type = attrsOf json.type;
default = {};
example = {
"10-clock-rate" = {
@@ -138,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`.
@@ -157,7 +164,7 @@ in {
'';
};
client = mkOption {
- type = lib.types.attrsOf json.type;
+ type = attrsOf json.type;
default = {};
example = {
"10-no-resample" = {
@@ -166,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`.
@@ -177,7 +184,7 @@ in {
'';
};
client-rt = mkOption {
- type = lib.types.attrsOf json.type;
+ type = attrsOf json.type;
default = {};
example = {
"10-alsa-linear-volume" = {
@@ -186,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`.
@@ -198,7 +205,7 @@ in {
'';
};
jack = mkOption {
- type = lib.types.attrsOf json.type;
+ type = attrsOf json.type;
default = {};
example = {
"20-hide-midi" = {
@@ -207,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`.
@@ -218,7 +225,7 @@ in {
'';
};
pipewire-pulse = mkOption {
- type = lib.types.attrsOf json.type;
+ type = attrsOf json.type;
default = {};
example = {
"15-force-s16-info" = {
@@ -232,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`.
@@ -248,10 +255,32 @@ 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.
@@ -260,11 +289,11 @@ in {
'';
};
- 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].
@@ -279,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.
'')
@@ -306,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;
@@ -320,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 ];
@@ -336,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 ];
@@ -377,18 +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" ];
- networking.firewall.allowedUDPPorts = lib.mkIf cfg.raopOpenFirewall [ 6001 6002 ];
+ networking.firewall.allowedUDPPorts = mkIf cfg.raopOpenFirewall [ 6001 6002 ];
- users = lib.mkIf cfg.systemWide {
+ 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/nixos/modules/services/desktops/pipewire/wireplumber.nix b/nixos/modules/services/desktops/pipewire/wireplumber.nix
index de177d0e4ef3..c924801bcd8b 100644
--- a/nixos/modules/services/desktops/pipewire/wireplumber.nix
+++ b/nixos/modules/services/desktops/pipewire/wireplumber.nix
@@ -1,46 +1,195 @@
{ config, lib, pkgs, ... }:
let
+ inherit (builtins) concatMap;
+ inherit (lib) maintainers;
+ inherit (lib.attrsets) attrByPath mapAttrsToList;
+ inherit (lib.lists) flatten optional;
+ inherit (lib.modules) mkIf;
+ inherit (lib.options) literalExpression mkOption;
+ inherit (lib.strings) concatStringsSep makeSearchPath;
+ inherit (lib.types) bool listOf attrsOf package lines;
+ inherit (lib.path) subpath;
+
pwCfg = config.services.pipewire;
cfg = pwCfg.wireplumber;
pwUsedForAudio = pwCfg.audio.enable;
+
+ json = pkgs.formats.json { };
+
+ configSectionsToConfFile = path: value:
+ pkgs.writeTextDir
+ path
+ (concatStringsSep "\n" (
+ mapAttrsToList
+ (section: content: "${section} = " + (builtins.toJSON content))
+ value
+ ));
+
+ mapConfigToFiles = config:
+ mapAttrsToList
+ (name: value: configSectionsToConfFile "share/wireplumber/wireplumber.conf.d/${name}.conf" value)
+ config;
+
+ mapScriptsToFiles = scripts:
+ mapAttrsToList
+ (relativePath: value: pkgs.writeTextDir (subpath.join ["share/wireplumber/scripts" relativePath]) value)
+ scripts;
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;
+ extraConfig = mkOption {
+ # Two layer attrset is necessary before using JSON, because of the whole
+ # config file not being a JSON object, but a concatenation of JSON objects
+ # in sections.
+ type = attrsOf (attrsOf json.type);
+ default = { };
+ example = literalExpression ''{
+ "log-level-debug" = {
+ "context.properties" = {
+ # Output Debug log messages as opposed to only the default level (Notice)
+ "log.level" = "D";
+ };
+ };
+ "wh-1000xm3-ldac-hq" = {
+ "monitor.bluez.rules" = [
+ {
+ matches = [
+ {
+ # Match any bluetooth device with ids equal to that of a WH-1000XM3
+ "device.name" = "~bluez_card.*";
+ "device.product.id" = "0x0cd3";
+ "device.vendor.id" = "usb:054c";
+ }
+ ];
+ actions = {
+ update-props = {
+ # Set quality to high quality instead of the default of auto
+ "bluez5.a2dp.ldac.quality" = "hq";
+ };
+ };
+ }
+ ];
+ };
+ }'';
+ description = ''
+ Additional configuration for the WirePlumber daemon when run in
+ single-instance mode (the default in nixpkgs and currently the only
+ supported way to run WirePlumber configured via `extraConfig`).
+
+ See also:
+ - [The configuration file][docs-the-conf-file]
+ - [Modifying configuration][docs-modifying-config]
+ - [Locations of files][docs-file-locations]
+ - and the [configuration section][docs-config-section] of the docs in general
+
+ Note that WirePlumber (and PipeWire) use dotted attribute names like
+ `device.product.id`. These are not nested, but flat objects for WirePlumber/PipeWire,
+ so to write these in nix expressions, remember to quote them like `"device.product.id"`.
+ Have a look at the example for this.
+
+ [docs-the-conf-file]: https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/conf_file.html
+ [docs-modifying-config]: https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/modifying_configuration.html
+ [docs-file-locations]: https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/locations.html
+ [docs-config-section]: https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration.html
+ '';
+ };
+
+ extraScripts = mkOption {
+ type = attrsOf lines;
+ default = { };
+ example = {
+ "test/hello-world.lua" = ''
+ print("Hello, world!")
+ '';
+ };
+ description = ''
+ Additional scripts for WirePlumber to be used by configuration files.
+
+ Every item in this attrset becomes a separate lua file with the path
+ relative to the `scripts` directory specified in the name of the item.
+ The scripts get passed to the WirePlumber service via the `XDG_DATA_DIRS`
+ variable. Scripts specified here are preferred over those shipped with
+ WirePlumber if they occupy the same relative path.
+
+ For a script to be loaded, it needs to be specified as part of a component,
+ and that component needs to be required by an active profile (e.g. `main`).
+ Components can be defined in config files either via `extraConfig` or `configPackages`.
+
+ For the hello-world example, you'd have to add the following `extraConfig`:
+ ```nix
+ services.pipewire.wireplumber.extraConfig."99-hello-world" = {
+ "wireplumber.components" = [
+ {
+ name = "test/hello-world.lua";
+ type = "script/lua";
+ provides = "custom.hello-world";
+ }
+ ];
+
+ "wireplumber.profiles" = {
+ main = {
+ "custom.hello-world" = "required";
+ };
+ };
+ };
+ ```
+
+ See also:
+ - [Location of scripts][docs-file-locations-scripts]
+ - [Components & Profiles][docs-components-profiles]
+ - [Migration - Loading custom scripts][docs-migration-loading-custom-scripts]
+
+ [docs-file-locations-scripts]: https://pipewire.pages.freedesktop.org/wireplumber/daemon/locations.html#location-of-scripts
+ [docs-components-profiles]: https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/components_and_profiles.html
+ [docs-migration-loading-custom-scripts]: https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/migration.html#loading-custom-scripts
+ '';
+ };
+
+ 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;
- default = [];
- example = lib.literalExpression "[ pkgs.lsp-plugins ]";
- description = lib.mdDoc ''
+ extraLv2Packages = mkOption {
+ type = listOf package;
+ default = [ ];
+ 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].
@@ -77,9 +226,22 @@ in
}
'';
+ extraConfigPkg = pkgs.buildEnv {
+ name = "wireplumber-extra-config";
+ paths = mapConfigToFiles cfg.extraConfig;
+ pathsToLink = [ "/share/wireplumber/wireplumber.conf.d" ];
+ };
+
+ extraScriptsPkg = pkgs.buildEnv {
+ name = "wireplumber-extra-scrips";
+ paths = mapScriptsToFiles cfg.extraScripts;
+ pathsToLink = [ "/share/wireplumber/scripts" ];
+ };
+
configPackages = cfg.configPackages
- ++ lib.optional (!pwUsedForAudio) pwNotForAudioConfigPkg
- ++ lib.optional config.services.pipewire.systemWide systemwideConfigPkg;
+ ++ [ extraConfigPkg extraScriptsPkg ]
+ ++ optional (!pwUsedForAudio) pwNotForAudioConfigPkg
+ ++ optional pwCfg.systemWide systemwideConfigPkg;
configs = pkgs.buildEnv {
name = "wireplumber-configs";
@@ -87,11 +249,11 @@ in
pathsToLink = [ "/share/wireplumber" ];
};
- requiredLv2Packages = lib.flatten
+ requiredLv2Packages = flatten
(
- lib.concatMap
+ concatMap
(p:
- lib.attrByPath ["passthru" "requiredLv2Packages"] [] p
+ attrByPath [ "passthru" "requiredLv2Packages" ] [ ] p
)
configPackages
);
@@ -102,45 +264,37 @@ 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
- (
- lib.filterAttrs
- (name: value:
- lib.hasPrefix "wireplumber/" name || name == "wireplumber"
- )
- config.environment.etc
- )) == 1;
- message = "Using `environment.etc.\"wireplumber<...>\"` directly is no longer supported in 24.05. Use `services.pipewire.wireplumber.configPackages` instead.";
- }
];
environment.systemPackages = [ cfg.package ];
- environment.etc.wireplumber.source = "${configs}/share/wireplumber";
-
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";
+
+ # Make WirePlumber find our config/script files and lv2 plugins required by those
+ # (but also the configs/scripts shipped with WirePlumber)
+ XDG_DATA_DIRS = makeSearchPath "share" [ configs cfg.package ];
LV2_PATH = "${lv2Plugins}/lib/lv2";
};
- systemd.user.services.wireplumber.environment.LV2_PATH =
- lib.mkIf (!config.services.pipewire.systemWide) "${lv2Plugins}/lib/lv2";
+ systemd.user.services.wireplumber.environment = mkIf (!pwCfg.systemWide) {
+ XDG_DATA_DIRS = makeSearchPath "share" [ configs cfg.package ];
+ LV2_PATH = "${lv2Plugins}/lib/lv2";
+ };
};
}
diff --git a/nixos/modules/services/desktops/profile-sync-daemon.nix b/nixos/modules/services/desktops/profile-sync-daemon.nix
index e307c6735004..6206295272fc 100644
--- a/nixos/modules/services/desktops/profile-sync-daemon.nix
+++ b/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/nixos/modules/services/desktops/seatd.nix b/nixos/modules/services/desktops/seatd.nix
index 51977dfd2153..fb20750f0429 100644
--- a/nixos/modules/services/desktops/seatd.nix
+++ b/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/nixos/modules/services/desktops/system-config-printer.nix b/nixos/modules/services/desktops/system-config-printer.nix
index caebfabf146c..55f27b0e6534 100644
--- a/nixos/modules/services/desktops/system-config-printer.nix
+++ b/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/nixos/modules/services/desktops/system76-scheduler.nix b/nixos/modules/services/desktops/system76-scheduler.nix
index 267b528cc5dd..b021ae6bfbfa 100644
--- a/nixos/modules/services/desktops/system76-scheduler.nix
+++ b/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/nixos/modules/services/desktops/telepathy.nix b/nixos/modules/services/desktops/telepathy.nix
index cdc6eb26de7e..b5f6a5fcbcfd 100644
--- a/nixos/modules/services/desktops/telepathy.nix
+++ b/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/nixos/modules/services/desktops/tumbler.nix b/nixos/modules/services/desktops/tumbler.nix
index 203071ec660d..f5341df2f7a4 100644
--- a/nixos/modules/services/desktops/tumbler.nix
+++ b/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/nixos/modules/services/desktops/zeitgeist.nix b/nixos/modules/services/desktops/zeitgeist.nix
index 0eb2a4c9c371..f170e90a2a41 100644
--- a/nixos/modules/services/desktops/zeitgeist.nix
+++ b/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/nixos/modules/services/development/athens.md b/nixos/modules/services/development/athens.md
index 77663db509d5..2795930b0a02 100644
--- a/nixos/modules/services/development/athens.md
+++ b/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/nixos/modules/services/development/athens.nix b/nixos/modules/services/development/athens.nix
index 34f8964a3bd5..55ec065f1689 100644
--- a/nixos/modules/services/development/athens.nix
+++ b/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/nixos/modules/services/development/blackfire.md b/nixos/modules/services/development/blackfire.md
index e2e7e4780c79..5a7fbe68f7d2 100644
--- a/nixos/modules/services/development/blackfire.md
+++ b/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/nixos/modules/services/development/blackfire.nix b/nixos/modules/services/development/blackfire.nix
index 3c98d7a281c6..9b76cfbca078 100644
--- a/nixos/modules/services/development/blackfire.nix
+++ b/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/nixos/modules/services/development/bloop.nix b/nixos/modules/services/development/bloop.nix
index 27da76a74432..c1180a8bbdd4 100644
--- a/nixos/modules/services/development/bloop.nix
+++ b/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/nixos/modules/services/development/distccd.nix b/nixos/modules/services/development/distccd.nix
index c33bf436bffb..916c0905034c 100644
--- a/nixos/modules/services/development/distccd.nix
+++ b/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/nixos/modules/services/development/gemstash.nix b/nixos/modules/services/development/gemstash.nix
index eb7ccb98bde8..367930dadfb8 100644
--- a/nixos/modules/services/development/gemstash.nix
+++ b/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/nixos/modules/services/development/hoogle.nix b/nixos/modules/services/development/hoogle.nix
index c90bb7f01902..1747ef391290 100644
--- a/nixos/modules/services/development/hoogle.nix
+++ b/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,13 +47,13 @@ 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";
};
@@ -61,7 +61,7 @@ in {
type = types.listOf types.str;
default = [];
example = [ "--no-security-headers" ];
- description = lib.mdDoc ''
+ description = ''
Additional command-line arguments to pass to
{command}`hoogle server`
'';
diff --git a/nixos/modules/services/development/jupyter/default.nix b/nixos/modules/services/development/jupyter/default.nix
index da8c7547fdd7..561ea86ea18b 100644
--- a/nixos/modules/services/development/jupyter/default.nix
+++ b/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/nixos/modules/services/development/jupyter/kernel-options.nix b/nixos/modules/services/development/jupyter/kernel-options.nix
index 6e406152de47..8a91125e6cce 100644
--- a/nixos/modules/services/development/jupyter/kernel-options.nix
+++ b/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/nixos/modules/services/development/jupyterhub/default.nix b/nixos/modules/services/development/jupyterhub/default.nix
index cebc35a50476..d9a37ad915d4 100644
--- a/nixos/modules/services/development/jupyterhub/default.nix
+++ b/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/nixos/modules/services/development/livebook.md b/nixos/modules/services/development/livebook.md
index 5315f2c2755a..aac9c58d081c 100644
--- a/nixos/modules/services/development/livebook.md
+++ b/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/nixos/modules/services/development/livebook.nix b/nixos/modules/services/development/livebook.nix
index df0e6e01e97c..c7a6e3537579 100644
--- a/nixos/modules/services/development/livebook.nix
+++ b/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/nixos/modules/services/development/lorri.nix b/nixos/modules/services/development/lorri.nix
index df3d814d7444..4aba3836e323 100644
--- a/nixos/modules/services/development/lorri.nix
+++ b/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/nixos/modules/services/development/rstudio-server/default.nix b/nixos/modules/services/development/rstudio-server/default.nix
index fc3756edf0ab..0126e105b3d3 100644
--- a/nixos/modules/services/development/rstudio-server/default.nix
+++ b/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/nixos/modules/services/development/zammad.nix b/nixos/modules/services/development/zammad.nix
index c084d6541ad3..0659c48e815e 100644
--- a/nixos/modules/services/development/zammad.nix
+++ b/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/nixos/modules/services/display-managers/default.nix b/nixos/modules/services/display-managers/default.nix
new file mode 100644
index 000000000000..de3feb500f33
--- /dev/null
+++ b/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/nixos/modules/services/display-managers/greetd.nix b/nixos/modules/services/display-managers/greetd.nix
index c2d345152de9..c07b225fc4d9 100644
--- a/nixos/modules/services/display-managers/greetd.nix
+++ b/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/nixos/modules/services/x11/display-managers/sddm.nix b/nixos/modules/services/display-managers/sddm.nix
similarity index 70%
rename from nixos/modules/services/x11/display-managers/sddm.nix
rename to nixos/modules/services/display-managers/sddm.nix
index a315a3ebf322..a6bfa213fe38 100644
--- a/nixos/modules/services/x11/display-managers/sddm.nix
+++ b/nixos/modules/services/display-managers/sddm.nix
@@ -2,8 +2,8 @@
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: {
@@ -21,12 +21,12 @@ let
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" ''
@@ -40,7 +40,7 @@ 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") {
@@ -66,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";
@@ -111,8 +111,8 @@ let
let
westonIni = (pkgs.formats.ini { }).generate "weston.ini" {
libinput = {
- enable-tap = xcfg.libinput.mouse.tapping;
- left-handed = xcfg.libinput.mouse.leftHanded;
+ enable-tap = config.services.libinput.mouse.tapping;
+ left-handed = config.services.libinput.mouse.leftHanded;
};
keyboard = {
keymap_model = xcfg.xkb.model;
@@ -128,27 +128,40 @@ let
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.
'';
};
@@ -158,7 +171,7 @@ in
enableHidpi = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable automatic HiDPI mode.
'';
};
@@ -172,7 +185,7 @@ in
Session = "plasma.desktop";
};
};
- description = lib.mdDoc ''
+ description = ''
Extra settings merged in and overwriting defaults in sddm.conf.
'';
};
@@ -180,7 +193,7 @@ in
theme = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Greeter theme to use.
'';
};
@@ -189,7 +202,7 @@ in
type = types.listOf types.package;
default = [ ];
defaultText = "[]";
- description = lib.mdDoc ''
+ description = ''
Extra Qt plugins / QML libraries to add to the environment.
'';
};
@@ -197,7 +210,7 @@ in
autoNumlock = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable numlock at login.
'';
};
@@ -210,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`.
'';
@@ -219,7 +232,7 @@ in
stopScript = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
A script to execute when stopping the display server.
'';
};
@@ -229,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.
'';
@@ -238,7 +251,7 @@ in
minimumUid = mkOption {
type = types.ints.u16;
default = 1000;
- description = lib.mdDoc ''
+ description = ''
Minimum user ID for auto-login user.
'';
};
@@ -249,7 +262,7 @@ in
enable = mkEnableOption "experimental Wayland support";
compositor = mkOption {
- description = lib.mdDoc "The compositor to use: ${lib.concatStringsSep ", " (builtins.attrNames compositorCmds)}";
+ description = "The compositor to use: ${lib.concatStringsSep ", " (builtins.attrNames compositorCmds)}";
type = types.enum (builtins.attrNames compositorCmds);
default = "weston";
};
@@ -258,7 +271,7 @@ in
type = types.str;
internal = true;
default = compositorCmds.${cfg.wayland.compositor};
- description = lib.mdDoc "Command used to start the selected compositor";
+ description = "Command used to start the selected compositor";
};
};
};
@@ -268,19 +281,24 @@ 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.displayManager = {
+ enable = true;
+ execCmd = "exec /run/current-system/sw/bin/sddm";
+ };
+
security.pam.services = {
sddm.text = ''
auth substack login
@@ -338,7 +356,6 @@ in
services = {
dbus.packages = [ sddm ];
xserver = {
- displayManager.job.execCmd = "exec /run/current-system/sw/bin/sddm";
# To enable user switching, allow sddm to allocate TTYs/displays dynamically.
tty = null;
display = null;
diff --git a/nixos/modules/services/editors/emacs.md b/nixos/modules/services/editors/emacs.md
index 02f47b098d86..da1028675155 100644
--- a/nixos/modules/services/editors/emacs.md
+++ b/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
@@ -362,44 +366,3 @@ convenient if you regularly edit Nix files.
You can use `woman` to get completion of all available
man pages. For example, type `M-x woman nixos-rebuild .`
-### Editing DocBook 5 XML Documents {#sec-emacs-docbook-xml}
-
-Emacs includes
-[nXML](https://www.gnu.org/software/emacs/manual/html_node/nxml-mode/Introduction.html),
-a major-mode for validating and editing XML documents. When editing DocBook
-5.0 documents, such as [this one](#book-nixos-manual),
-nXML needs to be configured with the relevant schema, which is not
-included.
-
-To install the DocBook 5.0 schemas, either add
-{var}`pkgs.docbook5` to [](#opt-environment.systemPackages)
-([NixOS](#sec-declarative-package-mgmt)), or run
-`nix-env -f '' -iA docbook5`
-([Nix](#sec-ad-hoc-packages)).
-
-Then customize the variable {var}`rng-schema-locating-files` to
-include {file}`~/.emacs.d/schemas.xml` and put the following
-text into that file:
-::: {.example #ex-emacs-docbook-xml}
-### nXML Schema Configuration (`~/.emacs.d/schemas.xml`)
-
-```xml
-
-
-
-
-
-
-
-```
-:::
diff --git a/nixos/modules/services/editors/emacs.nix b/nixos/modules/services/editors/emacs.nix
index ff6fd85d8a9b..35f257cee1e3 100644
--- a/nixos/modules/services/editors/emacs.nix
+++ b/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/nixos/modules/services/editors/haste.nix b/nixos/modules/services/editors/haste.nix
index a46415d43634..f2a40e62e718 100644
--- a/nixos/modules/services/editors/haste.nix
+++ b/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/nixos/modules/services/editors/infinoted.nix b/nixos/modules/services/editors/infinoted.nix
index 976163d4d0b2..2a7f1d45c2d8 100644
--- a/nixos/modules/services/editors/infinoted.nix
+++ b/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/nixos/modules/services/finance/odoo.nix b/nixos/modules/services/finance/odoo.nix
index aa9bd0014d98..45fb9c7c2397 100644
--- a/nixos/modules/services/finance/odoo.nix
+++ b/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/nixos/modules/services/games/archisteamfarm.nix b/nixos/modules/services/games/archisteamfarm.nix
index 4bb7234f430f..33898f8387e9 100644
--- a/nixos/modules/services/games/archisteamfarm.nix
+++ b/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/nixos/modules/services/games/armagetronad.nix b/nixos/modules/services/games/armagetronad.nix
index f79818e0e53b..71c8528a9f6e 100644
--- a/nixos/modules/services/games/armagetronad.nix
+++ b/nixos/modules/services/games/armagetronad.nix
@@ -30,11 +30,11 @@ in
options = {
services.armagetronad = {
servers = mkOption {
- description = lib.mdDoc "Armagetron server definitions.";
+ description = "Armagetron server definitions.";
default = { };
type = types.attrsOf (types.submodule {
options = {
- enable = mkEnableOption (lib.mdDoc "armagetronad");
+ enable = mkEnableOption "armagetronad";
package = lib.mkPackageOptionMD pkgs "armagetronad-dedicated" {
example = ''
@@ -48,25 +48,25 @@ in
host = mkOption {
type = types.str;
default = "0.0.0.0";
- description = lib.mdDoc "Host to listen on. Used for SERVER_IP.";
+ description = "Host to listen on. Used for SERVER_IP.";
};
port = mkOption {
type = types.port;
default = 4534;
- description = lib.mdDoc "Port to listen on. Used for SERVER_PORT.";
+ description = "Port to listen on. Used for SERVER_PORT.";
};
dns = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "DNS address to use for this server. Optional.";
+ description = "DNS address to use for this server. Optional.";
};
openFirewall = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Set to true to open the configured UDP port for Armagetron Advanced.";
+ description = "Set to true to open the configured UDP port for Armagetron Advanced.";
};
name = mkOption {
@@ -77,7 +77,7 @@ in
settings = mkOption {
type = settingsFormat.type;
default = { };
- description = lib.mdDoc ''
+ description = ''
Armagetron Advanced server rules configuration. Refer to:
or `armagetronad-dedicated --doc` for a list.
@@ -95,7 +95,7 @@ in
roundSettings = mkOption {
type = settingsFormat.type;
default = { };
- description = lib.mdDoc ''
+ description = ''
Armagetron Advanced server per-round configuration. Refer to:
or `armagetronad-dedicated --doc` for a list.
diff --git a/nixos/modules/services/games/crossfire-server.nix b/nixos/modules/services/games/crossfire-server.nix
index b19a86253cb4..314b4bad9a29 100644
--- a/nixos/modules/services/games/crossfire-server.nix
+++ b/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/nixos/modules/services/games/deliantra-server.nix b/nixos/modules/services/games/deliantra-server.nix
index b405f338fe3d..401a453ba932 100644
--- a/nixos/modules/services/games/deliantra-server.nix
+++ b/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/nixos/modules/services/games/factorio.nix b/nixos/modules/services/games/factorio.nix
index 14bb80c2d112..3dce60163a0e 100644
--- a/nixos/modules/services/games/factorio.nix
+++ b/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/nixos/modules/services/games/freeciv.nix b/nixos/modules/services/games/freeciv.nix
index bba27ae4cb5f..e4c05af3caba 100644
--- a/nixos/modules/services/games/freeciv.nix
+++ b/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/nixos/modules/services/games/mchprs.nix b/nixos/modules/services/games/mchprs.nix
index 71e546049c58..50db7cf66bb5 100644
--- a/nixos/modules/services/games/mchprs.nix
+++ b/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/nixos/modules/services/games/minecraft-server.nix b/nixos/modules/services/games/minecraft-server.nix
index 116fc533dfd8..00af8dce6603 100644
--- a/nixos/modules/services/games/minecraft-server.nix
+++ b/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/nixos/modules/services/games/minetest-server.nix b/nixos/modules/services/games/minetest-server.nix
index 8dc360153497..7fa687d2c7ed 100644
--- a/nixos/modules/services/games/minetest-server.nix
+++ b/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/nixos/modules/services/games/openarena.nix b/nixos/modules/services/games/openarena.nix
index 14e485b06a0d..a80c427dba5f 100644
--- a/nixos/modules/services/games/openarena.nix
+++ b/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/nixos/modules/services/games/quake3-server.nix b/nixos/modules/services/games/quake3-server.nix
index 41688d56173b..7b1a50c313f4 100644
--- a/nixos/modules/services/games/quake3-server.nix
+++ b/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/nixos/modules/services/games/teeworlds.nix b/nixos/modules/services/games/teeworlds.nix
index 04b611fb3cb1..1958fd414178 100644
--- a/nixos/modules/services/games/teeworlds.nix
+++ b/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/nixos/modules/services/games/terraria.nix b/nixos/modules/services/games/terraria.nix
index ccdd779165b8..57417b614f71 100644
--- a/nixos/modules/services/games/terraria.nix
+++ b/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/nixos/modules/services/games/xonotic.nix b/nixos/modules/services/games/xonotic.nix
index c84347ddc981..2b79e1183806 100644
--- a/nixos/modules/services/games/xonotic.nix
+++ b/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/nixos/modules/services/hardware/acpid.nix b/nixos/modules/services/hardware/acpid.nix
index 821f4ef205fc..581b6cb40136 100644
--- a/nixos/modules/services/hardware/acpid.nix
+++ b/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/nixos/modules/services/hardware/actkbd.nix b/nixos/modules/services/hardware/actkbd.nix
index 1718d179bf5e..335e9b2fdf5a 100644
--- a/nixos/modules/services/hardware/actkbd.nix
+++ b/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/nixos/modules/services/hardware/argonone.nix b/nixos/modules/services/hardware/argonone.nix
index e67c2625062e..b767388128c8 100644
--- a/nixos/modules/services/hardware/argonone.nix
+++ b/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/nixos/modules/services/hardware/asusd.nix b/nixos/modules/services/hardware/asusd.nix
index ff9a751e5be8..2dfe761a2172 100644
--- a/nixos/modules/services/hardware/asusd.nix
+++ b/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/nixos/modules/services/hardware/auto-cpufreq.nix b/nixos/modules/services/hardware/auto-cpufreq.nix
index 9c69ba8920f3..f61fa38be175 100644
--- a/nixos/modules/services/hardware/auto-cpufreq.nix
+++ b/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/nixos/modules/services/hardware/auto-epp.nix b/nixos/modules/services/hardware/auto-epp.nix
index 84b6a337d28a..b568dec26f4c 100644
--- a/nixos/modules/services/hardware/auto-epp.nix
+++ b/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/nixos/modules/services/hardware/bluetooth.nix b/nixos/modules/services/hardware/bluetooth.nix
index 51ec12f96537..a73cc970576a 100644
--- a/nixos/modules/services/hardware/bluetooth.nix
+++ b/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/nixos/modules/services/hardware/bolt.nix b/nixos/modules/services/hardware/bolt.nix
index 3bdf67cc1758..729273f94f12 100644
--- a/nixos/modules/services/hardware/bolt.nix
+++ b/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/nixos/modules/services/hardware/brltty.nix b/nixos/modules/services/hardware/brltty.nix
index f96760e92c57..bdec5d79be96 100644
--- a/nixos/modules/services/hardware/brltty.nix
+++ b/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/nixos/modules/services/hardware/ddccontrol.nix b/nixos/modules/services/hardware/ddccontrol.nix
index 0f1e8bf0d26c..f0b5a9c81960 100644
--- a/nixos/modules/services/hardware/ddccontrol.nix
+++ b/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/nixos/modules/services/hardware/fancontrol.nix b/nixos/modules/services/hardware/fancontrol.nix
index 993c37b2364f..f9fc8593f852 100644
--- a/nixos/modules/services/hardware/fancontrol.nix
+++ b/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/nixos/modules/services/hardware/freefall.nix b/nixos/modules/services/hardware/freefall.nix
index 2985739bc2df..4ac7c54d4d8a 100644
--- a/nixos/modules/services/hardware/freefall.nix
+++ b/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/nixos/modules/services/hardware/fwupd.nix b/nixos/modules/services/hardware/fwupd.nix
index c4837ff80ec7..bdbd0ac2440b 100644
--- a/nixos/modules/services/hardware/fwupd.nix
+++ b/nixos/modules/services/hardware/fwupd.nix
@@ -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/nixos/modules/services/hardware/handheld-daemon.nix b/nixos/modules/services/hardware/handheld-daemon.nix
index e8a7a39f441d..6c9d5aa3e22c 100644
--- a/nixos/modules/services/hardware/handheld-daemon.nix
+++ b/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/nixos/modules/services/hardware/hddfancontrol.nix b/nixos/modules/services/hardware/hddfancontrol.nix
index 746154e7aa17..e8cab0e22bef 100644
--- a/nixos/modules/services/hardware/hddfancontrol.nix
+++ b/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/nixos/modules/services/hardware/illum.nix b/nixos/modules/services/hardware/illum.nix
index 46172fb7b53a..7f7a85000234 100644
--- a/nixos/modules/services/hardware/illum.nix
+++ b/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/nixos/modules/services/hardware/interception-tools.nix b/nixos/modules/services/hardware/interception-tools.nix
index 4f86bd470ea7..e69c05841ee0 100644
--- a/nixos/modules/services/hardware/interception-tools.nix
+++ b/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/nixos/modules/services/hardware/iptsd.nix b/nixos/modules/services/hardware/iptsd.nix
index 8af0a6d6bbe1..3a299c2428df 100644
--- a/nixos/modules/services/hardware/iptsd.nix
+++ b/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/nixos/modules/services/hardware/irqbalance.nix b/nixos/modules/services/hardware/irqbalance.nix
index 8ba0a73d895d..c79e0eb83ece 100644
--- a/nixos/modules/services/hardware/irqbalance.nix
+++ b/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/nixos/modules/services/hardware/joycond.nix b/nixos/modules/services/hardware/joycond.nix
index 060303b520e5..106c19243c49 100644
--- a/nixos/modules/services/hardware/joycond.nix
+++ b/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/nixos/modules/services/hardware/kanata.nix b/nixos/modules/services/hardware/kanata.nix
index 05e76d843215..333b2d2a88a5 100644
--- a/nixos/modules/services/hardware/kanata.nix
+++ b/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/nixos/modules/services/hardware/keyd.nix b/nixos/modules/services/hardware/keyd.nix
index 77297401a51c..2aee7817c6f3 100644
--- a/nixos/modules/services/hardware/keyd.nix
+++ b/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/nixos/modules/services/hardware/lcd.nix b/nixos/modules/services/hardware/lcd.nix
index 8d682d137f44..d52d5f391911 100644
--- a/nixos/modules/services/hardware/lcd.nix
+++ b/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/nixos/modules/services/x11/hardware/libinput.nix b/nixos/modules/services/hardware/libinput.nix
similarity index 88%
rename from nixos/modules/services/x11/hardware/libinput.nix
rename to nixos/modules/services/hardware/libinput.nix
index 0ea21eb1dce3..b8aa59035d33 100644
--- a/nixos/modules/services/x11/hardware/libinput.nix
+++ b/nixos/modules/services/hardware/libinput.nix
@@ -2,7 +2,7 @@
with lib;
-let cfg = config.services.xserver.libinput;
+let cfg = config.services.libinput;
xorgBool = v: if v then "on" else "off";
@@ -11,8 +11,7 @@ let cfg = config.services.xserver.libinput;
type = types.nullOr types.str;
default = null;
example = "/dev/input/event0";
- description =
- lib.mdDoc ''
+ description = ''
Path for ${deviceType} device. Set to `null` to apply to any
auto-detected ${deviceType}.
'';
@@ -22,8 +21,7 @@ let cfg = config.services.xserver.libinput;
type = types.enum [ "flat" "adaptive" ];
default = "adaptive";
example = "flat";
- description =
- lib.mdDoc ''
+ description = ''
Sets the pointer acceleration profile to the given profile.
Permitted values are `adaptive`, `flat`.
Not all devices support this option or all profiles.
@@ -39,15 +37,14 @@ let cfg = config.services.xserver.libinput;
type = types.nullOr types.str;
default = null;
example = "-0.5";
- description = lib.mdDoc "Cursor acceleration (how fast speed increases from minSpeed to maxSpeed).";
+ description = "Cursor acceleration (how fast speed increases from minSpeed to maxSpeed).";
};
buttonMapping = mkOption {
type = types.nullOr types.str;
default = null;
example = "1 6 3 4 5 0 7";
- description =
- lib.mdDoc ''
+ description = ''
Sets the logical button mapping for this device, see XSetPointerMapping(3). The string must
be a space-separated list of button mappings in the order of the logical buttons on the
device, starting with button 1. The default mapping is "1 2 3 ... 32". A mapping of 0 deac‐
@@ -61,8 +58,7 @@ let cfg = config.services.xserver.libinput;
type = types.nullOr types.str;
default = null;
example = "0.5 0 0 0 0.8 0.1 0 0 1";
- description =
- lib.mdDoc ''
+ description = ''
A string of 9 space-separated floating point numbers. Sets the calibration matrix to the
3x3 matrix where the first row is (abc), the second row is (def) and the third row is (ghi).
'';
@@ -72,8 +68,7 @@ let cfg = config.services.xserver.libinput;
type = types.nullOr (types.enum [ "none" "buttonareas" "clickfinger" ]);
default = null;
example = "buttonareas";
- description =
- lib.mdDoc ''
+ description = ''
Enables a click method. Permitted values are `none`,
`buttonareas`, `clickfinger`.
Not all devices support all methods, if an option is unsupported,
@@ -84,14 +79,13 @@ let cfg = config.services.xserver.libinput;
leftHanded = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enables left-handed button orientation, i.e. swapping left and right buttons.";
+ description = "Enables left-handed button orientation, i.e. swapping left and right buttons.";
};
middleEmulation = mkOption {
type = types.bool;
default = true;
- description =
- lib.mdDoc ''
+ description = ''
Enables middle button emulation. When enabled, pressing the left and right buttons
simultaneously produces a middle mouse button click.
'';
@@ -100,15 +94,14 @@ let cfg = config.services.xserver.libinput;
naturalScrolling = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Enables or disables natural scrolling behavior.";
+ description = "Enables or disables natural scrolling behavior.";
};
scrollButton = mkOption {
type = types.nullOr types.int;
default = null;
example = 1;
- description =
- lib.mdDoc ''
+ description = ''
Designates a button as scroll button. If the ScrollMethod is button and the button is logically
held down, x/y axis movement is converted into scroll events.
'';
@@ -118,8 +111,7 @@ let cfg = config.services.xserver.libinput;
type = types.enum [ "twofinger" "edge" "button" "none" ];
default = "twofinger";
example = "edge";
- description =
- lib.mdDoc ''
+ description = ''
Specify the scrolling method: `twofinger`, `edge`,
`button`, or `none`
'';
@@ -128,8 +120,7 @@ let cfg = config.services.xserver.libinput;
horizontalScrolling = mkOption {
type = types.bool;
default = true;
- description =
- lib.mdDoc ''
+ description = ''
Enables or disables horizontal scrolling. When disabled, this driver will discard any
horizontal scroll events from libinput. This does not disable horizontal scroll events
from libinput; it merely discards the horizontal axis from any scroll events.
@@ -140,8 +131,7 @@ let cfg = config.services.xserver.libinput;
type = types.enum [ "disabled" "enabled" "disabled-on-external-mouse" ];
default = "enabled";
example = "disabled";
- description =
- lib.mdDoc ''
+ description = ''
Sets the send events mode to `disabled`, `enabled`,
or `disabled-on-external-mouse`
'';
@@ -150,8 +140,7 @@ let cfg = config.services.xserver.libinput;
tapping = mkOption {
type = types.bool;
default = true;
- description =
- lib.mdDoc ''
+ description = ''
Enables or disables tap-to-click behavior.
'';
};
@@ -159,7 +148,7 @@ let cfg = config.services.xserver.libinput;
tappingButtonMap = mkOption {
type = types.nullOr (types.enum [ "lrm" "lmr" ]);
default = null;
- description = lib.mdDoc ''
+ description = ''
Set the button mapping for 1/2/3-finger taps to left/right/middle or left/middle/right, respectively.
'';
};
@@ -167,8 +156,7 @@ let cfg = config.services.xserver.libinput;
tappingDragLock = mkOption {
type = types.bool;
default = true;
- description =
- lib.mdDoc ''
+ description = ''
Enables or disables drag lock during tapping behavior. When enabled, a finger up during tap-
and-drag will not immediately release the button. If the finger is set down again within the
timeout, the dragging process continues.
@@ -179,7 +167,7 @@ let cfg = config.services.xserver.libinput;
type = types.nullOr types.str;
default = null;
example = "0.5 0 0 0 0.8 0.1 0 0 1";
- description = lib.mdDoc ''
+ description = ''
A string of 9 space-separated floating point numbers. Sets the transformation matrix to
the 3x3 matrix where the first row is (abc), the second row is (def) and the third row is (ghi).
'';
@@ -188,8 +176,7 @@ let cfg = config.services.xserver.libinput;
disableWhileTyping = mkOption {
type = types.bool;
default = false;
- description =
- lib.mdDoc ''
+ description = ''
Disable input method while typing.
'';
};
@@ -201,7 +188,7 @@ let cfg = config.services.xserver.libinput;
''
Option "DragLockButtons" "L1 B1 L2 B2"
'';
- description = lib.mdDoc ''
+ description = ''
Additional options for libinput ${deviceType} driver. See
{manpage}`libinput(4)`
for available options.";
@@ -236,7 +223,7 @@ let cfg = config.services.xserver.libinput;
in {
imports =
- (map (option: mkRenamedOptionModule ([ "services" "xserver" "libinput" option ]) [ "services" "xserver" "libinput" "touchpad" option ]) [
+ (map (option: mkRenamedOptionModule ([ "services" "xserver" "libinput" option ]) [ "services" "libinput" "touchpad" option ]) [
"accelProfile"
"accelSpeed"
"buttonMapping"
@@ -255,12 +242,16 @@ in {
"transformationMatrix"
"disableWhileTyping"
"additionalOptions"
- ]);
+ ]) ++ [
+ (mkRenamedOptionModule [ "services" "xserver" "libinput" "enable" ] [ "services" "libinput" "enable" ])
+ (mkRenamedOptionModule [ "services" "xserver" "libinput" "mouse" ] [ "services" "libinput" "mouse" ])
+ (mkRenamedOptionModule [ "services" "xserver" "libinput" "touchpad" ] [ "services" "libinput" "touchpad" ])
+ ];
options = {
- services.xserver.libinput = {
- enable = mkEnableOption (lib.mdDoc "libinput") // {
+ services.libinput = {
+ enable = mkEnableOption "libinput" // {
default = config.services.xserver.enable;
defaultText = lib.literalExpression "config.services.xserver.enable";
};
diff --git a/nixos/modules/services/hardware/lirc.nix b/nixos/modules/services/hardware/lirc.nix
index 5b1a8d10c729..8103dbeb2d48 100644
--- a/nixos/modules/services/hardware/lirc.nix
+++ b/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/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/cdi-generate.nix b/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/cdi-generate.nix
deleted file mode 100644
index 1aaa2d07b9bd..000000000000
--- a/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/cdi-generate.nix
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- addDriverRunpath,
- glibc,
- jq,
- lib,
- nvidia-container-toolkit,
- nvidia-driver,
- runtimeShell,
- writeScriptBin,
-}:
-let
- mountOptions = { options = ["ro" "nosuid" "nodev" "bind"]; };
- mounts = [
- # FIXME: Making /usr mounts optional
- { hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-control";
- containerPath = "/usr/bin/nvidia-cuda-mps-control"; }
- { hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-server";
- containerPath = "/usr/bin/nvidia-cuda-mps-server"; }
- { hostPath = lib.getExe' nvidia-driver "nvidia-debugdump";
- containerPath = "/usr/bin/nvidia-debugdump"; }
- { hostPath = lib.getExe' nvidia-driver "nvidia-powerd";
- containerPath = "/usr/bin/nvidia-powerd"; }
- { hostPath = lib.getExe' nvidia-driver "nvidia-smi";
- containerPath = "/usr/bin/nvidia-smi"; }
- { hostPath = lib.getExe' nvidia-container-toolkit "nvidia-ctk";
- containerPath = "/usr/bin/nvidia-ctk"; }
- { 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:
- ["${lib.getExe jq} '${jqAddMountExpression} ${builtins.toJSON (mount // mountOptions)}'"])
- mounts;
-in
-writeScriptBin "nvidia-cdi-generator"
-''
-#! ${runtimeShell}
-
-function cdiGenerate {
- ${lib.getExe' nvidia-container-toolkit "nvidia-ctk"} cdi generate \
- --format json \
- --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 | \
- ${lib.concatStringsSep " | " mountsToJq} > $RUNTIME_DIRECTORY/nvidia-container-toolkit.json
-''
diff --git a/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/default.nix b/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/default.nix
deleted file mode 100644
index b95bdf191fad..000000000000
--- a/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/default.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
-
- options = {
-
- hardware.nvidia-container-toolkit-cdi-generator.enable = lib.mkOption {
- default = false;
- internal = true;
- visible = false;
- type = lib.types.bool;
- description = lib.mdDoc ''
- Enable dynamic CDI configuration for NVidia devices by running
- nvidia-container-toolkit on boot.
- '';
- };
-
- };
-
- config = {
-
- systemd.services.nvidia-container-toolkit-cdi-generator = lib.mkIf config.hardware.nvidia-container-toolkit-cdi-generator.enable {
- description = "Container Device Interface (CDI) for Nvidia generator";
- wantedBy = [ "multi-user.target" ];
- after = [ "systemd-udev-settle.service" ];
- serviceConfig = {
- RuntimeDirectory = "cdi";
- RemainAfterExit = true;
- ExecStart =
- let
- script = pkgs.callPackage ./cdi-generate.nix { nvidia-driver = config.hardware.nvidia.package; };
- in
- lib.getExe script;
- Type = "oneshot";
- };
- };
-
- };
-
-}
diff --git a/nixos/modules/services/hardware/nvidia-container-toolkit/cdi-generate.nix b/nixos/modules/services/hardware/nvidia-container-toolkit/cdi-generate.nix
new file mode 100644
index 000000000000..ca769cc44e5c
--- /dev/null
+++ b/nixos/modules/services/hardware/nvidia-container-toolkit/cdi-generate.nix
@@ -0,0 +1,35 @@
+{
+ glibc,
+ jq,
+ lib,
+ mounts,
+ nvidia-container-toolkit,
+ nvidia-driver,
+ runtimeShell,
+ writeScriptBin,
+}: let
+ mkMount = {hostPath, containerPath, mountOptions}: {
+ inherit hostPath containerPath;
+ options = mountOptions;
+ };
+ jqAddMountExpression = ".containerEdits.mounts[.containerEdits.mounts | length] |= . +";
+ allJqMounts = lib.concatMap
+ (mount:
+ ["${lib.getExe jq} '${jqAddMountExpression} ${builtins.toJSON (mkMount mount)}'"])
+ mounts;
+in
+writeScriptBin "nvidia-cdi-generator"
+''
+#! ${runtimeShell}
+
+function cdiGenerate {
+ ${lib.getExe' nvidia-container-toolkit "nvidia-ctk"} cdi generate \
+ --format json \
+ --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 | \
+ ${lib.concatStringsSep " | " allJqMounts} > $RUNTIME_DIRECTORY/nvidia-container-toolkit.json
+''
diff --git a/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix b/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix
new file mode 100644
index 000000000000..6c6bc667e649
--- /dev/null
+++ b/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix
@@ -0,0 +1,127 @@
+{ config, lib, pkgs, ... }:
+
+{
+ imports = [
+ (lib.mkRenamedOptionModule
+ [ "virtualisation" "containers" "cdi" "dynamic" "nvidia" "enable" ]
+ [ "hardware" "nvidia-container-toolkit" "enable" ])
+ ];
+
+ options = let
+ mountType = {
+ options = {
+ hostPath = lib.mkOption {
+ type = lib.types.str;
+ description = "Host path.";
+ };
+ containerPath = lib.mkOption {
+ type = lib.types.str;
+ description = "Container path.";
+ };
+ mountOptions = lib.mkOption {
+ default = [ "ro" "nosuid" "nodev" "bind" ];
+ type = lib.types.listOf lib.types.str;
+ description = "Mount options.";
+ };
+ };
+ };
+ in {
+
+ hardware.nvidia-container-toolkit = {
+ enable = lib.mkOption {
+ default = false;
+ type = lib.types.bool;
+ description = ''
+ Enable dynamic CDI configuration for NVidia devices by running
+ nvidia-container-toolkit on boot.
+ '';
+ };
+
+ mounts = lib.mkOption {
+ type = lib.types.listOf (lib.types.submodule mountType);
+ default = [];
+ description = "Mounts to be added to every container under the Nvidia CDI profile.";
+ };
+
+ mount-nvidia-executables = lib.mkOption {
+ default = true;
+ type = lib.types.bool;
+ description = ''
+ Mount executables nvidia-smi, nvidia-cuda-mps-control, nvidia-cuda-mps-server,
+ nvidia-debugdump, nvidia-powerd and nvidia-ctk on containers.
+ '';
+ };
+
+ mount-nvidia-docker-1-directories = lib.mkOption {
+ default = true;
+ type = lib.types.bool;
+ description = ''
+ Mount nvidia-docker-1 directories on containers: /usr/local/nvidia/lib and
+ /usr/local/nvidia/lib64.
+ '';
+ };
+ };
+
+ };
+
+ config = {
+
+ virtualisation.docker.daemon.settings = lib.mkIf
+ (config.hardware.nvidia-container-toolkit.enable &&
+ (lib.versionAtLeast config.virtualisation.docker.package.version "25")) {
+ features.cdi = true;
+ };
+
+ hardware.nvidia-container-toolkit.mounts = let
+ nvidia-driver = config.hardware.nvidia.package;
+ in (lib.mkMerge [
+ [{ hostPath = pkgs.addDriverRunpath.driverLink;
+ containerPath = pkgs.addDriverRunpath.driverLink; }
+ { hostPath = "${lib.getLib pkgs.glibc}/lib";
+ containerPath = "${lib.getLib pkgs.glibc}/lib"; }
+ { hostPath = "${lib.getLib pkgs.glibc}/lib64";
+ containerPath = "${lib.getLib pkgs.glibc}/lib64"; }]
+ (lib.mkIf config.hardware.nvidia-container-toolkit.mount-nvidia-executables
+ [{ hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-control";
+ containerPath = "/usr/bin/nvidia-cuda-mps-control"; }
+ { hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-server";
+ containerPath = "/usr/bin/nvidia-cuda-mps-server"; }
+ { hostPath = lib.getExe' nvidia-driver "nvidia-debugdump";
+ containerPath = "/usr/bin/nvidia-debugdump"; }
+ { hostPath = lib.getExe' nvidia-driver "nvidia-powerd";
+ containerPath = "/usr/bin/nvidia-powerd"; }
+ { hostPath = lib.getExe' nvidia-driver "nvidia-smi";
+ containerPath = "/usr/bin/nvidia-smi"; }])
+ # nvidia-docker 1.0 uses /usr/local/nvidia/lib{,64}
+ # e.g.
+ # - https://gitlab.com/nvidia/container-images/cuda/-/blob/e3ff10eab3a1424fe394899df0e0f8ca5a410f0f/dist/12.3.1/ubi9/base/Dockerfile#L44
+ # - https://github.com/NVIDIA/nvidia-docker/blob/01d2c9436620d7dde4672e414698afe6da4a282f/src/nvidia/volumes.go#L104-L173
+ (lib.mkIf config.hardware.nvidia-container-toolkit.mount-nvidia-docker-1-directories
+ [{ hostPath = "${lib.getLib nvidia-driver}/lib";
+ containerPath = "/usr/local/nvidia/lib"; }
+ { hostPath = "${lib.getLib nvidia-driver}/lib";
+ containerPath = "/usr/local/nvidia/lib64"; }])
+ ]);
+
+ systemd.services.nvidia-container-toolkit-cdi-generator = lib.mkIf config.hardware.nvidia-container-toolkit.enable {
+ description = "Container Device Interface (CDI) for Nvidia generator";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "systemd-udev-settle.service" ];
+ serviceConfig = {
+ RuntimeDirectory = "cdi";
+ RemainAfterExit = true;
+ ExecStart =
+ let
+ script = pkgs.callPackage ./cdi-generate.nix {
+ inherit (config.hardware.nvidia-container-toolkit) mounts;
+ nvidia-driver = config.hardware.nvidia.package;
+ };
+ in
+ lib.getExe script;
+ Type = "oneshot";
+ };
+ };
+
+ };
+
+}
diff --git a/nixos/modules/services/hardware/nvidia-optimus.nix b/nixos/modules/services/hardware/nvidia-optimus.nix
index 5b5273ed7823..d53175052c74 100644
--- a/nixos/modules/services/hardware/nvidia-optimus.nix
+++ b/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/nixos/modules/services/hardware/openrgb.nix b/nixos/modules/services/hardware/openrgb.nix
index 81b199e50778..6ae5b4e587c6 100644
--- a/nixos/modules/services/hardware/openrgb.nix
+++ b/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/nixos/modules/services/hardware/pcscd.nix b/nixos/modules/services/hardware/pcscd.nix
index 77c2d9b53f03..17bab2c5bf20 100644
--- a/nixos/modules/services/hardware/pcscd.nix
+++ b/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/nixos/modules/services/hardware/pommed.nix b/nixos/modules/services/hardware/pommed.nix
index a71004c1767c..9cdb2d4d1af8 100644
--- a/nixos/modules/services/hardware/pommed.nix
+++ b/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/nixos/modules/services/hardware/power-profiles-daemon.nix b/nixos/modules/services/hardware/power-profiles-daemon.nix
index 1d84bf8ac937..05e5b7a00b42 100644
--- a/nixos/modules/services/hardware/power-profiles-daemon.nix
+++ b/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/nixos/modules/services/hardware/rasdaemon.nix b/nixos/modules/services/hardware/rasdaemon.nix
index a1334684b7d5..3fe75984b3fb 100644
--- a/nixos/modules/services/hardware/rasdaemon.nix
+++ b/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/nixos/modules/services/hardware/ratbagd.nix b/nixos/modules/services/hardware/ratbagd.nix
index 5567bcbafd16..4398e8d582ea 100644
--- a/nixos/modules/services/hardware/ratbagd.nix
+++ b/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/nixos/modules/services/hardware/sane.nix b/nixos/modules/services/hardware/sane.nix
index 8f64afe60734..5f166bb320ba 100644
--- a/nixos/modules/services/hardware/sane.nix
+++ b/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/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix b/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix
index e737a4ce20de..8f9998108406 100644
--- a/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix
+++ b/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/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix b/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix
index d29e0f542f55..5236970337d8 100644
--- a/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix
+++ b/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/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix b/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix
index 5b05694abc01..d71a17f5ea6b 100644
--- a/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix
+++ b/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/nixos/modules/services/hardware/spacenavd.nix b/nixos/modules/services/hardware/spacenavd.nix
index 36f132439377..69ca6f102efe 100644
--- a/nixos/modules/services/hardware/spacenavd.nix
+++ b/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/nixos/modules/services/hardware/supergfxd.nix b/nixos/modules/services/hardware/supergfxd.nix
index f7af993d7238..62296014a8dc 100644
--- a/nixos/modules/services/hardware/supergfxd.nix
+++ b/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/nixos/modules/services/hardware/tcsd.nix b/nixos/modules/services/hardware/tcsd.nix
index f22924d410d5..e414b9647c9b 100644
--- a/nixos/modules/services/hardware/tcsd.nix
+++ b/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/nixos/modules/services/hardware/thermald.nix b/nixos/modules/services/hardware/thermald.nix
index a4839f326cc4..4f9202d13d90 100644
--- a/nixos/modules/services/hardware/thermald.nix
+++ b/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/nixos/modules/services/hardware/thinkfan.nix b/nixos/modules/services/hardware/thinkfan.nix
index b62fb5e9f8c9..37c9fef03d78 100644
--- a/nixos/modules/services/hardware/thinkfan.nix
+++ b/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/nixos/modules/services/hardware/throttled.nix b/nixos/modules/services/hardware/throttled.nix
index 0f1f00348ee8..143dc83a1d8b 100644
--- a/nixos/modules/services/hardware/throttled.nix
+++ b/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/nixos/modules/services/hardware/tlp.nix b/nixos/modules/services/hardware/tlp.nix
index 0b7f98ab6a6d..148a88e2030f 100644
--- a/nixos/modules/services/hardware/tlp.nix
+++ b/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/nixos/modules/services/hardware/trezord.nix b/nixos/modules/services/hardware/trezord.nix
index b2217fc97124..097acb03631f 100644
--- a/nixos/modules/services/hardware/trezord.nix
+++ b/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/nixos/modules/services/hardware/triggerhappy.nix b/nixos/modules/services/hardware/triggerhappy.nix
index 54eac70643ff..89f8754c0e68 100644
--- a/nixos/modules/services/hardware/triggerhappy.nix
+++ b/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/nixos/modules/services/hardware/tuxedo-rs.nix b/nixos/modules/services/hardware/tuxedo-rs.nix
index 0daccfef3a53..506454c1cadf 100644
--- a/nixos/modules/services/hardware/tuxedo-rs.nix
+++ b/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/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix
index 670b9087f110..3db661644281 100644
--- a/nixos/modules/services/hardware/udev.nix
+++ b/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/nixos/modules/services/hardware/udisks2.nix b/nixos/modules/services/hardware/udisks2.nix
index 5c058f1f0a6f..46a72b961501 100644
--- a/nixos/modules/services/hardware/udisks2.nix
+++ b/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/nixos/modules/services/hardware/undervolt.nix b/nixos/modules/services/hardware/undervolt.nix
index c4d4c6791a21..23bc848b2398 100644
--- a/nixos/modules/services/hardware/undervolt.nix
+++ b/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/nixos/modules/services/hardware/upower.nix b/nixos/modules/services/hardware/upower.nix
index 0ae31d99aa86..3d0edb0467ea 100644
--- a/nixos/modules/services/hardware/upower.nix
+++ b/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/nixos/modules/services/hardware/usbmuxd.nix b/nixos/modules/services/hardware/usbmuxd.nix
index d05ad3af8b12..891619934eb6 100644
--- a/nixos/modules/services/hardware/usbmuxd.nix
+++ b/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/nixos/modules/services/hardware/usbrelayd.nix b/nixos/modules/services/hardware/usbrelayd.nix
index 01d3a5ba8bee..31e56ab1d16c 100644
--- a/nixos/modules/services/hardware/usbrelayd.nix
+++ b/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/nixos/modules/services/hardware/vdr.nix b/nixos/modules/services/hardware/vdr.nix
index 689d83f7eedc..6adab680257f 100644
--- a/nixos/modules/services/hardware/vdr.nix
+++ b/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/nixos/modules/services/home-automation/ebusd.nix b/nixos/modules/services/home-automation/ebusd.nix
index 32485176ab29..d388022d7b50 100644
--- a/nixos/modules/services/home-automation/ebusd.nix
+++ b/nixos/modules/services/home-automation/ebusd.nix
@@ -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 [ "none" "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 (none|error|notice|info|debug) [all:notice].
'';
};
@@ -107,7 +107,7 @@ in
network = mkOption {
type = types.enum [ "none" "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 (none|error|notice|info|debug) [all:notice].
'';
};
@@ -115,7 +115,7 @@ in
bus = mkOption {
type = types.enum [ "none" "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 (none|error|notice|info|debug) [all:notice].
'';
};
@@ -123,7 +123,7 @@ in
update = mkOption {
type = types.enum [ "none" "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 (none|error|notice|info|debug) [all:notice].
'';
};
@@ -131,7 +131,7 @@ in
other = mkOption {
type = types.enum [ "none" "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 (none|error|notice|info|debug) [all:notice].
'';
};
@@ -139,7 +139,7 @@ in
all = mkOption {
type = types.enum [ "none" "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 (none|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/nixos/modules/services/home-automation/esphome.nix b/nixos/modules/services/home-automation/esphome.nix
index 3c0fd8aed08a..faae5ec8ff45 100644
--- a/nixos/modules/services/home-automation/esphome.nix
+++ b/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/nixos/modules/services/home-automation/evcc.nix b/nixos/modules/services/home-automation/evcc.nix
index f360f525b04b..a952437b1b56 100644
--- a/nixos/modules/services/home-automation/evcc.nix
+++ b/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].
@@ -63,6 +63,7 @@ in
DynamicUser = true;
LockPersonality = true;
MemoryDenyWriteExecute = true;
+ Restart = "on-failure";
RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
diff --git a/nixos/modules/services/home-automation/home-assistant.nix b/nixos/modules/services/home-automation/home-assistant.nix
index 3423eebe9ed6..d94adfb4aa1c 100644
--- a/nixos/modules/services/home-automation/home-assistant.nix
+++ b/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/nixos/modules/services/home-automation/homeassistant-satellite.nix b/nixos/modules/services/home-automation/homeassistant-satellite.nix
deleted file mode 100644
index 6ca428f2af81..000000000000
--- a/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/nixos/modules/services/home-automation/matter-server.nix b/nixos/modules/services/home-automation/matter-server.nix
index 864ef9e20083..7bf1cfe54d17 100644
--- a/nixos/modules/services/home-automation/matter-server.nix
+++ b/nixos/modules/services/home-automation/matter-server.nix
@@ -17,7 +17,7 @@ in
meta.maintainers = with lib.maintainers; [ leonm1 ];
options.services.matter-server = with types; {
- enable = mkEnableOption (lib.mdDoc "Matter-server");
+ enable = mkEnableOption "Matter-server";
package = mkPackageOptionMD pkgs "python-matter-server" { };
diff --git a/nixos/modules/services/audio/wyoming/faster-whisper.nix b/nixos/modules/services/home-automation/wyoming/faster-whisper.nix
similarity index 85%
rename from nixos/modules/services/audio/wyoming/faster-whisper.nix
rename to nixos/modules/services/home-automation/wyoming/faster-whisper.nix
index dd7f62744cd0..d0fca6a41c7b 100644
--- a/nixos/modules/services/audio/wyoming/faster-whisper.nix
+++ b/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;
@@ -129,6 +119,8 @@ in
wantedBy = [
"multi-user.target"
];
+ # https://github.com/rhasspy/wyoming-faster-whisper/issues/27
+ environment."HF_HUB_CACHE" = "/tmp";
serviceConfig = {
DynamicUser = true;
User = "wyoming-faster-whisper";
diff --git a/nixos/modules/services/audio/wyoming/openwakeword.nix b/nixos/modules/services/home-automation/wyoming/openwakeword.nix
similarity index 93%
rename from nixos/modules/services/audio/wyoming/openwakeword.nix
rename to nixos/modules/services/home-automation/wyoming/openwakeword.nix
index 252f70be2baa..856a4ef7366d 100644
--- a/nixos/modules/services/audio/wyoming/openwakeword.nix
+++ b/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/nixos/modules/services/audio/wyoming/piper.nix b/nixos/modules/services/home-automation/wyoming/piper.nix
similarity index 92%
rename from nixos/modules/services/audio/wyoming/piper.nix
rename to nixos/modules/services/home-automation/wyoming/piper.nix
index 2828fdf07892..5b5f898d7ca3 100644
--- a/nixos/modules/services/audio/wyoming/piper.nix
+++ b/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/nixos/modules/services/home-automation/wyoming/satellite.nix b/nixos/modules/services/home-automation/wyoming/satellite.nix
new file mode 100644
index 000000000000..531d375e703a
--- /dev/null
+++ b/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/nixos/modules/services/home-automation/zigbee2mqtt.nix b/nixos/modules/services/home-automation/zigbee2mqtt.nix
index a653e49a09f6..f1d150487379 100644
--- a/nixos/modules/services/home-automation/zigbee2mqtt.nix
+++ b/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/nixos/modules/services/home-automation/zwave-js.nix b/nixos/modules/services/home-automation/zwave-js.nix
index 9821da7ef6ed..2138719ec6fa 100644
--- a/nixos/modules/services/home-automation/zwave-js.nix
+++ b/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/nixos/modules/services/logging/SystemdJournal2Gelf.nix b/nixos/modules/services/logging/SystemdJournal2Gelf.nix
index 429dde33b521..7c50e9e2c42f 100644
--- a/nixos/modules/services/logging/SystemdJournal2Gelf.nix
+++ b/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/nixos/modules/services/logging/awstats.nix b/nixos/modules/services/logging/awstats.nix
index 708775bfcf03..a5b0e6347b2b 100644
--- a/nixos/modules/services/logging/awstats.nix
+++ b/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/nixos/modules/services/logging/filebeat.nix b/nixos/modules/services/logging/filebeat.nix
index 071e001eb3c5..57e0c6073578 100644
--- a/nixos/modules/services/logging/filebeat.nix
+++ b/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/nixos/modules/services/logging/fluentd.nix b/nixos/modules/services/logging/fluentd.nix
index c8718f26db38..bbf905eca06b 100644
--- a/nixos/modules/services/logging/fluentd.nix
+++ b/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/nixos/modules/services/logging/graylog.nix b/nixos/modules/services/logging/graylog.nix
index 673930c4cb5c..25982022c068 100644
--- a/nixos/modules/services/logging/graylog.nix
+++ b/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/nixos/modules/services/logging/heartbeat.nix b/nixos/modules/services/logging/heartbeat.nix
index 768ffe5315fe..1a264cebf6a2 100644
--- a/nixos/modules/services/logging/heartbeat.nix
+++ b/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/nixos/modules/services/logging/journalbeat.nix b/nixos/modules/services/logging/journalbeat.nix
index 80933d6a0f96..e7d726ab1f61 100644
--- a/nixos/modules/services/logging/journalbeat.nix
+++ b/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/nixos/modules/services/logging/journaldriver.nix b/nixos/modules/services/logging/journaldriver.nix
index 4d21464018aa..bb82f8cf30cc 100644
--- a/nixos/modules/services/logging/journaldriver.nix
+++ b/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/nixos/modules/services/logging/journalwatch.nix b/nixos/modules/services/logging/journalwatch.nix
index 55e2d600ee4f..71b29d57b7eb 100644
--- a/nixos/modules/services/logging/journalwatch.nix
+++ b/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/nixos/modules/services/logging/logcheck.nix b/nixos/modules/services/logging/logcheck.nix
index 5d87fc87d416..bda7f9a607e1 100644
--- a/nixos/modules/services/logging/logcheck.nix
+++ b/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/nixos/modules/services/logging/logrotate.nix b/nixos/modules/services/logging/logrotate.nix
index ba1445f08397..3e29828eba2f 100644
--- a/nixos/modules/services/logging/logrotate.nix
+++ b/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/nixos/modules/services/logging/logstash.nix b/nixos/modules/services/logging/logstash.nix
index 22292dbd931b..53e2e91d6212 100644
--- a/nixos/modules/services/logging/logstash.nix
+++ b/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/nixos/modules/services/logging/promtail.nix b/nixos/modules/services/logging/promtail.nix
index 9db82fd42b28..a34bc07b6ab2 100644
--- a/nixos/modules/services/logging/promtail.nix
+++ b/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/nixos/modules/services/logging/rsyslogd.nix b/nixos/modules/services/logging/rsyslogd.nix
index 207d416c1a88..25b6eec5056c 100644
--- a/nixos/modules/services/logging/rsyslogd.nix
+++ b/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/nixos/modules/services/logging/syslog-ng.nix b/nixos/modules/services/logging/syslog-ng.nix
index eea236263f7e..14e18d3f0eef 100644
--- a/nixos/modules/services/logging/syslog-ng.nix
+++ b/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/nixos/modules/services/logging/syslogd.nix b/nixos/modules/services/logging/syslogd.nix
index 553973e255f7..8674fad69658 100644
--- a/nixos/modules/services/logging/syslogd.nix
+++ b/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/nixos/modules/services/logging/ulogd.nix b/nixos/modules/services/logging/ulogd.nix
index 05c9797bb28b..5bd51ef88fe5 100644
--- a/nixos/modules/services/logging/ulogd.nix
+++ b/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/nixos/modules/services/logging/vector.nix b/nixos/modules/services/logging/vector.nix
index 9ccf8a4fa061..129a38b1d20f 100644
--- a/nixos/modules/services/logging/vector.nix
+++ b/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/nixos/modules/services/mail/clamsmtp.nix b/nixos/modules/services/mail/clamsmtp.nix
index a0de25962845..5bcf8ecdde1a 100644
--- a/nixos/modules/services/mail/clamsmtp.nix
+++ b/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/nixos/modules/services/mail/davmail.nix b/nixos/modules/services/mail/davmail.nix
index 9cdb435af4a1..46ddaedd4bf6 100644
--- a/nixos/modules/services/mail/davmail.nix
+++ b/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/nixos/modules/services/mail/dkimproxy-out.nix b/nixos/modules/services/mail/dkimproxy-out.nix
index 6f9cbc4e9d4d..48ccf2dda601 100644
--- a/nixos/modules/services/mail/dkimproxy-out.nix
+++ b/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/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix
index 71baa2bb1852..b2a6b3ab6784 100644
--- a/nixos/modules/services/mail/dovecot.nix
+++ b/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/nixos/modules/services/mail/dspam.nix b/nixos/modules/services/mail/dspam.nix
index 4fccd452a4fe..b81fe2652402 100644
--- a/nixos/modules/services/mail/dspam.nix
+++ b/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/nixos/modules/services/mail/exim.nix b/nixos/modules/services/mail/exim.nix
index 63d3fa54b23d..0a5ba9d76d15 100644
--- a/nixos/modules/services/mail/exim.nix
+++ b/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/nixos/modules/services/mail/goeland.nix b/nixos/modules/services/mail/goeland.nix
index 13092a65ed90..158b9ef982cc 100644
--- a/nixos/modules/services/mail/goeland.nix
+++ b/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/nixos/modules/services/mail/listmonk.nix b/nixos/modules/services/mail/listmonk.nix
index d6399304cc10..482bc42696f9 100644
--- a/nixos/modules/services/mail/listmonk.nix
+++ b/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.";
};
};
diff --git a/nixos/modules/services/mail/maddy.nix b/nixos/modules/services/mail/maddy.nix
index 2c4d75e8391a..7c67d4e6135e 100644
--- a/nixos/modules/services/mail/maddy.nix
+++ b/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/nixos/modules/services/mail/mail.nix b/nixos/modules/services/mail/mail.nix
index 8e1424595b51..fcc7ff6db91b 100644
--- a/nixos/modules/services/mail/mail.nix
+++ b/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/nixos/modules/services/mail/mailcatcher.nix b/nixos/modules/services/mail/mailcatcher.nix
index d0f4550c1926..6728bbcd3b8e 100644
--- a/nixos/modules/services/mail/mailcatcher.nix
+++ b/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/nixos/modules/services/mail/mailhog.nix b/nixos/modules/services/mail/mailhog.nix
index 7ae62de291ba..455e5095495e 100644
--- a/nixos/modules/services/mail/mailhog.nix
+++ b/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/nixos/modules/services/mail/mailman.md b/nixos/modules/services/mail/mailman.md
index 55b61f8a2582..446aa1f921b6 100644
--- a/nixos/modules/services/mail/mailman.md
+++ b/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/nixos/modules/services/mail/mailman.nix b/nixos/modules/services/mail/mailman.nix
index 76035625fbe1..7e7ca7e4060e 100644
--- a/nixos/modules/services/mail/mailman.nix
+++ b/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/nixos/modules/services/mail/mlmmj.nix b/nixos/modules/services/mail/mlmmj.nix
index 66106a14499b..80fd6d9f4e57 100644
--- a/nixos/modules/services/mail/mlmmj.nix
+++ b/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/nixos/modules/services/mail/nullmailer.nix b/nixos/modules/services/mail/nullmailer.nix
index 4fd0026dbe4e..55a85a354452 100644
--- a/nixos/modules/services/mail/nullmailer.nix
+++ b/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/nixos/modules/services/mail/offlineimap.nix b/nixos/modules/services/mail/offlineimap.nix
index 0166ec4e8d4e..f1517232c48d 100644
--- a/nixos/modules/services/mail/offlineimap.nix
+++ b/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/nixos/modules/services/mail/opendkim.nix b/nixos/modules/services/mail/opendkim.nix
index a377fccc7bd2..0460764ef094 100644
--- a/nixos/modules/services/mail/opendkim.nix
+++ b/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/nixos/modules/services/mail/opensmtpd.nix b/nixos/modules/services/mail/opensmtpd.nix
index a65c8e05a9ce..88e7bc0193b5 100644
--- a/nixos/modules/services/mail/opensmtpd.nix
+++ b/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/nixos/modules/services/mail/pfix-srsd.nix b/nixos/modules/services/mail/pfix-srsd.nix
index 237f36945e4b..7ad2b20454d0 100644
--- a/nixos/modules/services/mail/pfix-srsd.nix
+++ b/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/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix
index 209e066a19ef..fd78c98d0cb4 100644
--- a/nixos/modules/services/mail/postfix.nix
+++ b/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/nixos/modules/services/mail/postfixadmin.nix b/nixos/modules/services/mail/postfixadmin.nix
index e7ebb6fbd648..87a9f963b195 100644
--- a/nixos/modules/services/mail/postfixadmin.nix
+++ b/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/nixos/modules/services/mail/postgrey.nix b/nixos/modules/services/mail/postgrey.nix
index fdfa08946ddf..7c206e3725e6 100644
--- a/nixos/modules/services/mail/postgrey.nix
+++ b/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/nixos/modules/services/mail/postsrsd.nix b/nixos/modules/services/mail/postsrsd.nix
index 41301c8697d7..2ebc675ab10a 100644
--- a/nixos/modules/services/mail/postsrsd.nix
+++ b/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/nixos/modules/services/mail/public-inbox.nix b/nixos/modules/services/mail/public-inbox.nix
index bab4e8bb8d10..14a2ab48fa25 100644
--- a/nixos/modules/services/mail/public-inbox.nix
+++ b/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/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix
index 3f1a695ab91a..78f627d33e2d 100644
--- a/nixos/modules/services/mail/roundcube.nix
+++ b/nixos/modules/services/mail/roundcube.nix
@@ -7,14 +7,14 @@ let
fpm = config.services.phpfpm.pools.roundcube;
localDB = cfg.database.host == "localhost";
user = cfg.database.username;
- phpWithPspell = pkgs.php81.withExtensions ({ enabled, all }: [ all.pspell ] ++ enabled);
+ phpWithPspell = pkgs.php83.withExtensions ({ enabled, all }: [ all.pspell ] ++ enabled);
in
{
options.services.roundcube = {
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";
};
};
@@ -247,14 +247,15 @@ in
(mkIf (cfg.database.host == "localhost") {
requires = [ "postgresql.service" ];
after = [ "postgresql.service" ];
- path = [ config.services.postgresql.package ];
})
{
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
+
+ path = [ config.services.postgresql.package ];
script = let
- psql = "${lib.optionalString (!localDB) "PGPASSFILE=${cfg.database.passwordFile}"} ${pkgs.postgresql}/bin/psql ${lib.optionalString (!localDB) "-h ${cfg.database.host} -U ${cfg.database.username} "} ${cfg.database.dbname}";
+ psql = "${lib.optionalString (!localDB) "PGPASSFILE=${cfg.database.passwordFile}"} psql ${lib.optionalString (!localDB) "-h ${cfg.database.host} -U ${cfg.database.username} "} ${cfg.database.dbname}";
in
''
version="$(${psql} -t <<< "select value from system where name = 'roundcube-version';" || true)"
diff --git a/nixos/modules/services/mail/rspamd-trainer.nix b/nixos/modules/services/mail/rspamd-trainer.nix
index bb78ddf9dd47..81a0c460f0c3 100644
--- a/nixos/modules/services/mail/rspamd-trainer.nix
+++ b/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/nixos/modules/services/mail/rspamd.nix b/nixos/modules/services/mail/rspamd.nix
index ca88d8122179..c61ddcac954a 100644
--- a/nixos/modules/services/mail/rspamd.nix
+++ b/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/nixos/modules/services/mail/rss2email.nix b/nixos/modules/services/mail/rss2email.nix
index 4939f979cafb..c3327f7b436c 100644
--- a/nixos/modules/services/mail/rss2email.nix
+++ b/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/nixos/modules/services/mail/schleuder.nix b/nixos/modules/services/mail/schleuder.nix
index 2991418dd804..ca07b879071c 100644
--- a/nixos/modules/services/mail/schleuder.nix
+++ b/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/nixos/modules/services/mail/spamassassin.nix b/nixos/modules/services/mail/spamassassin.nix
index 072172e31451..e51cc0239a82 100644
--- a/nixos/modules/services/mail/spamassassin.nix
+++ b/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/nixos/modules/services/mail/stalwart-mail.nix b/nixos/modules/services/mail/stalwart-mail.nix
index 8ab3497f7a17..9cc919fd117d 100644
--- a/nixos/modules/services/mail/stalwart-mail.nix
+++ b/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/nixos/modules/services/mail/sympa.nix b/nixos/modules/services/mail/sympa.nix
index 13fc8656a2b5..fa8d3b82aaa0 100644
--- a/nixos/modules/services/mail/sympa.nix
+++ b/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/nixos/modules/services/mail/zeyple.nix b/nixos/modules/services/mail/zeyple.nix
index 9d4bc7f712d6..6f6a1799bc0a 100644
--- a/nixos/modules/services/mail/zeyple.nix
+++ b/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/nixos/modules/services/matrix/appservice-discord.nix b/nixos/modules/services/matrix/appservice-discord.nix
index c2c3abb79f97..7f3a1ed3e20a 100644
--- a/nixos/modules/services/matrix/appservice-discord.nix
+++ b/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/nixos/modules/services/matrix/appservice-irc.nix b/nixos/modules/services/matrix/appservice-irc.nix
index c79cd799b4d0..f4539a90f2e6 100644
--- a/nixos/modules/services/matrix/appservice-irc.nix
+++ b/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";
};
};
};
@@ -214,8 +214,9 @@ in {
RestrictRealtime = true;
PrivateMounts = true;
SystemCallFilter = [
- "@system-service @pkey @chown"
+ "@system-service @pkey"
"~@privileged @resources"
+ "@chown"
];
SystemCallArchitectures = "native";
# AF_UNIX is required to connect to a postgres socket.
diff --git a/nixos/modules/services/matrix/conduit.nix b/nixos/modules/services/matrix/conduit.nix
index b0fc85dbda7b..9b8a4f45c268 100644
--- a/nixos/modules/services/matrix/conduit.nix
+++ b/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,9 +100,9 @@ in
};
};
default = {};
- description = lib.mdDoc ''
+ description = ''
Generates the conduit.toml configuration file. Refer to
-
+
for details on supported values.
Note that database_path can not be edited because the service's reliance on systemd StateDir.
'';
diff --git a/nixos/modules/services/matrix/dendrite.nix b/nixos/modules/services/matrix/dendrite.nix
index 244c15fbf7a9..5152dfadf2e5 100644
--- a/nixos/modules/services/matrix/dendrite.nix
+++ b/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/nixos/modules/services/matrix/hebbot.nix b/nixos/modules/services/matrix/hebbot.nix
index ebf175464ddd..9f344fbe08d0 100644
--- a/nixos/modules/services/matrix/hebbot.nix
+++ b/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/nixos/modules/services/matrix/matrix-sliding-sync.nix b/nixos/modules/services/matrix/matrix-sliding-sync.nix
index d62e41bebd64..d273bba3e52d 100644
--- a/nixos/modules/services/matrix/matrix-sliding-sync.nix
+++ b/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 or path (for unix socket) 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
diff --git a/nixos/modules/services/matrix/maubot.md b/nixos/modules/services/matrix/maubot.md
index f6a05db56caf..d49066057a23 100644
--- a/nixos/modules/services/matrix/maubot.md
+++ b/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/nixos/modules/services/matrix/maubot.nix b/nixos/modules/services/matrix/maubot.nix
index bc96ca03b1fc..7aea88bd273d 100644
--- a/nixos/modules/services/matrix/maubot.nix
+++ b/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/nixos/modules/services/matrix/mautrix-facebook.nix b/nixos/modules/services/matrix/mautrix-facebook.nix
index d7cf024bb807..4d5217ee4367 100644
--- a/nixos/modules/services/matrix/mautrix-facebook.nix
+++ b/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/nixos/modules/services/matrix/mautrix-meta.nix b/nixos/modules/services/matrix/mautrix-meta.nix
new file mode 100644
index 000000000000..f0905c3af129
--- /dev/null
+++ b/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/nixos/modules/services/matrix/mautrix-telegram.nix b/nixos/modules/services/matrix/mautrix-telegram.nix
index 168c8bf436ac..a1ffaf9debe5 100644
--- a/nixos/modules/services/matrix/mautrix-telegram.nix
+++ b/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/nixos/modules/services/matrix/mautrix-whatsapp.nix b/nixos/modules/services/matrix/mautrix-whatsapp.nix
index 4b561a4b07a3..31f64c16d791 100644
--- a/nixos/modules/services/matrix/mautrix-whatsapp.nix
+++ b/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/nixos/modules/services/matrix/mjolnir.md b/nixos/modules/services/matrix/mjolnir.md
index f6994eeb8fa5..2594f05ce27b 100644
--- a/nixos/modules/services/matrix/mjolnir.md
+++ b/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/nixos/modules/services/matrix/mjolnir.nix b/nixos/modules/services/matrix/mjolnir.nix
index 4e9a915c23c7..d01c058e7396 100644
--- a/nixos/modules/services/matrix/mjolnir.nix
+++ b/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/nixos/modules/services/matrix/mx-puppet-discord.nix b/nixos/modules/services/matrix/mx-puppet-discord.nix
index 70828804b556..2b3a46193177 100644
--- a/nixos/modules/services/matrix/mx-puppet-discord.nix
+++ b/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/nixos/modules/services/matrix/pantalaimon-options.nix b/nixos/modules/services/matrix/pantalaimon-options.nix
index 3945a70fc86b..4243513788b5 100644
--- a/nixos/modules/services/matrix/pantalaimon-options.nix
+++ b/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/nixos/modules/services/matrix/pantalaimon.nix b/nixos/modules/services/matrix/pantalaimon.nix
index 591ba9a7ab55..6f3fefdb3430 100644
--- a/nixos/modules/services/matrix/pantalaimon.nix
+++ b/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/nixos/modules/services/matrix/synapse.md b/nixos/modules/services/matrix/synapse.md
index 9c9c025fc5f5..0ce13550d5b2 100644
--- a/nixos/modules/services/matrix/synapse.md
+++ b/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/nixos/modules/services/matrix/synapse.nix b/nixos/modules/services/matrix/synapse.nix
index 7291c0fcbcdd..bc88fb53012b 100644
--- a/nixos/modules/services/matrix/synapse.nix
+++ b/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.
'';
};
diff --git a/nixos/modules/services/misc/airsonic.nix b/nixos/modules/services/misc/airsonic.nix
index 6ba6ff5ca3cb..6095268eb960 100644
--- a/nixos/modules/services/misc/airsonic.nix
+++ b/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/nixos/modules/services/misc/amazon-ssm-agent.nix b/nixos/modules/services/misc/amazon-ssm-agent.nix
index 89a1c0766510..9ab4a7f96d08 100644
--- a/nixos/modules/services/misc/amazon-ssm-agent.nix
+++ b/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/nixos/modules/services/misc/ananicy.nix b/nixos/modules/services/misc/ananicy.nix
index 01e1053c9e0e..f7ab41fcce61 100644
--- a/nixos/modules/services/misc/ananicy.nix
+++ b/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/nixos/modules/services/misc/anki-sync-server.md b/nixos/modules/services/misc/anki-sync-server.md
index 5d2b4da4d2fc..f58d3d8ad0da 100644
--- a/nixos/modules/services/misc/anki-sync-server.md
+++ b/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/nixos/modules/services/misc/ankisyncd.nix b/nixos/modules/services/misc/ankisyncd.nix
index f5acfbb0ee96..b999b02534e7 100644
--- a/nixos/modules/services/misc/ankisyncd.nix
+++ b/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/nixos/modules/services/misc/apache-kafka.nix b/nixos/modules/services/misc/apache-kafka.nix
index b7281a0d9d5f..d1a3d92f2e22 100644
--- a/nixos/modules/services/misc/apache-kafka.nix
+++ b/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/nixos/modules/services/misc/atuin.nix b/nixos/modules/services/misc/atuin.nix
index 7e89929884d6..79c2c2a171e8 100644
--- a/nixos/modules/services/misc/atuin.nix
+++ b/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/nixos/modules/services/misc/autofs.nix b/nixos/modules/services/misc/autofs.nix
index 723b67e8bb6b..d94fae3edebf 100644
--- a/nixos/modules/services/misc/autofs.nix
+++ b/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/nixos/modules/services/misc/autorandr.nix b/nixos/modules/services/misc/autorandr.nix
index aa96acb61306..1dbfc4caa31d 100644
--- a/nixos/modules/services/misc/autorandr.nix
+++ b/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/nixos/modules/services/misc/autosuspend.nix b/nixos/modules/services/misc/autosuspend.nix
index 28dfa12105ec..a41ad43c4429 100644
--- a/nixos/modules/services/misc/autosuspend.nix
+++ b/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/nixos/modules/services/misc/bazarr.nix b/nixos/modules/services/misc/bazarr.nix
index 07c935053591..99343a146a7a 100644
--- a/nixos/modules/services/misc/bazarr.nix
+++ b/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/nixos/modules/services/misc/bcg.nix b/nixos/modules/services/misc/bcg.nix
index ad0b9c871342..626a67f66d08 100644
--- a/nixos/modules/services/misc/bcg.nix
+++ b/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/nixos/modules/services/misc/beanstalkd.nix b/nixos/modules/services/misc/beanstalkd.nix
index 4262cae323b9..b8f163cbfadf 100644
--- a/nixos/modules/services/misc/beanstalkd.nix
+++ b/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/nixos/modules/services/misc/bees.nix b/nixos/modules/services/misc/bees.nix
index 37f90c682221..a0fd3cd43d62 100644
--- a/nixos/modules/services/misc/bees.nix
+++ b/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/nixos/modules/services/misc/bepasty.nix b/nixos/modules/services/misc/bepasty.nix
index 70d07629493b..fad4827c6650 100644
--- a/nixos/modules/services/misc/bepasty.nix
+++ b/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/nixos/modules/services/misc/calibre-server.nix b/nixos/modules/services/misc/calibre-server.nix
index 66ae5fa91bb6..8e2ce2909239 100644
--- a/nixos/modules/services/misc/calibre-server.nix
+++ b/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/nixos/modules/services/misc/canto-daemon.nix b/nixos/modules/services/misc/canto-daemon.nix
index 8150e038bc13..db51a263aab5 100644
--- a/nixos/modules/services/misc/canto-daemon.nix
+++ b/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/nixos/modules/services/misc/cfdyndns.nix b/nixos/modules/services/misc/cfdyndns.nix
index dba8ac200151..506e5f7613c0 100644
--- a/nixos/modules/services/misc/cfdyndns.nix
+++ b/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/nixos/modules/services/misc/cgminer.nix b/nixos/modules/services/misc/cgminer.nix
index ad6cbf50918d..dd857124b226 100644
--- a/nixos/modules/services/misc/cgminer.nix
+++ b/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/nixos/modules/services/misc/clipcat.nix b/nixos/modules/services/misc/clipcat.nix
index fb6442709530..fa608e73c7d6 100644
--- a/nixos/modules/services/misc/clipcat.nix
+++ b/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/nixos/modules/services/misc/clipmenu.nix b/nixos/modules/services/misc/clipmenu.nix
index 343167b1df2e..71d36f9ef130 100644
--- a/nixos/modules/services/misc/clipmenu.nix
+++ b/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/nixos/modules/services/misc/confd.nix b/nixos/modules/services/misc/confd.nix
index 93731547ede8..836a1119a577 100644
--- a/nixos/modules/services/misc/confd.nix
+++ b/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/nixos/modules/services/misc/cpuminer-cryptonight.nix b/nixos/modules/services/misc/cpuminer-cryptonight.nix
index 7b18c6b3cd20..907b9d90da29 100644
--- a/nixos/modules/services/misc/cpuminer-cryptonight.nix
+++ b/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/nixos/modules/services/misc/db-rest.nix b/nixos/modules/services/misc/db-rest.nix
new file mode 100644
index 000000000000..fbf8b327af04
--- /dev/null
+++ b/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/nixos/modules/services/misc/devmon.nix b/nixos/modules/services/misc/devmon.nix
index bd0b738b7018..e4a3348646b1 100644
--- a/nixos/modules/services/misc/devmon.nix
+++ b/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/nixos/modules/services/misc/dictd.nix b/nixos/modules/services/misc/dictd.nix
index 4b714b84f3b2..8cb51bb0b7a7 100644
--- a/nixos/modules/services/misc/dictd.nix
+++ b/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/nixos/modules/services/misc/disnix.nix b/nixos/modules/services/misc/disnix.nix
index ee342cbc2e47..80e749204993 100644
--- a/nixos/modules/services/misc/disnix.nix
+++ b/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/nixos/modules/services/misc/docker-registry.nix b/nixos/modules/services/misc/docker-registry.nix
index 78d1d6339ed6..93bf71ea3ecc 100644
--- a/nixos/modules/services/misc/docker-registry.nix
+++ b/nixos/modules/services/misc/docker-registry.nix
@@ -41,24 +41,23 @@ 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;
};
@@ -66,13 +65,13 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Opens the port used by the firewall.";
+ 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.
'';
@@ -81,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.
diff --git a/nixos/modules/services/misc/domoticz.nix b/nixos/modules/services/misc/domoticz.nix
index 315092f93351..52443f49f7b3 100644
--- a/nixos/modules/services/misc/domoticz.nix
+++ b/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/nixos/modules/services/misc/duckling.nix b/nixos/modules/services/misc/duckling.nix
index 4d06ca7fa667..77d2a92380b0 100644
--- a/nixos/modules/services/misc/duckling.nix
+++ b/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/nixos/modules/services/misc/dwm-status.nix b/nixos/modules/services/misc/dwm-status.nix
index 351adf31d922..081451f2ace9 100644
--- a/nixos/modules/services/misc/dwm-status.nix
+++ b/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/nixos/modules/services/misc/dysnomia.nix b/nixos/modules/services/misc/dysnomia.nix
index 129345e38106..8150b7876221 100644
--- a/nixos/modules/services/misc/dysnomia.nix
+++ b/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/nixos/modules/services/misc/errbot.nix b/nixos/modules/services/misc/errbot.nix
index a650bc5bbd92..b447ba5d438d 100644
--- a/nixos/modules/services/misc/errbot.nix
+++ b/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/nixos/modules/services/misc/etebase-server.nix b/nixos/modules/services/misc/etebase-server.nix
index 6ec3807f0fb2..7b6b5249f230 100644
--- a/nixos/modules/services/misc/etebase-server.nix
+++ b/nixos/modules/services/misc/etebase-server.nix
@@ -33,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
@@ -47,25 +47,25 @@ in
type = types.package;
default = pkgs.python3.pkgs.etebase-server;
defaultText = literalExpression "pkgs.python3.pkgs.etebase-server";
- description = lib.mdDoc "etebase-server package to use.";
+ 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.
'';
};
@@ -73,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";
};
@@ -86,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.
'';
@@ -102,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 = {
@@ -116,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.
'';
};
@@ -125,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
@@ -157,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.";
};
};
};
diff --git a/nixos/modules/services/misc/etesync-dav.nix b/nixos/modules/services/misc/etesync-dav.nix
index ae2b5ad04343..ea659c61bd5a 100644
--- a/nixos/modules/services/misc/etesync-dav.nix
+++ b/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/nixos/modules/services/misc/evdevremapkeys.nix b/nixos/modules/services/misc/evdevremapkeys.nix
index 11ea6a5f03f2..e559dd89dc9f 100644
--- a/nixos/modules/services/misc/evdevremapkeys.nix
+++ b/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/nixos/modules/services/misc/felix.nix b/nixos/modules/services/misc/felix.nix
index 306d4cf0d7cf..0283de128afe 100644
--- a/nixos/modules/services/misc/felix.nix
+++ b/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/nixos/modules/services/misc/forgejo.md b/nixos/modules/services/misc/forgejo.md
index 14b21933e6b0..f234ebf44aef 100644
--- a/nixos/modules/services/misc/forgejo.md
+++ b/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/nixos/modules/services/misc/forgejo.nix b/nixos/modules/services/misc/forgejo.nix
index 08cddc3a0710..babed2d5acd4 100644
--- a/nixos/modules/services/misc/forgejo.nix
+++ b/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/nixos/modules/services/misc/freeswitch.nix b/nixos/modules/services/misc/freeswitch.nix
index a8f7b3d0c3ae..e90d9838fcb7 100644
--- a/nixos/modules/services/misc/freeswitch.nix
+++ b/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/nixos/modules/services/misc/fstrim.nix b/nixos/modules/services/misc/fstrim.nix
index 55fb24e29272..d2dda2636ef1 100644
--- a/nixos/modules/services/misc/fstrim.nix
+++ b/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/nixos/modules/services/misc/gammu-smsd.nix b/nixos/modules/services/misc/gammu-smsd.nix
index eff725f5a868..b30258333af2 100644
--- a/nixos/modules/services/misc/gammu-smsd.nix
+++ b/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/nixos/modules/services/misc/geoipupdate.nix b/nixos/modules/services/misc/geoipupdate.nix
index 27c1157e9a8c..f46bf7b394fe 100644
--- a/nixos/modules/services/misc/geoipupdate.nix
+++ b/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/nixos/modules/services/misc/gitea.nix b/nixos/modules/services/misc/gitea.nix
index 08feea853e47..a8526688b074 100644
--- a/nixos/modules/services/misc/gitea.nix
+++ b/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.";
};
};
};
@@ -722,5 +722,5 @@ in
timerConfig.OnCalendar = cfg.dump.interval;
};
};
- meta.maintainers = with lib.maintainers; [ srhb ma27 thehedgeh0g ];
+ meta.maintainers = with lib.maintainers; [ srhb ma27 pyrox0 ];
}
diff --git a/nixos/modules/services/misc/gitlab.md b/nixos/modules/services/misc/gitlab.md
index 916b23584ed0..f7a5a8027489 100644
--- a/nixos/modules/services/misc/gitlab.md
+++ b/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/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix
index e95ab0a112bc..43568f29dd37 100644
--- a/nixos/modules/services/misc/gitlab.nix
+++ b/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
@@ -1454,12 +1464,17 @@ in {
TimeoutSec = "infinity";
Restart = "always";
WorkingDirectory = "${cfg.packages.gitlab}/share/gitlab";
- ExecStart = utils.escapeSystemdExecArgs [
- "${cfg.packages.gitlab}/share/gitlab/bin/sidekiq-cluster"
- "-e" "production"
- "-r" "."
- "*" # all queue groups
- ];
+ 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" "."
+ ]
+ );
};
};
@@ -1578,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/nixos/modules/services/misc/gitolite.nix b/nixos/modules/services/misc/gitolite.nix
index 012abda2d76f..89f72c046755 100644
--- a/nixos/modules/services/misc/gitolite.nix
+++ b/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/nixos/modules/services/misc/gitweb.nix b/nixos/modules/services/misc/gitweb.nix
index aac0dac8a080..ec08ab51a457 100644
--- a/nixos/modules/services/misc/gitweb.nix
+++ b/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/nixos/modules/services/misc/gogs.nix b/nixos/modules/services/misc/gogs.nix
index 9bf7e4aab814..e4e23d597237 100644
--- a/nixos/modules/services/misc/gogs.nix
+++ b/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/nixos/modules/services/misc/gollum.nix b/nixos/modules/services/misc/gollum.nix
index e31eeaf8a30a..3966ef036bec 100644
--- a/nixos/modules/services/misc/gollum.nix
+++ b/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/nixos/modules/services/misc/gpsd.nix b/nixos/modules/services/misc/gpsd.nix
index 5d2e806181df..6f7aec0784a0 100644
--- a/nixos/modules/services/misc/gpsd.nix
+++ b/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/nixos/modules/services/misc/graphical-desktop.nix b/nixos/modules/services/misc/graphical-desktop.nix
new file mode 100644
index 000000000000..a88c02e610bf
--- /dev/null
+++ b/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/nixos/modules/services/misc/greenclip.nix b/nixos/modules/services/misc/greenclip.nix
index ecfb864ab2b7..d92cd1854877 100644
--- a/nixos/modules/services/misc/greenclip.nix
+++ b/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/nixos/modules/services/misc/headphones.nix b/nixos/modules/services/misc/headphones.nix
index 472b330fff15..31bd61cb4c20 100644
--- a/nixos/modules/services/misc/headphones.nix
+++ b/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/nixos/modules/services/misc/heisenbridge.nix b/nixos/modules/services/misc/heisenbridge.nix
index d7ce9c605c9e..de109e726633 100644
--- a/nixos/modules/services/misc/heisenbridge.nix
+++ b/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/nixos/modules/services/misc/homepage-dashboard.nix b/nixos/modules/services/misc/homepage-dashboard.nix
index 02f1378cb0d5..29fda16aa66f 100644
--- a/nixos/modules/services/misc/homepage-dashboard.nix
+++ b/nixos/modules/services/misc/homepage-dashboard.nix
@@ -12,20 +12,20 @@ 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 {
@@ -44,7 +44,7 @@ in
customCSS = lib.mkOption {
type = lib.types.lines;
- description = lib.mdDoc ''
+ description = ''
Custom CSS for styling Homepage.
See https://gethomepage.dev/latest/configs/custom-css-js/.
@@ -54,7 +54,7 @@ in
customJS = lib.mkOption {
type = lib.types.lines;
- description = lib.mdDoc ''
+ description = ''
Custom Javascript for Homepage.
See https://gethomepage.dev/latest/configs/custom-css-js/.
@@ -64,7 +64,7 @@ in
bookmarks = lib.mkOption {
inherit (settingsFormat) type;
- description = lib.mdDoc ''
+ description = ''
Homepage bookmarks configuration.
See https://gethomepage.dev/latest/configs/bookmarks/.
@@ -87,7 +87,7 @@ in
services = lib.mkOption {
inherit (settingsFormat) type;
- description = lib.mdDoc ''
+ description = ''
Homepage services configuration.
See https://gethomepage.dev/latest/configs/services/.
@@ -120,7 +120,7 @@ in
widgets = lib.mkOption {
inherit (settingsFormat) type;
- description = lib.mdDoc ''
+ description = ''
Homepage widgets configuration.
See https://gethomepage.dev/latest/configs/service-widgets/.
@@ -146,7 +146,7 @@ in
kubernetes = lib.mkOption {
inherit (settingsFormat) type;
- description = lib.mdDoc ''
+ description = ''
Homepage kubernetes configuration.
See https://gethomepage.dev/latest/configs/kubernetes/.
@@ -156,7 +156,7 @@ in
docker = lib.mkOption {
inherit (settingsFormat) type;
- description = lib.mdDoc ''
+ description = ''
Homepage docker configuration.
See https://gethomepage.dev/latest/configs/docker/.
@@ -166,7 +166,7 @@ in
settings = lib.mkOption {
inherit (settingsFormat) type;
- description = lib.mdDoc ''
+ description = ''
Homepage settings.
See https://gethomepage.dev/latest/configs/settings/.
diff --git a/nixos/modules/services/misc/ihaskell.nix b/nixos/modules/services/misc/ihaskell.nix
index 4782053c4fb8..186ff7345ab3 100644
--- a/nixos/modules/services/misc/ihaskell.nix
+++ b/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/nixos/modules/services/misc/input-remapper.nix b/nixos/modules/services/misc/input-remapper.nix
index 5b9f16e019d8..94c2ece52f98 100644
--- a/nixos/modules/services/misc/input-remapper.nix
+++ b/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/nixos/modules/services/misc/invidious-router.nix b/nixos/modules/services/misc/invidious-router.nix
new file mode 100644
index 000000000000..33da7e96b523
--- /dev/null
+++ b/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/nixos/modules/services/misc/irkerd.nix b/nixos/modules/services/misc/irkerd.nix
index d080cc0a7358..993d77ba424c 100644
--- a/nixos/modules/services/misc/irkerd.nix
+++ b/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/nixos/modules/services/misc/jackett.nix b/nixos/modules/services/misc/jackett.nix
index c0bb0a575f01..8b5011ce0d81 100644
--- a/nixos/modules/services/misc/jackett.nix
+++ b/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/nixos/modules/services/misc/jellyseerr.nix b/nixos/modules/services/misc/jellyseerr.nix
index 31e0c5beb673..7599a1af3384 100644
--- a/nixos/modules/services/misc/jellyseerr.nix
+++ b/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/nixos/modules/services/misc/klipper.nix b/nixos/modules/services/misc/klipper.nix
index a0eb409599b5..5e20b32bc8fd 100644
--- a/nixos/modules/services/misc/klipper.nix
+++ b/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/nixos/modules/services/misc/languagetool.nix b/nixos/modules/services/misc/languagetool.nix
index 9adf792373b5..ba563dace473 100644
--- a/nixos/modules/services/misc/languagetool.nix
+++ b/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/nixos/modules/services/misc/leaps.nix b/nixos/modules/services/misc/leaps.nix
index 5522223ecc97..c6f5a1252332 100644
--- a/nixos/modules/services/misc/leaps.nix
+++ b/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/nixos/modules/services/misc/libreddit.nix b/nixos/modules/services/misc/libreddit.nix
index 02d71c198e78..c1f6b276ad9f 100644
--- a/nixos/modules/services/misc/libreddit.nix
+++ b/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/nixos/modules/services/misc/lidarr.nix b/nixos/modules/services/misc/lidarr.nix
index 8ceb567e8801..5f7b5c293a25 100644
--- a/nixos/modules/services/misc/lidarr.nix
+++ b/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/nixos/modules/services/misc/lifecycled.nix b/nixos/modules/services/misc/lifecycled.nix
index fb5cabb4f038..8b80af392492 100644
--- a/nixos/modules/services/misc/lifecycled.nix
+++ b/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/nixos/modules/services/misc/llama-cpp.nix b/nixos/modules/services/misc/llama-cpp.nix
index 305d4538e89a..c73cff027e22 100644
--- a/nixos/modules/services/misc/llama-cpp.nix
+++ b/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 = [];
};
diff --git a/nixos/modules/services/misc/logkeys.nix b/nixos/modules/services/misc/logkeys.nix
index 75d073a0c94b..0fb4fa6cf8de 100644
--- a/nixos/modules/services/misc/logkeys.nix
+++ b/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/nixos/modules/services/misc/mame.nix b/nixos/modules/services/misc/mame.nix
index 6e9d2fd26cff..6c7f08d48be1 100644
--- a/nixos/modules/services/misc/mame.nix
+++ b/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/nixos/modules/services/misc/mbpfan.nix b/nixos/modules/services/misc/mbpfan.nix
index ef56ea49d1a9..1d9b7ae87ca0 100644
--- a/nixos/modules/services/misc/mbpfan.nix
+++ b/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/nixos/modules/services/misc/mediatomb.nix b/nixos/modules/services/misc/mediatomb.nix
index 03235e9a1265..932558e25802 100644
--- a/nixos/modules/services/misc/mediatomb.nix
+++ b/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/nixos/modules/services/misc/metabase.nix b/nixos/modules/services/misc/metabase.nix
index 5fc18e27eaae..eebe582548a5 100644
--- a/nixos/modules/services/misc/metabase.nix
+++ b/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/nixos/modules/services/misc/mollysocket.nix b/nixos/modules/services/misc/mollysocket.nix
new file mode 100644
index 000000000000..f40caa4a782e
--- /dev/null
+++ b/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/nixos/modules/services/misc/moonraker.nix b/nixos/modules/services/misc/moonraker.nix
index f043cc83bf05..1461f1048b03 100644
--- a/nixos/modules/services/misc/moonraker.nix
+++ b/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/nixos/modules/services/misc/mqtt2influxdb.nix b/nixos/modules/services/misc/mqtt2influxdb.nix
index 621f51a4e7fd..a2d6a2b34a23 100644
--- a/nixos/modules/services/misc/mqtt2influxdb.nix
+++ b/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/nixos/modules/services/misc/n8n.nix b/nixos/modules/services/misc/n8n.nix
index 2af37fba910a..231470b9937a 100644
--- a/nixos/modules/services/misc/n8n.nix
+++ b/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/nixos/modules/services/misc/nitter.nix b/nixos/modules/services/misc/nitter.nix
index d2cf7c0de2b7..f8be2aed70c9 100644
--- a/nixos/modules/services/misc/nitter.nix
+++ b/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/nixos/modules/services/misc/nix-gc.nix b/nixos/modules/services/misc/nix-gc.nix
index 656cbad81373..9caca5d74079 100644
--- a/nixos/modules/services/misc/nix-gc.nix
+++ b/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/nixos/modules/services/misc/nix-optimise.nix b/nixos/modules/services/misc/nix-optimise.nix
index 0398229a13da..ed33f6746a4e 100644
--- a/nixos/modules/services/misc/nix-optimise.nix
+++ b/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/nixos/modules/services/misc/nix-ssh-serve.nix b/nixos/modules/services/misc/nix-ssh-serve.nix
index cf9d6339c69b..f60736c688d9 100644
--- a/nixos/modules/services/misc/nix-ssh-serve.nix
+++ b/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/nixos/modules/services/misc/novacomd.nix b/nixos/modules/services/misc/novacomd.nix
index bde8328d46f8..7cfc68d2b673 100644
--- a/nixos/modules/services/misc/novacomd.nix
+++ b/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/nixos/modules/services/misc/ntfy-sh.nix b/nixos/modules/services/misc/ntfy-sh.nix
index b8b077240115..ae6ab9571d0f 100644
--- a/nixos/modules/services/misc/ntfy-sh.nix
+++ b/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/nixos/modules/services/misc/nzbget.nix b/nixos/modules/services/misc/nzbget.nix
index d02fda62fa4f..c961fe9b2877 100644
--- a/nixos/modules/services/misc/nzbget.nix
+++ b/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/nixos/modules/services/misc/nzbhydra2.nix b/nixos/modules/services/misc/nzbhydra2.nix
index 536a4e4b0075..8246ea52f978 100644
--- a/nixos/modules/services/misc/nzbhydra2.nix
+++ b/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/nixos/modules/services/misc/octoprint.nix b/nixos/modules/services/misc/octoprint.nix
index 43e0ce0c21d3..6290a6a7a537 100644
--- a/nixos/modules/services/misc/octoprint.nix
+++ b/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/nixos/modules/services/misc/ollama.nix b/nixos/modules/services/misc/ollama.nix
index 7a5661510e25..c0341984aa35 100644
--- a/nixos/modules/services/misc/ollama.nix
+++ b/nixos/modules/services/misc/ollama.nix
@@ -15,6 +15,55 @@ in
services.ollama = {
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";
@@ -24,22 +73,27 @@ in
'';
};
acceleration = lib.mkOption {
- type = types.nullOr (types.enum [ "rocm" "cuda" ]);
+ type = types.nullOr (types.enum [ false "rocm" "cuda" ]);
default = null;
example = "rocm";
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 = {
- HOME = "/tmp";
OLLAMA_LLM_LIBRARY = "cpu";
+ HIP_VISIBLE_DEVICES = "0,1";
};
description = ''
Set arbitrary environment variables for the ollama service.
@@ -58,15 +112,16 @@ in
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
environment = cfg.environmentVariables // {
- HOME = "%S/ollama";
- OLLAMA_MODELS = "%S/ollama/models";
+ HOME = cfg.home;
+ OLLAMA_MODELS = cfg.models;
OLLAMA_HOST = cfg.listenAddress;
};
serviceConfig = {
ExecStart = "${lib.getExe ollamaPackage} serve";
- WorkingDirectory = "%S/ollama";
+ WorkingDirectory = cfg.home;
StateDirectory = [ "ollama" ];
- DynamicUser = true;
+ DynamicUser = cfg.sandbox;
+ ReadWritePaths = cfg.writablePaths;
};
};
diff --git a/nixos/modules/services/misc/ombi.nix b/nixos/modules/services/misc/ombi.nix
index 8bf6a9b116ec..9b2e3cf84e5d 100644
--- a/nixos/modules/services/misc/ombi.nix
+++ b/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/nixos/modules/services/misc/osrm.nix b/nixos/modules/services/misc/osrm.nix
index 12c908a761e3..a93337dc75e3 100644
--- a/nixos/modules/services/misc/osrm.nix
+++ b/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/nixos/modules/services/misc/owncast.nix b/nixos/modules/services/misc/owncast.nix
index 01fe34cf50fe..94f0f4e998c4 100644
--- a/nixos/modules/services/misc/owncast.nix
+++ b/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/nixos/modules/services/misc/packagekit.nix b/nixos/modules/services/misc/packagekit.nix
index f4191a4453ca..1be689794d9f 100644
--- a/nixos/modules/services/misc/packagekit.nix
+++ b/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/nixos/modules/services/misc/paperless.nix b/nixos/modules/services/misc/paperless.nix
index 9314c4f3848d..e564fe3b8317 100644
--- a/nixos/modules/services/misc/paperless.nix
+++ b/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,8 +352,8 @@ 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;
@@ -352,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/nixos/modules/services/misc/parsoid.nix b/nixos/modules/services/misc/parsoid.nix
index 6f4a340c8a18..a1935d202172 100644
--- a/nixos/modules/services/misc/parsoid.nix
+++ b/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/nixos/modules/services/misc/persistent-evdev.nix b/nixos/modules/services/misc/persistent-evdev.nix
index b1f367fec7fb..650752abd215 100644
--- a/nixos/modules/services/misc/persistent-evdev.nix
+++ b/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/nixos/modules/services/misc/pinnwand.nix b/nixos/modules/services/misc/pinnwand.nix
index 5fca9f4125a8..9c26864dab56 100644
--- a/nixos/modules/services/misc/pinnwand.nix
+++ b/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/nixos/modules/services/misc/plex.nix b/nixos/modules/services/misc/plex.nix
index 164801605713..fcd8ebbac6ed 100644
--- a/nixos/modules/services/misc/plex.nix
+++ b/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/nixos/modules/services/misc/plikd.nix b/nixos/modules/services/misc/plikd.nix
index 9b0825bf40c9..ec94cfc02979 100644
--- a/nixos/modules/services/misc/plikd.nix
+++ b/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/nixos/modules/services/misc/podgrab.nix b/nixos/modules/services/misc/podgrab.nix
index c596122fd31c..50dc70e2bd76 100644
--- a/nixos/modules/services/misc/podgrab.nix
+++ b/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/nixos/modules/services/misc/polaris.nix b/nixos/modules/services/misc/polaris.nix
index 83da486083b4..4ac99eaad384 100644
--- a/nixos/modules/services/misc/polaris.nix
+++ b/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/nixos/modules/services/misc/portunus.nix b/nixos/modules/services/misc/portunus.nix
index ebb3bc8f0851..ab78479c96cd 100644
--- a/nixos/modules/services/misc/portunus.nix
+++ b/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/nixos/modules/services/misc/prowlarr.nix b/nixos/modules/services/misc/prowlarr.nix
index 84d365003992..c94882a4f72a 100644
--- a/nixos/modules/services/misc/prowlarr.nix
+++ b/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/nixos/modules/services/misc/pufferpanel.nix b/nixos/modules/services/misc/pufferpanel.nix
index b951d60cc5b9..3679d25861e6 100644
--- a/nixos/modules/services/misc/pufferpanel.nix
+++ b/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/nixos/modules/services/misc/pykms.nix b/nixos/modules/services/misc/pykms.nix
index be3accc0d7e5..d1b209e38932 100644
--- a/nixos/modules/services/misc/pykms.nix
+++ b/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/nixos/modules/services/misc/radarr.nix b/nixos/modules/services/misc/radarr.nix
index a5f264331ed3..d9f78c4e8ee6 100644
--- a/nixos/modules/services/misc/radarr.nix
+++ b/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/nixos/modules/services/misc/readarr.nix b/nixos/modules/services/misc/readarr.nix
index 73868b4baa95..b76a70859f75 100644
--- a/nixos/modules/services/misc/readarr.nix
+++ b/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/nixos/modules/services/misc/redmine.nix b/nixos/modules/services/misc/redmine.nix
index c1209e34a92b..af1773dab267 100644
--- a/nixos/modules/services/misc/redmine.nix
+++ b/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/nixos/modules/services/misc/ripple-data-api.nix b/nixos/modules/services/misc/ripple-data-api.nix
index 30623a321338..a699ce95cf0e 100644
--- a/nixos/modules/services/misc/ripple-data-api.nix
+++ b/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/nixos/modules/services/misc/rippled.nix b/nixos/modules/services/misc/rippled.nix
index 68a831894250..3a906f3e714f 100644
--- a/nixos/modules/services/misc/rippled.nix
+++ b/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/nixos/modules/services/misc/rkvm.nix b/nixos/modules/services/misc/rkvm.nix
index 582e8511ed96..9d41669e00f6 100644
--- a/nixos/modules/services/misc/rkvm.nix
+++ b/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 ._
@@ -50,7 +50,7 @@ in
certificate = mkOption {
type = types.path;
default = "/etc/rkvm/certificate.pem";
- description = mdDoc ''
+ description = ''
TLS certificate path.
::: {.note}
@@ -62,7 +62,7 @@ in
key = mkOption {
type = types.path;
default = "/etc/rkvm/key.pem";
- description = mdDoc ''
+ description = ''
TLS key path.
::: {.note}
@@ -73,7 +73,7 @@ in
password = mkOption {
type = types.str;
- description = mdDoc ''
+ description = ''
Shared secret token to authenticate the client.
Make sure this matches your client's config.
'';
@@ -82,7 +82,7 @@ in
};
default = { };
- description = mdDoc "Structured server daemon configuration";
+ description = "Structured server daemon configuration";
};
};
@@ -97,7 +97,7 @@ in
server = mkOption {
type = types.str;
example = "192.168.0.123:5258";
- description = mdDoc ''
+ description = ''
An RKVM server's internet socket address, either IPv4 or IPv6.
'';
};
@@ -105,7 +105,7 @@ in
certificate = mkOption {
type = types.path;
default = "/etc/rkvm/certificate.pem";
- description = mdDoc ''
+ description = ''
TLS ceritficate path.
::: {.note}
@@ -116,7 +116,7 @@ in
password = mkOption {
type = types.str;
- description = mdDoc ''
+ description = ''
Shared secret token to authenticate the client.
Make sure this matches your server's config.
'';
@@ -125,7 +125,7 @@ in
};
default = {};
- description = mdDoc "Structured client daemon configuration";
+ description = "Structured client daemon configuration";
};
};
diff --git a/nixos/modules/services/misc/rmfakecloud.nix b/nixos/modules/services/misc/rmfakecloud.nix
index 979f4f14d383..6cc87753aa25 100644
--- a/nixos/modules/services/misc/rmfakecloud.nix
+++ b/nixos/modules/services/misc/rmfakecloud.nix
@@ -9,7 +9,7 @@ let
in {
options = {
services.rmfakecloud = {
- enable = mkEnableOption (lib.mdDoc "rmfakecloud remarkable self-hosted cloud");
+ enable = mkEnableOption "rmfakecloud remarkable self-hosted cloud";
package = mkPackageOption pkgs "rmfakecloud" {
extraDescription = ''
@@ -22,7 +22,7 @@ in {
storageUrl = mkOption {
type = types.str;
example = "https://local.appspot.com";
- description = lib.mdDoc ''
+ description = ''
URL used by the tablet to access the rmfakecloud service.
'';
};
@@ -30,7 +30,7 @@ in {
port = mkOption {
type = types.port;
default = 3000;
- description = lib.mdDoc ''
+ description = ''
Listening port number.
'';
};
@@ -38,7 +38,7 @@ in {
logLevel = mkOption {
type = types.enum [ "info" "debug" "warn" "error" ];
default = "info";
- description = lib.mdDoc ''
+ description = ''
Logging level.
'';
};
@@ -47,7 +47,7 @@ in {
type = with types; attrsOf str;
default = { };
example = { DATADIR = "/custom/path/for/rmfakecloud/data"; };
- description = lib.mdDoc ''
+ description = ''
Extra settings in the form of a set of key-value pairs.
For tokens and secrets, use `environmentFile` instead.
@@ -60,7 +60,7 @@ in {
type = with types; nullOr path;
default = null;
example = "/etc/secrets/rmfakecloud.env";
- description = lib.mdDoc ''
+ description = ''
Path to an environment file loaded for the rmfakecloud service.
This can be used to securely store tokens and secrets outside of the
diff --git a/nixos/modules/services/misc/rshim.nix b/nixos/modules/services/misc/rshim.nix
index ae13f7d208f6..4a66f61fa40a 100644
--- a/nixos/modules/services/misc/rshim.nix
+++ b/nixos/modules/services/misc/rshim.nix
@@ -12,13 +12,13 @@ let
in
{
options.services.rshim = {
- enable = lib.mkEnableOption (lib.mdDoc "user-space rshim driver for the BlueField SoC");
+ enable = lib.mkEnableOption "user-space rshim driver for the BlueField SoC";
package = lib.mkPackageOption pkgs "rshim-user-space" { };
backend = lib.mkOption {
type = with lib.types; nullOr (enum [ "usb" "pcie" "pcie_lf" ]);
- description = lib.mdDoc ''
+ description = ''
Specify the backend to attach. If not specified, the driver will scan
all rshim backends unless the `device` option is given with a device
name specified.
@@ -29,7 +29,7 @@ in
device = lib.mkOption {
type = with lib.types; nullOr str;
- description = lib.mdDoc ''
+ description = ''
Specify the device name to attach. The backend driver can be deduced
from the device name, thus the `backend` option is not needed.
'';
@@ -39,7 +39,7 @@ in
index = lib.mkOption {
type = with lib.types; nullOr int;
- description = lib.mdDoc ''
+ description = ''
Specify the index to create device path `/dev/rshim`. It's also
used to create network interface name `tmfifo_net`. This option
is needed when multiple rshim instances are running.
@@ -50,7 +50,7 @@ in
log-level = lib.mkOption {
type = lib.types.int;
- description = lib.mdDoc ''
+ description = ''
Specify the log level (0:none, 1:error, 2:warning, 3:notice, 4:debug).
'';
default = 2;
@@ -59,7 +59,7 @@ in
config = lib.mkOption {
type = with lib.types; attrsOf (oneOf [ int str ]);
- description = lib.mdDoc ''
+ description = ''
Structural setting for the rshim configuration file
(`/etc/rshim.conf`). It can be used to specify the static mapping
between rshim devices and rshim names. It can also be used to ignore
diff --git a/nixos/modules/services/misc/safeeyes.nix b/nixos/modules/services/misc/safeeyes.nix
index 9dfa2001bcb7..38970fd77527 100644
--- a/nixos/modules/services/misc/safeeyes.nix
+++ b/nixos/modules/services/misc/safeeyes.nix
@@ -16,7 +16,7 @@ in
services.safeeyes = {
- enable = mkEnableOption (lib.mdDoc "the safeeyes OSGi service");
+ enable = mkEnableOption "the safeeyes OSGi service";
};
diff --git a/nixos/modules/services/misc/sdrplay.nix b/nixos/modules/services/misc/sdrplay.nix
index 2d5333e3885b..d56b1e4124d6 100644
--- a/nixos/modules/services/misc/sdrplay.nix
+++ b/nixos/modules/services/misc/sdrplay.nix
@@ -5,7 +5,7 @@ with lib;
enable = mkOption {
default = false;
example = true;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the SDRplay API service and udev rules.
::: {.note}
diff --git a/nixos/modules/services/misc/serviio.nix b/nixos/modules/services/misc/serviio.nix
index 18e64030d79d..a9449e54f5b0 100644
--- a/nixos/modules/services/misc/serviio.nix
+++ b/nixos/modules/services/misc/serviio.nix
@@ -31,7 +31,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the Serviio Media Server.
'';
};
@@ -39,7 +39,7 @@ in {
dataDir = mkOption {
type = types.path;
default = "/var/lib/serviio";
- description = lib.mdDoc ''
+ description = ''
The directory where serviio stores its state, data, etc.
'';
};
diff --git a/nixos/modules/services/misc/sickbeard.nix b/nixos/modules/services/misc/sickbeard.nix
index f141660ced86..51179fdb14d3 100644
--- a/nixos/modules/services/misc/sickbeard.nix
+++ b/nixos/modules/services/misc/sickbeard.nix
@@ -20,7 +20,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the sickbeard server.";
+ description = "Whether to enable the sickbeard server.";
};
package = mkPackageOption pkgs "sickbeard" {
example = "sickrage";
@@ -32,28 +32,28 @@ in
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.";
};
port = mkOption {
type = types.ints.u16;
default = 8081;
- 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/nixos/modules/services/misc/signald.nix b/nixos/modules/services/misc/signald.nix
index 32ba154506ce..45cf1434882f 100644
--- a/nixos/modules/services/misc/signald.nix
+++ b/nixos/modules/services/misc/signald.nix
@@ -8,24 +8,24 @@ let
in
{
options.services.signald = {
- enable = mkEnableOption (lib.mdDoc "the signald service");
+ enable = mkEnableOption "signald, the unofficial daemon for interacting with Signal";
user = mkOption {
type = types.str;
default = defaultUser;
- description = lib.mdDoc "User under which signald runs.";
+ description = "User under which signald runs.";
};
group = mkOption {
type = types.str;
default = defaultUser;
- description = lib.mdDoc "Group under which signald runs.";
+ description = "Group under which signald runs.";
};
socketPath = mkOption {
type = types.str;
default = "/run/signald/signald.sock";
- description = lib.mdDoc "Path to the signald socket";
+ description = "Path to the signald socket";
};
};
diff --git a/nixos/modules/services/misc/siproxd.nix b/nixos/modules/services/misc/siproxd.nix
index 3890962b7cfb..bedc91e3b43c 100644
--- a/nixos/modules/services/misc/siproxd.nix
+++ b/nixos/modules/services/misc/siproxd.nix
@@ -37,7 +37,7 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the Siproxd SIP
proxy/masquerading daemon.
'';
@@ -46,20 +46,20 @@ in
ifInbound = mkOption {
type = types.str;
example = "eth0";
- description = lib.mdDoc "Local network interface";
+ description = "Local network interface";
};
ifOutbound = mkOption {
type = types.str;
example = "ppp0";
- description = lib.mdDoc "Public network interface";
+ description = "Public network interface";
};
hostsAllowReg = mkOption {
type = types.listOf types.str;
default = [ ];
example = [ "192.168.1.0/24" "192.168.2.0/24" ];
- description = lib.mdDoc ''
+ description = ''
Access control list for incoming SIP registrations.
'';
};
@@ -68,7 +68,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "123.45.0.0/16" "123.46.0.0/16" ];
- description = lib.mdDoc ''
+ description = ''
Access control list for incoming SIP traffic.
'';
};
@@ -77,7 +77,7 @@ in
type = types.listOf types.str;
default = [ ];
example = [ "10.0.0.0/8" "11.0.0.0/8" ];
- description = lib.mdDoc ''
+ description = ''
Access control list for denying incoming
SIP registrations and traffic.
'';
@@ -86,7 +86,7 @@ in
sipListenPort = mkOption {
type = types.int;
default = 5060;
- description = lib.mdDoc ''
+ description = ''
Port to listen for incoming SIP messages.
'';
};
@@ -94,7 +94,7 @@ in
rtpPortLow = mkOption {
type = types.int;
default = 7070;
- description = lib.mdDoc ''
+ description = ''
Bottom of UDP port range for incoming and outgoing RTP traffic
'';
};
@@ -102,7 +102,7 @@ in
rtpPortHigh = mkOption {
type = types.int;
default = 7089;
- description = lib.mdDoc ''
+ description = ''
Top of UDP port range for incoming and outgoing RTP traffic
'';
};
@@ -110,7 +110,7 @@ in
rtpTimeout = mkOption {
type = types.int;
default = 300;
- description = lib.mdDoc ''
+ description = ''
Timeout for an RTP stream. If for the specified
number of seconds no data is relayed on an active
stream, it is considered dead and will be killed.
@@ -120,7 +120,7 @@ in
rtpDscp = mkOption {
type = types.int;
default = 46;
- description = lib.mdDoc ''
+ description = ''
DSCP (differentiated services) value to be assigned
to RTP packets. Allows QOS aware routers to handle
different types traffic with different priorities.
@@ -130,7 +130,7 @@ in
sipDscp = mkOption {
type = types.int;
default = 0;
- description = lib.mdDoc ''
+ description = ''
DSCP (differentiated services) value to be assigned
to SIP packets. Allows QOS aware routers to handle
different types traffic with different priorities.
@@ -140,7 +140,7 @@ in
passwordFile = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Path to per-user password file.
'';
};
@@ -148,7 +148,7 @@ in
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra configuration to add to siproxd configuration.
'';
};
diff --git a/nixos/modules/services/misc/snapper.nix b/nixos/modules/services/misc/snapper.nix
index 569433c3c71d..3a3ed1b5c0f5 100644
--- a/nixos/modules/services/misc/snapper.nix
+++ b/nixos/modules/services/misc/snapper.nix
@@ -25,7 +25,7 @@ let
configOptions = {
SUBVOLUME = mkOption {
type = types.path;
- description = lib.mdDoc ''
+ description = ''
Path of the subvolume or mount point.
This path is a subvolume and has to contain a subvolume named
.snapshots.
@@ -36,7 +36,7 @@ let
FSTYPE = mkOption {
type = types.enum [ "btrfs" ];
default = "btrfs";
- description = lib.mdDoc ''
+ description = ''
Filesystem type. Only btrfs is stable and tested.
'';
};
@@ -44,7 +44,7 @@ let
ALLOW_GROUPS = mkOption {
type = types.listOf safeStr;
default = [];
- description = lib.mdDoc ''
+ description = ''
List of groups allowed to operate with the config.
Also see the PERMISSIONS section in man:snapper(8).
@@ -55,7 +55,7 @@ let
type = types.listOf safeStr;
default = [];
example = [ "alice" ];
- description = lib.mdDoc ''
+ description = ''
List of users allowed to operate with the config. "root" is always
implicitly included.
@@ -66,7 +66,7 @@ let
TIMELINE_CLEANUP = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Defines whether the timeline cleanup algorithm should be run for the config.
'';
};
@@ -74,7 +74,7 @@ let
TIMELINE_CREATE = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Defines whether hourly snapshots should be created.
'';
};
@@ -87,7 +87,7 @@ in
snapshotRootOnBoot = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to snapshot root on boot
'';
};
@@ -95,7 +95,7 @@ in
snapshotInterval = mkOption {
type = types.str;
default = "hourly";
- description = lib.mdDoc ''
+ description = ''
Snapshot interval.
The format is described in
@@ -106,7 +106,7 @@ in
cleanupInterval = mkOption {
type = types.str;
default = "1d";
- description = lib.mdDoc ''
+ description = ''
Cleanup interval.
The format is described in
@@ -117,7 +117,7 @@ in
filters = mkOption {
type = types.nullOr types.lines;
default = null;
- description = lib.mdDoc ''
+ description = ''
Global display difference filter. See man:snapper(8) for more details.
'';
};
@@ -135,7 +135,7 @@ in
}
'';
- description = lib.mdDoc ''
+ description = ''
Subvolume configuration. Any option mentioned in man:snapper-configs(5)
is valid here, even if NixOS doesn't document it.
'';
diff --git a/nixos/modules/services/misc/soft-serve.nix b/nixos/modules/services/misc/soft-serve.nix
index 2b63b6bcd867..1907d92adb85 100644
--- a/nixos/modules/services/misc/soft-serve.nix
+++ b/nixos/modules/services/misc/soft-serve.nix
@@ -19,7 +19,7 @@ in
settings = mkOption {
type = format.type;
default = { };
- description = mdDoc ''
+ description = ''
The contents of the configuration file for soft-serve.
See <${docUrl}>.
diff --git a/nixos/modules/services/misc/sonarr.nix b/nixos/modules/services/misc/sonarr.nix
index ec59988d2b9a..228a2d48f5a9 100644
--- a/nixos/modules/services/misc/sonarr.nix
+++ b/nixos/modules/services/misc/sonarr.nix
@@ -8,18 +8,18 @@ in
{
options = {
services.sonarr = {
- enable = mkEnableOption (lib.mdDoc "Sonarr");
+ enable = mkEnableOption "Sonarr";
dataDir = mkOption {
type = types.str;
default = "/var/lib/sonarr/.config/NzbDrone";
- description = lib.mdDoc "The directory where Sonarr stores its data files.";
+ description = "The directory where Sonarr stores its data files.";
};
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open ports in the firewall for the Sonarr web interface
'';
};
@@ -27,13 +27,13 @@ in
user = mkOption {
type = types.str;
default = "sonarr";
- description = lib.mdDoc "User account under which Sonaar runs.";
+ description = "User account under which Sonaar runs.";
};
group = mkOption {
type = types.str;
default = "sonarr";
- description = lib.mdDoc "Group under which Sonaar runs.";
+ description = "Group under which Sonaar runs.";
};
package = mkPackageOption pkgs "sonarr" { };
diff --git a/nixos/modules/services/misc/sourcehut/default.md b/nixos/modules/services/misc/sourcehut/default.md
index 44d58aa0bef3..f965c395038a 100644
--- a/nixos/modules/services/misc/sourcehut/default.md
+++ b/nixos/modules/services/misc/sourcehut/default.md
@@ -12,7 +12,7 @@ This NixOS module also provides basic configuration integrating Sourcehut into l
and `services.postgresql` services.
A very basic configuration may look like this:
-```
+```nix
{ pkgs, ... }:
let
fqdn =
@@ -66,9 +66,9 @@ in {
# Settings to setup what certificates are used for which endpoint.
virtualHosts = {
"${fqdn}".enableACME = true;
- "meta.${fqdn}".useACMEHost = fqdn:
- "man.${fqdn}".useACMEHost = fqdn:
- "git.${fqdn}".useACMEHost = fqdn:
+ "meta.${fqdn}".useACMEHost = fqdn;
+ "man.${fqdn}".useACMEHost = fqdn;
+ "git.${fqdn}".useACMEHost = fqdn;
};
};
}
diff --git a/nixos/modules/services/misc/sourcehut/default.nix b/nixos/modules/services/misc/sourcehut/default.nix
index 557d6d7e7168..94a96dba6790 100644
--- a/nixos/modules/services/misc/sourcehut/default.nix
+++ b/nixos/modules/services/misc/sourcehut/default.nix
@@ -56,38 +56,38 @@ let
})));
commonServiceSettings = srv: {
origin = mkOption {
- description = lib.mdDoc "URL ${srv}.sr.ht is being served at (protocol://domain)";
+ description = "URL ${srv}.sr.ht is being served at (protocol://domain)";
type = types.str;
default = "https://${srv}.${domain}";
defaultText = "https://${srv}.example.com";
};
debug-host = mkOption {
- description = lib.mdDoc "Address to bind the debug server to.";
+ description = "Address to bind the debug server to.";
type = with types; nullOr str;
default = null;
};
debug-port = mkOption {
- description = lib.mdDoc "Port to bind the debug server to.";
+ description = "Port to bind the debug server to.";
type = with types; nullOr str;
default = null;
};
connection-string = mkOption {
- description = lib.mdDoc "SQLAlchemy connection string for the database.";
+ description = "SQLAlchemy connection string for the database.";
type = types.str;
default = "postgresql:///localhost?user=${srv}srht&host=/run/postgresql";
};
- migrate-on-upgrade = mkEnableOption (lib.mdDoc "automatic migrations on package upgrade") // { default = true; };
+ migrate-on-upgrade = mkEnableOption "automatic migrations on package upgrade" // { default = true; };
oauth-client-id = mkOption {
- description = lib.mdDoc "${srv}.sr.ht's OAuth client id for meta.sr.ht.";
+ description = "${srv}.sr.ht's OAuth client id for meta.sr.ht.";
type = types.str;
};
oauth-client-secret = mkOption {
- description = lib.mdDoc "${srv}.sr.ht's OAuth client secret for meta.sr.ht.";
+ description = "${srv}.sr.ht's OAuth client secret for meta.sr.ht.";
type = types.path;
apply = s: "<" + toString s;
};
api-origin = mkOption {
- description = lib.mdDoc "Origin URL for the API";
+ description = "Origin URL for the API";
type = types.str;
default = "http://${cfg.listenAddress}:${toString (cfg.${srv}.port + 100)}";
defaultText = lib.literalMD ''
@@ -117,57 +117,57 @@ let
todosrht
]);
mkOptionNullOrStr = description: mkOption {
- description = lib.mdDoc description;
+ description = description;
type = with types; nullOr str;
default = null;
};
in
{
options.services.sourcehut = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
sourcehut - git hosting, continuous integration, mailing list, ticket tracking, wiki
and account management services
- '');
+ '';
listenAddress = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "Address to bind to.";
+ description = "Address to bind to.";
};
python = mkOption {
internal = true;
type = types.package;
default = python;
- description = lib.mdDoc ''
+ description = ''
The python package to use. It should contain references to the *srht modules and also
gunicorn.
'';
};
minio = {
- enable = mkEnableOption (lib.mdDoc ''local minio integration'');
+ enable = mkEnableOption ''local minio integration'';
};
nginx = {
- enable = mkEnableOption (lib.mdDoc ''local nginx integration'');
+ enable = mkEnableOption ''local nginx integration'';
virtualHost = mkOption {
type = types.attrs;
default = {};
- description = lib.mdDoc "Virtual-host configuration merged with all Sourcehut's virtual-hosts.";
+ description = "Virtual-host configuration merged with all Sourcehut's virtual-hosts.";
};
};
postfix = {
- enable = mkEnableOption (lib.mdDoc ''local postfix integration'');
+ enable = mkEnableOption ''local postfix integration'';
};
postgresql = {
- enable = mkEnableOption (lib.mdDoc ''local postgresql integration'');
+ enable = mkEnableOption ''local postgresql integration'';
};
redis = {
- enable = mkEnableOption (lib.mdDoc ''local redis integration in a dedicated redis-server'');
+ enable = mkEnableOption ''local redis integration in a dedicated redis-server'';
};
settings = mkOption {
@@ -175,17 +175,17 @@ in
freeformType = settingsFormat.type;
options."sr.ht" = {
global-domain = mkOption {
- description = lib.mdDoc "Global domain name.";
+ description = "Global domain name.";
type = types.str;
example = "example.com";
};
environment = mkOption {
- description = lib.mdDoc "Values other than \"production\" adds a banner to each page.";
+ description = "Values other than \"production\" adds a banner to each page.";
type = types.enum [ "development" "production" ];
default = "development";
};
network-key = mkOption {
- description = lib.mdDoc ''
+ description = ''
An absolute file path (which should be outside the Nix-store)
to a secret key to encrypt internal messages with. Use `srht-keygen network` to
generate this key. It must be consistent between all services and nodes.
@@ -194,27 +194,27 @@ in
apply = s: "<" + toString s;
};
owner-email = mkOption {
- description = lib.mdDoc "Owner's email.";
+ description = "Owner's email.";
type = types.str;
default = "contact@example.com";
};
owner-name = mkOption {
- description = lib.mdDoc "Owner's name.";
+ description = "Owner's name.";
type = types.str;
default = "John Doe";
};
site-blurb = mkOption {
- description = lib.mdDoc "Blurb for your site.";
+ description = "Blurb for your site.";
type = types.str;
default = "the hacker's forge";
};
site-info = mkOption {
- description = lib.mdDoc "The top-level info page for your site.";
+ description = "The top-level info page for your site.";
type = types.str;
default = "https://sourcehut.org";
};
service-key = mkOption {
- description = lib.mdDoc ''
+ description = ''
An absolute file path (which should be outside the Nix-store)
to a key used for encrypting session cookies. Use `srht-keygen service` to
generate the service key. This must be shared between each node of the same
@@ -226,12 +226,12 @@ in
apply = s: "<" + toString s;
};
site-name = mkOption {
- description = lib.mdDoc "The name of your network of sr.ht-based sites.";
+ description = "The name of your network of sr.ht-based sites.";
type = types.str;
default = "sourcehut";
};
source-url = mkOption {
- description = lib.mdDoc "The source code for your fork of sr.ht.";
+ description = "The source code for your fork of sr.ht.";
type = types.str;
default = "https://git.sr.ht/~sircmpwn/srht";
};
@@ -239,7 +239,7 @@ in
options.mail = {
smtp-host = mkOptionNullOrStr "Outgoing SMTP host.";
smtp-port = mkOption {
- description = lib.mdDoc "Outgoing SMTP port.";
+ description = "Outgoing SMTP port.";
type = with types; nullOr port;
default = null;
};
@@ -247,13 +247,13 @@ in
smtp-password = mkOptionNullOrStr "Outgoing SMTP password.";
smtp-from = mkOption {
type = types.str;
- description = lib.mdDoc "Outgoing SMTP FROM.";
+ description = "Outgoing SMTP FROM.";
};
error-to = mkOptionNullOrStr "Address receiving application exceptions";
error-from = mkOptionNullOrStr "Address sending application exceptions";
pgp-privkey = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
An absolute file path (which should be outside the Nix-store)
to an OpenPGP private key.
@@ -265,26 +265,26 @@ in
};
pgp-pubkey = mkOption {
type = with types; either path str;
- description = lib.mdDoc "OpenPGP public key.";
+ description = "OpenPGP public key.";
};
pgp-key-id = mkOption {
type = types.str;
- description = lib.mdDoc "OpenPGP key identifier.";
+ description = "OpenPGP key identifier.";
};
};
options.objects = {
s3-upstream = mkOption {
- description = lib.mdDoc "Configure the S3-compatible object storage service.";
+ description = "Configure the S3-compatible object storage service.";
type = with types; nullOr str;
default = null;
};
s3-access-key = mkOption {
- description = lib.mdDoc "Access key to the S3-compatible object storage service";
+ description = "Access key to the S3-compatible object storage service";
type = with types; nullOr str;
default = null;
};
s3-secret-key = mkOption {
- description = lib.mdDoc ''
+ description = ''
An absolute file path (which should be outside the Nix-store)
to the secret key of the S3-compatible object storage service.
'';
@@ -295,7 +295,7 @@ in
};
options.webhooks = {
private-key = mkOption {
- description = lib.mdDoc ''
+ description = ''
An absolute file path (which should be outside the Nix-store)
to a base64-encoded Ed25519 key for signing webhook payloads.
This should be consistent for all *.sr.ht sites,
@@ -309,14 +309,14 @@ in
};
options."builds.sr.ht" = commonServiceSettings "builds" // {
- allow-free = mkEnableOption (lib.mdDoc "nonpaying users to submit builds");
+ allow-free = mkEnableOption "nonpaying users to submit builds";
redis = mkOption {
- description = lib.mdDoc "The Redis connection used for the Celery worker.";
+ description = "The Redis connection used for the Celery worker.";
type = types.str;
default = "redis+socket:///run/redis-sourcehut-buildsrht/redis.sock?virtual_host=2";
};
shell = mkOption {
- description = lib.mdDoc ''
+ description = ''
Scripts used to launch on SSH connection.
`/usr/bin/master-shell` on master,
`/usr/bin/runner-shell` on runner.
@@ -329,19 +329,19 @@ in
};
options."builds.sr.ht::worker" = {
bind-address = mkOption {
- description = lib.mdDoc ''
+ description = ''
HTTP bind address for serving local build information/monitoring.
'';
type = types.str;
default = "localhost:8080";
};
buildlogs = mkOption {
- description = lib.mdDoc "Path to write build logs.";
+ description = "Path to write build logs.";
type = types.str;
default = "/var/log/sourcehut/buildsrht-worker";
};
name = mkOption {
- description = lib.mdDoc ''
+ description = ''
Listening address and listening port
of the build runner (with HTTP port if not 80).
'';
@@ -349,7 +349,7 @@ in
default = "localhost:5020";
};
timeout = mkOption {
- description = lib.mdDoc ''
+ description = ''
Max build duration.
See .
'';
@@ -360,12 +360,12 @@ in
options."git.sr.ht" = commonServiceSettings "git" // {
outgoing-domain = mkOption {
- description = lib.mdDoc "Outgoing domain.";
+ description = "Outgoing domain.";
type = types.str;
default = "https://git.localhost.localdomain";
};
post-update-script = mkOption {
- description = lib.mdDoc ''
+ description = ''
A post-update script which is installed in every git repo.
This setting is propagated to newer and existing repositories.
'';
@@ -374,7 +374,7 @@ in
defaultText = "\${pkgs.sourcehut.gitsrht}/bin/gitsrht-update-hook";
};
repos = mkOption {
- description = lib.mdDoc ''
+ description = ''
Path to git repositories on disk.
If changing the default, you must ensure that
the gitsrht's user as read and write access to it.
@@ -383,14 +383,14 @@ in
default = "/var/lib/sourcehut/gitsrht/repos";
};
webhooks = mkOption {
- description = lib.mdDoc "The Redis connection used for the webhooks worker.";
+ description = "The Redis connection used for the webhooks worker.";
type = types.str;
default = "redis+socket:///run/redis-sourcehut-gitsrht/redis.sock?virtual_host=1";
};
};
options."git.sr.ht::api" = {
internal-ipnet = mkOption {
- description = lib.mdDoc ''
+ description = ''
Set of IP subnets which are permitted to utilize internal API
authentication. This should be limited to the subnets
from which your *.sr.ht services are running.
@@ -403,7 +403,7 @@ in
options."hg.sr.ht" = commonServiceSettings "hg" // {
changegroup-script = mkOption {
- description = lib.mdDoc ''
+ description = ''
A changegroup script which is installed in every mercurial repo.
This setting is propagated to newer and existing repositories.
'';
@@ -412,7 +412,7 @@ in
defaultText = "\${pkgs.sourcehut.hgsrht}/bin/hgsrht-hook-changegroup";
};
repos = mkOption {
- description = lib.mdDoc ''
+ description = ''
Path to mercurial repositories on disk.
If changing the default, you must ensure that
the hgsrht's user as read and write access to it.
@@ -425,18 +425,18 @@ in
(defaults to where the hgsrht code is)
'';
clone_bundle_threshold = mkOption {
- description = lib.mdDoc ".hg/store size (in MB) past which the nightly job generates clone bundles.";
+ description = ".hg/store size (in MB) past which the nightly job generates clone bundles.";
type = types.ints.unsigned;
default = 50;
};
hg_ssh = mkOption {
- description = lib.mdDoc "Path to hg-ssh (if not in $PATH).";
+ description = "Path to hg-ssh (if not in $PATH).";
type = types.str;
default = "${pkgs.mercurial}/bin/hg-ssh";
defaultText = "\${pkgs.mercurial}/bin/hg-ssh";
};
webhooks = mkOption {
- description = lib.mdDoc "The Redis connection used for the webhooks worker.";
+ description = "The Redis connection used for the webhooks worker.";
type = types.str;
default = "redis+socket:///run/redis-sourcehut-hgsrht/redis.sock?virtual_host=1";
};
@@ -446,31 +446,31 @@ in
};
options."lists.sr.ht" = commonServiceSettings "lists" // {
- allow-new-lists = mkEnableOption (lib.mdDoc "creation of new lists");
+ allow-new-lists = mkEnableOption "creation of new lists";
notify-from = mkOption {
- description = lib.mdDoc "Outgoing email for notifications generated by users.";
+ description = "Outgoing email for notifications generated by users.";
type = types.str;
default = "lists-notify@localhost.localdomain";
};
posting-domain = mkOption {
- description = lib.mdDoc "Posting domain.";
+ description = "Posting domain.";
type = types.str;
default = "lists.localhost.localdomain";
};
redis = mkOption {
- description = lib.mdDoc "The Redis connection used for the Celery worker.";
+ description = "The Redis connection used for the Celery worker.";
type = types.str;
default = "redis+socket:///run/redis-sourcehut-listssrht/redis.sock?virtual_host=2";
};
webhooks = mkOption {
- description = lib.mdDoc "The Redis connection used for the webhooks worker.";
+ description = "The Redis connection used for the webhooks worker.";
type = types.str;
default = "redis+socket:///run/redis-sourcehut-listssrht/redis.sock?virtual_host=1";
};
};
options."lists.sr.ht::worker" = {
reject-mimetypes = mkOption {
- description = lib.mdDoc ''
+ description = ''
Comma-delimited list of Content-Types to reject. Messages with Content-Types
included in this list are rejected. Multipart messages are always supported,
and each part is checked against this list.
@@ -481,12 +481,12 @@ in
default = ["text/html"];
};
reject-url = mkOption {
- description = lib.mdDoc "Reject URL.";
+ description = "Reject URL.";
type = types.str;
default = "https://man.sr.ht/lists.sr.ht/etiquette.md";
};
sock = mkOption {
- description = lib.mdDoc ''
+ description = ''
Path for the lmtp daemon's unix socket. Direct incoming mail to this socket.
Alternatively, specify IP:PORT and an SMTP server will be run instead.
'';
@@ -494,7 +494,7 @@ in
default = "/tmp/lists.sr.ht-lmtp.sock";
};
sock-group = mkOption {
- description = lib.mdDoc ''
+ description = ''
The lmtp daemon will make the unix socket group-read/write
for users in this group.
'';
@@ -510,15 +510,15 @@ in
removeAttrs (commonServiceSettings "meta")
["oauth-client-id" "oauth-client-secret"] // {
webhooks = mkOption {
- description = lib.mdDoc "The Redis connection used for the webhooks worker.";
+ description = "The Redis connection used for the webhooks worker.";
type = types.str;
default = "redis+socket:///run/redis-sourcehut-metasrht/redis.sock?virtual_host=1";
};
- welcome-emails = mkEnableOption (lib.mdDoc "sending stock sourcehut welcome emails after signup");
+ welcome-emails = mkEnableOption "sending stock sourcehut welcome emails after signup";
};
options."meta.sr.ht::api" = {
internal-ipnet = mkOption {
- description = lib.mdDoc ''
+ description = ''
Set of IP subnets which are permitted to utilize internal API
authentication. This should be limited to the subnets
from which your *.sr.ht services are running.
@@ -529,13 +529,13 @@ in
};
};
options."meta.sr.ht::aliases" = mkOption {
- description = lib.mdDoc "Aliases for the client IDs of commonly used OAuth clients.";
+ description = "Aliases for the client IDs of commonly used OAuth clients.";
type = with types; attrsOf int;
default = {};
example = { "git.sr.ht" = 12345; };
};
options."meta.sr.ht::billing" = {
- enabled = mkEnableOption (lib.mdDoc "the billing system");
+ enabled = mkEnableOption "the billing system";
stripe-public-key = mkOptionNullOrStr "Public key for Stripe. Get your keys at https://dashboard.stripe.com/account/apikeys";
stripe-secret-key = mkOptionNullOrStr ''
An absolute file path (which should be outside the Nix-store)
@@ -545,14 +545,14 @@ in
};
};
options."meta.sr.ht::settings" = {
- registration = mkEnableOption (lib.mdDoc "public registration");
+ registration = mkEnableOption "public registration";
onboarding-redirect = mkOption {
- description = lib.mdDoc "Where to redirect new users upon registration.";
+ description = "Where to redirect new users upon registration.";
type = types.str;
default = "https://meta.localhost.localdomain";
};
user-invites = mkOption {
- description = lib.mdDoc ''
+ description = ''
How many invites each user is issued upon registration
(only applicable if open registration is disabled).
'';
@@ -563,7 +563,7 @@ in
options."pages.sr.ht" = commonServiceSettings "pages" // {
gemini-certs = mkOption {
- description = lib.mdDoc ''
+ description = ''
An absolute file path (which should be outside the Nix-store)
to Gemini certificates.
'';
@@ -571,12 +571,12 @@ in
default = null;
};
max-site-size = mkOption {
- description = lib.mdDoc "Maximum size of any given site (post-gunzip), in MiB.";
+ description = "Maximum size of any given site (post-gunzip), in MiB.";
type = types.int;
default = 1024;
};
user-domain = mkOption {
- description = lib.mdDoc ''
+ description = ''
Configures the user domain, if enabled.
All users are given \.this.domain.
'';
@@ -586,7 +586,7 @@ in
};
options."pages.sr.ht::api" = {
internal-ipnet = mkOption {
- description = lib.mdDoc ''
+ description = ''
Set of IP subnets which are permitted to utilize internal API
authentication. This should be limited to the subnets
from which your *.sr.ht services are running.
@@ -602,24 +602,24 @@ in
options."todo.sr.ht" = commonServiceSettings "todo" // {
notify-from = mkOption {
- description = lib.mdDoc "Outgoing email for notifications generated by users.";
+ description = "Outgoing email for notifications generated by users.";
type = types.str;
default = "todo-notify@localhost.localdomain";
};
webhooks = mkOption {
- description = lib.mdDoc "The Redis connection used for the webhooks worker.";
+ description = "The Redis connection used for the webhooks worker.";
type = types.str;
default = "redis+socket:///run/redis-sourcehut-todosrht/redis.sock?virtual_host=1";
};
};
options."todo.sr.ht::mail" = {
posting-domain = mkOption {
- description = lib.mdDoc "Posting domain.";
+ description = "Posting domain.";
type = types.str;
default = "todo.localhost.localdomain";
};
sock = mkOption {
- description = lib.mdDoc ''
+ description = ''
Path for the lmtp daemon's unix socket. Direct incoming mail to this socket.
Alternatively, specify IP:PORT and an SMTP server will be run instead.
'';
@@ -627,7 +627,7 @@ in
default = "/tmp/todo.sr.ht-lmtp.sock";
};
sock-group = mkOption {
- description = lib.mdDoc ''
+ description = ''
The lmtp daemon will make the unix socket group-read/write
for users in this group.
'';
@@ -637,13 +637,13 @@ in
};
};
default = { };
- description = lib.mdDoc ''
+ description = ''
The configuration for the sourcehut network.
'';
};
builds = {
- enableWorker = mkEnableOption (lib.mdDoc ''
+ enableWorker = mkEnableOption ''
worker for builds.sr.ht
::: {.warning}
@@ -653,7 +653,7 @@ in
(e.g. automatic testing of patches via listssrht).
See .
:::
- '');
+ '';
images = mkOption {
type = with types; attrsOf (attrsOf (attrsOf package));
@@ -673,7 +673,7 @@ in
nixos.unstable.x86_64 = image_from_nixpkgs;
}
)'';
- description = lib.mdDoc ''
+ description = ''
Images for builds.sr.ht. Each package should be distro.release.arch and point to a /nix/store/package/root.img.qcow2.
'';
};
@@ -684,7 +684,7 @@ in
example = "gitFull";
};
fcgiwrap.preforkProcess = mkOption {
- description = lib.mdDoc "Number of fcgiwrap processes to prefork.";
+ description = "Number of fcgiwrap processes to prefork.";
type = types.int;
default = 4;
};
@@ -695,7 +695,7 @@ in
cloneBundles = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Generate clonebundles (which require more disk space but dramatically speed up cloning large repositories).
'';
};
@@ -706,12 +706,12 @@ in
extraArgs = mkOption {
type = with types; listOf str;
default = [ "--loglevel DEBUG" "--pool eventlet" "--without-heartbeat" ];
- description = lib.mdDoc "Extra arguments passed to the Celery responsible for processing mails.";
+ description = "Extra arguments passed to the Celery responsible for processing mails.";
};
celeryConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Content of the `celeryconfig.py` used by the Celery of `listssrht-process`.";
+ description = "Content of the `celeryconfig.py` used by the Celery of `listssrht-process`.";
};
};
};
diff --git a/nixos/modules/services/misc/sourcehut/service.nix b/nixos/modules/services/misc/sourcehut/service.nix
index 4a8289b4d403..ce5a0e78627c 100644
--- a/nixos/modules/services/misc/sourcehut/service.nix
+++ b/nixos/modules/services/misc/sourcehut/service.nix
@@ -133,12 +133,12 @@ let
in
{
options.services.sourcehut.${srv} = {
- enable = mkEnableOption (lib.mdDoc "${srv} service");
+ enable = mkEnableOption "${srv} service";
user = mkOption {
type = types.str;
default = srvsrht;
- description = lib.mdDoc ''
+ description = ''
User for ${srv}.sr.ht.
'';
};
@@ -146,7 +146,7 @@ in
group = mkOption {
type = types.str;
default = srvsrht;
- description = lib.mdDoc ''
+ description = ''
Group for ${srv}.sr.ht.
Membership grants access to the Git/Mercurial repositories by default,
but not to the config.ini file (where secrets are).
@@ -156,7 +156,7 @@ in
port = mkOption {
type = types.port;
default = port;
- description = lib.mdDoc ''
+ description = ''
Port on which the "${srv}" backend should listen.
'';
};
@@ -166,7 +166,7 @@ in
type = types.str;
default = "unix:///run/redis-sourcehut-${srvsrht}/redis.sock?db=0";
example = "redis://shared.wireguard:6379/0";
- description = lib.mdDoc ''
+ description = ''
The redis host URL. This is used for caching and temporary storage, and must
be shared between nodes (e.g. git1.sr.ht and git2.sr.ht), but need not be
shared between services. It may be shared between services, however, with no
@@ -179,7 +179,7 @@ in
database = mkOption {
type = types.str;
default = "${srv}.sr.ht";
- description = lib.mdDoc ''
+ description = ''
PostgreSQL database name for the ${srv}.sr.ht service,
used if [](#opt-services.sourcehut.postgresql.enable) is `true`.
'';
@@ -190,7 +190,7 @@ in
extraArgs = mkOption {
type = with types; listOf str;
default = [ "--timeout 120" "--workers 1" "--log-level=info" ];
- description = lib.mdDoc "Extra arguments passed to Gunicorn.";
+ description = "Extra arguments passed to Gunicorn.";
};
};
} // optionalAttrs webhooks {
@@ -198,12 +198,12 @@ in
extraArgs = mkOption {
type = with types; listOf str;
default = [ "--loglevel DEBUG" "--pool eventlet" "--without-heartbeat" ];
- description = lib.mdDoc "Extra arguments passed to the Celery responsible for webhooks.";
+ description = "Extra arguments passed to the Celery responsible for webhooks.";
};
celeryConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc "Content of the `celeryconfig.py` used by the Celery responsible for webhooks.";
+ description = "Content of the `celeryconfig.py` used by the Celery responsible for webhooks.";
};
};
};
diff --git a/nixos/modules/services/misc/spice-autorandr.nix b/nixos/modules/services/misc/spice-autorandr.nix
index 0d8830dbd5be..0d58d2865717 100644
--- a/nixos/modules/services/misc/spice-autorandr.nix
+++ b/nixos/modules/services/misc/spice-autorandr.nix
@@ -6,7 +6,7 @@ in
{
options = {
services.spice-autorandr = {
- enable = lib.mkEnableOption (lib.mdDoc "spice-autorandr service that will automatically resize display to match SPICE client window size.");
+ enable = lib.mkEnableOption "spice-autorandr service that will automatically resize display to match SPICE client window size.";
package = lib.mkPackageOption pkgs "spice-autorandr" { };
};
};
diff --git a/nixos/modules/services/misc/spice-vdagentd.nix b/nixos/modules/services/misc/spice-vdagentd.nix
index bde64847d89e..2dd9fcf68ab0 100644
--- a/nixos/modules/services/misc/spice-vdagentd.nix
+++ b/nixos/modules/services/misc/spice-vdagentd.nix
@@ -7,7 +7,7 @@ in
{
options = {
services.spice-vdagentd = {
- enable = mkEnableOption (lib.mdDoc "Spice guest vdagent daemon");
+ enable = mkEnableOption "Spice guest vdagent daemon";
};
};
diff --git a/nixos/modules/services/misc/spice-webdavd.nix b/nixos/modules/services/misc/spice-webdavd.nix
index 2b4304365618..9df0f7a420e7 100644
--- a/nixos/modules/services/misc/spice-webdavd.nix
+++ b/nixos/modules/services/misc/spice-webdavd.nix
@@ -7,7 +7,7 @@ in
{
options = {
services.spice-webdavd = {
- enable = mkEnableOption (lib.mdDoc "the spice guest webdav proxy daemon");
+ enable = mkEnableOption "the spice guest webdav proxy daemon";
package = mkPackageOption pkgs "phodav" { };
};
diff --git a/nixos/modules/services/misc/sssd.nix b/nixos/modules/services/misc/sssd.nix
index f83c82bbb7d7..4429b20174d9 100644
--- a/nixos/modules/services/misc/sssd.nix
+++ b/nixos/modules/services/misc/sssd.nix
@@ -10,11 +10,11 @@ let
in {
options = {
services.sssd = {
- enable = mkEnableOption (lib.mdDoc "the System Security Services Daemon");
+ enable = mkEnableOption "the System Security Services Daemon";
config = mkOption {
type = types.lines;
- description = lib.mdDoc "Contents of {file}`sssd.conf`.";
+ description = "Contents of {file}`sssd.conf`.";
default = ''
[sssd]
config_file_version = 2
@@ -37,7 +37,7 @@ in {
sshAuthorizedKeysIntegration = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to make sshd look up authorized keys from SSS.
For this to work, the `ssh` SSS service must be enabled in the sssd configuration.
'';
@@ -46,7 +46,7 @@ in {
kcm = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to use SSS as a Kerberos Cache Manager (KCM).
Kerberos will be configured to cache credentials in SSS.
'';
@@ -54,7 +54,7 @@ in {
environmentFile = mkOption {
type = types.nullOr types.path;
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
diff --git a/nixos/modules/services/misc/subsonic.nix b/nixos/modules/services/misc/subsonic.nix
index 0862d5782595..2dda8970dd30 100644
--- a/nixos/modules/services/misc/subsonic.nix
+++ b/nixos/modules/services/misc/subsonic.nix
@@ -8,12 +8,12 @@ let
in {
options = {
services.subsonic = {
- enable = mkEnableOption (lib.mdDoc "Subsonic daemon");
+ enable = mkEnableOption "Subsonic daemon";
home = mkOption {
type = types.path;
default = "/var/lib/subsonic";
- description = lib.mdDoc ''
+ description = ''
The directory where Subsonic will create files.
Make sure it is writable.
'';
@@ -22,7 +22,7 @@ in {
listenAddress = mkOption {
type = types.str;
default = "0.0.0.0";
- description = lib.mdDoc ''
+ description = ''
The host name or IP address on which to bind Subsonic.
Only relevant if you have multiple network interfaces and want
to make Subsonic available on only one of them. The default value
@@ -33,7 +33,7 @@ in {
port = mkOption {
type = types.port;
default = 4040;
- description = lib.mdDoc ''
+ description = ''
The port on which Subsonic will listen for
incoming HTTP traffic. Set to 0 to disable.
'';
@@ -42,7 +42,7 @@ in {
httpsPort = mkOption {
type = types.port;
default = 0;
- description = lib.mdDoc ''
+ description = ''
The port on which Subsonic will listen for
incoming HTTPS traffic. Set to 0 to disable.
'';
@@ -51,7 +51,7 @@ in {
contextPath = mkOption {
type = types.path;
default = "/";
- description = lib.mdDoc ''
+ description = ''
The context path, i.e., the last part of the Subsonic
URL. Typically '/' or '/subsonic'. Default '/'
'';
@@ -60,7 +60,7 @@ in {
maxMemory = mkOption {
type = types.int;
default = 100;
- description = lib.mdDoc ''
+ description = ''
The memory limit (max Java heap size) in megabytes.
Default: 100
'';
@@ -69,7 +69,7 @@ in {
defaultMusicFolder = mkOption {
type = types.path;
default = "/var/music";
- description = lib.mdDoc ''
+ description = ''
Configure Subsonic to use this folder for music. This option
only has effect the first time Subsonic is started.
'';
@@ -78,7 +78,7 @@ in {
defaultPodcastFolder = mkOption {
type = types.path;
default = "/var/music/Podcast";
- description = lib.mdDoc ''
+ description = ''
Configure Subsonic to use this folder for Podcasts. This option
only has effect the first time Subsonic is started.
'';
@@ -87,7 +87,7 @@ in {
defaultPlaylistFolder = mkOption {
type = types.path;
default = "/var/playlists";
- description = lib.mdDoc ''
+ description = ''
Configure Subsonic to use this folder for playlists. This option
only has effect the first time Subsonic is started.
'';
@@ -97,7 +97,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 Subsonic. Symlinks will be created to each executable inside
''${config.${opt.home}}/transcoders.
diff --git a/nixos/modules/services/misc/sundtek.nix b/nixos/modules/services/misc/sundtek.nix
index e85d7c5b92b9..e3234518c940 100644
--- a/nixos/modules/services/misc/sundtek.nix
+++ b/nixos/modules/services/misc/sundtek.nix
@@ -8,7 +8,7 @@ let
in
{
options.services.sundtek = {
- enable = mkEnableOption (lib.mdDoc "Sundtek driver");
+ enable = mkEnableOption "Sundtek driver";
};
config = mkIf cfg.enable {
diff --git a/nixos/modules/services/misc/svnserve.nix b/nixos/modules/services/misc/svnserve.nix
index a0103641c650..5fa262ca3b94 100644
--- a/nixos/modules/services/misc/svnserve.nix
+++ b/nixos/modules/services/misc/svnserve.nix
@@ -20,13 +20,13 @@ in
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable svnserve to serve Subversion repositories through the SVN protocol.";
+ description = "Whether to enable svnserve to serve Subversion repositories through the SVN protocol.";
};
svnBaseDir = mkOption {
type = types.str;
default = "/repos";
- description = lib.mdDoc "Base directory from which Subversion repositories are accessed.";
+ description = "Base directory from which Subversion repositories are accessed.";
};
};
diff --git a/nixos/modules/services/misc/synergy.nix b/nixos/modules/services/misc/synergy.nix
index 0cbdc7599c0f..fb664fc071d1 100644
--- a/nixos/modules/services/misc/synergy.nix
+++ b/nixos/modules/services/misc/synergy.nix
@@ -19,19 +19,19 @@ in
# !!! All these option descriptions needs to be cleaned up.
client = {
- enable = mkEnableOption (lib.mdDoc "the Synergy client (receive keyboard and mouse events from a Synergy server)");
+ enable = mkEnableOption "the Synergy client (receive keyboard and mouse events from a Synergy server)";
screenName = mkOption {
default = "";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Use the given name instead of the hostname to identify
ourselves to the server.
'';
};
serverAddress = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
The server address is of the form: [hostname][:port]. The
hostname must be the address or hostname of the server. The
port overrides the default port, 24800.
@@ -40,22 +40,22 @@ in
autoStart = mkOption {
default = true;
type = types.bool;
- description = lib.mdDoc "Whether the Synergy client should be started automatically.";
+ description = "Whether the Synergy client should be started automatically.";
};
};
server = {
- enable = mkEnableOption (lib.mdDoc "the Synergy server (send keyboard and mouse events)");
+ enable = mkEnableOption "the Synergy server (send keyboard and mouse events)";
configFile = mkOption {
type = types.path;
default = "/etc/synergy-server.conf";
- description = lib.mdDoc "The Synergy server configuration file.";
+ description = "The Synergy server configuration file.";
};
screenName = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc ''
+ description = ''
Use the given name instead of the hostname to identify
this screen in the configuration.
'';
@@ -63,18 +63,18 @@ in
address = mkOption {
type = types.str;
default = "";
- description = lib.mdDoc "Address on which to listen for clients.";
+ description = "Address on which to listen for clients.";
};
autoStart = mkOption {
default = true;
type = types.bool;
- description = lib.mdDoc "Whether the Synergy server should be started automatically.";
+ description = "Whether the Synergy server should be started automatically.";
};
tls = {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether TLS encryption should be used.
Using this requires a TLS certificate that can be
@@ -87,7 +87,7 @@ in
type = types.nullOr types.str;
default = null;
example = "~/.synergy/SSL/Synergy.pem";
- description = lib.mdDoc "The TLS certificate to use for encryption.";
+ description = "The TLS certificate to use for encryption.";
};
};
};
diff --git a/nixos/modules/services/misc/sysprof.nix b/nixos/modules/services/misc/sysprof.nix
index 25c5b0fabf61..ab91a8b586a2 100644
--- a/nixos/modules/services/misc/sysprof.nix
+++ b/nixos/modules/services/misc/sysprof.nix
@@ -3,7 +3,7 @@
{
options = {
services.sysprof = {
- enable = lib.mkEnableOption (lib.mdDoc "sysprof profiling daemon");
+ enable = lib.mkEnableOption "sysprof profiling daemon";
};
};
diff --git a/nixos/modules/services/misc/tabby.nix b/nixos/modules/services/misc/tabby.nix
index a3072e5df75e..d63a6b24ae3d 100644
--- a/nixos/modules/services/misc/tabby.nix
+++ b/nixos/modules/services/misc/tabby.nix
@@ -11,16 +11,14 @@ in
{
options = {
services.tabby = {
- enable = lib.mkEnableOption (
- lib.mdDoc "Self-hosted AI coding assistant using large language models"
- );
+ enable = lib.mkEnableOption "Self-hosted AI coding assistant using large language models";
package = lib.mkPackageOption pkgs "tabby" { };
port = lib.mkOption {
type = types.port;
default = 11029;
- description = lib.mdDoc ''
+ description = ''
Specifies the bind port on which the tabby server HTTP interface listens.
'';
};
@@ -28,7 +26,7 @@ in
model = lib.mkOption {
type = types.str;
default = "TabbyML/StarCoder-1B";
- description = lib.mdDoc ''
+ description = ''
Specify the model that tabby will use to generate completions.
This model will be downloaded automatically if it is not already present.
@@ -60,7 +58,7 @@ in
type = types.nullOr (types.enum [ "cpu" "rocm" "cuda" "metal" ]);
default = null;
example = "rocm";
- description = lib.mdDoc ''
+ description = ''
Specifies the device to use for hardware acceleration.
- `cpu`: no acceleration just use the CPU
@@ -85,7 +83,7 @@ in
settings = lib.mkOption {
inherit (format) type;
default = { };
- description = lib.mdDoc ''
+ description = ''
Tabby scheduler configuration
See for more details:
@@ -108,7 +106,7 @@ in
usageCollection = lib.mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable sending anonymous usage data.
See for more details:
@@ -120,7 +118,7 @@ in
type = types.str;
default = "5hours";
example = "5hours";
- description = lib.mdDoc ''
+ description = ''
Run tabby scheduler to generate the index database at this interval.
Updates by default every 5 hours. This value applies to
`OnUnitInactiveSec`
diff --git a/nixos/modules/services/misc/tandoor-recipes.nix b/nixos/modules/services/misc/tandoor-recipes.nix
index a8300ecd5233..a2210f3d7db5 100644
--- a/nixos/modules/services/misc/tandoor-recipes.nix
+++ b/nixos/modules/services/misc/tandoor-recipes.nix
@@ -20,7 +20,10 @@ let
manage = pkgs.writeShellScript "manage" ''
set -o allexport # Export the following env vars
${lib.toShellVars env}
- exec ${pkg}/bin/tandoor-recipes "$@"
+ eval "$(${config.systemd.package}/bin/systemctl show -pUID,GID,MainPID tandoor-recipes.service)"
+ exec ${pkgs.util-linux}/bin/nsenter \
+ -t $MainPID -m -S $UID -G $GID \
+ ${pkg}/bin/tandoor-recipes "$@"
'';
in
{
@@ -30,7 +33,7 @@ in
enable = mkOption {
type = lib.types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable Tandoor Recipes.
When started, the Tandoor Recipes database is automatically created if
@@ -45,19 +48,19 @@ in
address = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "Web interface address.";
+ description = "Web interface address.";
};
port = mkOption {
type = types.port;
default = 8080;
- description = lib.mdDoc "Web interface port.";
+ description = "Web interface port.";
};
extraConfig = mkOption {
type = types.attrs;
default = { };
- description = lib.mdDoc ''
+ description = ''
Extra tandoor recipes config options.
See [the example dot-env file](https://raw.githubusercontent.com/vabene1111/recipes/master/.env.template)
@@ -82,6 +85,7 @@ in
Restart = "on-failure";
User = "tandoor_recipes";
+ Group = "tandoor_recipes";
DynamicUser = true;
StateDirectory = "tandoor-recipes";
WorkingDirectory = "/var/lib/tandoor-recipes";
diff --git a/nixos/modules/services/misc/taskserver/default.nix b/nixos/modules/services/misc/taskserver/default.nix
index 775b3b6d2eae..d359bf899768 100644
--- a/nixos/modules/services/misc/taskserver/default.nix
+++ b/nixos/modules/services/misc/taskserver/default.nix
@@ -10,7 +10,7 @@ let
mkManualPkiOption = desc: mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
${desc}
::: {.note}
@@ -37,7 +37,7 @@ let
'';
};
- mkAutoDesc = preamble: lib.mdDoc ''
+ mkAutoDesc = preamble: ''
${preamble}
::: {.note}
@@ -91,7 +91,7 @@ let
type = types.uniq (types.listOf types.str);
default = [];
example = [ "alice" "bob" ];
- description = lib.mdDoc ''
+ description = ''
A list of user names that belong to the organization.
'';
};
@@ -100,7 +100,7 @@ let
type = types.listOf types.str;
default = [];
example = [ "workers" "slackers" ];
- description = lib.mdDoc ''
+ description = ''
A list of group names that belong to the organization.
'';
};
@@ -142,7 +142,7 @@ in {
default = false;
description = let
url = "https://nixos.org/manual/nixos/stable/index.html#module-services-taskserver";
- in lib.mdDoc ''
+ in ''
Whether to enable the Taskwarrior server.
More instructions about NixOS in conjunction with Taskserver can be
@@ -153,19 +153,19 @@ in {
user = mkOption {
type = types.str;
default = "taskd";
- description = lib.mdDoc "User for Taskserver.";
+ description = "User for Taskserver.";
};
group = mkOption {
type = types.str;
default = "taskd";
- description = lib.mdDoc "Group for Taskserver.";
+ description = "Group for Taskserver.";
};
dataDir = mkOption {
type = types.path;
default = "/var/lib/taskserver";
- description = lib.mdDoc "Data directory for Taskserver.";
+ description = "Data directory for Taskserver.";
};
ciphers = mkOption {
@@ -174,7 +174,7 @@ in {
example = "NORMAL:-VERS-SSL3.0";
description = let
url = "https://gnutls.org/manual/html_node/Priority-Strings.html";
- in lib.mdDoc ''
+ in ''
List of GnuTLS ciphers to use. See the GnuTLS documentation about
priority strings at <${url}> for full details.
'';
@@ -186,7 +186,7 @@ in {
example.myShinyOrganisation.users = [ "alice" "bob" ];
example.myShinyOrganisation.groups = [ "staff" "outsiders" ];
example.yetAnotherOrganisation.users = [ "foo" "bar" ];
- description = lib.mdDoc ''
+ description = ''
An attribute set where the keys name the organisation and the values
are a set of lists of {option}`users` and
{option}`groups`.
@@ -196,7 +196,7 @@ in {
confirmation = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Determines whether certain commands are confirmed.
'';
};
@@ -204,7 +204,7 @@ in {
debug = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Logs debugging information.
'';
};
@@ -212,7 +212,7 @@ in {
extensions = mkOption {
type = types.nullOr types.path;
default = null;
- description = lib.mdDoc ''
+ description = ''
Fully qualified path of the Taskserver extension scripts.
Currently there are none.
'';
@@ -221,7 +221,7 @@ in {
ipLog = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Logs the IP addresses of incoming requests.
'';
};
@@ -229,7 +229,7 @@ in {
queueSize = mkOption {
type = types.int;
default = 10;
- description = lib.mdDoc ''
+ description = ''
Size of the connection backlog, see {manpage}`listen(2)`.
'';
};
@@ -237,7 +237,7 @@ in {
requestLimit = mkOption {
type = types.int;
default = 1048576;
- description = lib.mdDoc ''
+ description = ''
Size limit of incoming requests, in bytes.
'';
};
@@ -246,7 +246,7 @@ in {
type = with types; either str (listOf str);
default = [];
example = [ "[Tt]ask [2-9]+" ];
- description = lib.mdDoc ''
+ description = ''
A list of regular expressions that are matched against the reported
client id (such as `task 2.3.0`).
@@ -260,7 +260,7 @@ in {
type = with types; either str (listOf str);
default = [];
example = [ "[Tt]ask [2-9]+" ];
- description = lib.mdDoc ''
+ description = ''
A list of regular expressions that are matched against the reported
client id (such as `task 2.3.0`).
@@ -274,7 +274,7 @@ in {
type = types.str;
default = "localhost";
example = "::";
- description = lib.mdDoc ''
+ description = ''
The address (IPv4, IPv6 or DNS) to listen on.
'';
};
@@ -282,7 +282,7 @@ in {
listenPort = mkOption {
type = types.int;
default = 53589;
- description = lib.mdDoc ''
+ description = ''
Port number of the Taskserver.
'';
};
@@ -290,7 +290,7 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Whether to open the firewall for the specified Taskserver port.
'';
};
@@ -298,7 +298,7 @@ in {
fqdn = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc ''
+ description = ''
The fully qualified domain name of this server, which is also used
as the common name in the certificates.
'';
@@ -307,7 +307,7 @@ in {
trust = mkOption {
type = types.enum [ "allow all" "strict" ];
default = "strict";
- description = lib.mdDoc ''
+ description = ''
Determines how client certificates are validated.
The value `allow all` performs no client
@@ -323,7 +323,7 @@ in {
config = mkOption {
type = types.attrs;
example.client.cert = "/tmp/debugging.cert";
- description = lib.mdDoc ''
+ description = ''
Configuration options to pass to Taskserver.
The options here are the same as described in
diff --git a/nixos/modules/services/misc/tautulli.nix b/nixos/modules/services/misc/tautulli.nix
index e379628c8ce6..6afdbd212aa8 100644
--- a/nixos/modules/services/misc/tautulli.nix
+++ b/nixos/modules/services/misc/tautulli.nix
@@ -12,42 +12,42 @@ in
options = {
services.tautulli = {
- enable = mkEnableOption (lib.mdDoc "Tautulli Plex Monitor");
+ enable = mkEnableOption "Tautulli Plex Monitor";
dataDir = mkOption {
type = types.str;
default = "/var/lib/plexpy";
- description = lib.mdDoc "The directory where Tautulli stores its data files.";
+ description = "The directory where Tautulli stores its data files.";
};
configFile = mkOption {
type = types.str;
default = "/var/lib/plexpy/config.ini";
- description = lib.mdDoc "The location of Tautulli's config file.";
+ description = "The location of Tautulli's config file.";
};
port = mkOption {
type = types.port;
default = 8181;
- description = lib.mdDoc "TCP port where Tautulli listens.";
+ description = "TCP port where Tautulli listens.";
};
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Open ports in the firewall for Tautulli.";
+ description = "Open ports in the firewall for Tautulli.";
};
user = mkOption {
type = types.str;
default = "plexpy";
- description = lib.mdDoc "User account under which Tautulli runs.";
+ description = "User account under which Tautulli runs.";
};
group = mkOption {
type = types.str;
default = "nogroup";
- description = lib.mdDoc "Group under which Tautulli runs.";
+ description = "Group under which Tautulli runs.";
};
package = mkPackageOption pkgs "tautulli" { };
diff --git a/nixos/modules/services/misc/tiddlywiki.nix b/nixos/modules/services/misc/tiddlywiki.nix
index 849f53ca2d48..7ae657dd862d 100644
--- a/nixos/modules/services/misc/tiddlywiki.nix
+++ b/nixos/modules/services/misc/tiddlywiki.nix
@@ -14,7 +14,7 @@ in {
options.services.tiddlywiki = {
- enable = mkEnableOption (lib.mdDoc "TiddlyWiki nodejs server");
+ enable = mkEnableOption "TiddlyWiki nodejs server";
listenOptions = mkOption {
type = types.attrs;
@@ -24,7 +24,7 @@ in {
readers="(authenticated)";
port = 3456;
};
- description = lib.mdDoc ''
+ description = ''
Parameters passed to `--listen` command.
Refer to
for details on supported values.
diff --git a/nixos/modules/services/misc/tp-auto-kbbl.nix b/nixos/modules/services/misc/tp-auto-kbbl.nix
index f6f2d49733e6..4ea356a133d8 100644
--- a/nixos/modules/services/misc/tp-auto-kbbl.nix
+++ b/nixos/modules/services/misc/tp-auto-kbbl.nix
@@ -9,14 +9,14 @@ in {
options = {
services.tp-auto-kbbl = {
- enable = mkEnableOption (lib.mdDoc "auto toggle keyboard back-lighting on Thinkpads (and maybe other laptops) for Linux");
+ enable = mkEnableOption "auto toggle keyboard back-lighting on Thinkpads (and maybe other laptops) for Linux";
package = mkPackageOption pkgs "tp-auto-kbbl" { };
arguments = mkOption {
type = types.listOf types.str;
default = [ ];
- description = lib.mdDoc ''
+ description = ''
List of arguments appended to `./tp-auto-kbbl --device [device] [arguments]`
'';
};
@@ -24,7 +24,7 @@ in {
device = mkOption {
type = types.str;
default = "/dev/input/event0";
- description = lib.mdDoc "Device watched for activities.";
+ description = "Device watched for activities.";
};
};
diff --git a/nixos/modules/services/misc/transfer-sh.nix b/nixos/modules/services/misc/transfer-sh.nix
index 899d9dfc3c10..150af2337e14 100644
--- a/nixos/modules/services/misc/transfer-sh.nix
+++ b/nixos/modules/services/misc/transfer-sh.nix
@@ -4,11 +4,11 @@ let
cfg = config.services.transfer-sh;
inherit (lib)
mkDefault mkEnableOption mkPackageOption mkIf mkOption
- types mapAttrs isBool getExe boolToString mdDoc optionalAttrs;
+ types mapAttrs isBool getExe boolToString optionalAttrs;
in
{
options.services.transfer-sh = {
- enable = mkEnableOption (mdDoc "Easy and fast file sharing from the command-line");
+ enable = mkEnableOption "Easy and fast file sharing from the command-line";
package = mkPackageOption pkgs "transfer-sh" { };
@@ -20,7 +20,7 @@ in
BASEDIR = "/var/lib/transfer.sh";
TLS_LISTENER_ONLY = false;
};
- description = mdDoc ''
+ description = ''
Additional configuration for transfer-sh, see
for supported values.
@@ -32,14 +32,14 @@ in
provider = mkOption {
type = types.enum [ "local" "s3" "storj" "gdrive" ];
default = "local";
- description = mdDoc "Storage providers to use";
+ description = "Storage providers to use";
};
secretFile = mkOption {
type = types.nullOr types.path;
default = null;
example = "/run/secrets/transfer-sh.env";
- description = mdDoc ''
+ description = ''
Path to file containing environment variables.
Useful for passing down secrets.
Some variables that can be considered secrets are:
diff --git a/nixos/modules/services/misc/tuxclocker.nix b/nixos/modules/services/misc/tuxclocker.nix
index 5969f75b8e30..4c2f9e39bcfc 100644
--- a/nixos/modules/services/misc/tuxclocker.nix
+++ b/nixos/modules/services/misc/tuxclocker.nix
@@ -7,20 +7,20 @@ let
in
{
options.programs.tuxclocker = {
- enable = mkEnableOption (lib.mdDoc ''
+ enable = mkEnableOption ''
TuxClocker, a hardware control and monitoring program
- '');
+ '';
- enableAMD = mkEnableOption (lib.mdDoc ''
+ enableAMD = mkEnableOption ''
AMD GPU controls.
Sets the `amdgpu.ppfeaturemask` kernel parameter to 0xfffd7fff to enable all TuxClocker controls
- '');
+ '';
enabledNVIDIADevices = mkOption {
type = types.listOf types.int;
default = [ ];
example = [ 0 1 ];
- description = lib.mdDoc ''
+ description = ''
Enable NVIDIA GPU controls for a device by index.
Sets the `Coolbits` Xorg option to enable all TuxClocker controls.
'';
@@ -30,7 +30,7 @@ in
type = types.bool;
default = false;
example = true;
- description = lib.mdDoc ''
+ description = ''
Whether to use components requiring unfree dependencies.
Disabling this allows you to get everything from the binary cache.
'';
diff --git a/nixos/modules/services/misc/tzupdate.nix b/nixos/modules/services/misc/tzupdate.nix
index 300a578f7c4a..eac1e1112a5a 100644
--- a/nixos/modules/services/misc/tzupdate.nix
+++ b/nixos/modules/services/misc/tzupdate.nix
@@ -9,7 +9,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable the tzupdate timezone updating service. This provides
a one-shot service which can be activated with systemctl to
update the timezone.
diff --git a/nixos/modules/services/misc/uhub.nix b/nixos/modules/services/misc/uhub.nix
index 80266b024e35..99774fbb920a 100644
--- a/nixos/modules/services/misc/uhub.nix
+++ b/nixos/modules/services/misc/uhub.nix
@@ -15,21 +15,21 @@ in {
services.uhub = mkOption {
default = { };
- description = lib.mdDoc "Uhub ADC hub instances";
+ description = "Uhub ADC hub instances";
type = types.attrsOf (types.submodule {
options = {
- enable = mkEnableOption (lib.mdDoc "hub instance") // { default = true; };
+ enable = mkEnableOption "hub instance" // { default = true; };
enableTLS = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable TLS support.";
+ description = "Whether to enable TLS support.";
};
settings = mkOption {
inherit (settingsFormat) type;
- description = lib.mdDoc ''
+ description = ''
Configuration of uhub.
See https://www.uhub.org/doc/config.php for a list of options.
'';
@@ -44,7 +44,7 @@ in {
};
plugins = mkOption {
- description = lib.mdDoc "Uhub plugin configuration.";
+ description = "Uhub plugin configuration.";
type = with types;
listOf (submodule {
options = {
@@ -52,10 +52,10 @@ in {
type = path;
example = literalExpression
"$${pkgs.uhub}/plugins/mod_auth_sqlite.so";
- description = lib.mdDoc "Path to plugin file.";
+ description = "Path to plugin file.";
};
settings = mkOption {
- description = lib.mdDoc "Settings specific to this plugin.";
+ description = "Settings specific to this plugin.";
type = with types; attrsOf str;
example = { file = "/etc/uhub/users.db"; };
};
diff --git a/nixos/modules/services/misc/wastebin.nix b/nixos/modules/services/misc/wastebin.nix
new file mode 100644
index 000000000000..3d0af2862683
--- /dev/null
+++ b/nixos/modules/services/misc/wastebin.nix
@@ -0,0 +1,158 @@
+{ config, lib, pkgs, ... }:
+
+let
+ cfg = config.services.wastebin;
+ inherit (lib)
+ mkEnableOption mkPackageOption mkIf mkOption
+ types mapAttrs isBool getExe boolToString optionalAttrs;
+in
+{
+
+ options.services.wastebin = {
+
+ enable = mkEnableOption "Wastenbin pastebin service";
+
+ package = mkPackageOption pkgs "wastebin" { };
+
+ stateDir = mkOption {
+ type = types.path;
+ default = "/var/lib/wastebin";
+ description = "State directory of the daemon.";
+ };
+
+ secretFile = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ example = "/run/secrets/wastebin.env";
+ description = ''
+ Path to file containing sensitive environment variables.
+ Some variables that can be considered secrets are:
+
+ - WASTEBIN_PASSWORD_SALT:
+ salt used to hash user passwords used for encrypting pastes.
+
+ - WASTEBIN_SIGNING_KEY:
+ sets the key to sign cookies. If not set, a random key will be
+ generated which means cookies will become invalid after restarts and
+ paste creators will not be able to delete their pastes anymore.
+ '';
+ };
+
+ settings = mkOption {
+
+ description = ''
+ Additional configuration for wastebin, see
+ for supported values.
+ For secrets use secretFile option instead.
+ '';
+
+ type = types.submodule {
+
+ freeformType = with types; attrsOf (oneOf [ bool int str ]);
+
+ options = {
+
+ WASTEBIN_ADDRESS_PORT = mkOption {
+ type = types.str;
+ default = "0.0.0.0:8088";
+ description = "Address and port to bind to";
+ };
+
+ WASTEBIN_BASE_URL = mkOption {
+ default = "http://localhost";
+ example = "https://myhost.tld";
+ type = types.str;
+ description = ''
+ Base URL for the QR code display. If not set, the user agent's Host
+ header field is used as an approximation.
+ '';
+ };
+
+ WASTEBIN_CACHE_SIZE = mkOption {
+ default = 128;
+ type = types.int;
+ description = "Number of rendered syntax highlight items to cache. Can be disabled by setting to 0.";
+ };
+
+ WASTEBIN_DATABASE_PATH = mkOption {
+ default = "/var/lib/wastebin/sqlite3.db"; # TODO make this default to stateDir/sqlite3.db
+ type = types.str;
+ description = "Path to the sqlite3 database file. If not set, an in-memory database is used.";
+ };
+
+ WASTEBIN_HTTP_TIMEOUT = mkOption {
+ default = 5;
+ type = types.int;
+ description = "Maximum number of seconds a request can be processed until wastebin responds with 408";
+ };
+
+ WASTEBIN_MAX_BODY_SIZE = mkOption {
+ default = 1024;
+ type = types.int;
+ description = "Number of bytes to accept for POST requests";
+ };
+
+ WASTEBIN_TITLE = mkOption {
+ default = "wastebin";
+ type = types.str;
+ description = "Overrides the HTML page title";
+ };
+
+ RUST_LOG = mkOption {
+ default = "info";
+ type = types.str;
+ description =
+ ''
+ Influences logging. Besides the typical trace, debug, info etc.
+ keys, you can also set the tower_http key to some log level to get
+ additional information request and response logs.
+ '';
+ };
+ };
+ };
+
+ default = { };
+
+ example = {
+ WASTEBIN_TITLE = "My awesome pastebin";
+ };
+ };
+ };
+
+ config = mkIf cfg.enable
+ {
+ systemd.services.wastebin = {
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+ environment = mapAttrs (_: v: if isBool v then boolToString v else toString v) cfg.settings;
+ serviceConfig = {
+ CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];
+ DevicePolicy = "closed";
+ DynamicUser = true;
+ ExecStart = "${getExe cfg.package}";
+ LockPersonality = true;
+ MemoryDenyWriteExecute = true;
+ PrivateDevices = true;
+ PrivateUsers = true;
+ ProtectClock = true;
+ ProtectControlGroups = true;
+ ProtectHostname = true;
+ ProtectKernelLogs = true;
+ ProtectKernelModules = true;
+ ProtectKernelTunables = true;
+ ProtectProc = "invisible";
+ RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ];
+ RestrictNamespaces = true;
+ RestrictRealtime = true;
+ SystemCallArchitectures = [ "native" ];
+ SystemCallFilter = [ "@system-service" ];
+ StateDirectory = baseNameOf cfg.stateDir;
+ ReadWritePaths = cfg.stateDir;
+ } // optionalAttrs (cfg.secretFile != null) {
+ EnvironmentFile = cfg.secretFile;
+ };
+ };
+ };
+
+ meta.maintainers = with lib.maintainers; [ pinpox ];
+}
diff --git a/nixos/modules/services/misc/weechat.md b/nixos/modules/services/misc/weechat.md
index 21f41be5b4a0..fb20ebe1e4db 100644
--- a/nixos/modules/services/misc/weechat.md
+++ b/nixos/modules/services/misc/weechat.md
@@ -12,7 +12,7 @@ unit which runs the chat client in a detached
session.
This can be done by enabling the `weechat` service:
-```
+```nix
{ ... }:
{
@@ -30,7 +30,7 @@ allow your another user to attach to this session, the
`screenrc` needs to be tweaked by adding
[multiuser](https://www.gnu.org/software/screen/manual/html_node/Multiuser.html#Multiuser)
support:
-```
+```nix
{
programs.screen.screenrc = ''
multiuser on
diff --git a/nixos/modules/services/misc/weechat.nix b/nixos/modules/services/misc/weechat.nix
index 338493e3cd37..6f6c78b1c9dc 100644
--- a/nixos/modules/services/misc/weechat.nix
+++ b/nixos/modules/services/misc/weechat.nix
@@ -8,20 +8,20 @@ in
{
options.services.weechat = {
- enable = mkEnableOption (lib.mdDoc "weechat");
+ enable = mkEnableOption "weechat";
root = mkOption {
- description = lib.mdDoc "Weechat state directory.";
+ description = "Weechat state directory.";
type = types.str;
default = "/var/lib/weechat";
};
sessionName = mkOption {
- description = lib.mdDoc "Name of the `screen` session for weechat.";
+ description = "Name of the `screen` session for weechat.";
default = "weechat-screen";
type = types.str;
};
binary = mkOption {
type = types.path;
- description = lib.mdDoc "Binary to execute.";
+ description = "Binary to execute.";
default = "${pkgs.weechat}/bin/weechat";
defaultText = literalExpression ''"''${pkgs.weechat}/bin/weechat"'';
example = literalExpression ''"''${pkgs.weechat}/bin/weechat-headless"'';
diff --git a/nixos/modules/services/misc/workout-tracker.nix b/nixos/modules/services/misc/workout-tracker.nix
new file mode 100644
index 000000000000..13555504be30
--- /dev/null
+++ b/nixos/modules/services/misc/workout-tracker.nix
@@ -0,0 +1,83 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+
+let
+ inherit (lib) types;
+ cfg = config.services.workout-tracker;
+ stateDir = "workout-tracker";
+in
+
+{
+ options = {
+ services.workout-tracker = {
+ enable = lib.mkEnableOption "workout tracking web application for personal use (or family, friends), geared towards running and other GPX-based activities";
+
+ package = lib.mkPackageOption pkgs "workout-tracker" { };
+
+ address = lib.mkOption {
+ type = types.str;
+ default = "127.0.0.1";
+ description = "Web interface address.";
+ };
+
+ port = lib.mkOption {
+ type = types.port;
+ default = 8080;
+ description = "Web interface port.";
+ };
+
+ environmentFile = lib.mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ example = "/run/keys/workout-tracker.env";
+ description = ''
+ An environment file as defined in {manpage}`systemd.exec(5)`.
+
+ Secrets like `WT_JWT_ENCRYPTION_KEY` may be passed to the service without adding them
+ to the world-readable Nix store.
+ '';
+ };
+
+ settings = lib.mkOption {
+ type = types.attrsOf types.str;
+
+ default = { };
+ description = ''
+ Extra config options.
+ '';
+ example = {
+ WT_LOGGING = "true";
+ WT_DEBUG = "false";
+ WT_DATABASE_DRIVER = "sqlite";
+ WT_DSN = "./database.db";
+ };
+ };
+ };
+ };
+
+ config = lib.mkIf cfg.enable {
+ systemd.services.workout-tracker = {
+ description = "A workout tracking web application for personal use (or family, friends), geared towards running and other GPX-based activities";
+ wantedBy = [ "multi-user.target" ];
+ environment = {
+ WT_BIND = "${cfg.address}:${toString cfg.port}";
+ WT_DATABASE_DRIVER = "sqlite";
+ WT_DSN = "./database.db";
+ } // cfg.settings;
+ serviceConfig = {
+ ExecStart = lib.getExe cfg.package;
+ DynamicUser = true;
+ StateDirectory = stateDir;
+ WorkingDirectory = "%S/${stateDir}";
+ Restart = "always";
+ EnvironmentFile = lib.optional (cfg.environmentFile != null) cfg.environmentFile;
+ };
+ };
+ };
+
+ meta.maintainers = with lib.maintainers; [ bhankas ];
+}
diff --git a/nixos/modules/services/misc/xmr-stak.nix b/nixos/modules/services/misc/xmr-stak.nix
index 54efae48d5d2..3015e3cb12a8 100644
--- a/nixos/modules/services/misc/xmr-stak.nix
+++ b/nixos/modules/services/misc/xmr-stak.nix
@@ -15,14 +15,14 @@ in
{
options = {
services.xmr-stak = {
- enable = mkEnableOption (lib.mdDoc "xmr-stak miner");
- openclSupport = mkEnableOption (lib.mdDoc "support for OpenCL (AMD/ATI graphics cards)");
+ enable = mkEnableOption "xmr-stak miner";
+ openclSupport = mkEnableOption "support for OpenCL (AMD/ATI graphics cards)";
extraArgs = mkOption {
type = types.listOf types.str;
default = [];
example = [ "--noCPU" "--currency monero" ];
- description = lib.mdDoc "List of parameters to pass to xmr-stak.";
+ description = "List of parameters to pass to xmr-stak.";
};
configFiles = mkOption {
@@ -51,7 +51,7 @@ in
''';
}
'';
- description = lib.mdDoc ''
+ description = ''
Content of config files like config.txt, pools.txt or cpu.txt.
'';
};
diff --git a/nixos/modules/services/misc/xmrig.nix b/nixos/modules/services/misc/xmrig.nix
index 8ad2d049f8a9..d4e1be779972 100644
--- a/nixos/modules/services/misc/xmrig.nix
+++ b/nixos/modules/services/misc/xmrig.nix
@@ -13,7 +13,7 @@ with lib;
{
options = {
services.xmrig = {
- enable = mkEnableOption (lib.mdDoc "XMRig Mining Software");
+ enable = mkEnableOption "XMRig Mining Software";
package = mkPackageOption pkgs "xmrig" {
example = "xmrig-mo";
@@ -38,7 +38,7 @@ with lib;
]
}
'';
- description = lib.mdDoc ''
+ description = ''
XMRig configuration. Refer to
for details on supported values.
diff --git a/nixos/modules/services/misc/zoneminder.nix b/nixos/modules/services/misc/zoneminder.nix
index fca03b2ad4e1..84c3a6710c0d 100644
--- a/nixos/modules/services/misc/zoneminder.nix
+++ b/nixos/modules/services/misc/zoneminder.nix
@@ -66,7 +66,7 @@ let
in {
options = {
services.zoneminder = with lib; {
- enable = lib.mkEnableOption (lib.mdDoc ''
+ enable = lib.mkEnableOption ''
ZoneMinder.
If you intend to run the database locally, you should set
@@ -75,12 +75,12 @@ in {
and database user as well as populate the database yourself.
Additionally, you will need to run `zmupdate.pl` yourself when
upgrading to a newer version
- '');
+ '';
webserver = mkOption {
type = types.enum [ "nginx" "none" ];
default = "nginx";
- description = lib.mdDoc ''
+ description = ''
The webserver to configure for the PHP frontend.
Set it to `none` if you want to configure it yourself. PRs are welcome
@@ -91,7 +91,7 @@ in {
hostname = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc ''
+ description = ''
The hostname on which to listen.
'';
};
@@ -99,7 +99,7 @@ in {
port = mkOption {
type = types.port;
default = 8095;
- description = lib.mdDoc ''
+ description = ''
The port on which to listen.
'';
};
@@ -107,7 +107,7 @@ in {
openFirewall = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Open the firewall port(s).
'';
};
@@ -116,7 +116,7 @@ in {
createLocally = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc ''
+ description = ''
Create the database and database user locally.
'';
};
@@ -124,7 +124,7 @@ in {
host = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc ''
+ description = ''
Hostname hosting the database.
'';
};
@@ -132,7 +132,7 @@ in {
name = mkOption {
type = types.str;
default = "zm";
- description = lib.mdDoc ''
+ description = ''
Name of database.
'';
};
@@ -140,7 +140,7 @@ in {
username = mkOption {
type = types.str;
default = "zmuser";
- description = lib.mdDoc ''
+ description = ''
Username for accessing the database.
'';
};
@@ -148,7 +148,7 @@ in {
password = mkOption {
type = types.str;
default = "zmpass";
- description = lib.mdDoc ''
+ description = ''
Username for accessing the database.
Not used if `createLocally` is set.
'';
@@ -158,7 +158,7 @@ in {
cameras = mkOption {
type = types.int;
default = 1;
- description = lib.mdDoc ''
+ description = ''
Set this to the number of cameras you expect to support.
'';
};
@@ -167,7 +167,7 @@ in {
type = types.nullOr types.str;
default = null;
example = "/storage/tank";
- description = lib.mdDoc ''
+ description = ''
ZoneMinder can generate quite a lot of data, so in case you don't want
to use the default ${defaultDir}, you can override the path here.
'';
@@ -176,7 +176,7 @@ in {
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Additional configuration added verbatim to the configuration file.
'';
};
diff --git a/nixos/modules/services/misc/zookeeper.nix b/nixos/modules/services/misc/zookeeper.nix
index b1c0b80648c6..3861a3cd2f4d 100644
--- a/nixos/modules/services/misc/zookeeper.nix
+++ b/nixos/modules/services/misc/zookeeper.nix
@@ -24,22 +24,22 @@ let
in {
options.services.zookeeper = {
- enable = mkEnableOption (lib.mdDoc "Zookeeper");
+ enable = mkEnableOption "Zookeeper";
port = mkOption {
- description = lib.mdDoc "Zookeeper Client port.";
+ description = "Zookeeper Client port.";
default = 2181;
type = types.port;
};
id = mkOption {
- description = lib.mdDoc "Zookeeper ID.";
+ description = "Zookeeper ID.";
default = 0;
type = types.int;
};
purgeInterval = mkOption {
- description = lib.mdDoc ''
+ description = ''
The time interval in hours for which the purge task has to be triggered. Set to a positive integer (1 and above) to enable the auto purging.
'';
default = 1;
@@ -47,7 +47,7 @@ in {
};
extraConf = mkOption {
- description = lib.mdDoc "Extra configuration for Zookeeper.";
+ description = "Extra configuration for Zookeeper.";
type = types.lines;
default = ''
initLimit=5
@@ -57,7 +57,7 @@ in {
};
servers = mkOption {
- description = lib.mdDoc "All Zookeeper Servers.";
+ description = "All Zookeeper Servers.";
default = "";
type = types.lines;
example = ''
@@ -68,7 +68,7 @@ in {
};
logging = mkOption {
- description = lib.mdDoc "Zookeeper logging configuration.";
+ description = "Zookeeper logging configuration.";
default = ''
zookeeper.root.logger=INFO, CONSOLE
log4j.rootLogger=INFO, CONSOLE
@@ -83,13 +83,13 @@ in {
dataDir = mkOption {
type = types.path;
default = "/var/lib/zookeeper";
- description = lib.mdDoc ''
+ description = ''
Data directory for Zookeeper
'';
};
extraCmdLineOptions = mkOption {
- description = lib.mdDoc "Extra command line options for the Zookeeper launcher.";
+ description = "Extra command line options for the Zookeeper launcher.";
default = [ "-Dcom.sun.management.jmxremote" "-Dcom.sun.management.jmxremote.local.only=true" ];
type = types.listOf types.str;
example = [ "-Djava.net.preferIPv4Stack=true" "-Dcom.sun.management.jmxremote" "-Dcom.sun.management.jmxremote.local.only=true" ];
@@ -98,7 +98,7 @@ in {
preferIPv4 = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc ''
+ description = ''
Add the -Djava.net.preferIPv4Stack=true flag to the Zookeeper server.
'';
};
@@ -106,7 +106,7 @@ in {
package = mkPackageOption pkgs "zookeeper" { };
jre = mkOption {
- description = lib.mdDoc "The JRE with which to run Zookeeper";
+ description = "The JRE with which to run Zookeeper";
default = cfg.package.jre;
defaultText = literalExpression "pkgs.zookeeper.jre";
example = literalExpression "pkgs.jre";
diff --git a/nixos/modules/services/monitoring/alerta.nix b/nixos/modules/services/monitoring/alerta.nix
index 0b0ab177e5e1..32c71e730102 100644
--- a/nixos/modules/services/monitoring/alerta.nix
+++ b/nixos/modules/services/monitoring/alerta.nix
@@ -21,58 +21,58 @@ let
in
{
options.services.alerta = {
- enable = mkEnableOption (lib.mdDoc "alerta");
+ enable = mkEnableOption "alerta";
port = mkOption {
type = types.port;
default = 5000;
- description = lib.mdDoc "Port of Alerta";
+ description = "Port of Alerta";
};
bind = mkOption {
type = types.str;
default = "0.0.0.0";
- description = lib.mdDoc "Address to bind to. The default is to bind to all addresses";
+ description = "Address to bind to. The default is to bind to all addresses";
};
logDir = mkOption {
type = types.path;
- description = lib.mdDoc "Location where the logfiles are stored";
+ description = "Location where the logfiles are stored";
default = "/var/log/alerta";
};
databaseUrl = mkOption {
type = types.str;
- description = lib.mdDoc "URL of the MongoDB or PostgreSQL database to connect to";
+ description = "URL of the MongoDB or PostgreSQL database to connect to";
default = "mongodb://localhost";
};
databaseName = mkOption {
type = types.str;
- description = lib.mdDoc "Name of the database instance to connect to";
+ description = "Name of the database instance to connect to";
default = "monitoring";
};
corsOrigins = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc "List of URLs that can access the API for Cross-Origin Resource Sharing (CORS)";
+ description = "List of URLs that can access the API for Cross-Origin Resource Sharing (CORS)";
default = [ "http://localhost" "http://localhost:5000" ];
};
authenticationRequired = mkOption {
type = types.bool;
- description = lib.mdDoc "Whether users must authenticate when using the web UI or command-line tool";
+ description = "Whether users must authenticate when using the web UI or command-line tool";
default = false;
};
signupEnabled = mkOption {
type = types.bool;
- description = lib.mdDoc "Whether to prevent sign-up of new users via the web UI";
+ description = "Whether to prevent sign-up of new users via the web UI";
default = true;
};
extraConfig = mkOption {
- description = lib.mdDoc "These lines go into alertad.conf verbatim.";
+ description = "These lines go into alertad.conf verbatim.";
default = "";
type = types.lines;
};
diff --git a/nixos/modules/services/monitoring/apcupsd.nix b/nixos/modules/services/monitoring/apcupsd.nix
index 666479c78a84..09cf593f5d5e 100644
--- a/nixos/modules/services/monitoring/apcupsd.nix
+++ b/nixos/modules/services/monitoring/apcupsd.nix
@@ -90,7 +90,7 @@ in
enable = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc ''
+ description = ''
Whether to enable the APC UPS daemon. apcupsd monitors your UPS and
permits orderly shutdown of your computer in the event of a power
failure. User manual: http://www.apcupsd.com/manual/manual.html.
@@ -107,7 +107,7 @@ in
MINUTES 5
'';
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Contents of the runtime configuration file, apcupsd.conf. The default
settings makes apcupsd autodetect USB UPSes, limit network access to
localhost and shutdown the system when the battery level is below 50
@@ -122,7 +122,7 @@ in
doshutdown = "# shell commands to notify that the computer is shutting down";
};
type = types.attrsOf types.lines;
- description = lib.mdDoc ''
+ description = ''
Each attribute in this option names an apcupsd event and the string
value it contains will be executed in a shell, in response to that
event (prior to the default action). See "man apccontrol" for the
diff --git a/nixos/modules/services/monitoring/arbtt.nix b/nixos/modules/services/monitoring/arbtt.nix
index a1a228d6e420..6dad6bdec328 100644
--- a/nixos/modules/services/monitoring/arbtt.nix
+++ b/nixos/modules/services/monitoring/arbtt.nix
@@ -7,7 +7,7 @@ let
in {
options = {
services.arbtt = {
- enable = mkEnableOption (lib.mdDoc "Arbtt statistics capture service");
+ enable = mkEnableOption "Arbtt statistics capture service";
package = mkPackageOption pkgs [ "haskellPackages" "arbtt" ] { };
@@ -15,7 +15,7 @@ in {
type = types.str;
default = "%h/.arbtt/capture.log";
example = "/home/username/.arbtt-capture.log";
- description = lib.mdDoc ''
+ description = ''
The log file for captured samples.
'';
};
@@ -24,7 +24,7 @@ in {
type = types.int;
default = 60;
example = 120;
- description = lib.mdDoc ''
+ description = ''
The sampling interval in seconds.
'';
};
diff --git a/nixos/modules/services/monitoring/below.nix b/nixos/modules/services/monitoring/below.nix
index 4a7135162ac4..729734828142 100644
--- a/nixos/modules/services/monitoring/below.nix
+++ b/nixos/modules/services/monitoring/below.nix
@@ -13,10 +13,10 @@ let
mkDisableOption = n: mkOption {
type = types.bool;
default = true;
- description = mdDoc "Whether to enable ${n}.";
+ description = "Whether to enable ${n}.";
};
optionalType = ty: x: mkOption (x // {
- description = mdDoc x.description;
+ description = x.description;
type = (types.nullOr ty);
default = null;
});
@@ -26,7 +26,7 @@ let
in {
options = {
services.below = {
- enable = mkEnableOption (mdDoc "'below' resource monitor");
+ enable = mkEnableOption "'below' resource monitor";
cgroupFilterOut = optionalStr {
description = "A regexp matching the full paths of cgroups whose data shouldn't be collected";
@@ -34,10 +34,10 @@ in {
};
collect = {
diskStats = mkDisableOption "dist_stat collection";
- ioStats = mkEnableOption (mdDoc "io.stat collection for cgroups");
+ ioStats = mkEnableOption "io.stat collection for cgroups";
exitStats = mkDisableOption "eBPF-based exitstats";
};
- compression.enable = mkEnableOption (mdDoc "data compression");
+ compression.enable = mkEnableOption "data compression";
retention = {
size = optionalInt {
description = ''
diff --git a/nixos/modules/services/monitoring/bosun.nix b/nixos/modules/services/monitoring/bosun.nix
index fb412d43ec27..4b855b96e949 100644
--- a/nixos/modules/services/monitoring/bosun.nix
+++ b/nixos/modules/services/monitoring/bosun.nix
@@ -22,14 +22,14 @@ in {
services.bosun = {
- enable = mkEnableOption (lib.mdDoc "bosun");
+ enable = mkEnableOption "bosun";
package = mkPackageOption pkgs "bosun" { };
user = mkOption {
type = types.str;
default = "bosun";
- description = lib.mdDoc ''
+ description = ''
User account under which bosun runs.
'';
};
@@ -37,7 +37,7 @@ in {
group = mkOption {
type = types.str;
default = "bosun";
- description = lib.mdDoc ''
+ description = ''
Group account under which bosun runs.
'';
};
@@ -45,7 +45,7 @@ in {
opentsdbHost = mkOption {
type = types.nullOr types.str;
default = "localhost:4242";
- description = lib.mdDoc ''
+ description = ''
Host and port of the OpenTSDB database that stores bosun data.
To disable opentsdb you can pass null as parameter.
'';
@@ -55,7 +55,7 @@ in {
type = types.nullOr types.str;
default = null;
example = "localhost:8086";
- description = lib.mdDoc ''
+ description = ''
Host and port of the influxdb database.
'';
};
@@ -63,7 +63,7 @@ in {
listenAddress = mkOption {
type = types.str;
default = ":8070";
- description = lib.mdDoc ''
+ description = ''
The host address and port that bosun's web interface will listen on.
'';
};
@@ -71,7 +71,7 @@ in {
stateFile = mkOption {
type = types.path;
default = "/var/lib/bosun/bosun.state";
- description = lib.mdDoc ''
+ description = ''
Path to bosun's state file.
'';
};
@@ -79,7 +79,7 @@ in {
ledisDir = mkOption {
type = types.path;
default = "/var/lib/bosun/ledis_data";
- description = lib.mdDoc ''
+ description = ''
Path to bosun's ledis data dir
'';
};
@@ -87,7 +87,7 @@ in {
checkFrequency = mkOption {
type = types.str;
default = "5m";
- description = lib.mdDoc ''
+ description = ''
Bosun's check frequency
'';
};
@@ -95,7 +95,7 @@ in {
extraConfig = mkOption {
type = types.lines;
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra configuration options for Bosun. You should describe your
desired templates, alerts, macros, etc through this configuration
option.
diff --git a/nixos/modules/services/monitoring/cadvisor.nix b/nixos/modules/services/monitoring/cadvisor.nix
index 68e6e8e40b31..6b0852cfe3ef 100644
--- a/nixos/modules/services/monitoring/cadvisor.nix
+++ b/nixos/modules/services/monitoring/cadvisor.nix
@@ -8,49 +8,49 @@ let
in {
options = {
services.cadvisor = {
- enable = mkEnableOption (lib.mdDoc "Cadvisor service");
+ enable = mkEnableOption "Cadvisor service";
listenAddress = mkOption {
default = "127.0.0.1";
type = types.str;
- description = lib.mdDoc "Cadvisor listening host";
+ description = "Cadvisor listening host";
};
port = mkOption {
default = 8080;
type = types.port;
- description = lib.mdDoc "Cadvisor listening port";
+ description = "Cadvisor listening port";
};
storageDriver = mkOption {
default = null;
type = types.nullOr types.str;
example = "influxdb";
- description = lib.mdDoc "Cadvisor storage driver.";
+ description = "Cadvisor storage driver.";
};
storageDriverHost = mkOption {
default = "localhost:8086";
type = types.str;
- description = lib.mdDoc "Cadvisor storage driver host.";
+ description = "Cadvisor storage driver host.";
};
storageDriverDb = mkOption {
default = "root";
type = types.str;
- description = lib.mdDoc "Cadvisord storage driver database name.";
+ description = "Cadvisord storage driver database name.";
};
storageDriverUser = mkOption {
default = "root";
type = types.str;
- description = lib.mdDoc "Cadvisor storage driver username.";
+ description = "Cadvisor storage driver username.";
};
storageDriverPassword = mkOption {
default = "root";
type = types.str;
- description = lib.mdDoc ''
+ description = ''
Cadvisor storage driver password.
Warning: this password is stored in the world-readable Nix store. It's
@@ -62,7 +62,7 @@ in {
storageDriverPasswordFile = mkOption {
type = types.str;
- description = lib.mdDoc ''
+ description = ''
File that contains the cadvisor storage driver password.
{option}`storageDriverPasswordFile` takes precedence over {option}`storageDriverPassword`
@@ -78,13 +78,13 @@ in {
storageDriverSecure = mkOption {
default = false;
type = types.bool;
- description = lib.mdDoc "Cadvisor storage driver, enable secure communication.";
+ description = "Cadvisor storage driver, enable secure communication.";
};
extraOptions = mkOption {
type = types.listOf types.str;
default = [];
- description = lib.mdDoc ''
+ description = ''
Additional cadvisor options.
See for available options.
diff --git a/nixos/modules/services/monitoring/certspotter.md b/nixos/modules/services/monitoring/certspotter.md
index 9bf6e1d946a0..e999bfe65ec3 100644
--- a/nixos/modules/services/monitoring/certspotter.md
+++ b/nixos/modules/services/monitoring/certspotter.md
@@ -9,17 +9,19 @@ A basic config that notifies you of all certificate changes for your
domain would look as follows:
```nix
-services.certspotter = {
- enable = true;
- # replace example.org with your domain name
- watchlist = [ ".example.org" ];
- emailRecipients = [ "webmaster@example.org" ];
-};
+{
+ services.certspotter = {
+ enable = true;
+ # replace example.org with your domain name
+ watchlist = [ ".example.org" ];
+ emailRecipients = [ "webmaster@example.org" ];
+ };
-# Configure an SMTP client
-programs.msmtp.enable = true;
-# Or you can use any other module that provides sendmail, like
-# services.nullmailer, services.opensmtpd, services.postfix
+ # Configure an SMTP client
+ programs.msmtp.enable = true;
+ # Or you can use any other module that provides sendmail, like
+ # services.nullmailer, services.opensmtpd, services.postfix
+}
```
In this case, the leading dot in `".example.org"` means that Cert
@@ -59,16 +61,18 @@ For example, you can remove `emailRecipients` and send email
notifications manually using the following hook:
```nix
-services.certspotter.hooks = [
- (pkgs.writeShellScript "certspotter-hook" ''
- function print_email() {
- echo "Subject: [certspotter] $SUMMARY"
- echo "Mime-Version: 1.0"
- echo "Content-Type: text/plain; charset=US-ASCII"
- echo
- cat "$TEXT_FILENAME"
- }
- print_email | ${config.services.certspotter.sendmailPath} -i webmaster@example.org
- '')
-];
+{
+ services.certspotter.hooks = [
+ (pkgs.writeShellScript "certspotter-hook" ''
+ function print_email() {
+ echo "Subject: [certspotter] $SUMMARY"
+ echo "Mime-Version: 1.0"
+ echo "Content-Type: text/plain; charset=US-ASCII"
+ echo
+ cat "$TEXT_FILENAME"
+ }
+ print_email | ${config.services.certspotter.sendmailPath} -i webmaster@example.org
+ '')
+ ];
+}
```
diff --git a/nixos/modules/services/monitoring/cockpit.nix b/nixos/modules/services/monitoring/cockpit.nix
index 45389a3174e1..64e26ce4e127 100644
--- a/nixos/modules/services/monitoring/cockpit.nix
+++ b/nixos/modules/services/monitoring/cockpit.nix
@@ -2,12 +2,12 @@
let
cfg = config.services.cockpit;
- inherit (lib) types mkEnableOption mkOption mkIf mdDoc literalMD mkPackageOption;
+ inherit (lib) types mkEnableOption mkOption mkIf literalMD mkPackageOption;
settingsFormat = pkgs.formats.ini {};
in {
options = {
services.cockpit = {
- enable = mkEnableOption (mdDoc "Cockpit");
+ enable = mkEnableOption "Cockpit";
package = mkPackageOption pkgs "Cockpit" {
default = [ "cockpit" ];
@@ -18,7 +18,7 @@ in {
default = {};
- description = mdDoc ''
+ description = ''
Settings for cockpit that will be saved in /etc/cockpit/cockpit.conf.
See the [documentation](https://cockpit-project.org/guide/latest/cockpit.conf.5.html), that is also available with `man cockpit.conf.5` for details.
@@ -26,13 +26,13 @@ in {
};
port = mkOption {
- description = mdDoc "Port where cockpit will listen.";
+ description = "Port where cockpit will listen.";
type = types.port;
default = 9090;
};
openFirewall = mkOption {
- description = mdDoc "Open port for cockpit.";
+ description = "Open port for cockpit.";
type = types.bool;
default = false;
};
diff --git a/nixos/modules/services/monitoring/collectd.nix b/nixos/modules/services/monitoring/collectd.nix
index 3e62ef422bad..fe9b1214e5c1 100644
--- a/nixos/modules/services/monitoring/collectd.nix
+++ b/nixos/modules/services/monitoring/collectd.nix
@@ -29,11 +29,11 @@ let
in {
options.services.collectd = with types; {
- enable = mkEnableOption (lib.mdDoc "collectd agent");
+ enable = mkEnableOption "collectd agent";
validateConfig = mkOption {
default = true;
- description = lib.mdDoc ''
+ description = ''
Validate the syntax of collectd configuration file at build time.
Disable this if you use the Include directive on files unavailable in
the build sandbox, or when cross-compiling.
@@ -45,7 +45,7 @@ in {
buildMinimalPackage = mkOption {
default = false;
- description = lib.mdDoc ''
+ description = ''
Build a minimal collectd package with only the configured `services.collectd.plugins`
'';
type = bool;
@@ -53,7 +53,7 @@ in {
user = mkOption {
default = "collectd";
- description = lib.mdDoc ''
+ description = ''
User under which to run collectd.
'';
type = nullOr str;
@@ -61,7 +61,7 @@ in {
dataDir = mkOption {
default = "/var/lib/collectd";
- description = lib.mdDoc ''
+ description = ''
Data directory for collectd agent.
'';
type = path;
@@ -69,7 +69,7 @@ in {
autoLoadPlugin = mkOption {
default = false;
- description = lib.mdDoc ''
+ description = ''
Enable plugin autoloading.
'';
type = bool;
@@ -77,7 +77,7 @@ in {
include = mkOption {
default = [];
- description = lib.mdDoc ''
+ description = ''
Additional paths to load config from.
'';
type = listOf str;
@@ -86,7 +86,7 @@ in {
plugins = mkOption {
default = {};
example = { cpu = ""; memory = ""; network = "Server 192.168.1.1 25826"; };
- description = lib.mdDoc ''
+ description = ''
Attribute set of plugin names to plugin config segments
'';
type = attrsOf lines;
@@ -94,7 +94,7 @@ in {
extraConfig = mkOption {
default = "";
- description = lib.mdDoc ''
+ description = ''
Extra configuration for collectd. Use mkBefore to add lines before the
default config, and mkAfter to add them below.
'';
diff --git a/nixos/modules/services/monitoring/das_watchdog.nix b/nixos/modules/services/monitoring/das_watchdog.nix
index fd420b0c8a06..88ca3a9227d2 100644
--- a/nixos/modules/services/monitoring/das_watchdog.nix
+++ b/nixos/modules/services/monitoring/das_watchdog.nix
@@ -12,7 +12,7 @@ in {
###### interface
options = {
- services.das_watchdog.enable = mkEnableOption (lib.mdDoc "realtime watchdog");
+ services.das_watchdog.enable = mkEnableOption "realtime watchdog";
};
###### implementation
diff --git a/nixos/modules/services/monitoring/datadog-agent.nix b/nixos/modules/services/monitoring/datadog-agent.nix
index 7b07c80c8d7b..5ac98bdf0382 100644
--- a/nixos/modules/services/monitoring/datadog-agent.nix
+++ b/nixos/modules/services/monitoring/datadog-agent.nix
@@ -49,7 +49,7 @@ let
};
in {
options.services.datadog-agent = {
- enable = mkEnableOption (lib.mdDoc "Datadog-agent v7 monitoring service");
+ enable = mkEnableOption "Datadog-agent v7 monitoring service";
package = mkPackageOption pkgs "datadog-agent" {
extraDescription = ''
@@ -61,7 +61,7 @@ in {
};
apiKeyFile = mkOption {
- description = lib.mdDoc ''
+ description = ''
Path to a file containing the Datadog API key to associate the
agent with your account.
'';
@@ -70,7 +70,7 @@ in {
};
ddUrl = mkOption {
- description = lib.mdDoc ''
+ description = ''
Custom dd_url to configure the agent with. Useful if traffic to datadog
needs to go through a proxy.
Don't use this to point to another datadog site (EU) - use site instead.
@@ -81,7 +81,7 @@ in {
};
site = mkOption {
- description = lib.mdDoc ''
+ description = ''
The datadog site to point the agent towards.
Set to datadoghq.eu to point it to their EU site.
'';
@@ -91,21 +91,21 @@ in {
};
tags = mkOption {
- description = lib.mdDoc "The tags to mark this Datadog agent";
+ description = "The tags to mark this Datadog agent";
example = [ "test" "service" ];
default = null;
type = types.nullOr (types.listOf types.str);
};
hostname = mkOption {
- description = lib.mdDoc "The hostname to show in the Datadog dashboard (optional)";
+ description = "The hostname to show in the Datadog dashboard (optional)";
default = null;
example = "mymachine.mydomain";
type = types.nullOr types.str;
};
logLevel = mkOption {
- description = lib.mdDoc "Logging verbosity.";
+ description = "Logging verbosity.";
default = null;
type = types.nullOr (types.enum ["DEBUG" "INFO" "WARN" "ERROR"]);
};
@@ -114,7 +114,7 @@ in {
default = {};
type = types.attrs;
- description = lib.mdDoc ''
+ description = ''
Extra integrations from the Datadog core-integrations
repository that should be built and included.
@@ -136,14 +136,14 @@ in {
extraConfig = mkOption {
default = {};
type = types.attrs;
- description = lib.mdDoc ''
+ description = ''
Extra configuration options that will be merged into the
main config file {file}`datadog.yaml`.
'';
};
enableLiveProcessCollection = mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether to enable the live process collection agent.
'';
default = false;
@@ -153,7 +153,7 @@ in {
processAgentPackage = mkOption {
default = pkgs.datadog-process-agent;
defaultText = literalExpression "pkgs.datadog-process-agent";
- description = lib.mdDoc ''
+ description = ''
Which DataDog v7 agent package to use. Note that the provided
package is expected to have an overridable `pythonPackages`-attribute
which configures the Python environment with the Datadog
@@ -163,7 +163,7 @@ in {
};
enableTraceAgent = mkOption {
- description = lib.mdDoc ''
+ description = ''
Whether to enable the trace agent.
'';
default = false;
@@ -171,7 +171,7 @@ in {
};
checks = mkOption {
- description = lib.mdDoc ''
+ description = ''
Configuration for all Datadog checks. Keys of this attribute
set will be used as the name of the check to create the
appropriate configuration in `conf.d/$check.d/conf.yaml`.
@@ -210,7 +210,7 @@ in {
};
diskCheck = mkOption {
- description = lib.mdDoc "Disk check config";
+ description = "Disk check config";
type = types.attrs;
default = {
init_config = {};
@@ -219,7 +219,7 @@ in {
};
networkCheck = mkOption {
- description = lib.mdDoc "Network check config";
+ description = "Network check config";
type = types.attrs;
default = {
init_config = {};
diff --git a/nixos/modules/services/monitoring/do-agent.nix b/nixos/modules/services/monitoring/do-agent.nix
index c1788c640c23..4dfb6236727b 100644
--- a/nixos/modules/services/monitoring/do-agent.nix
+++ b/nixos/modules/services/monitoring/do-agent.nix
@@ -8,7 +8,7 @@ let
in
{
options.services.do-agent = {
- enable = mkEnableOption (lib.mdDoc "do-agent, the DigitalOcean droplet metrics agent");
+ enable = mkEnableOption "do-agent, the DigitalOcean droplet metrics agent";
};
config = mkIf cfg.enable {
diff --git a/nixos/modules/services/monitoring/fusion-inventory.nix b/nixos/modules/services/monitoring/fusion-inventory.nix
index 7b28e8de1229..9b65c76ce02e 100644
--- a/nixos/modules/services/monitoring/fusion-inventory.nix
+++ b/nixos/modules/services/monitoring/fusion-inventory.nix
@@ -22,11 +22,11 @@ in {
services.fusionInventory = {
- enable = mkEnableOption (lib.mdDoc "Fusion Inventory Agent");
+ enable = mkEnableOption "Fusion Inventory Agent";
servers = mkOption {
type = types.listOf types.str;
- description = lib.mdDoc ''
+ description = ''
The urls of the OCS/GLPI servers to connect to.
'';
};
@@ -34,7 +34,7 @@ in {
extraConfig = mkOption {
default = "";
type = types.lines;
- description = lib.mdDoc ''
+ description = ''
Configuration that is injected verbatim into the configuration file.
'';
};
diff --git a/nixos/modules/services/monitoring/goss.md b/nixos/modules/services/monitoring/goss.md
index 1e636aa3bdf3..bf91d42011fa 100644
--- a/nixos/modules/services/monitoring/goss.md
+++ b/nixos/modules/services/monitoring/goss.md
@@ -7,7 +7,7 @@ for validating a server's configuration.
A minimal configuration looks like this:
-```
+```nix
{
services.goss = {
enable = true;
diff --git a/nixos/modules/services/monitoring/goss.nix b/nixos/modules/services/monitoring/goss.nix
index 1b973bbbf45c..00246752a7cd 100644
--- a/nixos/modules/services/monitoring/goss.nix
+++ b/nixos/modules/services/monitoring/goss.nix
@@ -14,7 +14,7 @@ in {
options = {
services.goss = {
- enable = lib.mkEnableOption (lib.mdDoc "Goss daemon");
+ enable = lib.mkEnableOption "Goss daemon";
package = lib.mkPackageOption pkgs "goss" { };
@@ -26,7 +26,7 @@ in {
GOSS_LOGLEVEL = "FATAL";
GOSS_LISTEN = ":8080";
};
- description = lib.mdDoc ''
+ description = ''
Environment variables to set for the goss service.
See
@@ -46,7 +46,7 @@ in {
running = true;
};
};
- description = lib.mdDoc ''
+ description = ''
The global options in `config` file in yaml format.
Refer to for schema.
diff --git a/nixos/modules/services/monitoring/grafana-agent.nix b/nixos/modules/services/monitoring/grafana-agent.nix
index e8d38a453176..655ec8ded1e0 100644
--- a/nixos/modules/services/monitoring/grafana-agent.nix
+++ b/nixos/modules/services/monitoring/grafana-agent.nix
@@ -11,12 +11,12 @@ in
};
options.services.grafana-agent = {
- enable = mkEnableOption (lib.mdDoc "grafana-agent");
+ enable = mkEnableOption "grafana-agent";
package = mkPackageOption pkgs "grafana-agent" { };
credentials = mkOption {
- description = lib.mdDoc ''
+ description = ''
Credentials to load at service startup. Keys that are UPPER_SNAKE will be loaded as env vars. Values are absolute paths to the credentials.
'';
type = types.attrsOf types.str;
@@ -36,7 +36,7 @@ in
type = with types; listOf str;
default = [ ];
example = [ "-enable-features=integrations-next" "-disable-reporting" ];
- description = lib.mdDoc ''
+ description = ''
Extra command-line flags passed to {command}`grafana-agent`.
See
@@ -44,7 +44,7 @@ in
};
settings = mkOption {
- description = lib.mdDoc ''
+ description = ''
Configuration for {command}`grafana-agent`.
See
diff --git a/nixos/modules/services/monitoring/grafana-image-renderer.nix b/nixos/modules/services/monitoring/grafana-image-renderer.nix
index afe9eb4d7b95..e06720b15302 100644
--- a/nixos/modules/services/monitoring/grafana-image-renderer.nix
+++ b/nixos/modules/services/monitoring/grafana-image-renderer.nix
@@ -10,18 +10,18 @@ let
configFile = format.generate "grafana-image-renderer-config.json" cfg.settings;
in {
options.services.grafana-image-renderer = {
- enable = mkEnableOption (lib.mdDoc "grafana-image-renderer");
+ enable = mkEnableOption "grafana-image-renderer";
chromium = mkOption {
type = types.package;
- description = lib.mdDoc ''
+ description = ''
The chromium to use for image rendering.
'';
};
- verbose = mkEnableOption (lib.mdDoc "verbosity for the service");
+ verbose = mkEnableOption "verbosity for the service";
- provisionGrafana = mkEnableOption (lib.mdDoc "Grafana configuration for grafana-image-renderer");
+ provisionGrafana = mkEnableOption "Grafana configuration for grafana-image-renderer";
settings = mkOption {
type = types.submodule {
@@ -32,14 +32,14 @@ in {
port = mkOption {
type = types.port;
default = 8081;
- description = lib.mdDoc ''
+ description = ''
The TCP port to use for the rendering server.
'';
};
logging.level = mkOption {
type = types.enum [ "error" "warning" "info" "debug" ];
default = "info";
- description = lib.mdDoc ''
+ description = ''
The log-level of the {file}`grafana-image-renderer.service`-unit.
'';
};
@@ -48,21 +48,21 @@ in {
width = mkOption {
default = 1000;
type = types.ints.positive;
- description = lib.mdDoc ''
+ description = ''
Width of the PNG used to display the alerting graph.
'';
};
height = mkOption {
default = 500;
type = types.ints.positive;
- description = lib.mdDoc ''
+ description = ''
Height of the PNG used to display the alerting graph.
'';
};
mode = mkOption {
default = "default";
type = types.enum [ "default" "reusable" "clustered" ];
- description = lib.mdDoc ''
+ description = ''
Rendering mode of `grafana-image-renderer`:
- `default:` Creates on browser-instance
@@ -77,7 +77,7 @@ in {
args = mkOption {
type = types.listOf types.str;
default = [ "--no-sandbox" ];
- description = lib.mdDoc ''
+ description = ''
List of CLI flags passed to `chromium`.
'';
};
@@ -87,7 +87,7 @@ in {
default = {};
- description = lib.mdDoc ''
+ description = ''
Configuration attributes for `grafana-image-renderer`.
See
diff --git a/nixos/modules/services/monitoring/grafana-reporter.nix b/nixos/modules/services/monitoring/grafana-reporter.nix
index eac304d63aa1..340ab7abd19b 100644
--- a/nixos/modules/services/monitoring/grafana-reporter.nix
+++ b/nixos/modules/services/monitoring/grafana-reporter.nix
@@ -7,40 +7,40 @@ let
in {
options.services.grafana_reporter = {
- enable = mkEnableOption (lib.mdDoc "grafana_reporter");
+ enable = mkEnableOption "grafana_reporter";
grafana = {
protocol = mkOption {
- description = lib.mdDoc "Grafana protocol.";
+ description = "Grafana protocol.";
default = "http";
type = types.enum ["http" "https"];
};
addr = mkOption {
- description = lib.mdDoc "Grafana address.";
+ description = "Grafana address.";
default = "127.0.0.1";
type = types.str;
};
port = mkOption {
- description = lib.mdDoc "Grafana port.";
+ description = "Grafana port.";
default = 3000;
type = types.port;
};
};
addr = mkOption {
- description = lib.mdDoc "Listening address.";
+ description = "Listening address.";
default = "127.0.0.1";
type = types.str;
};
port = mkOption {
- description = lib.mdDoc "Listening port.";
+ description = "Listening port.";
default = 8686;
type = types.port;
};
templateDir = mkOption {
- description = lib.mdDoc "Optional template directory to use custom tex templates";
+ description = "Optional template directory to use custom tex templates";
default = pkgs.grafana_reporter;
defaultText = literalExpression "pkgs.grafana_reporter";
type = types.either types.str types.path;
diff --git a/nixos/modules/services/monitoring/grafana.nix b/nixos/modules/services/monitoring/grafana.nix
index 5ac010bf81ee..9d453c539482 100644
--- a/nixos/modules/services/monitoring/grafana.nix
+++ b/nixos/modules/services/monitoring/grafana.nix
@@ -95,41 +95,41 @@ let
options = {
name = mkOption {
type = types.str;
- description = lib.mdDoc "Name of the datasource. Required.";
+ description = "Name of the datasource. Required.";
};
type = mkOption {
type = types.str;
- description = lib.mdDoc "Datasource type. Required.";
+ description = "Datasource type. Required.";
};
access = mkOption {
type = types.enum [ "proxy" "direct" ];
default = "proxy";
- description = lib.mdDoc "Access mode. proxy or direct (Server or Browser in the UI). Required.";
+ description = "Access mode. proxy or direct (Server or Browser in the UI). Required.";
};
uid = mkOption {
type = types.nullOr types.str;
default = null;
- description = lib.mdDoc "Custom UID which can be used to reference this datasource in other parts of the configuration, if not specified will be generated automatically.";
+ description = "Custom UID which can be used to reference this datasource in other parts of the configuration, if not specified will be generated automatically.";
};
url = mkOption {
type = types.str;
default = "localhost";
- description = lib.mdDoc "Url of the datasource.";
+ description = "Url of the datasource.";
};
editable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Allow users to edit datasources from the UI.";
+ description = "Allow users to edit datasources from the UI.";
};
jsonData = mkOption {
type = types.nullOr types.attrs;
default = null;
- description = lib.mdDoc "Extra data for datasource plugins.";
+ description = "Extra data for datasource plugins.";
};
secureJsonData = mkOption {
type = types.nullOr types.attrs;
default = null;
- description = lib.mdDoc ''
+ description = ''
Datasource specific secure configuration. Please note that the contents of this option
will end up in a world-readable Nix store. Use the file provider
pointing at a reasonably secured file in the local filesystem
@@ -148,16 +148,16 @@ let
name = mkOption {
type = types.str;
default = "default";
- description = lib.mdDoc "A unique provider name.";
+ description = "A unique provider name.";
};
type = mkOption {
type = types.str;
default = "file";
- description = lib.mdDoc "Dashboard provider type.";
+ description = "Dashboard provider type.";
};
options.path = mkOption {
type = types.path;
- description = lib.mdDoc "Path grafana will watch for dashboards. Required when using the 'file' type.";
+ description = "Path grafana will watch for dashboards. Required when using the 'file' type.";
};
};
};
@@ -167,55 +167,55 @@ let
name = mkOption {
type = types.str;
default = "default";
- description = lib.mdDoc "Notifier name.";
+ description = "Notifier name.";
};
type = mkOption {
type = types.enum [ "dingding" "discord" "email" "googlechat" "hipchat" "kafka" "line" "teams" "opsgenie" "pagerduty" "prometheus-alertmanager" "pushover" "sensu" "sensugo" "slack" "telegram" "threema" "victorops" "webhook" ];
- description = lib.mdDoc "Notifier type.";
+ description = "Notifier type.";
};
uid = mkOption {
type = types.str;
- description = lib.mdDoc "Unique notifier identifier.";
+ description = "Unique notifier identifier.";
};
org_id = mkOption {
type = types.int;
default = 1;
- description = lib.mdDoc "Organization ID.";
+ description = "Organization ID.";
};
org_name = mkOption {
type = types.str;
default = "Main Org.";
- description = lib.mdDoc "Organization name.";
+ description = "Organization name.";
};
is_default = mkOption {
type = types.bool;
- description = lib.mdDoc "Is the default notifier.";
+ description = "Is the default notifier.";
default = false;
};
send_reminder = mkOption {
type = types.bool;
default = true;
- description = lib.mdDoc "Should the notifier be sent reminder notifications while alerts continue to fire.";
+ description = "Should the notifier be sent reminder notifications while alerts continue to fire.";
};
frequency = mkOption {
type = types.str;
default = "5m";
- description = lib.mdDoc "How frequently should the notifier be sent reminders.";
+ description = "How frequently should the notifier be sent reminders.";
};
disable_resolve_message = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Turn off the message that sends when an alert returns to OK.";
+ description = "Turn off the message that sends when an alert returns to OK.";
};
settings = mkOption {
type = types.nullOr types.attrs;
default = null;
- description = lib.mdDoc "Settings for the notifier type.";
+ description = "Settings for the notifier type.";
};
secure_settings = mkOption {
type = types.nullOr types.attrs;
default = null;
- description = lib.mdDoc ''
+ description = ''
Secure settings for the notifier type. Please note that the contents of this option
will end up in a world-readable Nix store. Use the file provider
pointing at a reasonably secured file in the local filesystem
@@ -297,12 +297,12 @@ in
];
options.services.grafana = {
- enable = mkEnableOption (lib.mdDoc "grafana");
+ enable = mkEnableOption "grafana";
declarativePlugins = mkOption {
type = with types; nullOr (listOf path);
default = null;
- description = lib.mdDoc "If non-null, then a list of packages containing Grafana plugins to install. If set, plugins cannot be manually installed.";
+ description = "If non-null, then a list of packages containing Grafana plugins to install. If set, plugins cannot be manually installed.";
example = literalExpression "with pkgs.grafanaPlugins; [ grafana-piechart-panel ]";
# Make sure each plugin is added only once; otherwise building
# the link farm fails, since the same path is added multiple
@@ -313,13 +313,13 @@ in
package = mkPackageOption pkgs "grafana" { };
dataDir = mkOption {
- description = lib.mdDoc "Data directory.";
+ description = "Data directory.";
default = "/var/lib/grafana";
type = types.path;
};
settings = mkOption {
- description = lib.mdDoc ''
+ description = ''
Grafana settings. See
for available options. INI format is used.
'';
@@ -329,14 +329,14 @@ in
options = {
paths = {
plugins = mkOption {
- description = lib.mdDoc "Directory where grafana will automatically scan and look for plugins";
+ description = "Directory where grafana will automatically scan and look for plugins";
default = if (cfg.declarativePlugins == null) then "${cfg.dataDir}/plugins" else declarativePlugins;
defaultText = literalExpression "if (cfg.declarativePlugins == null) then \"\${cfg.dataDir}/plugins\" else declarativePlugins";
type = types.path;
};
provisioning = mkOption {
- description = lib.mdDoc ''
+ description = ''
Folder that contains provisioning config files that grafana will apply on startup and while running.
Don't change the value of this option if you are planning to use `services.grafana.provision` options.
'';
@@ -348,7 +348,7 @@ in
server = {
protocol = mkOption {
- description = lib.mdDoc "Which protocol to listen.";
+ description = "Which protocol to listen.";
default = "http";
type = types.enum [ "http" "https" "h2" "socket" ];
};
@@ -356,7 +356,7 @@ in
http_addr = mkOption {
type = types.str;
default = "127.0.0.1";
- description = lib.mdDoc ''
+ description = ''
Listening address.
::: {.note}
@@ -366,13 +366,13 @@ in
};
http_port = mkOption {
- description = lib.mdDoc "Listening port.";
+ description = "Listening port.";
default = 3000;
type = types.port;
};
domain = mkOption {
- description = lib.mdDoc ''
+ description = ''
The public facing domain name used to access grafana from a browser.
This setting is only used in the default value of the `root_url` setting.
@@ -383,7 +383,7 @@ in
};
enforce_domain = mkOption {
- description = lib.mdDoc ''
+ description = ''
Redirect to correct domain if the host header does not match the domain.
Prevents DNS rebinding attacks.
'';
@@ -392,7 +392,7 @@ in
};
root_url = mkOption {
- description = lib.mdDoc ''
+ description = ''
This is the full URL used to access Grafana from a web browser.
This is important if you use Google or GitHub OAuth authentication (for the callback URL to be correct).
@@ -404,7 +404,7 @@ in
};
serve_from_sub_path = mkOption {
- description = lib.mdDoc ''
+ description = ''
Serve Grafana from subpath specified in the `root_url` setting.
By default it is set to `false` for compatibility reasons.
@@ -418,7 +418,7 @@ in
};
router_logging = mkOption {
- description = lib.mdDoc ''
+ description = ''
Set to `true` for Grafana to log all HTTP requests (not just errors).
These are logged as Info level events to the Grafana log.
'';
@@ -427,14 +427,14 @@ in
};
static_root_path = mkOption {
- description = lib.mdDoc "Root path for static assets.";
+ description = "Root path for static assets.";
default = "${cfg.package}/share/grafana/public";
defaultText = literalExpression ''"''${package}/share/grafana/public"'';
type = types.str;
};
enable_gzip = mkOption {
- description = lib.mdDoc ''
+ description = ''
Set this option to `true` to enable HTTP compression, this can improve transfer speed and bandwidth utilization.
It is recommended that most users set it to `true`. By default it is set to `false` for compatibility reasons.
'';
@@ -443,7 +443,7 @@ in
};
cert_file = mkOption {
- description = lib.mdDoc ''
+ description = ''
Path to the certificate file (if `protocol` is set to `https` or `h2`).
'';
default = null;
@@ -451,7 +451,7 @@ in
};
cert_key = mkOption {
- description = lib.mdDoc ''
+ description = ''
Path to the certificate key file (if `protocol` is set to `https` or `h2`).
'';
default = null;
@@ -459,7 +459,7 @@ in
};
socket_gid = mkOption {
- description = lib.mdDoc ''
+ description = ''
GID where the socket should be set when `protocol=socket`.
Make sure that the target group is in the group of Grafana process and that Grafana process is the file owner before you change this setting.
It is recommended to set the gid as http server user gid.
@@ -470,7 +470,7 @@ in
};
socket_mode = mkOption {
- description = lib.mdDoc ''
+ description = ''
Mode where the socket should be set when `protocol=socket`.
Make sure that Grafana process is the file owner before you change this setting.
'';
@@ -482,7 +482,7 @@ in
};
socket = mkOption {
- description = lib.mdDoc ''
+ description = ''
Path where the socket should be created when `protocol=socket`.
Make sure that Grafana has appropriate permissions before you change this setting.
'';
@@ -491,7 +491,7 @@ in
};
cdn_url = mkOption {
- description = lib.mdDoc ''
+ description = ''
Specify a full HTTP URL address to the root of your Grafana CDN assets.
Grafana will add edition and version paths.
@@ -503,7 +503,7 @@ in
};
read_timeout = mkOption {
- description = lib.mdDoc ''
+ description = ''
Sets the maximum time using a duration format (5s/5m/5ms)
before timing out read of an incoming request and closing idle connections.
0 means there is no timeout for reading the request.
@@ -515,13 +515,13 @@ in
database = {
type = mkOption {
- description = lib.mdDoc "Database type.";
+ description = "Database type.";
default = "sqlite3";
type = types.enum [ "mysql" "sqlite3" "postgres" ];
};
host = mkOption {
- description = lib.mdDoc ''
+ description = ''
Only applicable to MySQL or Postgres.
Includes IP or hostname and port or in case of Unix sockets the path to it.
For example, for MySQL running on the same host as Grafana: `host = "127.0.0.1:3306"`
@@ -532,19 +532,19 @@ in
};
name = mkOption {
- description = lib.mdDoc "The name of the Grafana database.";
+ description = "The name of the Grafana database.";
default = "grafana";
type = types.str;
};
user = mkOption {
- description = lib.mdDoc "The database user (not applicable for `sqlite3`).";
+ description = "The database user (not applicable for `sqlite3`).";
default = "root";
type = types.str;
};
password = mkOption {
- description = lib.mdDoc ''
+ description = ''
The database user's password (not applicable for `sqlite3`).
Please note that the contents of this option
@@ -558,19 +558,19 @@ in
};
max_idle_conn = mkOption {
- description = lib.mdDoc "The maximum number of connections in the idle connection pool.";
+ description = "The maximum number of connections in the idle connection pool.";
default = 2;
type = types.int;
};
max_open_conn = mkOption {
- description = lib.mdDoc "The maximum number of open connections to the database.";
+ description = "The maximum number of open connections to the database.";
default = 0;
type = types.int;
};
conn_max_lifetime = mkOption {
- description = lib.mdDoc ''
+ description = ''
Sets the maximum amount of time a connection may be reused.
The default is 14400 (which means 14400 seconds or 4 hours).
For MySQL, this setting should be shorter than the `wait_timeout` variable.
@@ -580,7 +580,7 @@ in
};
locking_attempt_timeout_sec = mkOption {
- description = lib.mdDoc ''
+ description = ''
For `mysql`, if the `migrationLocking` feature toggle is set,
specify the time (in seconds) to wait before failing to lock the database for the migrations.
'';
@@ -589,13 +589,13 @@ in
};
log_queries = mkOption {
- description = lib.mdDoc "Set to `true` to log the sql calls and execution times";
+ description = "Set to `true` to log the sql calls and execution times";
default = false;
type = types.bool;
};
ssl_mode = mkOption {
- description = lib.mdDoc ''
+ description = ''
For Postgres, use either `disable`, `require` or `verify-full`.
For MySQL, use either `true`, `false`, or `skip-verify`.
'';
@@ -604,7 +604,7 @@ in
};
isolation_level = mkOption {
- description = lib.mdDoc ''
+ description = ''
Only the MySQL driver supports isolation levels in Grafana.
In case the value is empty, the driver's default isolation level is applied.
'';
@@ -613,25 +613,25 @@ in
};
ca_cert_path = mkOption {
- description = lib.mdDoc "The path to the CA certificate to use.";
+ description = "The path to the CA certificate to use.";
default = null;
type = types.nullOr types.str;
};
client_key_path = mkOption {
- description = lib.mdDoc "The path to the client key. Only if server requires client authentication.";
+ description = "The path to the client key. Only if server requires client authentication.";
default = null;
type = types.nullOr types.str;
};
client_cert_path = mkOption {
- description = lib.mdDoc "The path to the client cert. Only if server requires client authentication.";
+ description = "The path to the client cert. Only if server requires client authentication.";
default = null;
type = types.nullOr types.str;
};
server_cert_name = mkOption {
- description = lib.mdDoc ''
+ description = ''
The common name field of the certificate used by the `mysql` or `postgres` server.
Not necessary if `ssl_mode` is set to `skip-verify`.
'';
@@ -640,14 +640,14 @@ in
};
path = mkOption {
- description = lib.mdDoc "Only applicable to `sqlite3` database. The file path where the database will be stored.";
+ description = "Only applicable to `sqlite3` database. The file path where the database will be stored.";
default = "${cfg.dataDir}/data/grafana.db";
defaultText = literalExpression ''"''${config.${opt.dataDir}}/data/grafana.db"'';
type = types.path;
};
cache_mode = mkOption {
- description = lib.mdDoc ''
+ description = ''
For `sqlite3` only.
[Shared cache](https://www.sqlite.org/sharedcache.html) setting used for connecting to the database.
'';
@@ -656,7 +656,7 @@ in
};
wal = mkOption {
- description = lib.mdDoc ''
+ description = ''
For `sqlite3` only.
Setting to enable/disable [Write-Ahead Logging](https://sqlite.org/wal.html).
'';
@@ -665,7 +665,7 @@ in
};
query_retries = mkOption {
- description = lib.mdDoc ''
+ description = ''
This setting applies to `sqlite3` only and controls the number of times the system retries a query when the database is locked.
'';
default = 0;
@@ -673,7 +673,7 @@ in
};
transaction_retries = mkOption {
- description = lib.mdDoc ''
+ description = ''
This setting applies to `sqlite3` only and controls the number of times the system retries a transaction when the database is locked.
'';
default = 5;
@@ -682,7 +682,7 @@ in
# TODO Add "instrument_queries" option when upgrading to grafana 10.0
# instrument_queries = mkOption {
- # description = lib.mdDoc "Set to `true` to add metrics and tracing for database queries.";
+ # description = "Set to `true` to add metrics and tracing for database queries.";
# default = false;
# type = types.bool;
# };
@@ -690,19 +690,19 @@ in
security = {
disable_initial_admin_creation = mkOption {
- description = lib.mdDoc "Disable creation of admin user on first start of Grafana.";
+ description = "Disable creation of admin user on first start of Grafana.";
default = false;
type = types.bool;
};
admin_user = mkOption {
- description = lib.mdDoc "Default admin username.";
+ description = "Default admin username.";
default = "admin";
type = types.str;
};
admin_password = mkOption {
- description = lib.mdDoc ''
+ description = ''
Default admin password. Please note that the contents of this option
will end up in a world-readable Nix store. Use the file provider
pointing at a reasonably secured file in the local filesystem
@@ -714,13 +714,13 @@ in
};
admin_email = mkOption {
- description = lib.mdDoc "The email of the default Grafana Admin, created on startup.";
+ description = "The email of the default Grafana Admin, created on startup.";
default = "admin@localhost";
type = types.str;
};
secret_key = mkOption {
- description = lib.mdDoc ''
+ description = ''
Secret key used for signing. Please note that the contents of this option
will end up in a world-readable Nix store. Use the file provider
pointing at a reasonably secured file in the local filesystem
@@ -732,13 +732,13 @@ in
};
disable_gravatar = mkOption {
- description = lib.mdDoc "Set to `true` to disable the use of Gravatar for user profile images.";
+ description = "Set to `true` to disable the use of Gravatar for user profile images.";
default = false;
type = types.bool;
};
data_source_proxy_whitelist = mkOption {
- description = lib.mdDoc ''
+ description = ''
Define a whitelist of allowed IP addresses or domains, with ports,
to be used in data source URLs with the Grafana data source proxy.
Format: `ip_or_domain:port` separated by spaces.
@@ -749,19 +749,19 @@ in
};
disable_brute_force_login_protection = mkOption {
- description = lib.mdDoc "Set to `true` to disable [brute force login protection](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html#account-lockout).";
+ description = "Set to `true` to disable [brute force login protection](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html#account-lockout).";
default = false;
type = types.bool;
};
cookie_secure = mkOption {
- description = lib.mdDoc "Set to `true` if you host Grafana behind HTTPS.";
+ description = "Set to `true` if you host Grafana behind HTTPS.";
default = false;
type = types.bool;
};
cookie_samesite = mkOption {
- description = lib.mdDoc ''
+ description = ''
Sets the `SameSite` cookie attribute and prevents the browser from sending this cookie along with cross-site requests.
The main goal is to mitigate the risk of cross-origin information leakage.
This setting also provides some protection against cross-site request forgery attacks (CSRF),
@@ -773,7 +773,7 @@ in
};
allow_embedding = mkOption {
- description = lib.mdDoc ''
+ description = ''
When `false`, the HTTP header `X-Frame-Options: deny` will be set in Grafana HTTP responses
which will instruct browsers to not allow rendering Grafana in a ` `, `