mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-06 05:13:37 +00:00
Compare commits
28 Commits
haskell-up
...
r-updates
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
476399fb33 | ||
|
|
1d7a5c4a40 | ||
|
|
6f46fbd12c | ||
|
|
5a36e09add | ||
|
|
ee7a29379b | ||
|
|
4389f0263b | ||
|
|
513d50ef4a | ||
|
|
a8cb43260b | ||
|
|
7494fc7744 | ||
|
|
4d6b55a1c9 | ||
|
|
6513602344 | ||
|
|
80cfb6fe57 | ||
|
|
22ffe0a4ba | ||
|
|
208a93bc94 | ||
|
|
9ae23a4d52 | ||
|
|
2f5857b93e | ||
|
|
15672e349c | ||
|
|
56dec1ba0d | ||
|
|
06437cadfd | ||
|
|
37edf38e79 | ||
|
|
2ad1656d06 | ||
|
|
79bcae29d4 | ||
|
|
22d8ed93f3 | ||
|
|
a52facf1eb | ||
|
|
a4664b8196 | ||
|
|
8ee070ca0c | ||
|
|
c8c8e732c7 | ||
|
|
bf309d01a0 |
3
.github/ISSUE_TEMPLATE/01_bug_report.yml
vendored
3
.github/ISSUE_TEMPLATE/01_bug_report.yml
vendored
@@ -36,7 +36,8 @@ body:
|
||||
options:
|
||||
- "Please select a version."
|
||||
- "- Unstable (26.11)"
|
||||
- "- Stable (26.05)"
|
||||
- "- Beta (26.05)"
|
||||
- "- Stable (25.11)"
|
||||
default: 0
|
||||
validations:
|
||||
required: true
|
||||
|
||||
@@ -36,7 +36,8 @@ body:
|
||||
options:
|
||||
- "Please select a version."
|
||||
- "- Unstable (26.11)"
|
||||
- "- Stable (26.05)"
|
||||
- "- Beta (26.05)"
|
||||
- "- Stable (25.11)"
|
||||
default: 0
|
||||
validations:
|
||||
required: true
|
||||
@@ -99,7 +100,7 @@ body:
|
||||
attributes:
|
||||
label: "Are you using nix-darwin?"
|
||||
description: |
|
||||
[`nix-darwin`](https://github.com/nix-darwin/nix-darwin) is a set of NixOS-like modules for macOS systems. Depending on your issue, this information may be relevant.
|
||||
[`nix-darwin`](https://github.com/LnL7/nix-darwin) is a set of NixOS-like modules for macOS systems. Depending on your issue, this information may be relevant.
|
||||
options:
|
||||
- "Yes, I am using nix-darwin."
|
||||
- "No, I am not using nix-darwin."
|
||||
|
||||
@@ -36,7 +36,8 @@ body:
|
||||
options:
|
||||
- "Please select a version."
|
||||
- "- Unstable (26.11)"
|
||||
- "- Stable (26.05)"
|
||||
- "- Beta (26.05)"
|
||||
- "- Stable (25.11)"
|
||||
default: 0
|
||||
validations:
|
||||
required: true
|
||||
|
||||
3
.github/ISSUE_TEMPLATE/04_build_failure.yml
vendored
3
.github/ISSUE_TEMPLATE/04_build_failure.yml
vendored
@@ -38,7 +38,8 @@ body:
|
||||
options:
|
||||
- "Please select a version."
|
||||
- "- Unstable (26.11)"
|
||||
- "- Stable (26.05)"
|
||||
- "- Beta (26.05)"
|
||||
- "- Stable (25.11)"
|
||||
default: 0
|
||||
validations:
|
||||
required: true
|
||||
|
||||
3
.github/ISSUE_TEMPLATE/05_update_request.yml
vendored
3
.github/ISSUE_TEMPLATE/05_update_request.yml
vendored
@@ -38,7 +38,8 @@ body:
|
||||
options:
|
||||
- "Please select a version."
|
||||
- "- Unstable (26.11)"
|
||||
- "- Stable (26.05)"
|
||||
- "- Beta (26.05)"
|
||||
- "- Stable (25.11)"
|
||||
default: 0
|
||||
validations:
|
||||
required: true
|
||||
|
||||
3
.github/ISSUE_TEMPLATE/06_module_request.yml
vendored
3
.github/ISSUE_TEMPLATE/06_module_request.yml
vendored
@@ -36,7 +36,8 @@ body:
|
||||
options:
|
||||
- "Please select a version."
|
||||
- "- Unstable (26.11)"
|
||||
- "- Stable (26.05)"
|
||||
- "- Beta (26.05)"
|
||||
- "- Stable (25.11)"
|
||||
default: 0
|
||||
validations:
|
||||
required: true
|
||||
|
||||
1
.github/labeler.yml
vendored
1
.github/labeler.yml
vendored
@@ -9,7 +9,6 @@
|
||||
- '^release-'
|
||||
- '^staging-\d'
|
||||
- '^staging-next-\d'
|
||||
- '^staging-nixos-\d'
|
||||
|
||||
# NOTE: bsd, darwin and cross-compilation labels are handled by ofborg
|
||||
"6.topic: agda":
|
||||
|
||||
6
.github/workflows/backport.yml
vendored
6
.github/workflows/backport.yml
vendored
@@ -21,7 +21,7 @@ defaults:
|
||||
jobs:
|
||||
backport:
|
||||
name: Backport Pull Request
|
||||
if: vars.NIXPKGS_CI_CLIENT_ID && github.event.pull_request.merged == true && (github.event.action != 'labeled' || startsWith(github.event.label.name, 'backport'))
|
||||
if: vars.NIXPKGS_CI_APP_ID && github.event.pull_request.merged == true && (github.event.action != 'labeled' || startsWith(github.event.label.name, 'backport'))
|
||||
runs-on: ubuntu-slim
|
||||
timeout-minutes: 3
|
||||
steps:
|
||||
@@ -30,13 +30,13 @@ jobs:
|
||||
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
||||
id: app-token
|
||||
with:
|
||||
client-id: ${{ vars.NIXPKGS_CI_CLIENT_ID }}
|
||||
app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
|
||||
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
|
||||
permission-contents: write
|
||||
permission-pull-requests: write
|
||||
permission-workflows: write
|
||||
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
6
.github/workflows/bot.yml
vendored
6
.github/workflows/bot.yml
vendored
@@ -46,7 +46,7 @@ jobs:
|
||||
# https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout: |
|
||||
@@ -57,10 +57,10 @@ jobs:
|
||||
|
||||
# Use a GitHub App, because it has much higher rate limits: 12,500 instead of 5,000 req / hour.
|
||||
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
||||
if: github.event_name != 'pull_request' && vars.NIXPKGS_CI_CLIENT_ID
|
||||
if: github.event_name != 'pull_request' && vars.NIXPKGS_CI_APP_ID
|
||||
id: app-token
|
||||
with:
|
||||
client-id: ${{ vars.NIXPKGS_CI_CLIENT_ID }}
|
||||
app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
|
||||
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
|
||||
permission-administration: read
|
||||
permission-contents: write
|
||||
|
||||
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -52,7 +52,7 @@ jobs:
|
||||
runs-on: ${{ matrix.runner }}
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout: .github/actions
|
||||
|
||||
6
.github/workflows/check.yml
vendored
6
.github/workflows/check.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
runs-on: ubuntu-slim
|
||||
timeout-minutes: 3
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
path: trusted
|
||||
@@ -95,7 +95,7 @@ jobs:
|
||||
runs-on: ubuntu-slim
|
||||
timeout-minutes: 3
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
path: trusted
|
||||
@@ -137,7 +137,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout: .github/actions
|
||||
|
||||
6
.github/workflows/comment.yml
vendored
6
.github/workflows/comment.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
timeout-minutes: 2
|
||||
if: contains(github.event.comment.body, '@NixOS/nixpkgs-merge-bot merge')
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout: |
|
||||
@@ -31,10 +31,10 @@ jobs:
|
||||
|
||||
# Use the GitHub App to make sure the reaction happens with the same user who will later merge.
|
||||
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
||||
if: github.event_name != 'pull_request' && vars.NIXPKGS_CI_CLIENT_ID
|
||||
if: github.event_name != 'pull_request' && vars.NIXPKGS_CI_APP_ID
|
||||
id: app-token
|
||||
with:
|
||||
client-id: ${{ vars.NIXPKGS_CI_CLIENT_ID }}
|
||||
app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
|
||||
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
|
||||
permission-pull-requests: write
|
||||
|
||||
|
||||
2
.github/workflows/edited.yml
vendored
2
.github/workflows/edited.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
||||
id: app-token
|
||||
with:
|
||||
client-id: ${{ vars.NIXPKGS_CI_CLIENT_ID }}
|
||||
app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
|
||||
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
|
||||
permission-pull-requests: write
|
||||
|
||||
|
||||
10
.github/workflows/eval.yml
vendored
10
.github/workflows/eval.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
ciPinBumpCommit: ${{ steps.find-pinned-commit.outputs.ciPinBumpCommit }}
|
||||
ciPinBumpCommitShort: ${{ steps.find-pinned-commit.outputs.ciPinBumpCommitShort }}
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
path: trusted
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
ci/supportedVersions.nix
|
||||
|
||||
- name: Check out the PR at the test merge commit
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
ref: ${{ inputs.mergedSha }}
|
||||
@@ -171,7 +171,7 @@ jobs:
|
||||
sudo mkswap /swap
|
||||
sudo swapon /swap
|
||||
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout: .github/actions
|
||||
@@ -256,7 +256,7 @@ jobs:
|
||||
statuses: write # creating 'Eval Summary' commit statuses
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout: .github/actions
|
||||
@@ -471,7 +471,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout: .github/actions
|
||||
|
||||
8
.github/workflows/lint.yml
vendored
8
.github/workflows/lint.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout: .github/actions
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout: .github/actions
|
||||
@@ -90,7 +90,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout: .github/actions
|
||||
@@ -134,7 +134,7 @@ jobs:
|
||||
runs-on: ubuntu-slim
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: true # Needed to run git fetch for large PRs.
|
||||
path: trusted
|
||||
|
||||
2
.github/workflows/merge-group.yml
vendored
2
.github/workflows/merge-group.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
targetSha: ${{ steps.prepare.outputs.targetSha }}
|
||||
systems: ${{ steps.prepare.outputs.systems }}
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout: |
|
||||
|
||||
37
.github/workflows/periodic-merge-24h.yml
vendored
37
.github/workflows/periodic-merge-24h.yml
vendored
@@ -22,7 +22,7 @@ defaults:
|
||||
|
||||
jobs:
|
||||
periodic-merge:
|
||||
if: github.repository_owner == 'NixOS' || github.event_name == 'workflow_dispatch'
|
||||
if: github.repository_owner == 'NixOS'
|
||||
strategy:
|
||||
# don't fail fast, so that all pairs are tried
|
||||
fail-fast: false
|
||||
@@ -35,14 +35,10 @@ jobs:
|
||||
into: staging-next-25.11
|
||||
- from: staging-next-25.11
|
||||
into: staging-25.11
|
||||
- from: release-25.11
|
||||
into: staging-nixos-25.11
|
||||
- from: release-26.05
|
||||
into: staging-next-26.05
|
||||
- from: staging-next-26.05
|
||||
into: staging-26.05
|
||||
- from: release-26.05
|
||||
into: staging-nixos-26.05
|
||||
- name: merge-base(master,staging) → haskell-updates
|
||||
from: master staging
|
||||
into: haskell-updates
|
||||
@@ -53,34 +49,3 @@ jobs:
|
||||
name: ${{ matrix.pairs.name || format('{0} → {1}', matrix.pairs.from, matrix.pairs.into) }}
|
||||
secrets:
|
||||
NIXPKGS_CI_APP_PRIVATE_KEY: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
|
||||
|
||||
# Resets the target branch of the current haskell-updates PR.
|
||||
# This makes GitHub hide all the commits that are already part of staging and gives us a much clearer PR view.
|
||||
haskell-updates:
|
||||
needs: periodic-merge
|
||||
runs-on: ubuntu-slim
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Find PR and update target branch
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
script: |
|
||||
// There will at most be a single haskell-updates PR anyway, so no need to paginate.
|
||||
await Promise.all(
|
||||
(
|
||||
await github.rest.pulls.list({
|
||||
...context.repo,
|
||||
state: 'open',
|
||||
head: `${context.repo.owner}:haskell-updates`,
|
||||
})
|
||||
).data.map((pr) =>
|
||||
github.rest.pulls.update({
|
||||
...context.repo,
|
||||
pull_number: pr.number,
|
||||
// Just updating to the same branch to trigger a UI update.
|
||||
// This is staging most of the time, but could be staging-next in rare cases.
|
||||
base: pr.base.ref,
|
||||
}),
|
||||
),
|
||||
)
|
||||
|
||||
2
.github/workflows/periodic-merge-6h.yml
vendored
2
.github/workflows/periodic-merge-6h.yml
vendored
@@ -22,7 +22,7 @@ defaults:
|
||||
|
||||
jobs:
|
||||
periodic-merge:
|
||||
if: github.repository_owner == 'NixOS' || github.event_name == 'workflow_dispatch'
|
||||
if: github.repository_owner == 'NixOS'
|
||||
strategy:
|
||||
# don't fail fast, so that all pairs are tried
|
||||
fail-fast: false
|
||||
|
||||
4
.github/workflows/periodic-merge.yml
vendored
4
.github/workflows/periodic-merge.yml
vendored
@@ -29,12 +29,12 @@ jobs:
|
||||
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
||||
id: app-token
|
||||
with:
|
||||
client-id: ${{ vars.NIXPKGS_CI_CLIENT_ID }}
|
||||
app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
|
||||
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
|
||||
permission-contents: write
|
||||
permission-pull-requests: write
|
||||
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
|
||||
2
.github/workflows/pull-request-target.yml
vendored
2
.github/workflows/pull-request-target.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
systems: ${{ steps.prepare.outputs.systems }}
|
||||
touched: ${{ steps.prepare.outputs.touched }}
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout-cone-mode: true # default, for clarity
|
||||
|
||||
6
.github/workflows/review.yml
vendored
6
.github/workflows/review.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
runs-on: ubuntu-slim
|
||||
timeout-minutes: 2
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout: |
|
||||
@@ -28,10 +28,10 @@ jobs:
|
||||
|
||||
# Use the GitHub App to make sure the reaction happens with the same user who will later merge.
|
||||
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
||||
if: github.event_name != 'pull_request' && vars.NIXPKGS_CI_CLIENT_ID
|
||||
if: github.event_name != 'pull_request' && vars.NIXPKGS_CI_APP_ID
|
||||
id: app-token
|
||||
with:
|
||||
client-id: ${{ vars.NIXPKGS_CI_CLIENT_ID }}
|
||||
app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
|
||||
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
|
||||
permission-pull-requests: write
|
||||
|
||||
|
||||
4
.github/workflows/teams.yml
vendored
4
.github/workflows/teams.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
||||
id: app-token
|
||||
with:
|
||||
client-id: ${{ vars.NIXPKGS_CI_CLIENT_ID }}
|
||||
app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
|
||||
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
|
||||
permission-administration: read
|
||||
permission-contents: write
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
permission-pull-requests: write
|
||||
|
||||
- name: Fetch source
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout: |
|
||||
|
||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
push: ${{ steps.files.outputs.push }}
|
||||
targetSha: ${{ steps.prepare.outputs.targetSha }}
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
sparse-checkout-cone-mode: true # default, for clarity
|
||||
|
||||
@@ -442,7 +442,6 @@ The staging workflow is used for all stable branches with corresponding names:
|
||||
- `master`/`release-YY.MM`
|
||||
- `staging`/`staging-YY.MM`
|
||||
- `staging-next`/`staging-next-YY.MM`
|
||||
- `staging-nixos`/`staging-nixos-YY.MM`
|
||||
|
||||
[^1]: Except changes that cause no more rebuilds than kernel updates
|
||||
|
||||
@@ -506,7 +505,7 @@ These PRs go to `staging-nixos`, see [the next section for more context](#change
|
||||
Changes causing a rebuild of all NixOS tests get a special [`10.rebuild-nixos-tests`](https://github.com/NixOS/nixpkgs/issues?q=state%3Aopen%20label%3A10.rebuild-nixos-tests) label.
|
||||
These changes pose a significant impact on the build infrastructure.
|
||||
|
||||
Hence, these PRs should either target a `staging`-branch or `staging-nixos`-branch, provided one of following conditions applies:
|
||||
Hence, these PRs should either target a `staging`-branch or `staging-nixos`, provided one of following conditions applies:
|
||||
|
||||
* The label `10.rebuild-nixos-tests` is set, or
|
||||
* The PR is a change affecting the Linux kernel.
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<a href="https://opencollective.com/nixos"><img src="https://opencollective.com/nixos/tiers/supporter/badge.svg?label=supporters&color=brightgreen" alt="Open Collective supporters" /></a>
|
||||
</p>
|
||||
|
||||
[Nixpkgs](https://github.com/nixos/nixpkgs) is a collection of over 140,000 software packages that can be installed with the [Nix](https://nixos.org/nix/) package manager.
|
||||
[Nixpkgs](https://github.com/nixos/nixpkgs) is a collection of over 120,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.
|
||||
|
||||
# Manuals
|
||||
@@ -47,9 +47,9 @@ Here are some of the main ones:
|
||||
Nixpkgs and NixOS are built and tested by our continuous integration system, [Hydra](https://hydra.nixos.org/).
|
||||
|
||||
* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
|
||||
* [Continuous package builds for the NixOS 26.05 release](https://hydra.nixos.org/jobset/nixos/release-26.05)
|
||||
* [Continuous package builds for the NixOS 25.11 release](https://hydra.nixos.org/jobset/nixos/release-25.11)
|
||||
* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
|
||||
* [Tests for the NixOS 26.05 release](https://hydra.nixos.org/job/nixos/release-26.05/tested#tabs-constituents)
|
||||
* [Tests for the NixOS 25.11 release](https://hydra.nixos.org/job/nixos/release-25.11/tested#tabs-constituents)
|
||||
|
||||
Artifacts successfully built with Hydra are published to cache at https://cache.nixos.org/.
|
||||
When successful build and test criteria are met, the Nixpkgs expressions are distributed via [Nix channels](https://nix.dev/manual/nix/stable/command-ref/nix-channel.html).
|
||||
|
||||
24
ci/OWNERS
24
ci/OWNERS
@@ -56,12 +56,6 @@
|
||||
/pkgs/top-level/splice.nix @Ericson2314
|
||||
/pkgs/top-level/release-cross.nix @Ericson2314
|
||||
/pkgs/top-level/by-name-overlay.nix @infinisil @philiptaron
|
||||
/pkgs/top-level/config.nix @jopejoe1
|
||||
/pkgs/top-level/make-tarball.nix @jopejoe1
|
||||
/pkgs/top-level/packages-config.nix @jopejoe1
|
||||
/pkgs/top-level/packages-info.nix @jopejoe1
|
||||
/pkgs/top-level/release-lib.nix @jopejoe1
|
||||
/pkgs/top-level/release.nix @jopejoe1
|
||||
/pkgs/stdenv @philiptaron @NixOS/stdenv
|
||||
/pkgs/stdenv/generic @Ericson2314 @NixOS/stdenv
|
||||
/pkgs/stdenv/generic/problems.nix @infinisil
|
||||
@@ -79,7 +73,6 @@
|
||||
|
||||
## Format generators/serializers
|
||||
/pkgs/pkgs-lib @Stunkymonkey @h7x4
|
||||
/pkgs/pkgs-lib/formats/json2x @Stunkymonkey @h7x4 @figsoda
|
||||
|
||||
# Nixpkgs build-support
|
||||
/pkgs/build-support/writers @lassulus
|
||||
@@ -131,7 +124,6 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @Artturin @Ericson2314 @lo
|
||||
|
||||
# NixOS integration test driver
|
||||
/nixos/lib/test-driver @tfc
|
||||
/nixos/lib/testing @tfc
|
||||
|
||||
# NixOS QEMU virtualisation
|
||||
/nixos/modules/virtualisation/qemu-vm.nix @raitobezarius
|
||||
@@ -196,6 +188,8 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @Artturin @Ericson2314 @lo
|
||||
/maintainers/scripts/update-python-libraries @mweinelt @natsukium
|
||||
/pkgs/by-name/up/update-python-libraries @mweinelt @natsukium
|
||||
/pkgs/development/interpreters/python @mweinelt @natsukium
|
||||
/pkgs/top-level/python-packages.nix @natsukium
|
||||
/pkgs/top-level/release-python.nix @natsukium
|
||||
|
||||
# CUDA
|
||||
/pkgs/top-level/cuda-packages.nix @NixOS/cuda-maintainers
|
||||
@@ -277,15 +271,15 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
|
||||
/lib/licenses @alyssais @emilazy @jopejoe1
|
||||
|
||||
# Qt
|
||||
/pkgs/development/libraries/qt-5 @K900 @NickCao @SuperSandro2000
|
||||
/pkgs/development/libraries/qt-6 @K900 @NickCao @SuperSandro2000
|
||||
/pkgs/development/libraries/qt-5 @K900 @NickCao @SuperSandro2000 @ttuegel
|
||||
/pkgs/development/libraries/qt-6 @K900 @NickCao @SuperSandro2000 @ttuegel
|
||||
|
||||
# KDE Frameworks 5
|
||||
/pkgs/development/libraries/kde-frameworks @K900 @NickCao @SuperSandro2000
|
||||
/pkgs/development/libraries/kde-frameworks @K900 @NickCao @SuperSandro2000 @ttuegel
|
||||
|
||||
# KDE / Plasma 6
|
||||
/pkgs/kde @K900 @NickCao @SuperSandro2000
|
||||
/maintainers/scripts/kde @K900 @NickCao @SuperSandro2000
|
||||
/pkgs/kde @K900 @NickCao @SuperSandro2000 @ttuegel
|
||||
/maintainers/scripts/kde @K900 @NickCao @SuperSandro2000 @ttuegel
|
||||
|
||||
# PostgreSQL and related stuff
|
||||
/pkgs/by-name/po/postgresqlTestHook @NixOS/postgres
|
||||
@@ -445,7 +439,6 @@ nixos/tests/forgejo.nix @adamcstephens @bendlas @christoph-heiss @
|
||||
/doc/languages-frameworks/javascript.section.md @winterqt
|
||||
/pkgs/development/tools/pnpm @Scrumplex @gepbird
|
||||
/pkgs/build-support/node/fetch-pnpm-deps @Scrumplex @gepbird
|
||||
/pkgs/test/pnpm @Scrumplex @gepbird
|
||||
|
||||
# OCaml
|
||||
/pkgs/build-support/ocaml @ulrikstrid
|
||||
@@ -533,6 +526,3 @@ pkgs/by-name/wa/warp-terminal/ @emilytrau @imadnyc @FlameFlag @johnrtitor
|
||||
# Radicle
|
||||
/pkgs/build-support/fetchradicle/ @NixOS/radicle
|
||||
/pkgs/build-support/fetchradiclepatch/ @NixOS/radicle
|
||||
|
||||
# Zellij plugins
|
||||
/pkgs/by-name/ze/zellij/plugins/ @PerchunPak
|
||||
|
||||
@@ -102,8 +102,9 @@ async function checkTargetBranch({ github, context, core, dry }) {
|
||||
changed.attrdiff.changed.includes('nixosTests.simple-container') ||
|
||||
changed.attrdiff.changed.includes('nixosTests.simple-vm')
|
||||
|
||||
// https://github.com/NixOS/nixpkgs/pull/521157
|
||||
// These should go to master and release-xx.xx when backported
|
||||
// https://github.com/NixOS/nixpkgs/pull/481205#issuecomment-3790123921
|
||||
// These should go to staging-nixos instead of master,
|
||||
// but release-xx.xx (not staging-xx.xx) when backported
|
||||
let isExemptKernelUpdate = false
|
||||
if (prInfo.changed_files === 1) {
|
||||
const changedFiles = (
|
||||
@@ -114,8 +115,11 @@ async function checkTargetBranch({ github, context, core, dry }) {
|
||||
).data
|
||||
isExemptKernelUpdate =
|
||||
changedFiles.length === 1 &&
|
||||
changedFiles[0].filename ===
|
||||
'pkgs/os-specific/linux/kernel/xanmod-kernels.nix'
|
||||
(changedFiles[0].filename ===
|
||||
'pkgs/os-specific/linux/kernel/xanmod-kernels.nix' ||
|
||||
(base.startsWith('release-') &&
|
||||
changedFiles[0].filename ===
|
||||
'pkgs/os-specific/linux/kernel/kernels-org.json'))
|
||||
}
|
||||
|
||||
// https://github.com/NixOS/nixpkgs/pull/483194#issuecomment-3793393218
|
||||
@@ -160,10 +164,8 @@ async function checkTargetBranch({ github, context, core, dry }) {
|
||||
branchText = '(probably either `staging-nixos` or `staging`)'
|
||||
} else if (base === 'master') {
|
||||
branchText = '(probably `staging-nixos`)'
|
||||
} else if (maxRebuildCount >= 500) {
|
||||
branchText = `(probably either \`staging-nixos-${split(base).version}\` or \`staging-${split(base).version}\`)`
|
||||
} else {
|
||||
branchText = `(probably \`staging-nixos-${split(base).version}\`)`
|
||||
branchText = `(probably \`staging-${split(base).version}\`)`
|
||||
}
|
||||
const body = [
|
||||
`The PR's base branch is set to \`${base}\`, but this PR rebuilds all NixOS tests.`,
|
||||
|
||||
@@ -207,8 +207,6 @@ When needed, each convention explains why it exists, so you can make a decision
|
||||
Note that these conventions are about the **structure** of the manual (and its source files), not about the content that goes in it.
|
||||
You, as the writer of documentation, are still in charge of its content.
|
||||
|
||||
**For prose style, see the [documentation styleguide](./styleguide.md).**
|
||||
|
||||
### One sentence per line
|
||||
|
||||
Put each sentence in its own line.
|
||||
@@ -221,16 +219,17 @@ When changing existing content, update formatting if possible, but avoid excessi
|
||||
|
||||
### Examples first
|
||||
|
||||
Put examples before detailed explanations (see the [styleguide](./styleguide.md) for the rationale).
|
||||
Readers look at examples first: an example communicates what something does faster than a description.
|
||||
Put examples before detailed explanations.
|
||||
|
||||
Use this structure for each documented item:
|
||||
Prefer this structure for each documented item:
|
||||
|
||||
1. Title
|
||||
2. Abstract (optional, one sentence max)
|
||||
2. Abstract (optional, one sentence max, the example often speaks for itself)
|
||||
3. Example
|
||||
4. Explanation (details, edge cases, types, defaults)
|
||||
|
||||
Rendered example:
|
||||
For instance:
|
||||
|
||||
````markdown
|
||||
## `lib.toUpper`
|
||||
@@ -282,9 +281,11 @@ Returns the difference as a number.
|
||||
|
||||
Use the [admonition syntax](#admonitions) for callouts and examples.
|
||||
|
||||
### `callPackage`-compatible examples
|
||||
### Provide self-contained examples
|
||||
|
||||
Provide at least one example per function.
|
||||
Provide at least one example per function, and make examples self-contained.
|
||||
This is easier to understand for beginners.
|
||||
It also helps with testing that it actually works – especially once we introduce automation.
|
||||
|
||||
Example code should be such that it can be passed to `pkgs.callPackage`.
|
||||
Instead of something like:
|
||||
|
||||
@@ -37,7 +37,6 @@ npm-install-hook.section.md
|
||||
patch-rc-path-hooks.section.md
|
||||
perl.section.md
|
||||
pkg-config.section.md
|
||||
pnpm.section.md
|
||||
postgresql-test-hook.section.md
|
||||
premake.section.md
|
||||
python.section.md
|
||||
@@ -49,7 +48,6 @@ unzip.section.md
|
||||
validatePkgConfig.section.md
|
||||
versionCheckHook.section.md
|
||||
waf.section.md
|
||||
writable-tmpdir-as-home-hook.section.md
|
||||
zig.section.md
|
||||
xcbuild.section.md
|
||||
xfce4-dev-tools.section.md
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
# pnpmBuildHook {#pnpm-build-hook}
|
||||
|
||||
[pnpm](https://pnpm.io/) is a an NPM-compatible package manager focused on increasing managment speeds, and reducing disk space.
|
||||
|
||||
The `pnpmBuildHook` in Nixpkgs overrides the default build phase for building packages that use pnpm.
|
||||
|
||||
:::{.example #ex-pnpm-build-hook}
|
||||
## pnpmBuildHook example code snippet {#pnpm-build-hook-code-snippet}
|
||||
|
||||
```
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchPnpmDeps,
|
||||
pnpmConfigHook,
|
||||
pnpmBuildHook,
|
||||
makeBinaryWrapper,
|
||||
pnpm_10,
|
||||
}:
|
||||
let
|
||||
pnpm = pnpm_10;
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "coolPackages";
|
||||
version = "1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "JaneCool";
|
||||
repo = "coolpackage";
|
||||
tag = finalAttrs.version;
|
||||
hash = lib.fakeHash;
|
||||
};
|
||||
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
|
||||
pnpmDeps = fetchPnpmDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
inherit pnpm;
|
||||
fetcherversion = 4;
|
||||
hash = lib.fakeHash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pnpmConfigHook
|
||||
pnpmBuildHook
|
||||
makeBinaryWrapper
|
||||
];
|
||||
|
||||
pnpmBuildScript = "build";
|
||||
pnpmBuildFlags = [
|
||||
"--mode"
|
||||
"production"
|
||||
];
|
||||
pnpmWorkspaces = [
|
||||
"test"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir "$out"
|
||||
cp -r dist/. "$out"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "very cool package that does cool things";
|
||||
mainProgram = "cool";
|
||||
};
|
||||
})
|
||||
```
|
||||
:::
|
||||
|
||||
## Variables controlling pnpmBuildHook {#pnpm-build-hook-variables}
|
||||
|
||||
### pnpm Exclusive Variables {#pnpm-build-hook-exclusive-variables}
|
||||
|
||||
#### `pnpmBuildScript` {#pnpm-build-hook-script}
|
||||
|
||||
Controls the script ran to build the package, by default the script is `build`.
|
||||
|
||||
#### `pnpmFlags` {#pnpm-build-hook-flags}
|
||||
|
||||
Controls flags used for all invocations of pnpm across all hooks local to this derivation.
|
||||
|
||||
#### `pnpmBuildFlags` {#pnpm-build-hook-build-flags}
|
||||
|
||||
Controls the flags pass only to the pnpm build script invocation.
|
||||
|
||||
#### `dontPnpmBuild` {#pnpm-build-hook-dont}
|
||||
|
||||
Disables automatically running `pnpmBuildHook`. The build can still be run manually if needed, for example:
|
||||
|
||||
```
|
||||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
pnpmBuildHook,
|
||||
pnpmConfigHook,
|
||||
fetchPnpmDeps,
|
||||
emptyDirectory,
|
||||
pnpm_10,
|
||||
}:
|
||||
let
|
||||
pnpm = pnpm_10;
|
||||
in
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "super-fast-application";
|
||||
version = "1.0";
|
||||
|
||||
src = emptyDirectory;
|
||||
|
||||
cargoHash = lib.fakeHash;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pnpmBuildHook
|
||||
pnpmConfigHook
|
||||
];
|
||||
|
||||
pnpmDeps = fetchPnpmDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
inherit pnpm;
|
||||
fetcherversion = 3;
|
||||
hash = lib.fakeHash;
|
||||
}
|
||||
|
||||
dontPnpmBuild = true;
|
||||
postBuild = ''
|
||||
pnpmBuildHook
|
||||
'';
|
||||
})
|
||||
```
|
||||
|
||||
### Honored Variables {#pnpm-build-hook-honored-variables}
|
||||
|
||||
The following variables are honored by `pnpmBuildHook`.
|
||||
|
||||
* [`pnpmRoot`](#javascript-pnpm-sourceRoot)
|
||||
* [`pnpmWorkspaces`](#javascript-pnpm-workspaces)
|
||||
@@ -1,5 +0,0 @@
|
||||
# writableTmpDirAsHomeHook {#writableTmpDirAsHomeHook}
|
||||
|
||||
This setup hook provides a writable home directory for packages that require it.
|
||||
|
||||
To use, just add the hook to the `nativeBuildInputs` of the package.
|
||||
@@ -6,68 +6,46 @@ In this document and related Nix expressions, we use the term, _BEAM_, to descri
|
||||
|
||||
## Available versions and deprecations schedule {#available-versions-and-deprecations-schedule}
|
||||
|
||||
### Erlang OTP {#erlang}
|
||||
|
||||
Nixpkgs follows upstream Erlang in their [support lifecycle](https://erlang.org/download/otp_versions_tree.html) and keeps up to the last 3 released versions of Erlang available. Due to upstream and NixOS release timings, this may mean removal of the oldest release prior to upstream fully dropping support.
|
||||
|
||||
### Elixir {#elixir}
|
||||
|
||||
Nixpkgs follows the [official elixir deprecation schedule](https://hexdocs.pm/elixir/compatibility-and-deprecations.html) and keeps up to the last 5 released versions of Elixir available.
|
||||
Nixpkgs follows the [official elixir deprecation schedule](https://hexdocs.pm/elixir/compatibility-and-deprecations.html) and keeps the last 5 released versions of Elixir available.
|
||||
|
||||
## Structure {#beam-structure}
|
||||
|
||||
All BEAM-related expressions are available via top-level package sets. It is recommended to work with a single package set to ensure consistent versions.
|
||||
All BEAM-related expressions are available via the top-level `beam` attribute, which includes:
|
||||
|
||||
- `beamPackages` - default OTP version
|
||||
- `beamMinimalPackages` - default OTP version, without wxwidgets, which saves ~1GB in closure size
|
||||
- `interpreters`: a set of compilers running on the BEAM, including multiple Erlang/OTP versions (`beam.interpreters.erlang_22`, etc), Elixir (`beam.interpreters.elixir`) and LFE (Lisp Flavoured Erlang) (`beam.interpreters.lfe`).
|
||||
|
||||
There are also OTP version specific package sets, e.g. for OTP 28:
|
||||
- `packages`: a set of package builders (Mix and rebar3), each compiled with a specific Erlang/OTP version, e.g. `beam.packages.erlang22`.
|
||||
|
||||
- `beam28Packages`
|
||||
- `beamMinimal28Packages`
|
||||
The default Erlang compiler, defined by `beam.interpreters.erlang`, is aliased as `erlang`. The default BEAM package set is defined by `beam.packages.erlang` and aliased at the top level as `beamPackages`.
|
||||
|
||||
Inside each package set are:
|
||||
To create a package builder built with a custom Erlang version, use the lambda, `beam.packagesWith`, which accepts an Erlang/OTP derivation and produces a package builder similar to `beam.packages.erlang`.
|
||||
|
||||
- erlang itself (version comes from package set)
|
||||
- interpreters: elixir (multiple versions, e.g. elixir_1_18) and lfe
|
||||
- packages: rebar3, hex, etc
|
||||
- builders: mixRelease, buildRebar3, etc
|
||||
- hooks: for composing builders and packages
|
||||
Many Erlang/OTP distributions available in `beam.interpreters` have versions with ODBC and/or Java enabled or without wx (no observer support). For example, there's `beam.interpreters.erlang_22_odbc_javac`, which corresponds to `beam.interpreters.erlang_22` and `beam.interpreters.erlang_22_nox`, which corresponds to `beam.interpreters.erlang_22`.
|
||||
|
||||
To use a non-default Elixir it's important to keep the rest of the package set consistent, so it's recommended to use `.extend`. This ensures that builders like `mixRelease`, `fetchMixDeps`, and `buildMix` all pick up the overridden Elixir:
|
||||
## Build Tools {#build-tools}
|
||||
|
||||
```nix
|
||||
let
|
||||
beamPackages = beam27Packages.extend (self: super: { elixir = self.elixir_1_18; });
|
||||
in
|
||||
beamPackages.mixRelease {
|
||||
# ...
|
||||
}
|
||||
```
|
||||
### Rebar3 {#build-tools-rebar3}
|
||||
|
||||
## Build Tools {#beam-build-tools}
|
||||
We provide a version of Rebar3, under `rebar3`. We also provide a helper to fetch Rebar3 dependencies from a lockfile under `fetchRebar3Deps`.
|
||||
|
||||
### Rebar3 {#beam-build-tools-rebar3}
|
||||
|
||||
We provide a version of Rebar3, under `beamPackages.rebar3`. We also provide a helper to fetch Rebar3 dependencies from a lockfile under `beamPackages.fetchRebar3Deps`.
|
||||
|
||||
We also provide a version on Rebar3 with plugins included, under `beamPackages.rebar3WithPlugins`. This package is a function which takes two arguments: `plugins`, a list of nix derivations to include as plugins (loaded only when specified in `rebar.config`), and `globalPlugins`, which should always be loaded by rebar3. Example: `beamPackages.rebar3WithPlugins { globalPlugins = [beamPackages.pc]; }`.
|
||||
We also provide a version on Rebar3 with plugins included, under `rebar3WithPlugins`. This package is a function which takes two arguments: `plugins`, a list of nix derivations to include as plugins (loaded only when specified in `rebar.config`), and `globalPlugins`, which should always be loaded by rebar3. Example: `rebar3WithPlugins { globalPlugins = [beamPackages.pc]; }`.
|
||||
|
||||
When adding a new plugin it is important that the `name` attribute is the same as the atom used by rebar3 to refer to the plugin.
|
||||
|
||||
### Erlang.mk {#beam-build-tools-erlangmk}
|
||||
### Mix & Erlang.mk {#build-tools-other}
|
||||
|
||||
Erlang.mk works exactly as expected. There is a bootstrap process that needs to be run, which is supported by the `buildErlangMk` derivation.
|
||||
|
||||
### Mix {#beam-build-tools-mix}
|
||||
For Elixir applications use `mixRelease` to make a release. See examples for more details.
|
||||
|
||||
For Elixir applications that use [mix release](https://hexdocs.pm/mix/Mix.Release.html), use the `mixRelease` builder to make a release. See examples for more details.
|
||||
|
||||
There is also a `buildMix` helper, whose behavior is closer to that of `buildErlangMk` and `buildRebar3`. The primary difference is that `mixRelease` makes a release, while `buildMix` only builds the package, which is more useful for libraries and other dependencies.
|
||||
There is also a `buildMix` helper, whose behavior is closer to that of `buildErlangMk` and `buildRebar3`. The primary difference is that mixRelease makes a release, while buildMix only builds the package, making it useful for libraries and other dependencies.
|
||||
|
||||
## How to Install BEAM Packages {#how-to-install-beam-packages}
|
||||
|
||||
To use any of these builders in your environment, refer to them by their attribute path under `beamPackages` (or another BEAM package set), e.g. `beamPackages.rebar3`:
|
||||
BEAM builders are not registered at the top level, because they are not relevant to the vast majority of Nix users.
|
||||
To use any of those builders into your environment, refer to them by their attribute path under `beamPackages`, e.g. `beamPackages.rebar3`:
|
||||
|
||||
::: {.example #ex-beam-ephemeral-shell}
|
||||
# Ephemeral shell
|
||||
@@ -97,39 +75,35 @@ pkgs.mkShell { packages = [ pkgs.beamPackages.rebar3 ]; }
|
||||
|
||||
#### Rebar3 Packages {#rebar3-packages}
|
||||
|
||||
The builder `beamPackages.buildRebar3` can be used to build a derivation that understands how to build a Rebar3 project.
|
||||
The Nix function, `buildRebar3`, defined in `beam.packages.erlang.buildRebar3` and aliased at the top level, can be used to build a derivation that understands how to build a Rebar3 project.
|
||||
|
||||
If a package needs to compile native code via Rebar3's port compilation mechanism, add `compilePort = true;` to the derivation.
|
||||
|
||||
#### Erlang.mk Packages {#erlang-mk-packages}
|
||||
|
||||
Erlang.mk functions similarly to Rebar3, except we use `beamPackages.buildErlangMk` instead of `beamPackages.buildRebar3`.
|
||||
|
||||
If a package needs to compile native code via Erlang.mk's port compilation mechanism, add `compilePorts = true;` to the derivation.
|
||||
|
||||
### Elixir Applications {#packaging-elixir-applications}
|
||||
Erlang.mk functions similarly to Rebar3, except we use `buildErlangMk` instead of `buildRebar3`.
|
||||
|
||||
#### Mix Packages {#mix-packages}
|
||||
|
||||
`beamPackages.mixRelease` is used to make a release in the mix sense. Dependencies will need to be fetched with `beamPackages.fetchMixDeps` and passed to it.
|
||||
`mixRelease` is used to make a release in the mix sense. Dependencies will need to be fetched with `fetchMixDeps` and passed to it.
|
||||
|
||||
#### mixRelease - Elixir Phoenix example {#mix-release-elixir-phoenix-example}
|
||||
|
||||
There are 3 steps: frontend dependencies (javascript), backend dependencies (elixir), and the final derivation that puts both of those together.
|
||||
there are 3 steps: frontend dependencies (javascript), backend dependencies (elixir), and the final derivation that puts both of those together
|
||||
|
||||
##### mixRelease - Frontend dependencies (javascript) {#mix-release-javascript-deps}
|
||||
|
||||
For phoenix projects, inside of Nixpkgs you can either use `fetchYarnDeps` or `buildNpmPackage`. An example with `buildNpmPackage` can be found [here](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/pl/plausible/package.nix), and an example with `fetchYarnDeps` can be found [here](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/pi/pinchflat/package.nix).
|
||||
For phoenix projects, inside of Nixpkgs you can either use `fetchYarnDeps` or `buildNpmPackage`. An example with `fetchYarnDeps` can be found [here](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/pl/plausible/package.nix). An example with `fetchYarnDeps` will follow. To package something outside of nixpkgs, you have alternatives like [npmlock2nix](https://github.com/nix-community/npmlock2nix) or [nix-npm-buildpackage](https://github.com/serokell/nix-npm-buildpackage)
|
||||
|
||||
##### mixRelease - backend dependencies (mix) {#mix-release-mix-deps}
|
||||
|
||||
There are 2 ways to package backend dependencies: either per-dependency mix2nix or with a fixed-output-derivation (FOD).
|
||||
|
||||
When writing an elixir project targeting `mixRelease`, you can also consider using [deps_nix](https://github.com/code-supply/deps_nix) with `mixNixDeps`. `deps_nix` supports git dependencies, but is intended to be added to the project's `mix.exs` directly.
|
||||
There are 2 ways to package backend dependencies. With mix2nix and with a fixed-output-derivation (FOD).
|
||||
|
||||
###### mix2nix {#mix2nix}
|
||||
|
||||
`mix2nix` is a cli tool available in Nixpkgs. It will generate a Nix expression from a `mix.lock` file. It is quite standard in the 2nix tool series.
|
||||
|
||||
Note that currently mix2nix can't handle git dependencies inside the mix.lock file. If you have git dependencies, you can either add them manually (see [example](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/pl/pleroma/package.nix)) or use the FOD method.
|
||||
Note that currently mix2nix can't handle git dependencies inside the mix.lock file. If you have git dependencies, you can either add them manually (see [example](https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/pleroma/default.nix#L20)) or use the FOD method.
|
||||
|
||||
The advantage of using mix2nix is that nix will know your whole dependency graph. On a dependency update, this won't trigger a full rebuild and download of all the dependencies, where FOD will do so.
|
||||
|
||||
@@ -177,7 +151,7 @@ You will need to run the build process once to fix the hash to correspond to you
|
||||
|
||||
###### FOD {#fixed-output-derivation}
|
||||
|
||||
A fixed output derivation will download mix dependencies from the internet. To ensure reproducibility, a hash will be supplied. Note that mix is relatively reproducible. An FOD generating a different hash on each run hasn't been observed (as opposed to npm where the chances are relatively high). See [akkoma](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/ak/akkoma/package.nix) for a usage example of FOD.
|
||||
A fixed output derivation will download mix dependencies from the internet. To ensure reproducibility, a hash will be supplied. Note that mix is relatively reproducible. An FOD generating a different hash on each run hasn't been observed (as opposed to npm where the chances are relatively high). See [elixir-ls](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/beam-modules/elixir-ls/default.nix) for a usage example of FOD.
|
||||
|
||||
Practical steps
|
||||
|
||||
@@ -202,11 +176,12 @@ Note that if after you've replaced the value, nix suggests another hash, then mi
|
||||
Here is how your `default.nix` file would look for a Phoenix project.
|
||||
|
||||
```nix
|
||||
{
|
||||
# beam27Packages or beam29Packages is available if you need a particular version
|
||||
beamPackages,
|
||||
}:
|
||||
with import <nixpkgs> { };
|
||||
|
||||
let
|
||||
# beam.interpreters.erlang_26 is available if you need a particular version
|
||||
packages = beam.packagesWith beam.interpreters.erlang;
|
||||
|
||||
pname = "your_project";
|
||||
version = "0.0.1";
|
||||
|
||||
@@ -216,7 +191,7 @@ let
|
||||
};
|
||||
|
||||
# if using mix2nix you can use the mixNixDeps attribute
|
||||
mixFodDeps = beamPackages.fetchMixDeps {
|
||||
mixFodDeps = packages.fetchMixDeps {
|
||||
pname = "mix-deps-${pname}";
|
||||
inherit src version;
|
||||
# nix will complain and tell you the right value to replace this with
|
||||
@@ -225,8 +200,11 @@ let
|
||||
# if you have build time environment variables add them here
|
||||
MY_ENV_VAR = "my_value";
|
||||
};
|
||||
|
||||
nodeDependencies = (pkgs.callPackage ./assets/default.nix { }).shell.nodeDependencies;
|
||||
|
||||
in
|
||||
beamPackages.mixRelease {
|
||||
packages.mixRelease {
|
||||
inherit
|
||||
src
|
||||
pname
|
||||
@@ -237,6 +215,9 @@ beamPackages.mixRelease {
|
||||
MY_ENV_VAR = "my_value";
|
||||
|
||||
postBuild = ''
|
||||
ln -sf ${nodeDependencies}/lib/node_modules assets/node_modules
|
||||
npm run deploy --prefix ./assets
|
||||
|
||||
# for external task you need a workaround for the no deps check flag
|
||||
# https://github.com/phoenixframework/phoenix/issues/2690
|
||||
mix do deps.loadpaths --no-deps-check, phx.digest
|
||||
@@ -248,7 +229,7 @@ beamPackages.mixRelease {
|
||||
Setup will require the following steps:
|
||||
|
||||
- Move your secrets to runtime environment variables. For more information refer to the [runtime.exs docs](https://hexdocs.pm/mix/Mix.Tasks.Release.html#module-runtime-configuration). On a fresh Phoenix build that would mean that both `DATABASE_URL` and `SECRET_KEY` need to be moved to `runtime.exs`.
|
||||
- Generate a Nix expression for your frontend dependencies using `fetchNpmDeps`/`buildNpmPackage` or `fetchYarnDeps`, depending on whether the project uses npm or yarn
|
||||
- `cd assets` and `nix-shell -p node2nix --run "node2nix --development"` will generate a Nix expression containing your frontend dependencies
|
||||
- commit and push those changes
|
||||
- you can now `nix-build .`
|
||||
- To run the release, set the `RELEASE_TMP` environment variable to a directory that your program has write access to. It will be used to store the BEAM settings.
|
||||
@@ -267,7 +248,7 @@ in your project with the following
|
||||
}:
|
||||
|
||||
let
|
||||
release = pkgs.callPackage ./default.nix { };
|
||||
release = pkgs.callPackage ./default.nix;
|
||||
release_name = "app";
|
||||
working_directory = "/home/app";
|
||||
in
|
||||
@@ -339,10 +320,9 @@ Usually, we need to create a `shell.nix` file and do our development inside the
|
||||
|
||||
with pkgs;
|
||||
let
|
||||
# pin OTP via beam27Packages/beam28Packages/... and Elixir via .extend
|
||||
beamPackages = beam27Packages.extend (self: super: { elixir = self.elixir_1_18; });
|
||||
elixir = beam.packages.erlang_27.elixir_1_18;
|
||||
in
|
||||
mkShell { buildInputs = [ beamPackages.elixir ]; }
|
||||
mkShell { buildInputs = [ elixir ]; }
|
||||
```
|
||||
|
||||
### Using an overlay {#beam-using-overlays}
|
||||
@@ -357,7 +337,7 @@ let
|
||||
self: super: {
|
||||
elixir_1_18 = super.elixir_1_18.override {
|
||||
version = "1.18.1";
|
||||
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
|
||||
sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -375,17 +355,18 @@ Here is an example `shell.nix`.
|
||||
with import <nixpkgs> { };
|
||||
|
||||
let
|
||||
# pin OTP via beam27Packages/beam28Packages/... and Elixir via .extend
|
||||
beamPackages = beam27Packages.extend (self: super: { elixir = self.elixir_1_18; });
|
||||
|
||||
# define packages to install
|
||||
basePackages = [
|
||||
git
|
||||
beamPackages.elixir
|
||||
# replace with beam.packages.erlang.elixir_1_18 if you need
|
||||
beam.packages.erlang.elixir
|
||||
nodejs
|
||||
postgresql_14
|
||||
# only used for frontend dependencies
|
||||
# you are free to use yarn2nix as well
|
||||
nodePackages.node2nix
|
||||
# formatting js file
|
||||
prettier
|
||||
nodePackages.prettier
|
||||
];
|
||||
|
||||
inputs = basePackages ++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ];
|
||||
@@ -398,13 +379,13 @@ let
|
||||
export HEX_HOME=$PWD/.nix-mix
|
||||
# make hex from Nixpkgs available
|
||||
# `mix local.hex` will install hex into MIX_HOME and should take precedence
|
||||
export MIX_PATH="${beamPackages.hex}/lib/erlang/lib/hex/ebin"
|
||||
export MIX_PATH="${beam.packages.erlang.hex}/lib/erlang/lib/hex/ebin"
|
||||
export PATH=$MIX_HOME/bin:$HEX_HOME/bin:$PATH
|
||||
export LANG=C.UTF-8
|
||||
# keep your shell history in iex
|
||||
export ERL_AFLAGS="-kernel shell_history enabled"
|
||||
|
||||
# postgres related
|
||||
# postges related
|
||||
# keep all your db data in a folder inside the project
|
||||
export PGDATA="$PWD/db"
|
||||
|
||||
|
||||
@@ -309,8 +309,6 @@ pnpm is available as the top-level package `pnpm`. Additionally, there are varia
|
||||
|
||||
When packaging an application that includes a `pnpm-lock.yaml`, you need to fetch the pnpm store for that project using a fixed-output-derivation. The function `fetchPnpmDeps` can create this pnpm store derivation. In conjunction, the setup hook `pnpmConfigHook` will prepare the build environment to install the pre-fetched dependencies store. Here is an example for a package that contains `package.json` and a `pnpm-lock.yaml` files using the fetcher and setup hook above:
|
||||
|
||||
There is also the [`pnpmBuildHook`](#pnpm-build-hook) for building packages with `pnpm`, as seen in [](#ex-pnpm-build-hook).
|
||||
|
||||
```nix
|
||||
{
|
||||
fetchPnpmDeps,
|
||||
@@ -513,10 +511,10 @@ Changes can include workarounds or bug fixes to existing PNPM issues.
|
||||
|
||||
##### Version history {#javascript-pnpm-fetcherVersion-versionHistory}
|
||||
|
||||
Version 3 is the minimum supported value. Versions 1 and 2 were removed in the 26.11 release; packages that still use them fail to evaluate and must migrate to `fetcherVersion = 3` (or later) and regenerate their hashes.
|
||||
Version 3 is the recommended value for new packages. Versions 1 and 2 are deprecated and scheduled for removal in the 26.11 release; existing packages must migrate.
|
||||
|
||||
- 1: Initial version, nothing special. (removed in 26.11)
|
||||
- 2: [Ensure consistent permissions](https://github.com/NixOS/nixpkgs/pull/422975) (removed in 26.11)
|
||||
- 1: Initial version, nothing special.
|
||||
- 2: [Ensure consistent permissions](https://github.com/NixOS/nixpkgs/pull/422975)
|
||||
- 3: [Build a reproducible tarball](https://github.com/NixOS/nixpkgs/pull/469950)
|
||||
- 4: [Dump SQLite database to an SQL file](https://github.com/NixOS/nixpkgs/pull/522703)
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ The following is an example:
|
||||
vyp
|
||||
lblasc
|
||||
];
|
||||
license = lib.licenses.mit;
|
||||
license.fullName = "MIT/X11";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ Based on the packages defined in `pkgs/top-level/python-packages.nix` an
|
||||
attribute set is created for each available Python interpreter. The available
|
||||
sets are
|
||||
|
||||
* `pkgs.python27Packages`
|
||||
* `pkgs.python3Packages`
|
||||
* `pkgs.python311Packages`
|
||||
* `pkgs.python312Packages`
|
||||
@@ -59,7 +60,9 @@ sets are
|
||||
|
||||
and the aliases
|
||||
|
||||
* `pkgs.python2Packages` pointing to `pkgs.python27Packages`
|
||||
* `pkgs.python3Packages` pointing to `pkgs.python313Packages`
|
||||
* `pkgs.pythonPackages` pointing to `pkgs.python2Packages`
|
||||
* `pkgs.pypy2Packages` pointing to `pkgs.pypy27Packages`
|
||||
* `pkgs.pypy3Packages` pointing to `pkgs.pypy310Packages`
|
||||
* `pkgs.pypyPackages` pointing to `pkgs.pypy2Packages`
|
||||
@@ -284,27 +287,29 @@ because their behaviour is different:
|
||||
The `buildPythonPackage` function has a `overridePythonAttrs` method that can be
|
||||
used to override the package. In the following example we create an environment
|
||||
where we have the `blaze` package using an older version of `pandas`. We
|
||||
first override the Python package set, then instantiate an interpreter with
|
||||
that package set.
|
||||
override first the Python interpreter and pass `packageOverrides` which contains
|
||||
the overrides for packages in the package set.
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> { };
|
||||
|
||||
let
|
||||
pythonPackages = python3Packages.overrideScope (
|
||||
final: prev: {
|
||||
pandas = prev.pandas.overridePythonAttrs (old: rec {
|
||||
version = "0.19.1";
|
||||
src = fetchPypi {
|
||||
pname = "pandas";
|
||||
inherit version;
|
||||
hash = "sha256-JQn+rtpy/OA2deLszSKEuxyttqBzcAil50H+JDHUdCE=";
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
python = pkgs.python3.override {
|
||||
packageOverrides = self: super: {
|
||||
pandas = super.pandas.overridePythonAttrs (
|
||||
finalAttrs: prevAttrs: {
|
||||
version = "0.19.1";
|
||||
src = fetchPypi {
|
||||
pname = "pandas";
|
||||
inherit (finalAttrs) version;
|
||||
hash = "sha256-JQn+rtpy/OA2deLszSKEuxyttqBzcAil50H+JDHUdCE=";
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
in
|
||||
(pythonPackages.python.withPackages (ps: [ ps.blaze ])).env
|
||||
(python.withPackages (ps: [ ps.blaze ])).env
|
||||
```
|
||||
|
||||
The next example shows a non trivial overriding of the `blas` implementation to
|
||||
@@ -312,16 +317,15 @@ be used through out all of the Python package set:
|
||||
|
||||
```nix
|
||||
{
|
||||
python3PackagesWithBlas = python3Packages.overrideScope (
|
||||
final: prev: {
|
||||
python3MyBlas = pkgs.python3.override {
|
||||
packageOverrides = self: super: {
|
||||
# We need toPythonModule for the package set to evaluate this
|
||||
blas = final.toPythonModule (prev.blas.override { blasProvider = final.mkl; });
|
||||
lapack = final.toPythonModule (prev.lapack.override { lapackProvider = final.mkl; });
|
||||
}
|
||||
);
|
||||
blas = super.toPythonModule (super.pkgs.blas.override { blasProvider = super.pkgs.mkl; });
|
||||
lapack = super.toPythonModule (super.pkgs.lapack.override { lapackProvider = super.pkgs.mkl; });
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
This will create a new Python package set with the blas and lapack implementation set to Intel MKL.
|
||||
|
||||
This is particularly useful for numpy and scipy users who want to gain speed with other blas implementations.
|
||||
Note that using `scipy = super.scipy.override { blas = super.pkgs.mkl; };` will likely result in
|
||||
@@ -453,10 +457,11 @@ Note that overriding packages deeper in the dependency graph _can_ work, but it'
|
||||
let
|
||||
pyproject = pkgs.lib.importTOML ./pyproject.toml;
|
||||
|
||||
myPython3Packages = pkgs.python3Packages.overrideScope (
|
||||
final: _: {
|
||||
myPython = pkgs.python.override {
|
||||
self = myPython;
|
||||
packageOverrides = pyfinal: pyprev: {
|
||||
# An editable package with a script that loads our mutable location
|
||||
my-editable = final.mkPythonEditablePackage {
|
||||
my-editable = pyfinal.mkPythonEditablePackage {
|
||||
# Inherit project metadata from pyproject.toml
|
||||
pname = pyproject.project.name;
|
||||
inherit (pyproject.project) version;
|
||||
@@ -467,10 +472,10 @@ let
|
||||
# Inject a script (other PEP-621 entrypoints are also accepted)
|
||||
inherit (pyproject.project) scripts;
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
pythonEnv = myPython3Packages.python.withPackages (ps: [ ps.my-editable ]);
|
||||
pythonEnv = myPython.withPackages (ps: [ ps.my-editable ]);
|
||||
|
||||
in
|
||||
pkgs.mkShell { packages = [ pythonEnv ]; }
|
||||
@@ -570,6 +575,9 @@ In contrast to [`python.buildEnv`](#python.buildenv-function), [`python.withPack
|
||||
more advanced options such as `ignoreCollisions = true` or `postBuild`. If you
|
||||
need them, you have to use [`python.buildEnv`](#python.buildenv-function).
|
||||
|
||||
Python 2 namespace packages may provide `__init__.py` that collide. In that case
|
||||
[`python.buildEnv`](#python.buildenv-function) should be used with `ignoreCollisions = true`.
|
||||
|
||||
#### Setup hooks {#setup-hooks}
|
||||
|
||||
The following are setup hooks specifically for Python packages. Most of these
|
||||
@@ -621,9 +629,10 @@ buildPythonPackage.override { stdenv = customStdenv; } {
|
||||
|
||||
Several versions of the Python interpreter are available on Nix, as well as a
|
||||
high amount of packages. The attribute `python3` refers to the default
|
||||
interpreter, which is currently CPython 3.13. It is also possible to refer to
|
||||
specific versions, e.g., `python313` refers to CPython 3.13, and `pypy` refers
|
||||
to the default PyPy interpreter.
|
||||
interpreter, which is currently CPython 3.13. The attribute `python` refers to
|
||||
CPython 2.7 for backwards compatibility. It is also possible to refer to
|
||||
specific versions, e.g., `python313` refers to CPython 3.13, and `pypy` refers to
|
||||
the default PyPy interpreter.
|
||||
|
||||
Python is used a lot, and in different ways. This affects also how it is
|
||||
packaged. In the case of Python on Nix, an important distinction is made between
|
||||
@@ -635,6 +644,14 @@ In the Nixpkgs tree Python applications can be found throughout, depending on
|
||||
what they do, and are called from the main package set. Python libraries,
|
||||
however, are in separate sets, with one set per interpreter version.
|
||||
|
||||
The interpreters have several common attributes. One of these attributes is
|
||||
`pkgs`, which is a package set of Python libraries for this specific
|
||||
interpreter. E.g., the `toolz` package corresponding to the default interpreter
|
||||
is `python3.pkgs.toolz`, and the CPython 3.13 version is `python313.pkgs.toolz`.
|
||||
The main package set contains aliases to these package sets, e.g.
|
||||
`pythonPackages` refers to `python.pkgs` and `python313Packages` to
|
||||
`python313.pkgs`.
|
||||
|
||||
#### Installing Python and packages {#installing-python-and-packages}
|
||||
|
||||
The Nix and NixOS manuals explain how packages are generally installed. In the
|
||||
@@ -1004,7 +1021,7 @@ information. The output of the function is a derivation.
|
||||
|
||||
An expression for `toolz` can be found in the Nixpkgs repository. As explained
|
||||
in the introduction of this Python section, a derivation of `toolz` is available
|
||||
for each interpreter version, e.g. `python313Packages.toolz` refers to the `toolz`
|
||||
for each interpreter version, e.g. `python313.pkgs.toolz` refers to the `toolz`
|
||||
derivation corresponding to the CPython 3.13 interpreter.
|
||||
|
||||
The above example works when you're directly working on
|
||||
@@ -1019,7 +1036,7 @@ with import <nixpkgs> { };
|
||||
|
||||
(
|
||||
let
|
||||
my_toolz = python313Packages.buildPythonPackage (finalAttrs: {
|
||||
my_toolz = python313.pkgs.buildPythonPackage (finalAttrs: {
|
||||
pname = "toolz";
|
||||
version = "0.10.0";
|
||||
pyproject = true;
|
||||
@@ -1029,7 +1046,7 @@ with import <nixpkgs> { };
|
||||
hash = "sha256-CP3V73yWSArRHBLUct4hrNMjWZlvaaUlkpm1QP66RWA=";
|
||||
};
|
||||
|
||||
build-system = [ python313Packages.setuptools ];
|
||||
build-system = [ python313.pkgs.setuptools ];
|
||||
|
||||
# has no tests
|
||||
doCheck = false;
|
||||
@@ -1042,7 +1059,7 @@ with import <nixpkgs> { };
|
||||
});
|
||||
|
||||
in
|
||||
python313Packages.python.withPackages (
|
||||
python313.withPackages (
|
||||
ps: with ps; [
|
||||
numpy
|
||||
my_toolz
|
||||
@@ -1063,11 +1080,6 @@ of [`withPackages`](#python.withpackages-function) we used a `let` expression. Y
|
||||
`toolz` from the Nixpkgs package set this time, but instead took our own version
|
||||
that we introduced with the `let` expression.
|
||||
|
||||
There is also a legacy API that can be accessed via `python3.pkgs`, which will also give access to
|
||||
the Python package set for a given interpreter. This API is not recommended to be used anymore
|
||||
because the package set at `python3.pkgs` is not spliced, while the package set at `python3Packages`
|
||||
is. This can lead to strange errors during cross-compilation, or if Python is used at build time.
|
||||
|
||||
#### Handling dependencies {#handling-dependencies}
|
||||
|
||||
Our example, `toolz`, does not have any dependencies on other Python packages or system libraries.
|
||||
@@ -1705,22 +1717,27 @@ should also be done when packaging `A`.
|
||||
|
||||
### How to override a Python package? {#how-to-override-a-python-package}
|
||||
|
||||
We can override the Python package set, then instantiate an interpreter with it.
|
||||
In the following example we rename the `pandas` package and build it.
|
||||
We can override the interpreter and pass `packageOverrides`. In the following
|
||||
example we rename the `pandas` package and build it.
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> { };
|
||||
|
||||
let
|
||||
pythonPackages = python3Packages.overrideScope (
|
||||
final: prev: {
|
||||
pandas = prev.pandas.overridePythonAttrs {
|
||||
name = "foo";
|
||||
};
|
||||
}
|
||||
);
|
||||
in
|
||||
(pythonPackages.python.withPackages (ps: [ ps.pandas ])).env
|
||||
(
|
||||
let
|
||||
python =
|
||||
let
|
||||
packageOverrides = self: super: {
|
||||
pandas = super.pandas.overridePythonAttrs (old: {
|
||||
name = "foo";
|
||||
});
|
||||
};
|
||||
in
|
||||
pkgs.python313.override { inherit packageOverrides; };
|
||||
|
||||
in
|
||||
python.withPackages (ps: [ ps.pandas ])
|
||||
).env
|
||||
```
|
||||
|
||||
Using `nix-build` on this expression will build an environment that contains the
|
||||
@@ -1736,10 +1753,12 @@ the updated `scipy` version.
|
||||
```nix
|
||||
with import <nixpkgs> { };
|
||||
|
||||
let
|
||||
pythonPackages = python313Packages.overrideScope (_: prev: { scipy = prev.scipy_0_17; });
|
||||
in
|
||||
(pythonPackages.python.withPackages (ps: [ ps.blaze ])).env
|
||||
(
|
||||
let
|
||||
packageOverrides = self: super: { scipy = super.scipy_0_17; };
|
||||
in
|
||||
(pkgs.python313.override { inherit packageOverrides; }).withPackages (ps: [ ps.blaze ])
|
||||
).env
|
||||
```
|
||||
|
||||
The requested package `blaze` depends on `pandas` which itself depends on `scipy`.
|
||||
@@ -1753,16 +1772,14 @@ let
|
||||
pkgs = import <nixpkgs> { };
|
||||
newpkgs = import pkgs.path {
|
||||
overlays = [
|
||||
(_: prev: {
|
||||
(self: super: {
|
||||
python313 =
|
||||
let
|
||||
pythonPackages = prev.python313Packages.overrideScope (
|
||||
_: prev: {
|
||||
numpy = prev.numpy_1_18;
|
||||
}
|
||||
);
|
||||
packageOverrides = python-self: python-super: {
|
||||
numpy = python-super.numpy_1_18;
|
||||
};
|
||||
in
|
||||
pythonPackages.python3;
|
||||
super.python313.override { inherit packageOverrides; };
|
||||
})
|
||||
];
|
||||
};
|
||||
@@ -1903,8 +1920,9 @@ pkgs.mkShell rec {
|
||||
}
|
||||
```
|
||||
|
||||
In case the supplied venvShellHook is insufficient, you can define your own
|
||||
shell hook and adapt to your needs like in the following example:
|
||||
In case the supplied venvShellHook is insufficient, or when Python 2 support is
|
||||
needed, you can define your own shell hook and adapt to your needs like in the
|
||||
following example:
|
||||
|
||||
```nix
|
||||
with import <nixpkgs> { };
|
||||
@@ -1917,6 +1935,8 @@ pkgs.mkShell rec {
|
||||
name = "impurePythonEnv";
|
||||
buildInputs = [
|
||||
pythonPackages.python
|
||||
# Needed when using python 2.7
|
||||
# pythonPackages.virtualenv
|
||||
# ...
|
||||
];
|
||||
|
||||
@@ -1929,6 +1949,8 @@ pkgs.mkShell rec {
|
||||
echo "Skipping venv creation, '${venvDir}' already exists"
|
||||
else
|
||||
echo "Creating new venv environment in path: '${venvDir}'"
|
||||
# Note that the module venv was only introduced in python 3, so for 2.7
|
||||
# this needs to be replaced with a call to virtualenv
|
||||
${pythonPackages.python.interpreter} -m venv "${venvDir}"
|
||||
fi
|
||||
|
||||
@@ -1955,17 +1977,19 @@ If you need to change a package's attribute(s) from `configuration.nix` you coul
|
||||
|
||||
```nix
|
||||
{
|
||||
nixpkgs.config.packageOverrides = final: _: {
|
||||
python3Packages = super.python3Packages.overrideScope (pySuper: {
|
||||
twisted = pySuper.twisted.overridePythonAttrs {
|
||||
src = final.fetchPypi {
|
||||
pname = "Twisted";
|
||||
version = "19.10.0";
|
||||
hash = "sha256-c5S6fycq5yKnTz2Wnc9Zm8TvCTvDkgOHSKSQ8XJKUV0=";
|
||||
extension = "tar.bz2";
|
||||
};
|
||||
nixpkgs.config.packageOverrides = super: {
|
||||
python3 = super.python3.override {
|
||||
packageOverrides = python-self: python-super: {
|
||||
twisted = python-super.twisted.overridePythonAttrs (oldAttrs: {
|
||||
src = super.fetchPypi {
|
||||
pname = "Twisted";
|
||||
version = "19.10.0";
|
||||
hash = "sha256-c5S6fycq5yKnTz2Wnc9Zm8TvCTvDkgOHSKSQ8XJKUV0=";
|
||||
extension = "tar.bz2";
|
||||
};
|
||||
});
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
@@ -1981,7 +2005,7 @@ this snippet:
|
||||
|
||||
```nix
|
||||
{
|
||||
myPythonPackages = python3Packages.overrideScope (final: super: { twisted = <...>; });
|
||||
myPythonPackages = python3Packages.override { overrides = self: super: { twisted = <...>; }; };
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1990,17 +2014,19 @@ this snippet:
|
||||
Use the following overlay template:
|
||||
|
||||
```nix
|
||||
self: _: {
|
||||
python3Packages = super.python3Packages.overrideScope (pySuper: {
|
||||
twisted = pySuper.twisted.overrideAttrs {
|
||||
src = final.fetchPypi {
|
||||
pname = "Twisted";
|
||||
version = "19.10.0";
|
||||
hash = "sha256-c5S6fycq5yKnTz2Wnc9Zm8TvCTvDkgOHSKSQ8XJKUV0=";
|
||||
extension = "tar.bz2";
|
||||
};
|
||||
self: super: {
|
||||
python = super.python.override {
|
||||
packageOverrides = python-self: python-super: {
|
||||
twisted = python-super.twisted.overrideAttrs (oldAttrs: {
|
||||
src = super.fetchPypi {
|
||||
pname = "Twisted";
|
||||
version = "19.10.0";
|
||||
hash = "sha256-c5S6fycq5yKnTz2Wnc9Zm8TvCTvDkgOHSKSQ8XJKUV0=";
|
||||
extension = "tar.bz2";
|
||||
};
|
||||
});
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ Note that if the builder is running and you have created the above ssh conf file
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-22.11-darwin";
|
||||
darwin.url = "github:nix-darwin/nix-darwin/master";
|
||||
darwin.url = "github:lnl7/nix-darwin/master";
|
||||
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
||||
@@ -119,10 +119,11 @@ $ pkgs/os-specific/linux/kernel/update.sh
|
||||
The change gets submitted like this:
|
||||
|
||||
* File a PR against `staging-nixos`.
|
||||
* Add a `backport staging-nixos-XX.XX` label for an automated backport.
|
||||
* Add a `backport release-XX.XX` label for an automated backport.
|
||||
We don't expect many other changes on that branch to require a backport, hence there's no such branch for stable.
|
||||
By using an additional PR, we get the automatic backport against stable without manual cherry-picks.
|
||||
* Merge into `staging-nixos` or `staging-nixos-XX.XX`.
|
||||
* File as PR from `staging-nixos` against `master` or `staging-nixos-XX.XX` against `release-xx.xx`.
|
||||
* Merge into `staging-nixos`.
|
||||
* File as PR from `staging-nixos` against `master`.
|
||||
* When all status checks are green, merge.
|
||||
|
||||
### Add a new (major) version of the Linux kernel {#sec-linux-add-new-kernel-version}
|
||||
|
||||
@@ -113,9 +113,6 @@
|
||||
"ex-pkgs-replace-vars-with": [
|
||||
"index.html#ex-pkgs-replace-vars-with"
|
||||
],
|
||||
"ex-pnpm-build-hook": [
|
||||
"index.html#ex-pnpm-build-hook"
|
||||
],
|
||||
"ex-shfmt": [
|
||||
"index.html#ex-shfmt"
|
||||
],
|
||||
@@ -349,33 +346,6 @@
|
||||
"pkgs.treefmt.withConfig": [
|
||||
"index.html#pkgs.treefmt.withConfig"
|
||||
],
|
||||
"pnpm-build-hook": [
|
||||
"index.html#pnpm-build-hook"
|
||||
],
|
||||
"pnpm-build-hook-build-flags": [
|
||||
"index.html#pnpm-build-hook-build-flags"
|
||||
],
|
||||
"pnpm-build-hook-code-snippet": [
|
||||
"index.html#pnpm-build-hook-code-snippet"
|
||||
],
|
||||
"pnpm-build-hook-dont": [
|
||||
"index.html#pnpm-build-hook-dont"
|
||||
],
|
||||
"pnpm-build-hook-exclusive-variables": [
|
||||
"index.html#pnpm-build-hook-exclusive-variables"
|
||||
],
|
||||
"pnpm-build-hook-flags": [
|
||||
"index.html#pnpm-build-hook-flags"
|
||||
],
|
||||
"pnpm-build-hook-script": [
|
||||
"index.html#pnpm-build-hook-script"
|
||||
],
|
||||
"pnpm-build-hook-variables": [
|
||||
"index.html#pnpm-build-hook-variables"
|
||||
],
|
||||
"pnpm-build-hook-honored-variables": [
|
||||
"index.html#pnpm-build-hook-honored-variables"
|
||||
],
|
||||
"preface": [
|
||||
"index.html#preface"
|
||||
],
|
||||
@@ -442,9 +412,6 @@
|
||||
"sec-meta-identifiers-cpe": [
|
||||
"index.html#sec-meta-identifiers-cpe"
|
||||
],
|
||||
"sec-meta-identifiers-purl": [
|
||||
"index.html#sec-meta-identifiers-purl"
|
||||
],
|
||||
"sec-modify-via-packageOverrides": [
|
||||
"index.html#sec-modify-via-packageOverrides"
|
||||
],
|
||||
@@ -956,9 +923,6 @@
|
||||
"var-go-buildTestBinaries": [
|
||||
"index.html#var-go-buildTestBinaries"
|
||||
],
|
||||
"var-meta-donationPage": [
|
||||
"index.html#var-meta-donationPage"
|
||||
],
|
||||
"var-meta-identifiers-cpe": [
|
||||
"index.html#var-meta-identifiers-cpe"
|
||||
],
|
||||
@@ -968,15 +932,6 @@
|
||||
"var-meta-identifiers-possibleCPEs": [
|
||||
"index.html#var-meta-identifiers-possibleCPEs"
|
||||
],
|
||||
"var-meta-identifiers-purl": [
|
||||
"index.html#var-meta-identifiers-purl"
|
||||
],
|
||||
"var-meta-identifiers-purlParts": [
|
||||
"index.html#var-meta-identifiers-purlParts"
|
||||
],
|
||||
"var-meta-identifiers-purls": [
|
||||
"index.html#var-meta-identifiers-purls"
|
||||
],
|
||||
"var-meta-teams": [
|
||||
"index.html#var-meta-teams"
|
||||
],
|
||||
@@ -1085,9 +1040,6 @@
|
||||
"tar-files": [
|
||||
"index.html#tar-files"
|
||||
],
|
||||
"writableTmpDirAsHomeHook": [
|
||||
"index.html#writableTmpDirAsHomeHook"
|
||||
],
|
||||
"x86_64-darwin-26.05": [
|
||||
"release-notes.html#x86_64-darwin-26.05"
|
||||
],
|
||||
@@ -3121,28 +3073,19 @@
|
||||
"available-versions-and-deprecations-schedule": [
|
||||
"index.html#available-versions-and-deprecations-schedule"
|
||||
],
|
||||
"erlang": [
|
||||
"index.html#erlang"
|
||||
],
|
||||
"elixir": [
|
||||
"index.html#elixir"
|
||||
],
|
||||
"beam-structure": [
|
||||
"index.html#beam-structure"
|
||||
],
|
||||
"beam-build-tools": [
|
||||
"index.html#beam-build-tools",
|
||||
"build-tools": [
|
||||
"index.html#build-tools"
|
||||
],
|
||||
"beam-build-tools-rebar3": [
|
||||
"index.html#beam-build-tools-rebar3",
|
||||
"build-tools-rebar3": [
|
||||
"index.html#build-tools-rebar3"
|
||||
],
|
||||
"beam-build-tools-erlangmk": [
|
||||
"index.html#beam-build-tools-erlangmk"
|
||||
],
|
||||
"beam-build-tools-mix": [
|
||||
"index.html#beam-build-tools-mix",
|
||||
"build-tools-other": [
|
||||
"index.html#build-tools-other"
|
||||
],
|
||||
"how-to-install-beam-packages": [
|
||||
@@ -3160,9 +3103,6 @@
|
||||
"packaging-erlang-applications": [
|
||||
"index.html#packaging-erlang-applications"
|
||||
],
|
||||
"packaging-elixir-applications": [
|
||||
"index.html#packaging-elixir-applications"
|
||||
],
|
||||
"rebar3-packages": [
|
||||
"index.html#rebar3-packages"
|
||||
],
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
- `base16-builder` node package has been removed due to lack of upstream maintenance.
|
||||
|
||||
- `budgie-desktop` has been updated to [10.9.4](https://github.com/BuddiesOfBudgie/budgie-desktop/releases/tag/v10.9.4). This changes `XDG_CURRENT_DESKTOP` from `Budgie:GNOME` to `Budgie` and contains ABI bumps for libpeas2 migration.
|
||||
- `budgie-desktop` has been updated [10.9.4](https://github.com/BuddiesOfBudgie/budgie-desktop/releases/tag/v10.9.4). This changes `XDG_CURRENT_DESKTOP` from `Budgie:GNOME` to `Budgie` and contains ABI bumps for libpeas2 migration.
|
||||
|
||||
- `buildGoModule` removes the compatibility layer of `CGO_ENABLED` not specified via `env`.
|
||||
Specifying `CGO_ENABLED` directly now results in an error.
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
- `cardboard` has been removed due to the package having been broken since at least November 2024.
|
||||
|
||||
- `carla` no longer supports `gtk2` override.
|
||||
- `carla` no longer support `gtk2` override.
|
||||
|
||||
- `chatgpt-retrieval-plugin` has been removed due to the package having been broken since at least November 2024.
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
- `linux` and all other Linux kernel packages have moved all in-tree kernel modules into a new `modules` output.
|
||||
|
||||
- `lxde` scope has been removed, and its packages have been moved to the top-level.
|
||||
- `lxde` scope has been removed, and its packages have been moved the top-level.
|
||||
|
||||
- `mariadb` now defaults to `mariadb_114` instead of `mariadb_1011`, meaning the default version was upgraded from 10.11.x to 11.4.x. See the [upgrade notes](https://mariadb.com/kb/en/upgrading-from-mariadb-10-11-to-mariadb-11-4/) for potential issues.
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
- `pcp` has been removed because the upstream repo was archived and it hasn't been updated since 2021.
|
||||
|
||||
- `podofo` has been updated from `0.9.8` to `1.0.0`. These releases are by nature very incompatible due to major API changes. The legacy versions can be found under `podofo_0_10` and `podofo_0_9`.
|
||||
Changelog: <https://github.com/podofo/podofo/blob/1.0.0/CHANGELOG.md>, API-Migration-Guide: <https://github.com/podofo/podofo/blob/1.0.0/API-MIGRATION.md>.
|
||||
Changelog: https://github.com/podofo/podofo/blob/1.0.0/CHANGELOG.md, API-Migration-Guide: https://github.com/podofo/podofo/blob/1.0.0/API-MIGRATION.md.
|
||||
|
||||
- `privatebin` has been updated to `2.0.0`. This release changes configuration defaults including switching the template and removing legacy features. See the [v2.0.0 changelog entry](https://github.com/PrivateBin/PrivateBin/releases/tag/2.0.0) for details on how to upgrade.
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
|
||||
- `sublime-music` has been removed because upstream has announced it is no longer maintained. Upstream suggests using `supersonic` instead.
|
||||
|
||||
- Support for bootstrapping native GHC compilers on 32‐bit ARM and little‐endian 64-bit PowerPC has been dropped.
|
||||
- Support for bootstrapping native GHC compilers on 32‐bit ARM and little‐endian 64‐bit PowerPC has been dropped.
|
||||
The latter was probably broken anyway.
|
||||
If there is interest in restoring support for these architectures, it should be possible to cross‐compile a bootstrap GHC binary.
|
||||
|
||||
@@ -359,7 +359,7 @@ and [release notes for v18](https://goteleport.com/docs/changelog/#1800-070325).
|
||||
|
||||
- `ffmpeg_8`, `ffmpeg_8-headless`, and `ffmpeg_8-full` have been added. The default version of FFmpeg is now `ffmpeg_8`. You can install previous versions from package attributes such as `ffmpeg_7`.
|
||||
|
||||
- `forgejo-runner` has been upgraded to version 11, which brings a license change from MIT to GPLv3-or-later.
|
||||
- `forgejo-runner` upgrading to version 11 brings a license change from MIT to GPLv3-or-later.
|
||||
|
||||
- GIMP now defaults to version 3. Use `gimp2` for the old version.
|
||||
|
||||
@@ -405,6 +405,8 @@ and [release notes for v18](https://goteleport.com/docs/changelog/#1800-070325).
|
||||
|
||||
- `prl-tools` has been moved out of `linuxPackages` because Parallels Guest Tools become driverless since 26.1.0.
|
||||
|
||||
- `searx` was updated to use `envsubst` instead of `sed` for parsing secrets from environment variables.
|
||||
|
||||
- `sftpman` has been updated to version 2, a rewrite in Rust which is mostly backward compatible but does include some changes to the CLI.
|
||||
For more information, [check the project's README](https://github.com/spantaleev/sftpman-rs#is-sftpman-v2-compatible-with-sftpman-v1).
|
||||
|
||||
@@ -429,7 +431,7 @@ and [release notes for v18](https://goteleport.com/docs/changelog/#1800-070325).
|
||||
|
||||
- The `dockerTools.streamLayeredImage` builder now uses a better algorithm for generating layered docker images, such that much more sharing is possible when the number of store paths exceeds the layer limit. It gives each of the largest store paths its own layer and adds dependencies to those layers when they aren't used elsewhere.
|
||||
|
||||
- The `open-webui` package's postgres support has been moved to optional dependencies to comply with upstream changes in 0.6.26.
|
||||
- The `open-webui` package's postgres support have been moved to optional dependencies to comply with upstream changes in 0.6.26.
|
||||
|
||||
- The systemd initrd will now respect `x-systemd.wants` and `x-systemd.requires` for reliably unlocking multi-disk bcachefs volumes.
|
||||
|
||||
@@ -438,8 +440,6 @@ and [release notes for v18](https://goteleport.com/docs/changelog/#1800-070325).
|
||||
- Packages using `versionCheckHook` that previously relied solely on `pname` to locate the program used to version check, but have a differing `meta.mainProgram` entry, might now fail.
|
||||
|
||||
- `waydroid-nftables` is a new variant of `waydroid` that supports nftables instead of iptables.
|
||||
|
||||
- `searx` was updated to use `envsubst` instead of `sed` for parsing secrets from environment variables.
|
||||
If your previous configuration included a secret reference like `server.secret_key = "@SEARX_SECRET_KEY@"`, you must migrate to the new envsubst syntax: `server.secret_key = "$SEARX_SECRET_KEY"`.
|
||||
|
||||
## Nixpkgs Library {#sec-nixpkgs-release-25.11-lib}
|
||||
@@ -470,7 +470,7 @@ and [release notes for v18](https://goteleport.com/docs/changelog/#1800-070325).
|
||||
|
||||
- `lib.sources.pathType`, `lib.sources.pathIsDirectory` and `lib.sources.pathIsRegularFile` have been replaced by `lib.filesystem.pathType`, `lib.filesystem.pathIsDirectory` and `lib.filesystem.pathIsRegularFile` respectively.
|
||||
|
||||
- `lib.strings.isCoercibleToString` has been replaced in favor of either `lib.strings.isStringLike` or `lib.strings.isConvertibleWithToString`. Only use the latter if it needs to return true for null, numbers, booleans, or a list of those.
|
||||
- `lib.strings.isCoercibleToString` has been in favor of either `lib.strings.isStringLike` or `lib.strings.isConvertibleWithToString`. Only use the latter if it needs to return true for null, numbers, booleans, or a list of those.
|
||||
|
||||
- `lib.types.string` has been removed. See [this pull request](https://github.com/NixOS/nixpkgs/pull/66346) for better alternative types like `lib.types.str`.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Nixpkgs 26.05 ("Yarara", 2026.05/30) {#sec-nixpkgs-release-26.05}
|
||||
# Nixpkgs 26.05 ("Yarara", 2026.05/??) {#sec-nixpkgs-release-26.05}
|
||||
|
||||
## Highlights {#sec-nixpkgs-release-26.05-highlights}
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
@@ -6,44 +6,6 @@
|
||||
- GCC has been updated from GCC 14 to GCC 15.
|
||||
This introduces some backwards incompatible changes; Refer to the [upstream porting guide](https://gcc.gnu.org/gcc-15/porting_to.html) for details.
|
||||
|
||||
- `glibc` has been updated to version 2.42.
|
||||
|
||||
This version no longer makes the stack executable when a shared library requires this. A symptom
|
||||
is an error like
|
||||
|
||||
> cannot enable executable stack as shared object requires: Invalid argument
|
||||
|
||||
This is usually a bug. Please consider reporting it to the software maintainers.
|
||||
|
||||
In a lot of cases, the library requires the execstack by mistake only. The following workarounds exist:
|
||||
|
||||
* When building the shared library in question from source, use the following linker flags to force turning off the
|
||||
executable flag:
|
||||
|
||||
```nix
|
||||
mkDerivation {
|
||||
# …
|
||||
|
||||
env.NIX_LDFLAGS = "-z,noexecstack";
|
||||
}
|
||||
```
|
||||
|
||||
* If the sources are not available, the execstack-flag can be cleared with `patchelf`:
|
||||
|
||||
```
|
||||
patchelf --clear-execstack binary-only.so
|
||||
```
|
||||
|
||||
* If the shared library to be loaded actually requires an executable stack and it isn't turned
|
||||
on by the application loading it, you may force allowing that behavior by setting the
|
||||
following environment variable:
|
||||
|
||||
```
|
||||
GLIBC_TUNABLES=glibc.rtld.execstack=2
|
||||
```
|
||||
|
||||
**Do not set this globally!** This makes your setup inherently less secure.
|
||||
|
||||
- Node.js default version has been updated from 22 LTS to 24 LTS.
|
||||
This introduces some breaking changes; Refer to the [upstream migration article](https://nodejs.org/en/blog/migrations/v22-to-v24) for details.
|
||||
|
||||
@@ -112,8 +74,6 @@
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
- `mdbook-linkcheck` has been removed as it is unmaintained and incompatible with the latest version of `mdbook`. Users can instead migrate to `mdbook-linkcheck2`.
|
||||
|
||||
- The `nodePackages` package set has been removed entirely from nixpkgs. This package set was created to ease the maintenance burden of maintaining lots of
|
||||
NodeJS-based packages within nixpkgs, but became a burden itself. Over the past several releases, there has been a focus on removing it in favor of the more modern nixpkgs packaging strategies.
|
||||
After a long time, this package set has been deprecated and removed. If you are using its package set in your own config, please use the top-level packages instead.(i.e `pkgs.package-name` instead of `pkgs.nodePackages.package-name`).
|
||||
@@ -129,7 +89,7 @@
|
||||
|
||||
- `yarn2nix`/`yarn2nix-moretea` and its tooling(`mkYarnPackage`, `mkYarnModules`, and `fixup_yarn_lock`) have been removed as they were unmaintainable in nixpkgs. If you want to build with Yarn V1 going forward, use the hooks instead(`yarnBuildHook`, `yarnConfigHook`, and `yarnInstallHook`). See the yarn v1 documentation in the nixpkgs manual for more details.
|
||||
|
||||
- `albert` has been updated to version 34.0.5. This release redesigns the query system to support stateful asynchronous handlers and infinite scrolling, and adds internationalized tokenization.
|
||||
- `albert` has been updated to the version 34.0.5. This release redesigns the query system to support stateful asynchronous handlers and infinite scrolling, and adds internationalized tokenization.
|
||||
This update introduces several breaking changes: the Python plugin interface is now v5.0, the `PATH` plugin has been renamed to `Commandline`, and the QStylesheets-based widgets box model frontend has been removed.
|
||||
For more information read the [changelog for 34.0.0](https://albertlauncher.github.io/2026/01/19/albert-v34.0.0-released/).
|
||||
|
||||
@@ -145,34 +105,17 @@
|
||||
|
||||
- `spoof` has been removed, as there are many issues upstream with it working on modern OS versions, and it appears to be unmaintained.
|
||||
|
||||
- `duckstation` package has been removed, as it was requested by upstream and build sources were changed to be incompatible with NixOS.
|
||||
- `duckstation` package has been removed, as it was requested by upstream and build source were changed to be incompatible with NixOS.
|
||||
|
||||
- `nodePackages.coc-go` and `nodePackages.coc-tsserver`, along with their vim plugins, have been removed from nixpkgs due to being unmaintained.
|
||||
|
||||
- `nodePackages.wavedrom-cli` has been removed, as it was unmaintained within nixpkgs.
|
||||
|
||||
- MATE packages have been moved to top level (e.g. if you previously added `pkgs.mate.caja` to `environment.systemPackages`, you will need to change it to `pkgs.caja`).
|
||||
|
||||
- `kratos` has been updated from 1.3.1 to [25.4.0](https://github.com/ory/kratos/releases/tag/v25.4.0). Upstream switched to a new versioning scheme (year.major.minor). Notable breaking changes:
|
||||
|
||||
- The `migrate sql` CLI command is now `migrate sql up`
|
||||
- OIDC registration validation errors are now placed in the `default` node group instead of `oidc`
|
||||
- Failed OIDC account linking returns HTTP 400 instead of 200
|
||||
|
||||
- `pdns` has been updated to version [v5.0.x](https://doc.powerdns.com/authoritative/changelog/5.0.html), which introduces breaking changes. Check out the [Upgrade Notes](https://doc.powerdns.com/authoritative/upgrading.html#to-5-0-0) for details.
|
||||
|
||||
- `geph` package's built-in GUI `geph5-client-gui` has been [removed](https://github.com/geph-official/geph5/commit/f2221fb8386312daf2cef05483ebb353ff48bdb4) by the upstream. All users who wish to continue using the GUI should install the `gephgui-wry`, which is consistent with the official release version.
|
||||
|
||||
- `xfsprogs` was updated to version 6.18.0, which enables parent pointers and exchange-range by default. Upstream recommends not to use these features with kernels older than 6.18.
|
||||
GRUB2 is likely unable to boot from filesystems with these features enabled.
|
||||
|
||||
- `lunarvim` package has been removed, as it was abandoned upstream and relied on an old version of `neovim` to work properly.
|
||||
|
||||
- `requireFile` now treats any `message` or `url` argument as a literal string, rather than subjecting it to Bash here-doc expansion. This allows including strings like `$PWD` in the message without needing to know about and handle the undocumented Bash expansion.
|
||||
|
||||
- `nodePackages.browserify` has been removed, as it was unmaintained within nixpkgs.
|
||||
|
||||
- `command-not-found` package will be enabled by default if the source of nixpkgs contains the file `programs.sqlite`. This is the case if a nixpkgs tarball from <https://channels.nixos.org> is used. This usage will also make the database of `command-not-found` stateless.
|
||||
- `command-not-found` package will be enabled by default if the source of nixpkgs contains the file `programs.sqlite`. This is the case if a nixpkgs tarball from https://channels.nixos.org is used. This usage will also make the database of `command-not-found` stateless.
|
||||
|
||||
- `nodePackages.sass` has been removed, as it was unmaintained within nixpkgs.
|
||||
|
||||
@@ -183,7 +126,9 @@
|
||||
- `kanata` now requires `karabiner-dk` version 6.0+ or later.
|
||||
The package has been updated to use the new `karabiner-dk` package and the `darwinDriver` output stays at the version defined in the package.
|
||||
|
||||
- Keycloak has been updated to 26.6.X, bringing a lot of new features like federated client authentication, JWT authorization grants, workflows and the ability to do
|
||||
- Reloading or restarting systemd units from the NixOS activation script is deprecated, and will be removed in NixOS 26.11. This deprecation is part of a bigger effort to deprecate activation scripts altogether, which will take place over several releases. There are no in-tree usages of the now-deprecated reload/restart functionality.
|
||||
|
||||
- Keycloak has been updated to 26.6.X, bringing a lot new features like federated client authentication, JWT authorization grants, workflows and the ability to do
|
||||
zero-downtime patch releases. Read more about [all the exciting new capabilities in keycloak 26.6 here](https://github.com/keycloak/keycloak/releases/tag/26.6.0)
|
||||
and [consult the migration guide to 26.6](https://www.keycloak.org/docs/latest/upgrading/index.html#migrating-to-26-6-0) to find out whether this is a breaking
|
||||
change for your keycloak instance.
|
||||
@@ -212,19 +157,21 @@
|
||||
This release contains breaking changes, see [Upgrading to Vinyl Cache 9.0](https://vinyl-cache.org/docs/9.0/whats-new/upgrading-9.0.html).
|
||||
The `varnish-modules` project is currently not packaged for Vinyl Cache, as it is incompatible.
|
||||
|
||||
- `eslint` has been updated from version 9 to version 10. Please see <https://eslint.org/blog/2026/02/eslint-v10.0.0-released/> for details about the breaking changes included in the update.
|
||||
- `eslint` has been updated from version 9 to version 10. Please see https://eslint.org/blog/2026/02/eslint-v10.0.0-released/ for details about the breaking changes included in the update.
|
||||
|
||||
- `minio` has been abandoned by upstream and security issues won't be fixed. `minio_legacy_fs` has also been removed. Both are scheduled for full removal in 26.11. Users should migrate to alternatives such as Garage, SeaweedFS, or Ceph. S3-compatible clients such as rclone can be used to move data.
|
||||
- `minio` has been abandoned by upstream and security issues won't be fixed. It is scheduled to be removed for 26.11. Users should migrate to alternatives such as Garage, SeaweedFS, or Ceph. S3-compatible clients such as rclone can be used to move data.
|
||||
|
||||
- `mercure` has been updated to `0.21.4` (or later). Version [0.21.0](https://github.com/dunglas/mercure/releases/v0.21.0) and [0.21.2](https://github.com/dunglas/mercure/releases/tag/v0.21.2) introduce breaking changes to the package.
|
||||
`minio_legacy_fs` has been removed. Users should migrate to alternatives such as Garage, SeaweedFS, or Ceph. S3-compatible clients such as rclone can be used to move data.
|
||||
|
||||
- `mozc` and `mozc-ut` no longer contain the IBus front-end, which is now provided by `ibus-engines.mozc` and `ibus-engines.mozc-ut`.
|
||||
- `mercure` has been update to `0.21.4` (or later). Version [0.21.0](https://github.com/dunglas/mercure/releases/v0.21.0) and [0.21.2](https://github.com/dunglas/mercure/releases/tag/v0.21.2) introduce breaking changes to the package.
|
||||
|
||||
- `mozc` and `mozc-ut` no longer contains the IBus front-end, which are now provided by `ibus-engines.mozc` and `ibus-engines.mozc-ut`.
|
||||
|
||||
- `nemorosa` has been updated from `0.4.3` to `0.5.0`. Version [0.5.0](https://github.com/KyokoMiki/nemorosa/releases/tag/0.5.0) introduced breaking changes to the package configuration.
|
||||
|
||||
- `n8n` has been updated to version 2. You can find the breaking changes here: <https://docs.n8n.io/2-0-breaking-changes/>.
|
||||
- `n8n` has been updated to version 2. You can find the breaking changes here: https://docs.n8n.io/2-0-breaking-changes/.
|
||||
|
||||
- `nomad` has been updated to v1.11. Refer to the [release note](https://developer.hashicorp.com/nomad/docs/release-notes/nomad/v1-11-x) for more details. Once a new Nomad version has started and upgraded its data directory, it generally cannot be downgraded to the previous version.
|
||||
- `nomad` has been updated to v1.11. Refer to the [release note](https://developer.hashicorp.com/nomad/docs/release-notes/nomad/v1-11-x) for more details. Once a new Nomad version has started and upgraded it's data directory, it generally cannot be downgraded to the previous version.
|
||||
|
||||
- The default NVIDIA drivers no longer support Maxwell (GTX 1xxx) or older GPUs. Pin the nvidia package to ` config.boot.kernelPackages.nvidiaPackages.legacy_580` for continued support.
|
||||
|
||||
@@ -232,26 +179,24 @@
|
||||
|
||||
- `iroh` has been removed and split up into `iroh-dns-server` and `iroh-relay`.
|
||||
|
||||
- The `xorg` package set has been deprecated, packages have moved to the top level.
|
||||
- the `xorg` package set has been deprecated, packages have moved to the top level.
|
||||
|
||||
- `python3Packages.buildPythonPackage` and `python3Packages.buildPythonApplication` now throw errors in the presence of `pytestFlagsArray`.
|
||||
Please use [`pytestFlags` and `(enabled|disabled)(TestPaths|Tests|TestMarks)`](#using-pytestcheckhook) instead.
|
||||
If modifying the Nix expression is not feasible, users can remediate the error by overriding `pytestFlagsArray` with `null` or `[ ]`.
|
||||
|
||||
- `python3Packages.pygame` has been renamed to `python3Packages.pygame-original`, the attribute `python3Packages.pygame` will from python 3.14 default to the more actively maintained `python3Packages.pygame-ce`.
|
||||
- `python3Packages.pygame` has been been renamed to `python3Packages.pygame-original`, the attribute `python3Packages.pygame` will from python 3.14 default to the more actively maintained `python3Packages.pygame-ce`
|
||||
|
||||
- `fastly` has been updated to major version 14. For more information, you can check the [release notes](https://github.com/fastly/cli/releases/tag/v14.0.0).
|
||||
- `fastly` has been updated to major version 14. For more information, you can check the [release notes](https://github.com/fastly/cli/releases/tag/v14.0.0)
|
||||
|
||||
- `peertube` has been updated from `7.3.0` to `8.0.2`, introducing several breaking changes.
|
||||
Some notable new features include channel collaboration and video player redesign with a new theme.
|
||||
For details on how to upgrade, see the `IMPORTANT NOTES` section of the [v8.0.0 CHANGELOG entry](https://docs.joinpeertube.org/CHANGELOG#v8-0-0).
|
||||
|
||||
- `python3Packages.gradio` has been updated to version 6. See upstream's migration guide at <https://www.gradio.app/main/guides/gradio-6-migration-guide>.
|
||||
- `python3Packages.gradio` has been updated to version 6. See upstream's migration guide at https://www.gradio.app/main/guides/gradio-6-migration-guide.
|
||||
|
||||
- `python3Packages.pikepdf` no longer builds with mupdf support by default, which may be nice in Jupyter and iPython. Build with `withMupdf = true` if this is required.
|
||||
|
||||
- `olive-editor` has been dropped as upstream development ceased and no longer builds.
|
||||
|
||||
- `python3Packages.django-mdeditor` has been removed, as it was unmaintained upstream and the latest release was vulnerable to a [critical security vulnerability](https://github.com/NixOS/nixpkgs/issues/515462).
|
||||
|
||||
- `vicinae` has been updated to v0.20. This includes, among several other breaking changes, a complete overhaul of the configuration system. For update instructions, see the [upstream configuration documentation](https://docs.vicinae.com/config#migration-from-v0-16-x-to-v0-17-x).
|
||||
@@ -269,12 +214,23 @@
|
||||
- `jetbrains.plugins.addPlugins` no longer supports plugin names or ID strings.
|
||||
You can still use `addPlugins` with plugin derivations, such as plugins packaged outside of Nixpkgs.
|
||||
|
||||
- The `programs.captive-browser` module no longer falls back on a setcap wrapper around udhcpc to discover your network's DNS server due to [GHSA-wc3r-c66x-8xmc](https://github.com/NixOS/nixpkgs/security/advisories/GHSA-wc3r-c66x-8xmc) (CVE-2026-25740). If you're using this module, you must either configure `programs.captive-browser.dhcp-dns` manually or enable one of NetworkManager, dhcpcd, or systemd-networkd.
|
||||
|
||||
- NetBox was updated to `>= 4.5.5`. Have a look at the breaking changes
|
||||
of the [4.5 release](https://github.com/netbox-community/netbox/releases/tag/v4.5.0),
|
||||
make the required changes to your database, if needed, then upgrade by setting `services.netbox.package = pkgs.netbox_4_5;` in your configuration.
|
||||
|
||||
- The `services.yggdrasil` module has been refactored with the following breaking changes:
|
||||
- The `services.yggdrasil.configFile` option has been removed. Configuration should now be specified directly via `services.yggdrasil.settings`.
|
||||
- The `services.yggdrasil.persistentKeys` option has been removed. To maintain persistent keys and IPv6 addresses across reboots, use `services.yggdrasil.settings.PrivateKeyPath` to securely load your private key from a file via systemd credentials. The private key must be in PEM format (PKCS #8).
|
||||
- Storing `PrivateKey` directly in `settings` is now explicitly forbidden to prevent keys from being stored world-readable in the Nix store.
|
||||
- If you previously used `configFile`, migrate your configuration to the `settings` option and extract the private key to a separate file referenced by `PrivateKeyPath`.
|
||||
- If you previously used `persistentKeys`, convert your keys to PEM format and store them in a secure location accessible only to root, then reference them via `PrivateKeyPath`.
|
||||
|
||||
- `pocket-id` has been updated to version 2 that contains [breaking changes](https://pocket-id.org/docs/setup/major-releases/migrate-v2).
|
||||
|
||||
- `services.xserver` will now throw an error if an X11 driver specified in `videoDriver(s)` cannot be found. Previously, unknown drivers would be silently ignored.
|
||||
|
||||
- `asio` (standalone version of `boost::asio`) has been updated from 1.24.0 to 1.36.0. Some breaking changes were introduced between these
|
||||
two versions, and the one affected most was the removal of `asio::io_service` in favor of `asio::io_context` in 1.33.0. `asio_1_32_0` is
|
||||
retained for packages that have not completed migration. `asio_1_10` has been removed as no packages depend on it anymore.
|
||||
@@ -297,6 +253,8 @@
|
||||
|
||||
- Ethercalc and its associated module have been removed, as the package is unmaintained and cannot be installed from source with npm now.
|
||||
|
||||
- The `services.avahi.wideArea` option now defaults to `false` as a mitigation against [`CVE-2024-52615`/`GHSA-x6vp-f33h-h32g`](https://github.com/avahi/avahi/security/advisories/GHSA-x6vp-f33h-h32g).
|
||||
|
||||
- `coreth` has been removed, as upstream has moved it into `avalanchego`.
|
||||
|
||||
- `nodePackages.prebuild-install` was removed because it appeared to be unmaintained upstream.
|
||||
@@ -314,7 +272,7 @@
|
||||
IMAP_CERTIFICATE_VALIDATION=false
|
||||
```
|
||||
|
||||
- `python3Packages.pillow-avif-plugin` has been removed as the functionality is included in `python3Packages.pillow` directly since version 11.3.
|
||||
- `python3packages.pillow-avif-plugin` has been removed as the functionality is included in `python3packages.pillow` directly since version 11.3.
|
||||
|
||||
- `wasistlos` (previously known as `whatsapp-for-linux`) has been removed because it was unmaintained and archived upstream.
|
||||
Multiple alternatives exist: `karere`, `whatsie` and `zapzap` among others.
|
||||
@@ -326,6 +284,8 @@
|
||||
|
||||
- `shisho` has been removed because it's archived. `semgrep`, `opengrep`, and `ast-grep` provide similar functionality.
|
||||
|
||||
- `services.openssh.settings.AcceptEnv` now explicitly defined as an option that takes a list of strings, to facilitate option merging. Setting it to a string value is no longer supported.
|
||||
|
||||
- All Xfce packages have been moved to top level (e.g. if you previously added `pkgs.xfce.xfce4-whiskermenu-plugin` to `environment.systemPackages`, you will need to change it to `pkgs.xfce4-whiskermenu-plugin`). The `xfce` scope will be removed in NixOS 26.11.
|
||||
|
||||
- The Dovecot IMAP server has been updated to version 2.4, with the `dovecot` attribute now referring to this backwards-incompatible version. The attribute `dovecot_2_3` refers to the previous version. The Pigeonhole plugin has been similarly updated to 2.4, with the version compatible with Dovecot 2.3 being at `dovecot_pigeonhole_0_5`. See <https://doc.dovecot.org/latest/installation/upgrade/2.3-to-2.4.html> for more information on how to upgrade.
|
||||
@@ -336,8 +296,12 @@
|
||||
|
||||
- `vimPlugins.nvim-treesitter` has been updated to `main` branch, which is a full and incompatible rewrite. If you can't or don't want to update, you should use `vimPlugins.nvim-treesitter-legacy`.
|
||||
|
||||
- `services.taskchampion-sync-server` module have been added an option `services.taskchampion-sync-server.dynamicUser` to use systemd's DynamicUser feature. This is enabled by default when stateVersion is at least 26.05, and disabled otherwise. If you need this feature, you need to set `services.taskchampion-sync-server.dynamicUser` to `true` and migrate `/var/lib/taskchampion-sync-server` to `/var/lib/private/taskchampion-sync-server`.
|
||||
|
||||
- Package `jellyseerr` has been renamed to `seerr` following the upstream rename.
|
||||
|
||||
- The default packages in `services.jenkins.packages` have been dropped, since not every Jenkins installation needs any package at all. It's more reasonable to leave it empty and let users configure what they need.
|
||||
|
||||
- The `pie` hardening flag has been removed and will now error, after being deprecated in 25.11. Compilers are expected to enable PIE by default, as has been common practice since 2016 outside of Nixpkgs. If a package needs `pie` disabled pass `-no-pie` in `CFLAGS`. It is unlikely this will be necessary in many cases; due to the prevalence of default PIE toolchains, most packages incompatible with PIE already pass `-no-pie`.
|
||||
|
||||
- `pqos-wrapper` was removed as it has been unmaintained since 2022 and not widely used.
|
||||
@@ -350,8 +314,6 @@
|
||||
|
||||
- `linuxPackages.nvidiaPackages` now follows NVIDIA's official release branches by exposing `production`, `new_feature`, and `beta`. The convenience aliases `latest` (newer of `production` and `new_feature`) and `bleeding_edge` (newer of `latest` and `beta`) are provided; note that `beta` now refers strictly to the beta branch.
|
||||
|
||||
- `stestrCheckHook` was added: This test hook runs `stestr run`. You can disable tests with `disabledTests` and `disabledTestsRegex`.
|
||||
|
||||
- `balatro` now supports the Google Play and Xbox PC versions of the game. Pass the `apk` or `Assets.zip` as `balatro.override { src = "…" }`.
|
||||
|
||||
- `uptime-kuma` has been updated to v2, which requires an automated migration that can take a few hours. **A backup is highly recommended.**
|
||||
@@ -362,22 +324,16 @@
|
||||
|
||||
- The `libcxxhardeningextensive` hardening flag has been **disabled** by default. Enabling it by default in 25.11 was unintentional and may have had a negative effect on performance in some cases. `libcxxhardeningfast` remains enabled by default.
|
||||
|
||||
- Wine has been updated to the 11.0 branch. Please check the [upstream announcement](https://gitlab.winehq.org/wine/wine/-/releases/wine-11.0) for more details.
|
||||
|
||||
- Cinnamon has been updated to 6.6, please check the [upstream announcement](https://www.linuxmint.com/rel_zena_whatsnew.php) for more details.
|
||||
|
||||
- `rspamd` has been updated to 4.0. Please check the upstream [migration](https://docs.rspamd.com/tutorials/migration/#migration-to-rspamd-400) documentation, especially if you run a sharded Redis deployment.
|
||||
|
||||
- `hyphen` now supports over 40 language variants through `hyphenDicts` and now allows to enable all supported languages through `hyphenDicts.all`.
|
||||
|
||||
- `budgie` has been updated to 10.10, please check the [upstream announcement](https://buddiesofbudgie.org/blog/budgie-10-10-released) for more details.
|
||||
|
||||
- The packages `ibtool`, `actool` and `re-plistbuddy` have been added, providing reimplementations of the corresponding proprietary Apple tools. They are more compatible with the originals than the previously existing `xcbuild` package, and should enable more darwin software to be built from source.
|
||||
|
||||
- Switch inhibitors were introduced, which add a pre-switch check that compares a list of strings between the previous and the new generation, and refuses to switch into the new generation when there is a difference between the two lists. This allows to avoid switching into a system when for instance the systemd version changed by adding `config.systemd.package.version` to the switch inhibitors for your system. You can still forcefully switch into any generation by setting `NIXOS_NO_CHECK=1`.
|
||||
|
||||
- GNU Taler has been updated to version 1.3.
|
||||
This release focuses on getting everything ready for a deployment of GNU Taler by Magnet bank.
|
||||
For more details, see the [upstream release notes](https://www.taler.net/en/news/2025-13.html).
|
||||
|
||||
- The `services.nextcloud-spreed-signaling` NixOS module has been added to facilitate declarative management of a standalone Spreed signaling server ("High Performance Backend" for Nextcloud Talk).
|
||||
|
||||
- `collabora-desktop` The desktop version of Collabora Office is now available, package version `25.05.9.2-2`.
|
||||
|
||||
- `fetchPnpmDeps` and `pnpmConfigHook` were added as top-level attributes, replacing the now deprecated `pnpm.fetchDeps` and `pnpm.configHook` attributes.
|
||||
@@ -393,7 +349,7 @@
|
||||
|
||||
- Added `dell-bios-fan-control` package and service.
|
||||
|
||||
- Added `lovr` package, a Lua-based game engine for VR and XR applications.
|
||||
- Added `lovr` package, a LUA-based game engine for VR and XR applications.
|
||||
|
||||
- Updated `wsjtx` from 2.7.0 to 3.0.0 for amateur radio hobbyists who use FT8 and other related digital modes.
|
||||
See the [release notes](https://wsjt.sourceforge.io/Release_Notes.txt) for the changelog.
|
||||
@@ -403,14 +359,14 @@
|
||||
|
||||
- `wrapNeovimUnstable` now sets provider-related configuration in its generated config rather than as wrapper arguments. It should not affect configuration unless you set `wrapRc` to false or are using the `legacyWrapper`.
|
||||
|
||||
- Neovim Lua dependencies are now set in the generated init.lua instead of
|
||||
- neovim lua dependencies are now set in the generated init.lua instead of
|
||||
modifying LUA_PATH in the wrapper. Commands run pre-vimrc via `nvim --cmd
|
||||
"require'LUA_MODULE'"` may
|
||||
not find their lua dependencies anymore. Use `nvim -c "lua require'LUA_MODULE'"` instead to run these commands after loading `init.lua`. If you use `wrapNeovim` with `wrapRc` set to `false`, you may lose the lua dependencies if you are not loading the generated `init.lua`.
|
||||
|
||||
- We now use the upstream wrapper script for Gradle, supporting both the `JAVA_HOME` and `GRADLE_OPTS` environment variables.
|
||||
|
||||
- Updated `gonic` to 0.21.0. A full ("slow") scan is recommended after upgrading to v0.21.0 to pick up the newly scanned fields (contributors, ISRCs, record labels, per-track years, ARTIST_CREDIT).
|
||||
- the `autossh-ng` NixOS module was introduced as a simpler alternative to the existing `autossh` module.
|
||||
|
||||
- Added `haskell.packages.microhs`, a set of Haskell packages built with MicroHs.
|
||||
|
||||
@@ -430,6 +386,8 @@ gnuradioMinimal.override {
|
||||
}
|
||||
```
|
||||
|
||||
- Added `headplane` and `headplane-agent` packages, and `services.headplane` service.
|
||||
|
||||
## Nixpkgs Library {#sec-nixpkgs-release-26.05-lib}
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
@@ -442,7 +400,7 @@ gnuradioMinimal.override {
|
||||
|
||||
- `nodejs` is now a simple wrapper for `nodejs-slim`+`nodejs-slim.npm`+`nodejs-slim.corepack`, meaning it is no longer possible to reference or override its attributes or outputs (e.g. `nodejs.libv8` must be replaced with `nodejs-slim.libv8`, `nodejs.nativeBuildInputs` with `nodejs-slim.nativeBuildInputs`, etc.).
|
||||
|
||||
- `navidrome` has removed the built-in Spotify integration. See [v0.61.0](https://github.com/navidrome/navidrome/releases/tag/v0.61.0) for details on optional replacements.
|
||||
- `navidrome` has removed the built-in Spotify integration https://github.com/navidrome/navidrome/releases/tag/v0.61.0 has details on optional replacements
|
||||
|
||||
- `mold` is now wrapped by default.
|
||||
|
||||
@@ -462,3 +420,4 @@ gnuradioMinimal.override {
|
||||
|
||||
- The builder `php.buildComposerProject2` for PHP applications has been improved for better reliability and stability.
|
||||
|
||||
- The `services.drupal` module has a few improvements aimed at making it better for installing custom Drupal instances, namely a new `webRoot` option for identifying custom webroots in source code, a new `configRoot` option for identifying and synchronizing config yamls onto NixOS, and a some new settings for managing variable content and filepaths.
|
||||
|
||||
@@ -10,41 +10,13 @@
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
- `databricks-cli` has been updated from `0.290.2` to `1.x.x`, the first major release. OAuth tokens for interactive logins (`auth_type = databricks-cli`) are now stored in the OS-native secure store by default (Secret Service on Linux) instead of `~/.databricks/token-cache.json`; cached tokens from older versions are not migrated, so run `databricks auth login` once per profile after upgrading. To keep the previous file-backed storage, set `DATABRICKS_AUTH_STORAGE=plaintext` or add `auth_storage = plaintext` under `[__settings__]` in `~/.databrickscfg`. Additionally, the `vector_search_endpoints` DABs resource renamed `min_qps` to `target_qps` (and the `vector-search-endpoints` command renamed `--min-qps` to `--target-qps`). See the [upstream changelog](https://github.com/databricks/cli/blob/main/CHANGELOG.md) for details.
|
||||
|
||||
- `hurl` has been updated to `8.x.x` which has some breaking changes. See [upstream changelog](https://github.com/Orange-OpenSource/hurl/releases/tag/8.0.0) for details.
|
||||
- `python3Packages.django-health-check` has been updated to major version 4. See its [migration guide](https://codingjoe.dev/django-health-check/migrate-to-v4/) and [changelog](https://github.com/codingjoe/django-health-check/releases/tag/4.0.0) for breaking changes.
|
||||
|
||||
- `libgdata` has been removed, as it was archived upstream and relied on the insecure libsoup 2.4.
|
||||
|
||||
- `uhttpmock` providing 0.0 ABI was removed. `uhttpmock_1_0` providing 1.0 ABI was renamed to `uhttpmock` and `uhttpmock_1_0` was kept as an alias.
|
||||
|
||||
- The ARMv5 Linux kernel build now uses a standard configuration and generates a standard compressed image instead of the deprecated legacy U‐Boot image format.
|
||||
`lib.systems.{examples,platforms}.{sheevaplug,pogoplug4}` have been unified into `lib.systems.examples.armv5tel-multiplatform`.
|
||||
Note that there is no official support for ARMv5 and it is not possible to build even a simple NixOS configuration out of the box.
|
||||
|
||||
- Support for the legacy U‐Boot image format has been removed from the Linux kernel builders, as it is deprecated upstream and no longer used by any platform in Nixpkgs.
|
||||
|
||||
- `requireFile` now sets `meta.license = lib.licenses.unfree` by default. Users of `requireFile`-based derivations that preserve this default will need to explicitly allow their evaluation as described in [](#sec-allow-unfree).
|
||||
|
||||
- `librest` providing 0.7 ABI was removed. `librest_1_0` providing 1.0 ABI was renamed to `librest` and `librest_1_0` was kept as an alias.
|
||||
|
||||
- `fetchPnpmDeps`' `fetcherVersion = 1` and `fetcherVersion = 2` have been
|
||||
removed, as announced in the 26.05 release. Packages still using them now
|
||||
throw an evaluation error and must migrate to `fetcherVersion = 3` (or later)
|
||||
and regenerate their hashes. See the
|
||||
[pnpm `fetcherVersion` section](#javascript-pnpm-fetcherVersion) of the manual
|
||||
for details.
|
||||
|
||||
## Other Notable Changes {#sec-nixpkgs-release-26.11-notable-changes}
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
- Package-URL (PURL, https://github.com/package-url/purl-spec) metadata identifier has been added for `fetchgit`, `fetchpypi` and `fetchFromGithub` fetchers.
|
||||
`mkDerivation` has been adjusted to reuse this information.
|
||||
Package-URLs allow reliably identifying and locating software packages.
|
||||
Maintainers of derivations using the adapted fetchers should rely on the `drv.src.meta.identifiers.v1.purl` default identifier and can enhance their `drv.meta.identifiers.v1.purls` list once they would like to have additional identifiers.
|
||||
Maintainers using `fetchurl` for `drv.src` are urged to adapt their `drv.meta.identifiers.purlParts` for proper identification.
|
||||
- Create the first release note entry in this section!
|
||||
|
||||
## Nixpkgs Library {#sec-nixpkgs-release-26.11-lib}
|
||||
|
||||
|
||||
@@ -61,12 +61,6 @@ Release branch. Used to specify that a package is not going to receive updates t
|
||||
|
||||
The package’s homepage. Example: `https://www.gnu.org/software/hello/manual/`
|
||||
|
||||
### `donationPage` {#var-meta-donationPage}
|
||||
|
||||
The package or project's donation page, if it exists. Example: `https://neovim.io/sponsors/`
|
||||
|
||||
Authoritative project URLs are preferred.
|
||||
|
||||
### `downloadPage` {#var-meta-downloadPage}
|
||||
|
||||
The page where a link to the current version can be found. Example: `https://ftp.gnu.org/gnu/hello/`
|
||||
@@ -157,8 +151,6 @@ The list of Nix platform types for which the [Hydra](https://github.com/nixos/hy
|
||||
}
|
||||
```
|
||||
|
||||
Note that this does not affect whether reverse dependencies of the package are built on Hydra.
|
||||
|
||||
### `broken` {#var-meta-broken}
|
||||
|
||||
If set to `true`, the package is marked as "broken", meaning that it won’t show up in [search.nixos.org](https://search.nixos.org/packages), and cannot be built or installed unless [explicitly allowed](#sec-allow-broken).
|
||||
@@ -342,30 +334,3 @@ A readonly attribute that concatenates all CPE parts in one string.
|
||||
#### `meta.identifiers.possibleCPEs` {#var-meta-identifiers-possibleCPEs}
|
||||
|
||||
A readonly attribute containing the list of guesses for what CPE for this package can look like. It includes all variants of version handling mentioned above. Each item is an attrset with attributes `cpeParts` and `cpe` for each guess.
|
||||
|
||||
### Package URL {#sec-meta-identifiers-purl}
|
||||
|
||||
[Package-URL](https://github.com/package-url/purl-spec) (PURL) is a specification to reliably identify and locate software packages.
|
||||
Through identification of software packages, additional (non-major) use cases are e.g. software license cross-verification via third party databases or initial vulnerability response management.
|
||||
Package-URLs shall default to the `mkDerivation.src`, as the original consumed software package is the single source of truth.
|
||||
|
||||
#### `meta.identifiers.purlParts` {#var-meta-identifiers-purlParts}
|
||||
|
||||
This attribute contains an attribute set of all parts of the PURL for this package.
|
||||
|
||||
* `type` mandatory [type](https://github.com/package-url/purl-spec/blob/18fd3e395dda53c00bc8b11fe481666dc7b3807a/docs/standard/summary.md) which needs to be provided
|
||||
* `spec` specify the PURL in accordance with the [purl-spec](https://github.com/package-url/purl-spec/blob/18fd3e395dda53c00bc8b11fe481666dc7b3807a/purl-specification.md)
|
||||
|
||||
#### `meta.identifiers.purl` {#var-meta-identifiers-purl}
|
||||
|
||||
An extendable attribute which is built based on `purlParts`.
|
||||
This is the main identifier of the software package.
|
||||
For handling edge cases, consider using the list interface [`meta.identifiers.purls`](#var-meta-identifiers-purls).
|
||||
|
||||
#### `meta.identifiers.purls` {#var-meta-identifiers-purls}
|
||||
|
||||
An extendable list attribute which defaults to a single element equal to [`meta.identifiers.purl`](#var-meta-identifiers-purl).
|
||||
It provides an interface for additional identifiers of `mkDerivation.src` or for identifiers of vendored dependencies inside `mkDerivation.src`, which maintainers may carefully consider to specify as well.
|
||||
|
||||
Additional identifiers are generally not recommended, as they might cause maintenance overhead or diverge.
|
||||
For example, a source distribution `pkg:github` may be hard to keep correctly aligned with the corresponding binary distribution `pkg:pypi`.
|
||||
|
||||
@@ -1,420 +0,0 @@
|
||||
# Styleguide
|
||||
|
||||
## Writing Principles
|
||||
|
||||
A consistent style greatly increases the usability of all documentation and communication.
|
||||
|
||||
Use this page as a reference and style guide for our internal and external documentation.
|
||||
|
||||
### Knowledge Expectations
|
||||
|
||||
**Assume competence, not familiarity.**
|
||||
|
||||
Write for someone who knows a great deal — up to but not including this project.
|
||||
|
||||
**What readers know:**
|
||||
|
||||
- Basic computer operation
|
||||
- Command line familiarity
|
||||
- General interest in systems configuration
|
||||
|
||||
**What readers don't know:**
|
||||
|
||||
- NixOS-specific concepts
|
||||
- NixOS ecosystem details or grammar
|
||||
- NixOS workflows
|
||||
|
||||
If specific knowledge is required, mention it at the start of the page.
|
||||
|
||||
#### Show, Don't Tell
|
||||
|
||||
The fastest path to understanding is a working example.
|
||||
People learn by doing, not by reading about doing.
|
||||
|
||||
**Recommended structure:**
|
||||
|
||||
- Start with the minimal working code or command
|
||||
- Briefly explain what it does
|
||||
- Cover edge cases or variations
|
||||
- Link to further information instead of including it
|
||||
|
||||
#### Grammar and Style
|
||||
|
||||
**Sentence structure:**
|
||||
|
||||
- Use simple, direct sentences
|
||||
- Break complex ideas into multiple short sentences
|
||||
- Avoid nested clauses
|
||||
|
||||
**Bad:**
|
||||
|
||||
> The following command, which utilizes nixos-generate-config to produce a comprehensive hardware configuration, will write the results back into the respective configuration directory located on your local machine.
|
||||
|
||||
What the user does is hidden in the middle.
|
||||
`nixos-generate-config` is a leaked implementation detail.
|
||||
Users care about *detecting hardware*, not *the tool that does it*.
|
||||
|
||||
**Good:**
|
||||
|
||||
> This command detects your hardware and saves the configuration.
|
||||
|
||||
#### Content Organization
|
||||
|
||||
Lead with value. State what the reader will accomplish before explaining how.
|
||||
|
||||
**Bad:**
|
||||
|
||||
> To create a new NixOS configuration that you can later use as a webserver, first navigate to your project directory, then add a new host configuration file with the desired machine name.
|
||||
|
||||
**Good:**
|
||||
|
||||
Add a webserver configuration to your NixOS setup:
|
||||
|
||||
```nix
|
||||
# hosts/webserver/configuration.nix
|
||||
{ ... }:
|
||||
{
|
||||
services.nginx.enable = true;
|
||||
}
|
||||
```
|
||||
|
||||
Use **progressive disclosure**. Introduce concepts only when needed.
|
||||
|
||||
**Recommended structure:**
|
||||
|
||||
1. State the goal (one sentence)
|
||||
2. Show the simplest working example
|
||||
3. Explain concepts if needed
|
||||
4. Provide advanced options separately or link to the reference
|
||||
|
||||
#### No Meta-commentary
|
||||
|
||||
Don't describe what the documentation does. Just do it.
|
||||
|
||||
**Don't:**
|
||||
|
||||
> This section explains how to configure networking.
|
||||
> The following guide walks you through setting up a web server.
|
||||
|
||||
**Do:**
|
||||
|
||||
> Configure networking by setting:
|
||||
> Set up a web server:
|
||||
|
||||
#### Code Examples
|
||||
|
||||
**Keep examples focused:**
|
||||
|
||||
- Show one concept at a time
|
||||
- Use realistic but simple scenarios
|
||||
- Avoid dependencies on other examples
|
||||
|
||||
**Minimal comments**
|
||||
|
||||
Let the code speak for itself.
|
||||
Paste code examples directly and without further alteration.
|
||||
|
||||
**Bad:**
|
||||
|
||||
```nix
|
||||
# This sets the hostname for the machine
|
||||
{
|
||||
networking.hostName = "webserver"; # Change this to your machine's hostname
|
||||
# This enables SSH access
|
||||
services.openssh.enable = true; # Required for remote deployment
|
||||
}
|
||||
```
|
||||
|
||||
**Good:**
|
||||
|
||||
```nix
|
||||
{
|
||||
networking.hostName = "webserver";
|
||||
services.openssh.enable = true;
|
||||
}
|
||||
```
|
||||
|
||||
#### Lead with Practical Examples
|
||||
|
||||
Don't front-load theory. Readers want to accomplish something first, then understand why it works.
|
||||
|
||||
- Show configuration as *what you want*, not *how the module system works*
|
||||
- Introduce Nix-specific concepts only when they are needed to complete the task
|
||||
- Defer language mechanics to reference pages or `nix.dev`
|
||||
|
||||
**Bad:**
|
||||
|
||||
> Before adding a service, you need to understand the NixOS module system and attribute set merging.
|
||||
|
||||
**Good:**
|
||||
|
||||
Enable nginx:
|
||||
|
||||
```nix
|
||||
{ services.nginx.enable = true; }
|
||||
```
|
||||
|
||||
This adds nginx to your system configuration. Rebuild to apply:
|
||||
|
||||
```bash
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
#### Teach Nix through examples, not theory
|
||||
|
||||
|
||||
Users learn the NixOS module system by seeing patterns first.
|
||||
|
||||
- Start with a working example
|
||||
- Explanation follows the code
|
||||
- Link deeper concepts instead of inlining them
|
||||
- Link to `nix.dev` for optional learning
|
||||
|
||||
#### General Rules
|
||||
|
||||
- Abbreviate keys like `ssh-ed25519 AAAAC3NzaC…`
|
||||
- Abbreviate IP addresses like `192.168.XXX.XXX`
|
||||
- Variables are capitalized and start with `$`, e.g. `$YOUR_HOSTNAME`
|
||||
- Variables should be directly usable during copy-paste
|
||||
- Do **not** describe missing code parts (`#elided`, `#omitted`)
|
||||
- **Machine vs Host**: use "machine" for the NixOS system identity, "host" for the physical or virtual hardware
|
||||
|
||||
#### Capitalization
|
||||
|
||||
- GB / RAM / HDD
|
||||
- bootable USB drive
|
||||
- Wi-Fi / DHCP / DNS
|
||||
- macOS / NixOS / Nix / Linux
|
||||
- Flakes
|
||||
- git
|
||||
|
||||
#### Headings
|
||||
|
||||
Use sentence case. A reader scanning only headings should understand the page.
|
||||
|
||||
**Don't:**
|
||||
|
||||
> Getting Started
|
||||
> Overview
|
||||
> Configure The Database
|
||||
|
||||
**Do:**
|
||||
|
||||
> Set up a PostgreSQL database
|
||||
> Configure networking
|
||||
> Add a user to the system
|
||||
|
||||
#### Imperative Mood, Voice, and Person
|
||||
|
||||
Use imperative mood for instructions. Address the reader as "you", not "the user". Use active voice; in other words, make the subject do the action.
|
||||
|
||||
**Don't:**
|
||||
|
||||
> The user should run the following command.
|
||||
> The configuration will need to be updated.
|
||||
> The key is generated by the system.
|
||||
|
||||
**Do:**
|
||||
|
||||
> Run the command.
|
||||
> Update the configuration.
|
||||
> The system generates the key.
|
||||
|
||||
#### Tense
|
||||
|
||||
Use present tense for descriptions. Future tense makes documentation feel tentative.
|
||||
|
||||
**Don't:**
|
||||
|
||||
> This will create a new folder.
|
||||
> Running this command will install the package.
|
||||
|
||||
**Do:**
|
||||
|
||||
> This creates a new folder.
|
||||
> Running this command installs the package.
|
||||
|
||||
#### Be Confident
|
||||
|
||||
State facts. Don't hedge with "should," "might," "typically," or "usually" unless the behavior genuinely varies.
|
||||
|
||||
**Don't:**
|
||||
|
||||
> This should create the configuration file.
|
||||
> The service will usually start automatically.
|
||||
|
||||
**Do:**
|
||||
|
||||
> This creates the configuration file.
|
||||
> The service starts automatically.
|
||||
|
||||
#### Avoid Nominalizations
|
||||
|
||||
A nominalization is a verb turned into a noun, often by adding *-tion*, *-meant*, or *-ance* (e.g. "explanation", "selection"). The fix: find the hidden verb and use it directly.
|
||||
|
||||
**Don't:**
|
||||
|
||||
> Make a selection from the list.
|
||||
> Provide an explanation of the error.
|
||||
|
||||
**Do:**
|
||||
|
||||
> Select from the list.
|
||||
> Explain the error.
|
||||
|
||||
#### Plain Words
|
||||
|
||||
Technical precision for technical terms; plain language for everything else.
|
||||
|
||||
- "use" not "utilize"
|
||||
- "start" not "initiate"
|
||||
- "end" not "terminate"
|
||||
- "help" not "facilitate"
|
||||
- "send" not "transmit"
|
||||
- "set up" not "establish"
|
||||
- "find out" not "ascertain"
|
||||
|
||||
#### Filler Words and Weak Phrases
|
||||
|
||||
Cut words and phrases that add length without meaning.
|
||||
|
||||
Delete on sight:
|
||||
|
||||
- "simply", "just", "easily", "basically", "obviously"
|
||||
- "in order to" → use "to"
|
||||
- "allows you to" → use the verb directly
|
||||
- "it's worth noting that" → just say the thing
|
||||
- no exclamation marks in technical prose
|
||||
|
||||
**Don't:**
|
||||
|
||||
> Simply run `nixos-rebuild switch`.
|
||||
> In order to deploy, you first need to run the command, which allows you to push the config.
|
||||
> It's worth noting that this requires root access.
|
||||
|
||||
**Do:**
|
||||
|
||||
> Run `nixos-rebuild switch`.
|
||||
> To deploy, run:
|
||||
> This requires root access.
|
||||
|
||||
Every word must earn its place.
|
||||
|
||||
#### Writing Procedures
|
||||
|
||||
One instruction per sentence. Don't pack multiple actions into one sentence.
|
||||
|
||||
**Don't:**
|
||||
|
||||
> Navigate to your project directory and run the command, then check the output.
|
||||
|
||||
**Do:**
|
||||
|
||||
1. Navigate to your project directory.
|
||||
2. Run the command.
|
||||
3. Check the output.
|
||||
|
||||
Don't bury the negative. Key limitations should be prominent, not a footnote after a positive description.
|
||||
|
||||
**Don't:**
|
||||
|
||||
> This service supports multiple roles, integrates with existing modules, and works great for most setups (note that multiple instances are not supported).
|
||||
|
||||
**Do:**
|
||||
|
||||
> This service does not support multiple instances.
|
||||
|
||||
#### Consistent Terminology
|
||||
|
||||
Pick a term and stick to it. Don't swap synonyms to avoid repetition. In technical documentation, repetition is clarity.
|
||||
|
||||
**Don't:**
|
||||
|
||||
> Create a machine... configure the host... deploy the node.
|
||||
|
||||
**Do:**
|
||||
|
||||
> Create a machine... configure the machine... deploy the machine.
|
||||
|
||||
#### Links
|
||||
|
||||
Use descriptive link text. Never use "click here" or "this link."
|
||||
|
||||
**Don't:**
|
||||
|
||||
> For more information, see `[this page](url)`.
|
||||
> Click `[here](url)` to read the reference.
|
||||
|
||||
**Do:**
|
||||
|
||||
> See the `[NixOS options reference](url)` for details.
|
||||
> Read the `[NixOS module system guide](url)`.
|
||||
|
||||
Only link when the destination is directly relevant, not for generic background context (sometimes known as "Wikipedia-style links"). Readers feel obligated to click links, fearing they'll miss something important. Don't send them to a generic article about a technology when they're looking for how *your* system uses it.
|
||||
|
||||
**Don't:**
|
||||
|
||||
> Our software uses [SQLite](https://sqlite.org/) for storage.
|
||||
> *(Reader clicks expecting schema details — finds a generic product page instead.)*
|
||||
|
||||
(Note that in the above example, the SQLite link is the SQLite home page, which is likely not pertinent.)
|
||||
|
||||
**Do:**
|
||||
|
||||
> See `[database schema](url)` for the full table structure.
|
||||
|
||||
#### UI Language
|
||||
|
||||
Match UI element names exactly: wording, casing, and spacing (even if a label seems oddly worded).
|
||||
|
||||
**Don't:**
|
||||
|
||||
> Click the generator button.
|
||||
> Select the save option.
|
||||
|
||||
**Do:**
|
||||
|
||||
> Click **Generate a Key**.
|
||||
> Click **Save Changes**.
|
||||
|
||||
Someone will go looking for a button labeled "generator." They will not find it. They will be frustrated.
|
||||
|
||||
Consistency between documentation and interface builds confidence. Words are part of the interface.
|
||||
|
||||
:::{.tip}
|
||||
This can be tricky as UI changes; we don't yet have a policy in place for how to handle this. We welcome comments and suggestions.
|
||||
:::
|
||||
|
||||
#### Clean system discipline
|
||||
|
||||
Your machine has things new users don't: cached credentials, installed tools, environment variables, existing configuration. When writing or updating documentation:
|
||||
|
||||
**Don't:**
|
||||
|
||||
> Write steps from memory on your development machine, assuming what works there will work everywhere.
|
||||
|
||||
**Do:**
|
||||
|
||||
> - Start on a clean system — a fresh VM or new user account
|
||||
> - Take notes in real time as you work through the steps
|
||||
> - Document every warning, prompt, or unexpected output the system shows
|
||||
|
||||
Also think in combinations: WSL vs native Linux, with and without existing keys. You don't need to test every matrix square — but you need to know which ones diverge.
|
||||
|
||||
#### Never type code — always copy-paste
|
||||
|
||||
Always copy commands and code from a terminal where you just ran them successfully. Never retype from memory.
|
||||
|
||||
**Don't:**
|
||||
|
||||
> Retype a command from memory into the documentation.
|
||||
> Retype code into a code-block from memory
|
||||
|
||||
**Do:**
|
||||
|
||||
> Paste commands directly from the shell or IDE.
|
||||
> Paste code that has been successfully validated with nix-instantiate or nix-build
|
||||
|
||||
Replace sensitive values with placeholders: `<YOUR-KEY>`, `<YOUR-HOST>`, `<YOUR-TOKEN>`.
|
||||
|
||||
Typed-from-memory commands introduce subtle errors. Even the most experienced software developers have occasional typos.
|
||||
@@ -400,25 +400,7 @@ rec {
|
||||
condition: passthru: drv:
|
||||
let
|
||||
commonAttrs =
|
||||
drv
|
||||
// listToAttrs (
|
||||
outputsList
|
||||
++ [
|
||||
{
|
||||
name = "all";
|
||||
value = map (x: x.value) outputsList;
|
||||
}
|
||||
]
|
||||
)
|
||||
// passthru
|
||||
// {
|
||||
drvPath =
|
||||
assert condition;
|
||||
drv.drvPath;
|
||||
outPath =
|
||||
assert condition;
|
||||
drv.outPath;
|
||||
};
|
||||
drv // (listToAttrs outputsList) // { all = map (x: x.value) outputsList; } // passthru;
|
||||
|
||||
outputsList = map (outputName: {
|
||||
name = outputName;
|
||||
@@ -440,7 +422,15 @@ rec {
|
||||
};
|
||||
}) (drv.outputs or [ "out" ]);
|
||||
in
|
||||
commonAttrs;
|
||||
commonAttrs
|
||||
// {
|
||||
drvPath =
|
||||
assert condition;
|
||||
drv.drvPath;
|
||||
outPath =
|
||||
assert condition;
|
||||
drv.outPath;
|
||||
};
|
||||
|
||||
/**
|
||||
Strip a derivation of all non-essential attributes, returning
|
||||
|
||||
@@ -23,12 +23,9 @@
|
||||
let
|
||||
inherit (lib)
|
||||
addErrorContext
|
||||
any
|
||||
assertMsg
|
||||
attrNames
|
||||
attrValues
|
||||
concatLists
|
||||
concatMap
|
||||
concatMapStringsSep
|
||||
concatStrings
|
||||
concatStringsSep
|
||||
@@ -55,7 +52,6 @@ let
|
||||
isString
|
||||
last
|
||||
length
|
||||
genAttrs
|
||||
mapAttrs
|
||||
mapAttrsToList
|
||||
optionals
|
||||
@@ -383,69 +379,55 @@ rec {
|
||||
See the [git-config documentation](https://git-scm.com/docs/git-config#_variables) for possible values.
|
||||
*/
|
||||
toGitINI =
|
||||
attrs:
|
||||
let
|
||||
mkSectionName =
|
||||
let
|
||||
containsQuote = hasInfix ''"'';
|
||||
in
|
||||
name:
|
||||
let
|
||||
containsQuote = hasInfix ''"'' name;
|
||||
sections = splitString "." name;
|
||||
section = head sections;
|
||||
subsections = tail sections;
|
||||
subsection = concatStringsSep "." subsections;
|
||||
in
|
||||
if containsQuote name || length sections == 1 then
|
||||
name
|
||||
else
|
||||
''${head sections} "${concatStringsSep "." (tail sections)}"'';
|
||||
if containsQuote || subsections == [ ] then name else ''${section} "${subsection}"'';
|
||||
|
||||
mkValueString =
|
||||
v:
|
||||
let
|
||||
escape = replaceStrings [ "\n" " " ''"'' "\\" ] [ "\\n" "\\t" ''\"'' "\\\\" ];
|
||||
escapedV = ''"${replaceStrings [ "\n" " " ''"'' "\\" ] [ "\\n" "\\t" ''\"'' "\\\\" ] v}"'';
|
||||
in
|
||||
v: mkValueStringDefault { } (if isString v then ''"${escape v}"'' else v);
|
||||
mkValueStringDefault { } (if isString v then escapedV else v);
|
||||
|
||||
# generation for multiple ini values
|
||||
mkKeyValue =
|
||||
k: v:
|
||||
let
|
||||
mkKeyValue = mkKeyValueDefault { inherit mkValueString; } " = ";
|
||||
attrToString = k: v: "\t" + mkKeyValue k v;
|
||||
mkKeyValue = mkKeyValueDefault { inherit mkValueString; } " = " k;
|
||||
in
|
||||
k: v: if isList v then concatStringsSep "\n" (map (attrToString k) v) else attrToString k v;
|
||||
concatStringsSep "\n" (map (kv: "\t" + mkKeyValue kv) (toList v));
|
||||
|
||||
# converts { a.b.c = 5; } to { "a.b".c = 5; } for toINI
|
||||
gitFlattenAttrs =
|
||||
let
|
||||
isNonDrvAttrs = value: isAttrs value && !isDerivation value;
|
||||
recurse =
|
||||
path: value:
|
||||
if isNonDrvAttrs value then
|
||||
concatMap (name: recurse ([ name ] ++ path) value.${name}) (attrNames value)
|
||||
if isAttrs value && !isDerivation value then
|
||||
mapAttrsToList (name: value: recurse ([ name ] ++ path) value) value
|
||||
else if length path > 1 then
|
||||
[
|
||||
{
|
||||
${concatStringsSep "." (reverseList (tail path))}.${head path} = value;
|
||||
}
|
||||
]
|
||||
{
|
||||
${concatStringsSep "." (reverseList (tail path))}.${head path} = value;
|
||||
}
|
||||
else
|
||||
[
|
||||
{
|
||||
${head path} = value;
|
||||
}
|
||||
];
|
||||
{
|
||||
${head path} = value;
|
||||
};
|
||||
in
|
||||
attrs:
|
||||
let
|
||||
# Filter the names for any that contain nested attrsets. attrs that
|
||||
# don't contain nested attrsets can stay the same =
|
||||
namesToRewrite = filter (
|
||||
name: isAttrs attrs.${name} && any isNonDrvAttrs (attrValues attrs.${name})
|
||||
) (attrNames attrs);
|
||||
attrsToRewrite = genAttrs namesToRewrite (name: attrs.${name});
|
||||
in
|
||||
removeAttrs attrs namesToRewrite // foldl recursiveUpdate { } (recurse [ ] attrsToRewrite);
|
||||
attrs: foldl recursiveUpdate { } (flatten (recurse [ ] attrs));
|
||||
|
||||
toINI_ = toINI { inherit mkKeyValue mkSectionName; };
|
||||
in
|
||||
attrs: toINI_ (gitFlattenAttrs attrs);
|
||||
toINI_ (gitFlattenAttrs attrs);
|
||||
|
||||
/**
|
||||
`mkKeyValueDefault` wrapper that handles dconf INI quirks.
|
||||
|
||||
@@ -575,13 +575,6 @@ lib.mapAttrs mkLicense (
|
||||
free = false;
|
||||
};
|
||||
|
||||
enpl = {
|
||||
fullName = "Emmi AI Non-Production License";
|
||||
url = "https://github.com/Emmi-AI/noether/blob/main/LICENSE.txt";
|
||||
free = false;
|
||||
redistributable = true;
|
||||
};
|
||||
|
||||
epl10 = {
|
||||
spdxId = "EPL-1.0";
|
||||
fullName = "Eclipse Public License 1.0";
|
||||
@@ -1157,12 +1150,6 @@ lib.mapAttrs mkLicense (
|
||||
redistributable = true; # Only if used in Netdata products.
|
||||
};
|
||||
|
||||
netboxLimitedUse = {
|
||||
fullName = "NetBox Limited Use License 1.0";
|
||||
free = false;
|
||||
url = "https://github.com/netboxlabs/netbox-branching/blob/8465b9aee69ded23930cfe1a522695bfb8955a5a/LICENSE.md";
|
||||
};
|
||||
|
||||
ngpl = {
|
||||
spdxId = "NGPL";
|
||||
fullName = "Nethack General Public License";
|
||||
|
||||
@@ -1158,10 +1158,8 @@ let
|
||||
value = if opt ? apply then opt.apply res.mergedValue else res.mergedValue;
|
||||
|
||||
warnDeprecation =
|
||||
if (opt.type.deprecationMessage != null) then
|
||||
warn "The type `types.${opt.type.name}' of option `${showOption loc}' defined in ${showFiles opt.declarations} is deprecated. ${opt.type.deprecationMessage}"
|
||||
else
|
||||
x: x;
|
||||
warnIf (opt.type.deprecationMessage != null)
|
||||
"The type `types.${opt.type.name}' of option `${showOption loc}' defined in ${showFiles opt.declarations} is deprecated. ${opt.type.deprecationMessage}";
|
||||
|
||||
in
|
||||
warnDeprecation opt
|
||||
@@ -1600,28 +1598,6 @@ let
|
||||
inherit priority content;
|
||||
};
|
||||
|
||||
/**
|
||||
Applies a function to the value inside a definition,
|
||||
preserving all surrounding properties (`mkForce`, `mkOrder`, `mkIf`, etc.).
|
||||
*/
|
||||
mapDefinitionValue =
|
||||
f: def:
|
||||
if def ? _type then
|
||||
if def._type == "merge" then
|
||||
def // { contents = map (mapDefinitionValue f) def.contents; }
|
||||
else if def._type == "if" then
|
||||
def // { content = mapDefinitionValue f def.content; }
|
||||
else if def._type == "override" then
|
||||
def // { content = mapDefinitionValue f def.content; }
|
||||
else if def._type == "order" then
|
||||
def // { content = mapDefinitionValue f def.content; }
|
||||
else if def._type == "definition" then
|
||||
def // { value = mapDefinitionValue f def.value; }
|
||||
else
|
||||
f def
|
||||
else
|
||||
f def;
|
||||
|
||||
mkBefore = mkOrder 500;
|
||||
defaultOrderPriority = 1000;
|
||||
mkAfter = mkOrder 1500;
|
||||
@@ -2326,7 +2302,6 @@ private
|
||||
importApply
|
||||
importJSON
|
||||
importTOML
|
||||
mapDefinitionValue
|
||||
mergeDefinitions
|
||||
mergeAttrDefinitionsWithPrio
|
||||
mergeOptionDecls # should be private?
|
||||
|
||||
115
lib/sources.nix
115
lib/sources.nix
@@ -7,19 +7,12 @@ let
|
||||
match
|
||||
split
|
||||
storeDir
|
||||
escapeRegex
|
||||
removePrefix
|
||||
;
|
||||
inherit (lib)
|
||||
boolToString
|
||||
filter
|
||||
isString
|
||||
readFile
|
||||
concatStrings
|
||||
length
|
||||
elemAt
|
||||
isList
|
||||
any
|
||||
;
|
||||
inherit (lib.filesystem)
|
||||
pathIsRegularFile
|
||||
@@ -520,113 +513,6 @@ let
|
||||
else
|
||||
throw "repoRevToName: invalid kind";
|
||||
|
||||
/**
|
||||
Filter a source tree by a list of doublestar-style glob patterns,
|
||||
returning a source that only contains paths matching at least one
|
||||
pattern. `*` matches a single path component, and `**` matches any
|
||||
number of components.
|
||||
|
||||
# Inputs
|
||||
|
||||
`src`
|
||||
|
||||
: The source tree to filter.
|
||||
|
||||
`patterns`
|
||||
|
||||
: List of glob patterns to include, e.g. `[ "*.py" "src/**" ]`.
|
||||
A leading `**` (e.g. `**\/*.py` for all `.py` files at any depth)
|
||||
is also supported; the `\` here is just a Nix string escape used
|
||||
to avoid closing this comment.
|
||||
|
||||
# Examples
|
||||
:::{.example}
|
||||
## `sourceByGlobs` usage example
|
||||
|
||||
- Include everything under a subdirectory
|
||||
```nix
|
||||
src = sourceByGlobs ./. [ "src/**" "tests/**" ]
|
||||
```
|
||||
|
||||
- Include all .py files in root directory only
|
||||
```nix
|
||||
src = sourceByGlobs ./. [ "*.py" ]
|
||||
```
|
||||
|
||||
:::
|
||||
*/
|
||||
sourceByGlobs =
|
||||
let
|
||||
splitPath = path: filter isString (split "/" path);
|
||||
# Make component regex
|
||||
mkRe =
|
||||
s:
|
||||
if s == "**" then
|
||||
".*" # Has special handling below
|
||||
else
|
||||
concatStrings (map (tok: if isList tok then "[^/]*" else escapeRegex tok) (split "\\*+" s));
|
||||
|
||||
# Make a source filter function from pattern
|
||||
mkMatcher =
|
||||
pat:
|
||||
let
|
||||
globs = map mkRe (splitPath pat);
|
||||
glen = length globs;
|
||||
in
|
||||
path: type:
|
||||
let
|
||||
path' = splitPath path;
|
||||
plen = length path';
|
||||
|
||||
recurse =
|
||||
gi: pi:
|
||||
let
|
||||
g = elemAt globs gi;
|
||||
p = elemAt path' pi;
|
||||
m = match g p != null;
|
||||
in
|
||||
if pi >= plen then # Reached end of path
|
||||
gi >= glen || (type == "directory" || type == "symlink") # Only allow partial matches for directories
|
||||
else if gi >= glen then # Reached end of globs
|
||||
false
|
||||
else if g == ".*" then # Special handling for **
|
||||
(
|
||||
# Lookahead for next glob match
|
||||
if (gi + 1) == glen then
|
||||
true
|
||||
else if (match (elemAt globs (gi + 1)) p != null) then
|
||||
recurse (gi + 1) pi
|
||||
else if m then
|
||||
recurse gi (pi + 1)
|
||||
else
|
||||
false
|
||||
)
|
||||
else if m then
|
||||
recurse (gi + 1) (pi + 1)
|
||||
else
|
||||
false;
|
||||
|
||||
in
|
||||
recurse 0 0;
|
||||
|
||||
mkSourceFilter =
|
||||
root: patterns:
|
||||
let
|
||||
root' = "${toString root}/";
|
||||
matchers = map mkMatcher patterns;
|
||||
in
|
||||
name: type:
|
||||
let
|
||||
name' = removePrefix root' name;
|
||||
in
|
||||
any (m: m name' type) matchers;
|
||||
|
||||
in
|
||||
src: patterns:
|
||||
lib.cleanSourceWith {
|
||||
filter = mkSourceFilter src patterns;
|
||||
inherit src;
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit
|
||||
@@ -646,7 +532,6 @@ in
|
||||
|
||||
sourceByRegex
|
||||
sourceFilesBySuffices
|
||||
sourceByGlobs
|
||||
|
||||
trace
|
||||
;
|
||||
|
||||
@@ -40,9 +40,10 @@ rec {
|
||||
rust.rustcTarget = "powerpc-unknown-linux-gnu";
|
||||
};
|
||||
|
||||
armv5tel-multiplatform = {
|
||||
sheevaplug = {
|
||||
config = "armv5tel-unknown-linux-gnueabi";
|
||||
};
|
||||
}
|
||||
// platforms.sheevaplug;
|
||||
|
||||
raspberryPi = {
|
||||
config = "armv6l-unknown-linux-gnueabihf";
|
||||
@@ -98,6 +99,11 @@ rec {
|
||||
useLLVM = true;
|
||||
};
|
||||
|
||||
pogoplug4 = {
|
||||
config = "armv5tel-unknown-linux-gnueabi";
|
||||
}
|
||||
// platforms.pogoplug4;
|
||||
|
||||
ben-nanonote = {
|
||||
config = "mipsel-unknown-linux-uclibc";
|
||||
}
|
||||
@@ -149,6 +155,7 @@ rec {
|
||||
gnu64 = {
|
||||
config = "x86_64-unknown-linux-gnu";
|
||||
};
|
||||
gnu64_simplekernel = gnu64 // platforms.pc_simplekernel; # see test/cross/default.nix
|
||||
gnu32 = {
|
||||
config = "i686-unknown-linux-gnu";
|
||||
};
|
||||
|
||||
@@ -18,6 +18,10 @@ rec {
|
||||
};
|
||||
};
|
||||
|
||||
pc_simplekernel = lib.recursiveUpdate pc {
|
||||
linux-kernel.autoModules = false;
|
||||
};
|
||||
|
||||
##
|
||||
## POWER
|
||||
##
|
||||
@@ -46,15 +50,138 @@ rec {
|
||||
## ARM
|
||||
##
|
||||
|
||||
armv5tel-multiplatform = {
|
||||
pogoplug4 = {
|
||||
linux-kernel = {
|
||||
name = "armv5tel-multiplatform";
|
||||
name = "pogoplug4";
|
||||
|
||||
baseConfig = "multi_v5_defconfig";
|
||||
DTB = true;
|
||||
autoModules = true;
|
||||
preferBuiltin = true;
|
||||
target = "zImage";
|
||||
autoModules = false;
|
||||
extraConfig = ''
|
||||
# Ubi for the mtd
|
||||
MTD_UBI y
|
||||
UBIFS_FS y
|
||||
UBIFS_FS_XATTR y
|
||||
UBIFS_FS_ADVANCED_COMPR y
|
||||
UBIFS_FS_LZO y
|
||||
UBIFS_FS_ZLIB y
|
||||
UBIFS_FS_DEBUG n
|
||||
'';
|
||||
makeFlags = [ "LOADADDR=0x8000" ];
|
||||
target = "uImage";
|
||||
# TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working
|
||||
#DTB = true;
|
||||
};
|
||||
gcc = {
|
||||
arch = "armv5te";
|
||||
};
|
||||
};
|
||||
|
||||
sheevaplug = {
|
||||
linux-kernel = {
|
||||
name = "sheevaplug";
|
||||
|
||||
baseConfig = "multi_v5_defconfig";
|
||||
autoModules = false;
|
||||
extraConfig = ''
|
||||
BLK_DEV_RAM y
|
||||
BLK_DEV_INITRD y
|
||||
BLK_DEV_CRYPTOLOOP m
|
||||
BLK_DEV_DM m
|
||||
DM_CRYPT m
|
||||
MD y
|
||||
BTRFS_FS m
|
||||
XFS_FS m
|
||||
JFS_FS m
|
||||
EXT4_FS m
|
||||
USB_STORAGE_CYPRESS_ATACB m
|
||||
|
||||
# mv cesa requires this sw fallback, for mv-sha1
|
||||
CRYPTO_SHA1 y
|
||||
# Fast crypto
|
||||
CRYPTO_TWOFISH y
|
||||
CRYPTO_TWOFISH_COMMON y
|
||||
CRYPTO_BLOWFISH y
|
||||
CRYPTO_BLOWFISH_COMMON y
|
||||
|
||||
IP_PNP y
|
||||
IP_PNP_DHCP y
|
||||
NFS_FS y
|
||||
ROOT_NFS y
|
||||
TUN m
|
||||
NFS_V4 y
|
||||
NFS_V4_1 y
|
||||
NFS_FSCACHE y
|
||||
NFSD m
|
||||
NFSD_V2_ACL y
|
||||
NFSD_V3 y
|
||||
NFSD_V3_ACL y
|
||||
NFSD_V4 y
|
||||
NETFILTER y
|
||||
IP_NF_IPTABLES y
|
||||
IP_NF_FILTER y
|
||||
IP_NF_MATCH_ADDRTYPE y
|
||||
IP_NF_TARGET_LOG y
|
||||
IP_NF_MANGLE y
|
||||
IPV6 m
|
||||
VLAN_8021Q m
|
||||
|
||||
CIFS y
|
||||
CIFS_XATTR y
|
||||
CIFS_POSIX y
|
||||
CIFS_FSCACHE y
|
||||
CIFS_ACL y
|
||||
|
||||
WATCHDOG y
|
||||
WATCHDOG_CORE y
|
||||
ORION_WATCHDOG m
|
||||
|
||||
ZRAM m
|
||||
NETCONSOLE m
|
||||
|
||||
# Disable OABI to have seccomp_filter (required for systemd)
|
||||
# https://github.com/raspberrypi/firmware/issues/651
|
||||
OABI_COMPAT n
|
||||
|
||||
# Fail to build
|
||||
DRM n
|
||||
SCSI_ADVANSYS n
|
||||
USB_ISP1362_HCD n
|
||||
SND_SOC n
|
||||
SND_ALI5451 n
|
||||
FB_SAVAGE n
|
||||
SCSI_NSP32 n
|
||||
ATA_SFF n
|
||||
SUNGEM n
|
||||
IRDA n
|
||||
ATM_HE n
|
||||
SCSI_ACARD n
|
||||
BLK_DEV_CMD640_ENHANCED n
|
||||
|
||||
FUSE_FS m
|
||||
|
||||
# systemd uses cgroups
|
||||
CGROUPS y
|
||||
|
||||
# Latencytop
|
||||
LATENCYTOP y
|
||||
|
||||
# Ubi for the mtd
|
||||
MTD_UBI y
|
||||
UBIFS_FS y
|
||||
UBIFS_FS_XATTR y
|
||||
UBIFS_FS_ADVANCED_COMPR y
|
||||
UBIFS_FS_LZO y
|
||||
UBIFS_FS_ZLIB y
|
||||
UBIFS_FS_DEBUG n
|
||||
|
||||
# Kdb, for kernel troubles
|
||||
KGDB y
|
||||
KGDB_SERIAL_CONSOLE y
|
||||
KGDB_KDB y
|
||||
'';
|
||||
makeFlags = [ "LOADADDR=0x0200000" ];
|
||||
target = "uImage";
|
||||
DTB = true; # Beyond 3.10
|
||||
};
|
||||
gcc = {
|
||||
arch = "armv5te";
|
||||
@@ -69,6 +196,11 @@ rec {
|
||||
DTB = true;
|
||||
autoModules = true;
|
||||
preferBuiltin = true;
|
||||
extraConfig = ''
|
||||
# Disable OABI to have seccomp_filter (required for systemd)
|
||||
# https://github.com/raspberrypi/firmware/issues/651
|
||||
OABI_COMPAT n
|
||||
'';
|
||||
target = "zImage";
|
||||
};
|
||||
gcc = {
|
||||
@@ -89,6 +221,15 @@ rec {
|
||||
};
|
||||
|
||||
zero-gravitas = {
|
||||
linux-kernel = {
|
||||
name = "zero-gravitas";
|
||||
|
||||
baseConfig = "zero-gravitas_defconfig";
|
||||
# Target verified by checking /boot on reMarkable 1 device
|
||||
target = "zImage";
|
||||
autoModules = false;
|
||||
DTB = true;
|
||||
};
|
||||
gcc = {
|
||||
fpu = "neon";
|
||||
cpu = "cortex-a9";
|
||||
@@ -96,6 +237,15 @@ rec {
|
||||
};
|
||||
|
||||
zero-sugar = {
|
||||
linux-kernel = {
|
||||
name = "zero-sugar";
|
||||
|
||||
baseConfig = "zero-sugar_defconfig";
|
||||
DTB = true;
|
||||
autoModules = false;
|
||||
preferBuiltin = true;
|
||||
target = "zImage";
|
||||
};
|
||||
gcc = {
|
||||
cpu = "cortex-a7";
|
||||
fpu = "neon-vfpv4";
|
||||
@@ -103,6 +253,49 @@ rec {
|
||||
};
|
||||
};
|
||||
|
||||
utilite = {
|
||||
linux-kernel = {
|
||||
name = "utilite";
|
||||
maseConfig = "multi_v7_defconfig";
|
||||
autoModules = false;
|
||||
extraConfig = ''
|
||||
# Ubi for the mtd
|
||||
MTD_UBI y
|
||||
UBIFS_FS y
|
||||
UBIFS_FS_XATTR y
|
||||
UBIFS_FS_ADVANCED_COMPR y
|
||||
UBIFS_FS_LZO y
|
||||
UBIFS_FS_ZLIB y
|
||||
UBIFS_FS_DEBUG n
|
||||
'';
|
||||
makeFlags = [ "LOADADDR=0x10800000" ];
|
||||
target = "uImage";
|
||||
DTB = true;
|
||||
};
|
||||
gcc = {
|
||||
cpu = "cortex-a9";
|
||||
fpu = "neon";
|
||||
};
|
||||
};
|
||||
|
||||
guruplug = lib.recursiveUpdate sheevaplug {
|
||||
# Define `CONFIG_MACH_GURUPLUG' (see
|
||||
# <http://kerneltrap.org/mailarchive/git-commits-head/2010/5/19/33618>)
|
||||
# and other GuruPlug-specific things. Requires the `guruplug-defconfig'
|
||||
# patch.
|
||||
linux-kernel.baseConfig = "guruplug_defconfig";
|
||||
};
|
||||
|
||||
beaglebone = lib.recursiveUpdate armv7l-hf-multiplatform {
|
||||
linux-kernel = {
|
||||
name = "beaglebone";
|
||||
baseConfig = "bb.org_defconfig";
|
||||
autoModules = false;
|
||||
extraConfig = ""; # TBD kernel config
|
||||
target = "zImage";
|
||||
};
|
||||
};
|
||||
|
||||
# https://developer.android.com/ndk/guides/abis#v7a
|
||||
armv7a-android = {
|
||||
linux-kernel.name = "armeabi-v7a";
|
||||
@@ -116,11 +309,32 @@ rec {
|
||||
armv7l-hf-multiplatform = {
|
||||
linux-kernel = {
|
||||
name = "armv7l-hf-multiplatform";
|
||||
baseConfig = "defconfig";
|
||||
Major = "2.6"; # Using "2.6" enables 2.6 kernel syscalls in glibc.
|
||||
baseConfig = "multi_v7_defconfig";
|
||||
DTB = true;
|
||||
autoModules = true;
|
||||
preferBuiltin = true;
|
||||
target = "zImage";
|
||||
extraConfig = ''
|
||||
# Serial port for Raspberry Pi 3. Wasn't included in ARMv7 defconfig
|
||||
# until 4.17.
|
||||
SERIAL_8250_BCM2835AUX y
|
||||
SERIAL_8250_EXTENDED y
|
||||
SERIAL_8250_SHARE_IRQ y
|
||||
|
||||
# Hangs ODROID-XU4
|
||||
ARM_BIG_LITTLE_CPUIDLE n
|
||||
|
||||
# Disable OABI to have seccomp_filter (required for systemd)
|
||||
# https://github.com/raspberrypi/firmware/issues/651
|
||||
OABI_COMPAT n
|
||||
|
||||
# >=5.12 fails with:
|
||||
# drivers/net/ethernet/micrel/ks8851_common.o: in function `ks8851_probe_common':
|
||||
# ks8851_common.c:(.text+0x179c): undefined reference to `__this_module'
|
||||
# See: https://lore.kernel.org/netdev/20210116164828.40545-1-marex@denx.de/T/
|
||||
KS8851_MLL y
|
||||
'';
|
||||
};
|
||||
gcc = {
|
||||
# Some table about fpu flags:
|
||||
@@ -153,6 +367,22 @@ rec {
|
||||
autoModules = true;
|
||||
preferBuiltin = true;
|
||||
extraConfig = ''
|
||||
# Raspberry Pi 3 stuff. Not needed for s >= 4.10.
|
||||
ARCH_BCM2835 y
|
||||
BCM2835_MBOX y
|
||||
BCM2835_WDT y
|
||||
RASPBERRYPI_FIRMWARE y
|
||||
RASPBERRYPI_POWER y
|
||||
SERIAL_8250_BCM2835AUX y
|
||||
SERIAL_8250_EXTENDED y
|
||||
SERIAL_8250_SHARE_IRQ y
|
||||
|
||||
# Cavium ThunderX stuff.
|
||||
PCI_HOST_THUNDER_ECAM y
|
||||
|
||||
# Nvidia Tegra stuff.
|
||||
PCI_TEGRA y
|
||||
|
||||
# The default (=y) forces us to have the XHCI firmware available in initrd,
|
||||
# which our initrd builder can't currently do easily.
|
||||
USB_XHCI_TEGRA m
|
||||
@@ -186,6 +416,74 @@ rec {
|
||||
};
|
||||
|
||||
fuloong2f_n32 = {
|
||||
linux-kernel = {
|
||||
name = "fuloong2f_n32";
|
||||
baseConfig = "lemote2f_defconfig";
|
||||
autoModules = false;
|
||||
extraConfig = ''
|
||||
MIGRATION n
|
||||
COMPACTION n
|
||||
|
||||
# nixos mounts some cgroup
|
||||
CGROUPS y
|
||||
|
||||
BLK_DEV_RAM y
|
||||
BLK_DEV_INITRD y
|
||||
BLK_DEV_CRYPTOLOOP m
|
||||
BLK_DEV_DM m
|
||||
DM_CRYPT m
|
||||
MD y
|
||||
EXT4_FS m
|
||||
USB_STORAGE_CYPRESS_ATACB m
|
||||
|
||||
IP_PNP y
|
||||
IP_PNP_DHCP y
|
||||
IP_PNP_BOOTP y
|
||||
NFS_FS y
|
||||
ROOT_NFS y
|
||||
TUN m
|
||||
NFS_V4 y
|
||||
NFS_V4_1 y
|
||||
NFS_FSCACHE y
|
||||
NFSD m
|
||||
NFSD_V2_ACL y
|
||||
NFSD_V3 y
|
||||
NFSD_V3_ACL y
|
||||
NFSD_V4 y
|
||||
|
||||
# Fail to build
|
||||
DRM n
|
||||
SCSI_ADVANSYS n
|
||||
USB_ISP1362_HCD n
|
||||
SND_SOC n
|
||||
SND_ALI5451 n
|
||||
FB_SAVAGE n
|
||||
SCSI_NSP32 n
|
||||
ATA_SFF n
|
||||
SUNGEM n
|
||||
IRDA n
|
||||
ATM_HE n
|
||||
SCSI_ACARD n
|
||||
BLK_DEV_CMD640_ENHANCED n
|
||||
|
||||
FUSE_FS m
|
||||
|
||||
# Needed for udev >= 150
|
||||
SYSFS_DEPRECATED_V2 n
|
||||
|
||||
VGA_CONSOLE n
|
||||
VT_HW_CONSOLE_BINDING y
|
||||
SERIAL_8250_CONSOLE y
|
||||
FRAMEBUFFER_CONSOLE y
|
||||
EXT2_FS y
|
||||
EXT3_FS y
|
||||
MAGIC_SYSRQ y
|
||||
|
||||
# The kernel doesn't boot at all, with FTRACE
|
||||
FTRACE n
|
||||
'';
|
||||
target = "vmlinux";
|
||||
};
|
||||
gcc = {
|
||||
arch = "loongson2f";
|
||||
float = "hard";
|
||||
@@ -231,6 +529,35 @@ rec {
|
||||
};
|
||||
};
|
||||
|
||||
# based on:
|
||||
# https://www.mail-archive.com/qemu-discuss@nongnu.org/msg05179.html
|
||||
# https://gmplib.org/~tege/qemu.html#mips64-debian
|
||||
mips64el-qemu-linux-gnuabi64 = {
|
||||
linux-kernel = {
|
||||
name = "mips64el";
|
||||
baseConfig = "64r2el_defconfig";
|
||||
target = "vmlinuz";
|
||||
autoModules = false;
|
||||
DTB = true;
|
||||
# for qemu 9p passthrough filesystem
|
||||
extraConfig = ''
|
||||
MIPS_MALTA y
|
||||
PAGE_SIZE_4KB y
|
||||
CPU_LITTLE_ENDIAN y
|
||||
CPU_MIPS64_R2 y
|
||||
64BIT y
|
||||
CPU_MIPS64_R2 y
|
||||
|
||||
NET_9P y
|
||||
NET_9P_VIRTIO y
|
||||
9P_FS y
|
||||
9P_FS_POSIX_ACL y
|
||||
PCI y
|
||||
VIRTIO_PCI y
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
##
|
||||
## Other
|
||||
##
|
||||
@@ -284,7 +611,7 @@ rec {
|
||||
if version == null then
|
||||
pc
|
||||
else if lib.versionOlder version "6" then
|
||||
armv5tel-multiplatform
|
||||
sheevaplug
|
||||
else if lib.versionOlder version "7" then
|
||||
raspberrypi
|
||||
else
|
||||
|
||||
@@ -5114,96 +5114,4 @@ runTests {
|
||||
);
|
||||
expected = false;
|
||||
};
|
||||
|
||||
# mapDefinitionValue
|
||||
|
||||
testMapDefinitionValuePlain = {
|
||||
expr = lib.modules.mapDefinitionValue (x: x + 1) 5;
|
||||
expected = 6;
|
||||
};
|
||||
|
||||
testMapDefinitionValueMkForce = {
|
||||
expr = lib.modules.mapDefinitionValue (x: x + 1) (lib.mkForce 5);
|
||||
expected = lib.mkForce 6;
|
||||
};
|
||||
|
||||
testMapDefinitionValueMkDefault = {
|
||||
expr = lib.modules.mapDefinitionValue (x: x + 1) (lib.mkDefault 5);
|
||||
expected = lib.mkDefault 6;
|
||||
};
|
||||
|
||||
testMapDefinitionValueMkOrder = {
|
||||
expr = lib.modules.mapDefinitionValue (x: x + 1) (lib.mkOrder 500 5);
|
||||
expected = lib.mkOrder 500 6;
|
||||
};
|
||||
|
||||
testMapDefinitionValueMkOverrideNested = {
|
||||
expr = lib.modules.mapDefinitionValue (x: x + 1) (lib.mkForce (lib.mkOrder 500 5));
|
||||
expected = lib.mkForce (lib.mkOrder 500 6);
|
||||
};
|
||||
|
||||
testMapDefinitionValueMkIf = {
|
||||
expr = lib.modules.mapDefinitionValue (x: x + 1) (lib.mkIf true 5);
|
||||
expected = lib.mkIf true 6;
|
||||
};
|
||||
|
||||
testMapDefinitionValueMkMerge = {
|
||||
expr = lib.modules.mapDefinitionValue (x: x + 1) (
|
||||
lib.mkMerge [
|
||||
5
|
||||
10
|
||||
]
|
||||
);
|
||||
expected = lib.mkMerge [
|
||||
6
|
||||
11
|
||||
];
|
||||
};
|
||||
|
||||
testMapDefinitionValueMkDefinition = {
|
||||
expr = lib.modules.mapDefinitionValue (x: x + 1) (
|
||||
lib.mkDefinition {
|
||||
file = "test";
|
||||
value = 5;
|
||||
}
|
||||
);
|
||||
expected = lib.mkDefinition {
|
||||
file = "test";
|
||||
value = 6;
|
||||
};
|
||||
};
|
||||
|
||||
testMapDefinitionValueDeep = {
|
||||
expr = lib.modules.mapDefinitionValue (x: x + 1) (lib.mkIf true (lib.mkForce (lib.mkOrder 500 5)));
|
||||
expected = lib.mkIf true (lib.mkForce (lib.mkOrder 500 6));
|
||||
};
|
||||
|
||||
testMapDefinitionValueAllNested = {
|
||||
expr = lib.modules.mapDefinitionValue (x: x + 1) (
|
||||
lib.mkMerge [
|
||||
(lib.mkIf true (
|
||||
lib.mkForce (
|
||||
lib.mkOrder 500 (
|
||||
lib.mkDefinition {
|
||||
file = "test";
|
||||
value = lib.mkBefore 5;
|
||||
}
|
||||
)
|
||||
)
|
||||
))
|
||||
]
|
||||
);
|
||||
expected = lib.mkMerge [
|
||||
(lib.mkIf true (
|
||||
lib.mkForce (
|
||||
lib.mkOrder 500 (
|
||||
lib.mkDefinition {
|
||||
file = "test";
|
||||
value = lib.mkBefore 6;
|
||||
}
|
||||
)
|
||||
)
|
||||
))
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -899,19 +899,6 @@ checkConfigError 'Did you mean .enable., .ebe. or .enabled.\?' config ./error-ty
|
||||
checkConfigError 'Did you mean .services\.myservice\.port. or .services\.myservice\.enable.\?' config.services.myservice ./error-typo-submodule.nix
|
||||
checkConfigError 'Did you mean .services\.nginx\.virtualHosts\."example\.com"\.ssl\.certificate. or .services\.nginx\.virtualHosts\."example\.com"\.ssl\.certificateKey.\?' config.services.nginx.virtualHosts.\"example.com\" ./error-typo-deeply-nested.nix
|
||||
|
||||
# types.attrListOf
|
||||
checkConfigOutput '"ok"' config.assertions ./declare-attrList.nix
|
||||
checkConfigError 'A definition for option .attrListInt.badValue.a. is not of type .signed integer.. Definition values:' config.attrListIntStrict.badValue ./declare-attrList.nix
|
||||
checkConfigError 'A definition for option .attrList.badListElem. is not of type .attribute list of string.. Each list element must be a single-key attribute set, but got 2 keys' config.attrListStrict.badListElem ./declare-attrList.nix
|
||||
checkConfigError 'A definition for option .attrList.badString. is not of type .attribute list of string.. TypeError: Definition values:' config.attrListStrict.badString ./declare-attrList.nix
|
||||
checkConfigError 'A definition for option .attrList.badListString. is not of type .attribute list of string.. Each list element must be an attribute set, but got string' config.attrListStrict.badListString ./declare-attrList.nix
|
||||
|
||||
# attrListWith valueMeta.definitions: file propagation
|
||||
checkConfigError 'the-defs-file\.nix' config.argv ./attrList-valueMeta-definitions-file-diagnostic-forwarding.nix
|
||||
|
||||
# attrListOf does not support type merging
|
||||
checkConfigError 'The option .merged. in .*/declare-attrList-type-merge.nix. is already declared in .*/declare-attrList-type-merge.nix' config.merged ./declare-attrList-type-merge.nix
|
||||
|
||||
cat <<EOF
|
||||
====== module tests ======
|
||||
$pass Pass
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
{ lib, options, ... }:
|
||||
let
|
||||
inherit (lib) mkOption mkMerge types;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
{
|
||||
_file = "the-defs-file.nix";
|
||||
config.flags.my-flag = 3.14;
|
||||
}
|
||||
];
|
||||
|
||||
options.flags = mkOption {
|
||||
type = types.attrListWith {
|
||||
elemType = types.anything;
|
||||
asAttrs = true;
|
||||
mergeAttrValues = _name: vs: lib.head vs;
|
||||
};
|
||||
};
|
||||
options.argv = mkOption { type = types.listOf types.str; };
|
||||
|
||||
# Feed definitions into argv; the float from the-defs-file.nix should cause
|
||||
# a type error mentioning that file
|
||||
config.argv = mkMerge options.flags.valueMeta.definitions;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
# Test that attrListOf does not support type merging:
|
||||
# two declarations of the same option should fail.
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
{ options.merged = mkOption { type = types.attrListOf types.str; }; }
|
||||
{ options.merged = mkOption { type = types.attrListOf types.str; }; }
|
||||
];
|
||||
}
|
||||
@@ -1,925 +0,0 @@
|
||||
# Run with:
|
||||
# cd nixpkgs
|
||||
# ./lib/tests/modules.sh
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkOption
|
||||
mkOrder
|
||||
mkMerge
|
||||
mkBefore
|
||||
mkAfter
|
||||
mkIf
|
||||
mkOverride
|
||||
mkDefault
|
||||
mkForce
|
||||
types
|
||||
;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
attrList = mkOption {
|
||||
type = types.lazyAttrsOf (types.attrListOf types.str);
|
||||
};
|
||||
|
||||
attrListInt = mkOption {
|
||||
type = types.lazyAttrsOf (types.attrListOf types.int);
|
||||
};
|
||||
|
||||
attrListSubmodule = mkOption {
|
||||
type = types.attrListOf (
|
||||
types.submodule {
|
||||
options.port = mkOption {
|
||||
type = types.int;
|
||||
description = "Port number";
|
||||
};
|
||||
options.host = mkOption {
|
||||
type = types.str;
|
||||
default = "localhost";
|
||||
description = "Hostname";
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
# asAttrs: value is a merged attrset, ordered list in valueMeta
|
||||
asAttrs = mkOption {
|
||||
type = types.lazyAttrsOf (
|
||||
types.attrListWith {
|
||||
elemType = types.str;
|
||||
asAttrs = true;
|
||||
mergeAttrValues = _name: values: lib.last values;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
# asAttrs with default mergeAttrValues: duplicates collected into lists
|
||||
asAttrsDefault = mkOption {
|
||||
type = types.lazyAttrsOf (
|
||||
types.attrListWith {
|
||||
elemType = types.int;
|
||||
asAttrs = true;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
# Strict wrappers that force deep evaluation, for testing error cases
|
||||
attrListStrict = mkOption {
|
||||
type = types.lazyAttrsOf types.raw;
|
||||
};
|
||||
|
||||
attrListIntStrict = mkOption {
|
||||
type = types.lazyAttrsOf types.raw;
|
||||
};
|
||||
|
||||
# either picks attrList when input is list/attrset, int when input is int
|
||||
eitherAttrListOrInt = mkOption {
|
||||
type = types.either (types.attrListOf types.str) types.int;
|
||||
};
|
||||
|
||||
eitherAttrListOrIntFallback = mkOption {
|
||||
type = types.either (types.attrListOf types.str) types.int;
|
||||
};
|
||||
|
||||
eitherIntOrAttrList = mkOption {
|
||||
type = types.either types.int (types.attrListOf types.str);
|
||||
};
|
||||
|
||||
eitherIntOrAttrListFallback = mkOption {
|
||||
type = types.either types.int (types.attrListOf types.str);
|
||||
};
|
||||
|
||||
assertions = mkOption { };
|
||||
};
|
||||
|
||||
imports = [
|
||||
# Second module contributing to multiModule
|
||||
{
|
||||
attrListInt.multiModule = [
|
||||
{ b = 2; }
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
# List input: pass-through
|
||||
attrList.listInput = [
|
||||
{ a = "alpha"; }
|
||||
{ b = "beta"; }
|
||||
];
|
||||
|
||||
# Attrset input with explicit ordering
|
||||
attrList.attrsetOrdered = {
|
||||
x = mkOrder 200 "x-val";
|
||||
y = mkOrder 100 "y-val";
|
||||
};
|
||||
|
||||
# Mixed: list elements at default priority, attrset with mkOrder
|
||||
attrList.mixed = mkMerge [
|
||||
[
|
||||
{ m = "from-list"; }
|
||||
]
|
||||
{
|
||||
n = mkOrder 50 "from-attrset";
|
||||
}
|
||||
];
|
||||
|
||||
# Multiple list definitions from separate modules
|
||||
attrListInt.multiModule = [
|
||||
{ a = 1; }
|
||||
];
|
||||
|
||||
# Attrset without mkOrder uses default priority
|
||||
attrList.attrsetNoOrder = {
|
||||
foo = "bar";
|
||||
baz = "qux";
|
||||
};
|
||||
|
||||
# Empty list
|
||||
attrList.empty = [ ];
|
||||
|
||||
# Ordering test: lower priority first
|
||||
attrList.ordering = mkMerge [
|
||||
{
|
||||
last = mkOrder 1500 "last";
|
||||
}
|
||||
{
|
||||
first = mkOrder 500 "first";
|
||||
}
|
||||
[
|
||||
{ middle = "middle"; }
|
||||
]
|
||||
];
|
||||
|
||||
# List elements support mkOrder/mkBefore/mkAfter
|
||||
attrList.listOrdering = [
|
||||
(mkAfter { z = "after"; })
|
||||
{ m = "default"; }
|
||||
(mkBefore { a = "before"; })
|
||||
];
|
||||
|
||||
# Plain list entries land at default priority (1000):
|
||||
# they appear after mkOrder 999 and before mkOrder 1001.
|
||||
attrList.listDefaultPrio = mkMerge [
|
||||
{ after = mkOrder 1001 "after"; }
|
||||
[
|
||||
{ mid = "list-entry"; }
|
||||
]
|
||||
{ before = mkOrder 999 "before"; }
|
||||
];
|
||||
|
||||
# mkBefore and mkAfter
|
||||
attrList.beforeAfter = mkMerge [
|
||||
{
|
||||
z = mkAfter "after";
|
||||
}
|
||||
{
|
||||
a = mkBefore "before";
|
||||
}
|
||||
[
|
||||
{ m = "default"; }
|
||||
]
|
||||
];
|
||||
|
||||
# mkIf: conditional definition
|
||||
attrList.withMkIf = mkMerge [
|
||||
(mkIf true [
|
||||
{ yes = "included"; }
|
||||
])
|
||||
(mkIf false [
|
||||
{ no = "excluded"; }
|
||||
])
|
||||
];
|
||||
|
||||
# mkOverride: higher priority override wins
|
||||
attrList.withOverride = mkMerge [
|
||||
(mkOverride 100 [
|
||||
{ replaced = "gone"; }
|
||||
])
|
||||
(mkOverride 50 [
|
||||
{ winner = "wins"; }
|
||||
])
|
||||
];
|
||||
|
||||
# mkDefault: lower priority than normal
|
||||
attrList.withDefault = mkMerge [
|
||||
(mkDefault [
|
||||
{ default = "overridden"; }
|
||||
])
|
||||
[
|
||||
{ normal = "wins"; }
|
||||
]
|
||||
];
|
||||
|
||||
# mkForce on the whole option (should discard other defs)
|
||||
attrList.withForce = mkMerge [
|
||||
[
|
||||
{ discarded = "gone"; }
|
||||
]
|
||||
(mkForce [
|
||||
{ forced = "wins"; }
|
||||
])
|
||||
];
|
||||
|
||||
# mkForce with mkOrder inside
|
||||
attrList.forceWithOrder = mkForce [
|
||||
(mkAfter { second = "after"; })
|
||||
(mkBefore { first = "before"; })
|
||||
];
|
||||
|
||||
# mkForce on individual element values; non-forced entries are discarded.
|
||||
# Discarded values use a mix of: plain value, mkDefault(abort ...), mkOverride 100 (abort ...).
|
||||
# The abort variants verify laziness: peelProperties sees the wrapper without forcing the content.
|
||||
attrListInt.forceElementValue = [
|
||||
{ a = mkDefault (abort "overridden by mkForce; laziness guarantee: MUST NOT be evaluated"); }
|
||||
{ a = mkForce 42; }
|
||||
{ a = mkOverride 100 (abort "overridden by mkForce; laziness guarantee: MUST NOT be evaluated"); }
|
||||
{ b = 2; }
|
||||
];
|
||||
|
||||
# mkForce on attrset format
|
||||
attrList.forceAttrset = mkMerge [
|
||||
[
|
||||
{ discarded = "gone"; }
|
||||
]
|
||||
(mkForce {
|
||||
x = mkOrder 200 "x-val";
|
||||
y = mkOrder 100 "y-val";
|
||||
})
|
||||
];
|
||||
|
||||
# mkForce on repeated key: forced entries override non-forced
|
||||
attrList.forceRepeatedKey = [
|
||||
{ x = mkOverride 100 (abort "overridden by mkForce; laziness guarantee: MUST NOT be evaluated"); }
|
||||
{ x = mkForce "wins"; }
|
||||
{ x = mkForce "wins 2"; }
|
||||
];
|
||||
|
||||
# mkForce on repeated key across mkMerge
|
||||
attrList.forceRepeatedKeyMerge = mkMerge [
|
||||
[
|
||||
{ x = "unused: overridden by mkForce"; }
|
||||
{ x = mkDefault (abort "overridden by mkForce; laziness guarantee: MUST NOT be evaluated"); }
|
||||
]
|
||||
[
|
||||
{ x = mkOverride 100 (abort "overridden by mkForce; laziness guarantee: MUST NOT be evaluated"); }
|
||||
]
|
||||
[
|
||||
{ x = mkForce "forced"; }
|
||||
]
|
||||
];
|
||||
|
||||
# mkForce on repeated key in attrset format across mkMerge
|
||||
attrList.forceRepeatedKeyAttrs = mkMerge [
|
||||
{
|
||||
x = mkDefault (abort "overridden by mkForce; laziness guarantee: MUST NOT be evaluated");
|
||||
y = "kept";
|
||||
}
|
||||
{ x = mkForce "forced"; }
|
||||
];
|
||||
|
||||
# mkForce only affects the key it's on, other keys survive
|
||||
attrList.forcePartialAttrs = mkMerge [
|
||||
{
|
||||
x = "unused: overridden by mkForce";
|
||||
y = "normal y";
|
||||
}
|
||||
{ x = mkForce "forced x"; }
|
||||
];
|
||||
|
||||
# mkForce in attrset format overrides same key from list format
|
||||
attrList.forceMixedFormats = mkMerge [
|
||||
[
|
||||
{ x = mkOverride 100 (abort "overridden by mkForce; laziness guarantee: MUST NOT be evaluated"); }
|
||||
{ y = "list y"; }
|
||||
]
|
||||
{ x = mkForce "attrset forced x"; }
|
||||
];
|
||||
|
||||
# Nesting: list format, mkOrder on element + mkForce on value
|
||||
attrList.nestListOrderForce = mkMerge [
|
||||
[
|
||||
{ x = mkDefault (abort "overridden by mkForce; laziness guarantee: MUST NOT be evaluated"); }
|
||||
(mkOrder 500 { x = mkForce "forced-early"; })
|
||||
(mkOrder 1500 { y = "late"; })
|
||||
]
|
||||
[
|
||||
(mkOrder 100 { z = "earliest"; })
|
||||
]
|
||||
];
|
||||
|
||||
# Nesting: list format, mkOrder(mkForce(val)) on value
|
||||
attrList.nestListOrderOfForce = mkMerge [
|
||||
[
|
||||
{ x = mkOverride 100 (abort "overridden by mkForce; laziness guarantee: MUST NOT be evaluated"); }
|
||||
{ y = "plain-early"; }
|
||||
]
|
||||
[
|
||||
{ x = mkOrder 1500 (mkForce "forced-late"); }
|
||||
{ z = mkOrder 500 "earliest"; }
|
||||
]
|
||||
[
|
||||
{ x = "unused: overridden by mkForce"; }
|
||||
{ w = mkOrder 1200 "mid"; }
|
||||
]
|
||||
];
|
||||
|
||||
# Nesting: list format, mkForce(mkOrder(val)) on value
|
||||
attrList.nestListForceOfOrder = mkMerge [
|
||||
[
|
||||
{ x = "unused: overridden by mkForce"; }
|
||||
{ y = "plain-early"; }
|
||||
]
|
||||
[
|
||||
{ x = mkForce (mkOrder 1500 "forced-late"); }
|
||||
{ z = mkOrder 500 "earliest"; }
|
||||
]
|
||||
[
|
||||
{ x = mkDefault (abort "overridden by mkForce; laziness guarantee: MUST NOT be evaluated"); }
|
||||
{ w = mkOrder 1200 "mid"; }
|
||||
]
|
||||
];
|
||||
|
||||
# Nesting: attrset format, mkOrder wrapping mkForce
|
||||
attrList.nestAttrsOrderOfForce = mkMerge [
|
||||
{
|
||||
x = mkOverride 100 (abort "overridden by mkForce; laziness guarantee: MUST NOT be evaluated");
|
||||
y = "plain-early";
|
||||
}
|
||||
{
|
||||
x = mkOrder 1500 (mkForce "forced-late");
|
||||
z = mkOrder 500 "earliest";
|
||||
}
|
||||
{
|
||||
x = "unused: overridden by mkForce";
|
||||
w = mkOrder 1200 "mid";
|
||||
}
|
||||
];
|
||||
|
||||
# Nesting: attrset format, mkForce wrapping mkOrder
|
||||
attrList.nestAttrsForceOfOrder = mkMerge [
|
||||
{
|
||||
x = "unused: overridden by mkForce";
|
||||
y = "plain-early";
|
||||
}
|
||||
{
|
||||
x = mkForce (mkOrder 1500 "forced-late");
|
||||
z = mkOrder 500 "earliest";
|
||||
}
|
||||
{
|
||||
x = mkDefault (abort "overridden by mkForce; laziness guarantee: MUST NOT be evaluated");
|
||||
w = mkOrder 1200 "mid";
|
||||
}
|
||||
];
|
||||
|
||||
# mkIf false on individual element value filters it out (list format)
|
||||
attrListInt.optionalValueList = [
|
||||
{ a = mkIf true 1; }
|
||||
{ b = mkIf false 2; }
|
||||
{ c = 3; }
|
||||
];
|
||||
|
||||
# mkIf false on individual element value filters it out (attrset format)
|
||||
attrListInt.optionalValueAttrs = {
|
||||
a = mkIf true 1;
|
||||
b = mkIf false 2;
|
||||
c = 3;
|
||||
};
|
||||
|
||||
# submodule elemType: produces real valueMeta
|
||||
attrListSubmodule = [
|
||||
{
|
||||
web = {
|
||||
port = 80;
|
||||
};
|
||||
}
|
||||
{
|
||||
db = {
|
||||
port = 5432;
|
||||
host = "dbhost";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
# asAttrs: unique keys — value is a plain attrset
|
||||
asAttrs.unique = [
|
||||
{ a = "alpha"; }
|
||||
{ b = "beta"; }
|
||||
];
|
||||
|
||||
# asAttrs: duplicate keys — last in order wins
|
||||
asAttrs.duplicateKeys = mkMerge [
|
||||
{ x = mkOrder 500 "first"; }
|
||||
{ x = mkOrder 1500 "last"; }
|
||||
{ y = "only"; }
|
||||
];
|
||||
|
||||
# asAttrs: with ordering — value is attrset, ordered list in valueMeta
|
||||
asAttrs.ordered = {
|
||||
z = mkOrder 200 "z-val";
|
||||
a = mkOrder 100 "a-val";
|
||||
};
|
||||
|
||||
# asAttrs: with mkForce — forced key overrides
|
||||
asAttrs.withForce = mkMerge [
|
||||
{ x = "unused: overridden by mkForce"; }
|
||||
{
|
||||
x = mkForce "forced";
|
||||
y = "kept";
|
||||
}
|
||||
];
|
||||
|
||||
# asAttrs: empty
|
||||
asAttrs.empty = [ ];
|
||||
|
||||
# asAttrsDefault: unique keys
|
||||
asAttrsDefault.unique = [
|
||||
{ a = 1; }
|
||||
{ b = 2; }
|
||||
];
|
||||
|
||||
# asAttrsDefault: duplicate keys — default collects into lists
|
||||
asAttrsDefault.duplicates = mkMerge [
|
||||
{ x = mkOrder 500 10; }
|
||||
{ x = mkOrder 1500 30; }
|
||||
{ y = 99; }
|
||||
[
|
||||
{ x = 20; }
|
||||
]
|
||||
];
|
||||
|
||||
# either: attrList branch matches for list input
|
||||
eitherAttrListOrInt = [
|
||||
{ a = "hello"; }
|
||||
{ b = "world"; }
|
||||
];
|
||||
|
||||
# either: int input falls through to int branch
|
||||
eitherAttrListOrIntFallback = 42;
|
||||
|
||||
# either (swapped): int first, attrList second — int input matches int
|
||||
eitherIntOrAttrList = 42;
|
||||
|
||||
# either (swapped): list input falls through to attrList branch
|
||||
eitherIntOrAttrListFallback = [
|
||||
{ a = "hello"; }
|
||||
];
|
||||
|
||||
# Bad: string where int expected
|
||||
attrListInt.badValue = [
|
||||
{ a = "not-an-int"; }
|
||||
];
|
||||
|
||||
# Bad: list element with multiple keys
|
||||
attrList.badListElem = [
|
||||
{
|
||||
a = "ok";
|
||||
b = "extra";
|
||||
}
|
||||
];
|
||||
|
||||
# Bad: plain string instead of list or attrset
|
||||
attrList.badString = "not-a-container";
|
||||
|
||||
# Bad: list element is a bare string, not a singleton attrset
|
||||
attrList.badListString = [
|
||||
"not a singleton attribute"
|
||||
];
|
||||
|
||||
attrListStrict = builtins.mapAttrs (k: v: builtins.deepSeq v v) config.attrList;
|
||||
attrListIntStrict = builtins.mapAttrs (k: v: builtins.deepSeq v v) config.attrListInt;
|
||||
|
||||
assertions =
|
||||
let
|
||||
c = lib.evalModules {
|
||||
modules = [ ./declare-attrList.nix ];
|
||||
};
|
||||
cfg = c.config;
|
||||
in
|
||||
|
||||
# List input preserves elements
|
||||
assert
|
||||
cfg.attrList.listInput == [
|
||||
{ a = "alpha"; }
|
||||
{ b = "beta"; }
|
||||
];
|
||||
|
||||
# Attrset input with mkOrder: lower priority comes first
|
||||
assert
|
||||
cfg.attrList.attrsetOrdered == [
|
||||
{ y = "y-val"; }
|
||||
{ x = "x-val"; }
|
||||
];
|
||||
|
||||
# Mixed input: mkOrder 50 < default 1000
|
||||
assert
|
||||
cfg.attrList.mixed == [
|
||||
{ n = "from-attrset"; }
|
||||
{ m = "from-list"; }
|
||||
];
|
||||
|
||||
# Multiple definitions from separate modules concatenate
|
||||
# (import module's definition comes before this module's)
|
||||
assert
|
||||
cfg.attrListInt.multiModule == [
|
||||
{ b = 2; }
|
||||
{ a = 1; }
|
||||
];
|
||||
|
||||
# Attrset without mkOrder: all at default priority
|
||||
assert builtins.length cfg.attrList.attrsetNoOrder == 2;
|
||||
|
||||
# Empty list stays empty
|
||||
assert cfg.attrList.empty == [ ];
|
||||
|
||||
# List elements support mkOrder/mkBefore/mkAfter
|
||||
assert
|
||||
cfg.attrList.listOrdering == [
|
||||
{ a = "before"; }
|
||||
{ m = "default"; }
|
||||
{ z = "after"; }
|
||||
];
|
||||
|
||||
# Plain list entries are at default priority (1000)
|
||||
assert
|
||||
cfg.attrList.listDefaultPrio == [
|
||||
{ before = "before"; }
|
||||
{ mid = "list-entry"; }
|
||||
{ after = "after"; }
|
||||
];
|
||||
|
||||
# Ordering: 500 < 1000 (default) < 1500
|
||||
assert
|
||||
cfg.attrList.ordering == [
|
||||
{ first = "first"; }
|
||||
{ middle = "middle"; }
|
||||
{ last = "last"; }
|
||||
];
|
||||
|
||||
# mkBefore (500) < default (1000) < mkAfter (1500)
|
||||
assert
|
||||
cfg.attrList.beforeAfter == [
|
||||
{ a = "before"; }
|
||||
{ m = "default"; }
|
||||
{ z = "after"; }
|
||||
];
|
||||
|
||||
# mkIf true includes, mkIf false excludes
|
||||
assert
|
||||
cfg.attrList.withMkIf == [
|
||||
{ yes = "included"; }
|
||||
];
|
||||
|
||||
# mkOverride: only lowest priority override survives
|
||||
assert
|
||||
cfg.attrList.withOverride == [
|
||||
{ winner = "wins"; }
|
||||
];
|
||||
|
||||
# mkDefault is overridden by normal definitions
|
||||
assert
|
||||
cfg.attrList.withDefault == [
|
||||
{ normal = "wins"; }
|
||||
];
|
||||
|
||||
# mkForce discards other definitions
|
||||
assert
|
||||
cfg.attrList.withForce == [
|
||||
{ forced = "wins"; }
|
||||
];
|
||||
|
||||
# mkForce with mkOrder inside: ordering still works
|
||||
assert
|
||||
cfg.attrList.forceWithOrder == [
|
||||
{ first = "before"; }
|
||||
{ second = "after"; }
|
||||
];
|
||||
|
||||
# mkForce on individual element values passes through
|
||||
assert
|
||||
cfg.attrListInt.forceElementValue == [
|
||||
{ a = 42; }
|
||||
{ b = 2; }
|
||||
];
|
||||
|
||||
# mkForce on attrset format: discards other defs, ordering preserved
|
||||
assert
|
||||
cfg.attrList.forceAttrset == [
|
||||
{ y = "y-val"; }
|
||||
{ x = "x-val"; }
|
||||
];
|
||||
|
||||
# mkForce on repeated key: forced entries override non-forced
|
||||
assert
|
||||
cfg.attrList.forceRepeatedKey == [
|
||||
{ x = "wins"; }
|
||||
{ x = "wins 2"; }
|
||||
];
|
||||
|
||||
# mkForce on repeated key across mkMerge: forced wins
|
||||
assert
|
||||
cfg.attrList.forceRepeatedKeyMerge == [
|
||||
{ x = "forced"; }
|
||||
];
|
||||
|
||||
# mkForce on repeated key in attrset format: discards other x, keeps y
|
||||
assert
|
||||
cfg.attrList.forceRepeatedKeyAttrs == [
|
||||
{ y = "kept"; }
|
||||
{ x = "forced"; }
|
||||
];
|
||||
|
||||
# mkForce only affects its own key
|
||||
assert
|
||||
cfg.attrList.forcePartialAttrs == [
|
||||
{ y = "normal y"; }
|
||||
{ x = "forced x"; }
|
||||
];
|
||||
|
||||
# mkForce in attrset format overrides same key from list format
|
||||
assert
|
||||
cfg.attrList.forceMixedFormats == [
|
||||
{ y = "list y"; }
|
||||
{ x = "attrset forced x"; }
|
||||
];
|
||||
|
||||
# Nesting: list format, mkOrder on element + mkForce on value
|
||||
# z(100) < x-forced(500) < y(1500); x-discarded filtered by mkForce
|
||||
assert
|
||||
cfg.attrList.nestListOrderForce == [
|
||||
{ z = "earliest"; }
|
||||
{ x = "forced-early"; }
|
||||
{ y = "late"; }
|
||||
];
|
||||
|
||||
# Nesting: list format, mkOrder(mkForce(val)) on value
|
||||
# z(500) < y(1000) < w(1200) < x-forced(1500); x-discarded entries filtered
|
||||
assert
|
||||
cfg.attrList.nestListOrderOfForce == [
|
||||
{ z = "earliest"; }
|
||||
{ y = "plain-early"; }
|
||||
{ w = "mid"; }
|
||||
{ x = "forced-late"; }
|
||||
];
|
||||
|
||||
# Nesting: list format, mkForce(mkOrder(val)) on value
|
||||
# z(500) < y(1000) < w(1200) < x-forced(1500); x-discarded entries filtered
|
||||
assert
|
||||
cfg.attrList.nestListForceOfOrder == [
|
||||
{ z = "earliest"; }
|
||||
{ y = "plain-early"; }
|
||||
{ w = "mid"; }
|
||||
{ x = "forced-late"; }
|
||||
];
|
||||
|
||||
# Nesting: attrset format, mkOrder(mkForce(val))
|
||||
# z(500) < y(1000) < w(1200) < x-forced(1500); x-discarded entries filtered
|
||||
assert
|
||||
cfg.attrList.nestAttrsOrderOfForce == [
|
||||
{ z = "earliest"; }
|
||||
{ y = "plain-early"; }
|
||||
{ w = "mid"; }
|
||||
{ x = "forced-late"; }
|
||||
];
|
||||
|
||||
# Nesting: attrset format, mkForce(mkOrder(val))
|
||||
# z(500) < y(1000) < w(1200) < x-forced(1500); x-discarded entries filtered
|
||||
assert
|
||||
cfg.attrList.nestAttrsForceOfOrder == [
|
||||
{ z = "earliest"; }
|
||||
{ y = "plain-early"; }
|
||||
{ w = "mid"; }
|
||||
{ x = "forced-late"; }
|
||||
];
|
||||
|
||||
# mkIf false on individual element value filters it out (list format)
|
||||
assert
|
||||
cfg.attrListInt.optionalValueList == [
|
||||
{ a = 1; }
|
||||
{ c = 3; }
|
||||
];
|
||||
|
||||
# mkIf false on individual element value filters it out (attrset format)
|
||||
assert
|
||||
cfg.attrListInt.optionalValueAttrs == [
|
||||
{ a = 1; }
|
||||
{ c = 3; }
|
||||
];
|
||||
|
||||
# submodule: value, option descriptions, and valueMeta with real configuration metadata
|
||||
assert
|
||||
cfg.attrListSubmodule == [
|
||||
{
|
||||
web = {
|
||||
host = "localhost";
|
||||
port = 80;
|
||||
};
|
||||
}
|
||||
{
|
||||
db = {
|
||||
host = "dbhost";
|
||||
port = 5432;
|
||||
};
|
||||
}
|
||||
];
|
||||
assert
|
||||
builtins.map (m: m.configuration.config) c.options.attrListSubmodule.valueMeta.attrList == [
|
||||
{
|
||||
host = "localhost";
|
||||
port = 80;
|
||||
}
|
||||
{
|
||||
host = "dbhost";
|
||||
port = 5432;
|
||||
}
|
||||
];
|
||||
assert
|
||||
builtins.map (
|
||||
m:
|
||||
builtins.mapAttrs (n: o: o.description) (builtins.removeAttrs m.configuration.options [ "_module" ])
|
||||
) c.options.attrListSubmodule.valueMeta.attrList == [
|
||||
{
|
||||
host = "Hostname";
|
||||
port = "Port number";
|
||||
}
|
||||
{
|
||||
host = "Hostname";
|
||||
port = "Port number";
|
||||
}
|
||||
];
|
||||
|
||||
# valueMeta.attrList has one entry per (non-filtered) element
|
||||
assert
|
||||
c.options.attrList.valueMeta.attrs.listInput.attrList == [
|
||||
{ }
|
||||
{ }
|
||||
];
|
||||
assert
|
||||
c.options.attrList.valueMeta.attrs.attrsetOrdered.attrList == [
|
||||
{ }
|
||||
{ }
|
||||
];
|
||||
assert
|
||||
c.options.attrList.valueMeta.attrs.mixed.attrList == [
|
||||
{ }
|
||||
{ }
|
||||
];
|
||||
assert c.options.attrList.valueMeta.attrs.empty.attrList == [ ];
|
||||
assert
|
||||
c.options.attrListInt.valueMeta.attrs.optionalValueList.attrList == [
|
||||
{ }
|
||||
{ }
|
||||
];
|
||||
|
||||
# either: headError is null for valid attrList input, so attrList branch is picked
|
||||
assert
|
||||
cfg.eitherAttrListOrInt == [
|
||||
{ a = "hello"; }
|
||||
{ b = "world"; }
|
||||
];
|
||||
|
||||
# either: headError is non-null for int input, so int branch is picked
|
||||
assert cfg.eitherAttrListOrIntFallback == 42;
|
||||
|
||||
# either (swapped): int first — int input matches
|
||||
assert cfg.eitherIntOrAttrList == 42;
|
||||
|
||||
# either (swapped): list input falls through to attrList branch
|
||||
assert
|
||||
cfg.eitherIntOrAttrListFallback == [
|
||||
{ a = "hello"; }
|
||||
];
|
||||
|
||||
# asAttrs: unique keys — value is a plain attrset
|
||||
assert
|
||||
cfg.asAttrs.unique == {
|
||||
a = "alpha";
|
||||
b = "beta";
|
||||
};
|
||||
# ordered list preserved in valueMeta
|
||||
assert
|
||||
c.options.asAttrs.valueMeta.attrs.unique.attrListValue == [
|
||||
{ a = "alpha"; }
|
||||
{ b = "beta"; }
|
||||
];
|
||||
|
||||
# asAttrs: duplicate keys — last in order wins
|
||||
assert
|
||||
cfg.asAttrs.duplicateKeys == {
|
||||
x = "last";
|
||||
y = "only";
|
||||
};
|
||||
assert
|
||||
c.options.asAttrs.valueMeta.attrs.duplicateKeys.attrListValue == [
|
||||
{ x = "first"; }
|
||||
{ y = "only"; }
|
||||
{ x = "last"; }
|
||||
];
|
||||
|
||||
# asAttrs: ordered — value is attrset (unordered), list in valueMeta preserves order
|
||||
assert
|
||||
cfg.asAttrs.ordered == {
|
||||
a = "a-val";
|
||||
z = "z-val";
|
||||
};
|
||||
assert
|
||||
c.options.asAttrs.valueMeta.attrs.ordered.attrListValue == [
|
||||
{ a = "a-val"; }
|
||||
{ z = "z-val"; }
|
||||
];
|
||||
|
||||
# asAttrs: mkForce — forced key overrides, value is attrset
|
||||
assert
|
||||
cfg.asAttrs.withForce == {
|
||||
x = "forced";
|
||||
y = "kept";
|
||||
};
|
||||
|
||||
# asAttrs: empty — value is empty attrset
|
||||
assert cfg.asAttrs.empty == { };
|
||||
|
||||
# asAttrsDefault: unique keys — each value wrapped in singleton list
|
||||
assert
|
||||
cfg.asAttrsDefault.unique == {
|
||||
a = [ 1 ];
|
||||
b = [ 2 ];
|
||||
};
|
||||
|
||||
# asAttrsDefault: duplicate keys — values collected into list in order
|
||||
assert
|
||||
cfg.asAttrsDefault.duplicates == {
|
||||
x = [
|
||||
10
|
||||
20
|
||||
30
|
||||
];
|
||||
y = [ 99 ];
|
||||
};
|
||||
assert
|
||||
c.options.asAttrsDefault.valueMeta.attrs.duplicates.attrListValue == [
|
||||
{ x = 10; }
|
||||
{ y = 99; }
|
||||
{ x = 20; }
|
||||
{ x = 30; }
|
||||
];
|
||||
|
||||
# valueMeta.definitions: mkDefinition records with mkOrder-wrapped single-key attrsets
|
||||
# Use duplicateKeys which has mixed priorities and repeated keys
|
||||
assert
|
||||
let
|
||||
defs = c.options.asAttrs.valueMeta.attrs.duplicateKeys.definitions;
|
||||
extract = d: {
|
||||
prio = d.value.priority;
|
||||
value = d.value.content;
|
||||
};
|
||||
in
|
||||
map extract defs == [
|
||||
{
|
||||
prio = 500;
|
||||
value = {
|
||||
x = "first";
|
||||
};
|
||||
}
|
||||
{
|
||||
prio = 1000;
|
||||
value = {
|
||||
y = "only";
|
||||
};
|
||||
}
|
||||
{
|
||||
prio = 1500;
|
||||
value = {
|
||||
x = "last";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
# Round-trip: feed definitions through mapDefinitionValue + mkMerge into a listOf option
|
||||
assert
|
||||
let
|
||||
rendered = lib.modules.mapDefinitionValue (attr: lib.cli.toCommandLineGNU { } attr) (
|
||||
mkMerge c.options.asAttrs.valueMeta.attrs.duplicateKeys.definitions
|
||||
);
|
||||
result =
|
||||
(lib.evalModules {
|
||||
modules = [
|
||||
{ options.out = mkOption { type = types.listOf types.str; }; }
|
||||
{ config.out = rendered; }
|
||||
# Interleave: mkOrder 800 lands between x(500) and y(1000)
|
||||
{ config.out = mkOrder 800 [ "--interleaved" ]; }
|
||||
];
|
||||
}).config.out;
|
||||
in
|
||||
result == [
|
||||
"-xfirst"
|
||||
"--interleaved"
|
||||
"-yonly"
|
||||
"-xlast"
|
||||
];
|
||||
|
||||
# Error cases are tested via checkConfigError in modules.sh
|
||||
|
||||
"ok";
|
||||
};
|
||||
}
|
||||
@@ -167,28 +167,6 @@ in
|
||||
elemType = str;
|
||||
lazy = false;
|
||||
}).description == "attribute set of string";
|
||||
assert (attrListOf str).description == "attribute list of string";
|
||||
assert (attrListOf int).description == "attribute list of signed integer";
|
||||
assert (attrListOf bool).description == "attribute list of boolean";
|
||||
assert (attrListOf (either int str)).description == "attribute list of (signed integer or string)";
|
||||
assert (attrListOf (nullOr str)).description == "attribute list of (null or string)";
|
||||
assert (attrListOf (listOf str)).description == "attribute list of list of string";
|
||||
assert
|
||||
(attrListOf (attrsOf int)).description == "attribute list of attribute set of signed integer";
|
||||
assert (attrListOf (attrListOf str)).description == "attribute list of attribute list of string";
|
||||
assert (attrListOf ints.positive).description == "attribute list of (positive integer, meaning >0)";
|
||||
assert
|
||||
(attrListOf (enum [
|
||||
"a"
|
||||
"b"
|
||||
])).description == "attribute list of (one of \"a\", \"b\")";
|
||||
assert
|
||||
(attrListOf (strMatching "[0-9]+")).description
|
||||
== "attribute list of string matching the pattern [0-9]+";
|
||||
assert
|
||||
(attrListOf (nonEmptyListOf str)).description == "attribute list of non-empty (list of string)";
|
||||
assert (attrListOf (submodule { })).description == "attribute list of (submodule)";
|
||||
|
||||
assert (coercedTo str abort int).description == "signed integer or string convertible to it";
|
||||
assert (coercedTo int abort str).description == "string or signed integer convertible to it";
|
||||
assert (coercedTo bool abort str).description == "string or boolean convertible to it";
|
||||
|
||||
@@ -70,16 +70,4 @@ dir="$(nix-instantiate --eval --strict --read-write-mode --json --expr '(with im
|
||||
EOF
|
||||
) || die "cleanSourceWith + cleanSource"
|
||||
|
||||
|
||||
dir="$(nix-instantiate --eval --strict --read-write-mode --json --expr '(with import <nixpkgs/lib>; "${
|
||||
sources.sourceByGlobs '"$work"' [ "*.md" "**/*.o" ]
|
||||
}")' | crudeUnquoteJSON)"
|
||||
(cd "$dir"; find) | sort -f | diff -U10 - <(cat <<EOF
|
||||
.
|
||||
./module.o
|
||||
./README.md
|
||||
EOF
|
||||
) || die "sourceByGlobs 1"
|
||||
|
||||
|
||||
echo >&2 tests ok
|
||||
|
||||
180
lib/types.nix
180
lib/types.nix
@@ -20,7 +20,6 @@ let
|
||||
isStorePath
|
||||
isString
|
||||
substring
|
||||
sort
|
||||
throwIf
|
||||
toDerivation
|
||||
toList
|
||||
@@ -28,7 +27,6 @@ let
|
||||
;
|
||||
inherit (lib.lists)
|
||||
concatLists
|
||||
concatMap
|
||||
elemAt
|
||||
filter
|
||||
foldl'
|
||||
@@ -72,11 +70,6 @@ let
|
||||
mergeDefinitions
|
||||
fixupOptionType
|
||||
mergeOptionDecls
|
||||
defaultOrderPriority
|
||||
defaultOverridePriority
|
||||
mkDefinition
|
||||
mkOrder
|
||||
mkOverride
|
||||
;
|
||||
inherit (lib.fileset)
|
||||
isFileset
|
||||
@@ -812,179 +805,6 @@ rec {
|
||||
substSubModules = m: nonEmptyListOf (elemType.substSubModules m);
|
||||
};
|
||||
|
||||
attrListOf = elemType: attrListWith { inherit elemType; };
|
||||
|
||||
attrListWith =
|
||||
{
|
||||
elemType,
|
||||
asAttrs ? false,
|
||||
mergeAttrValues ? _name: values: values,
|
||||
}:
|
||||
mkOptionType rec {
|
||||
name = "attrListOf";
|
||||
description = "attribute list of ${
|
||||
optionDescriptionPhrase (class: class == "noun" || class == "composite") elemType
|
||||
}";
|
||||
descriptionClass = "composite";
|
||||
check = {
|
||||
__functor = _self: x: isList x || isAttrs x;
|
||||
isV2MergeCoherent = true;
|
||||
};
|
||||
merge = {
|
||||
__functor =
|
||||
self: loc: defs:
|
||||
(self.v2 { inherit loc defs; }).value;
|
||||
v2 =
|
||||
{ loc, defs }:
|
||||
let
|
||||
# Peel order and override properties from a value in any nesting order.
|
||||
# Returns { value, prio, overridePrio }.
|
||||
# mkOrder is stripped (we consume it for sorting).
|
||||
# mkOverride is preserved in value (mergeDefinitions strips it).
|
||||
peelProperties =
|
||||
value:
|
||||
let
|
||||
type = value._type or null;
|
||||
in
|
||||
if type == "order" then
|
||||
let
|
||||
inner = peelProperties value.content;
|
||||
in
|
||||
{
|
||||
inherit (inner) value overridePrio;
|
||||
prio = value.priority;
|
||||
}
|
||||
else if type == "override" then
|
||||
let
|
||||
inner = peelProperties value.content;
|
||||
in
|
||||
{
|
||||
inherit (inner) prio;
|
||||
overridePrio = value.priority;
|
||||
# Re-wrap mkOverride around the inner value (with mkOrder stripped)
|
||||
value = mkOverride value.priority inner.value;
|
||||
}
|
||||
else
|
||||
{
|
||||
inherit value;
|
||||
prio = defaultOrderPriority;
|
||||
overridePrio = defaultOverridePriority;
|
||||
};
|
||||
|
||||
# Extract { file, key, value, prio, overridePrio } from a single-key attrset,
|
||||
# optionally wrapped in mkOrder at the element level (list format).
|
||||
extractItem =
|
||||
file: raw:
|
||||
let
|
||||
hasOrder = isType "order" raw;
|
||||
item = if hasOrder then raw.content else raw;
|
||||
key = head (attrNames item);
|
||||
peeled = peelProperties item.${key};
|
||||
in
|
||||
if isAttrs item && length (attrNames item) == 1 then
|
||||
peeled
|
||||
// {
|
||||
inherit file key;
|
||||
prio = if hasOrder then raw.priority else peeled.prio;
|
||||
}
|
||||
else
|
||||
throw "A definition for option `${showOption loc}' is not of type `${description}'. ${
|
||||
if !isAttrs item then
|
||||
"Each list element must be an attribute set, but got ${builtins.typeOf item}"
|
||||
else
|
||||
"Each list element must be a single-key attribute set, but got ${toString (length (attrNames item))} keys"
|
||||
}.${
|
||||
showDefs [
|
||||
{
|
||||
inherit file;
|
||||
value = raw;
|
||||
}
|
||||
]
|
||||
}";
|
||||
|
||||
# Convert a definition to a flat list of { file, key, value, prio, overridePrio }
|
||||
defToItems =
|
||||
def:
|
||||
if isList def.value then
|
||||
map (extractItem def.file) def.value
|
||||
else
|
||||
# isAttrs: properties are on the values directly
|
||||
map (
|
||||
key:
|
||||
peelProperties def.value.${key}
|
||||
// {
|
||||
inherit (def) file;
|
||||
inherit key;
|
||||
}
|
||||
) (attrNames def.value);
|
||||
|
||||
allItems = concatMap defToItems defs;
|
||||
|
||||
# Per key, find the highest override priority (lowest number)
|
||||
winningOverridePrio = foldl' (
|
||||
acc: item:
|
||||
let
|
||||
prev = acc.${item.key} or defaultOverridePriority;
|
||||
in
|
||||
if item.overridePrio < prev then
|
||||
acc // { ${item.key} = item.overridePrio; }
|
||||
else
|
||||
# minimize `//` operations
|
||||
acc
|
||||
) { } allItems;
|
||||
|
||||
# Keep only items at the winning override priority for their key
|
||||
items = sort (a: b: a.prio < b.prio) (
|
||||
filter (
|
||||
item: item.overridePrio == winningOverridePrio.${item.key} or defaultOverridePriority
|
||||
) allItems
|
||||
);
|
||||
|
||||
evals = filter (e: e.eval.optionalValue ? value) (
|
||||
map (item: {
|
||||
inherit (item) key file prio;
|
||||
eval = mergeDefinitions (loc ++ [ item.key ]) elemType [
|
||||
{
|
||||
inherit (item) file value;
|
||||
}
|
||||
];
|
||||
}) items
|
||||
);
|
||||
|
||||
attrListValue = map (e: { ${e.key} = e.eval.optionalValue.value or e.eval.mergedValue; }) evals;
|
||||
in
|
||||
{
|
||||
headError = checkDefsForError check loc defs;
|
||||
value = if asAttrs then zipAttrsWith mergeAttrValues attrListValue else attrListValue;
|
||||
valueMeta.attrList = map (e: e.eval.checkedAndMerged.valueMeta) evals;
|
||||
/**
|
||||
The ordered list representation, especially useful when asAttrs is set.
|
||||
*/
|
||||
valueMeta.attrListValue = attrListValue;
|
||||
valueMeta.definitions = map (
|
||||
e:
|
||||
mkDefinition {
|
||||
inherit (e) file;
|
||||
value = mkOrder e.prio { ${e.key} = e.eval.optionalValue.value or e.eval.mergedValue; };
|
||||
}
|
||||
) evals;
|
||||
};
|
||||
};
|
||||
emptyValue = {
|
||||
value = if asAttrs then { } else [ ];
|
||||
};
|
||||
getSubOptions = prefix: elemType.getSubOptions (prefix ++ [ "*" ]);
|
||||
getSubModules = elemType.getSubModules;
|
||||
substSubModules =
|
||||
m:
|
||||
attrListWith {
|
||||
inherit asAttrs mergeAttrValues;
|
||||
elemType = elemType.substSubModules m;
|
||||
};
|
||||
typeMerge = t: null; # Disable type merging
|
||||
nestedTypes.elemType = elemType;
|
||||
};
|
||||
|
||||
attrsOf = elemType: attrsWith { inherit elemType; };
|
||||
|
||||
# A version of attrsOf that's lazy in its values at the expense of
|
||||
|
||||
@@ -309,7 +309,8 @@
|
||||
"members": {
|
||||
"AndersonTorres": 5954806,
|
||||
"adisbladis": 63286,
|
||||
"panchoh": 471059
|
||||
"panchoh": 471059,
|
||||
"ttuegel": 563054
|
||||
},
|
||||
"name": "emacs"
|
||||
},
|
||||
@@ -406,13 +407,12 @@
|
||||
"gnome": {
|
||||
"description": "Maintain GNOME desktop environment and platform.",
|
||||
"id": 3806133,
|
||||
"maintainers": {
|
||||
"jtojnar": 705123
|
||||
},
|
||||
"maintainers": {},
|
||||
"members": {
|
||||
"bobby285271": 20080233,
|
||||
"dasj19": 7589338,
|
||||
"hedning": 71978
|
||||
"hedning": 71978,
|
||||
"jtojnar": 705123
|
||||
},
|
||||
"name": "GNOME"
|
||||
},
|
||||
@@ -702,7 +702,6 @@
|
||||
"Mic92": 96200,
|
||||
"Radvendii": 1239929,
|
||||
"edolstra": 1148549,
|
||||
"lisanna-dettwyler": 72424138,
|
||||
"lovesegfault": 7243783,
|
||||
"xokdvium": 145775305
|
||||
},
|
||||
@@ -820,13 +819,14 @@
|
||||
"description": "Maintain the Qt framework, KDE application suite, Plasma desktop environment and related projects",
|
||||
"id": 4341481,
|
||||
"maintainers": {
|
||||
"K900": 386765,
|
||||
"NickCao": 15247171,
|
||||
"SuperSandro2000": 7258858
|
||||
"ttuegel": 563054
|
||||
},
|
||||
"members": {
|
||||
"FRidh": 2129135,
|
||||
"K900": 386765,
|
||||
"LunNova": 782440,
|
||||
"NickCao": 15247171,
|
||||
"SuperSandro2000": 7258858,
|
||||
"bkchr": 5718007,
|
||||
"ilya-fedin": 17829319,
|
||||
"mjm": 1181,
|
||||
@@ -896,7 +896,8 @@
|
||||
"id": 7304571,
|
||||
"maintainers": {
|
||||
"Mic92": 96200,
|
||||
"winterqt": 78392041
|
||||
"winterqt": 78392041,
|
||||
"zowoq": 59103226
|
||||
},
|
||||
"members": {},
|
||||
"name": "rust"
|
||||
@@ -935,7 +936,6 @@
|
||||
"infinisil": 20525370
|
||||
},
|
||||
"members": {
|
||||
"andir": 638836,
|
||||
"pyrox0": 35778371
|
||||
},
|
||||
"name": "Security review"
|
||||
|
||||
@@ -118,6 +118,13 @@
|
||||
github = "0xB10C";
|
||||
githubId = 19157360;
|
||||
};
|
||||
_0xbe7a = {
|
||||
email = "nix@be7a.de";
|
||||
name = "Bela Stoyan";
|
||||
github = "0xbe7a";
|
||||
githubId = 6232980;
|
||||
keys = [ { fingerprint = "2536 9E86 1AA5 9EB7 4C47 B138 6510 870A 77F4 9A99"; } ];
|
||||
};
|
||||
_0xC45 = {
|
||||
email = "jason@0xc45.com";
|
||||
name = "Jason Vigil";
|
||||
@@ -703,12 +710,6 @@
|
||||
githubId = 25004152;
|
||||
name = "Adrian Gunnar Lauterer";
|
||||
};
|
||||
adrielvelazquez = {
|
||||
email = "AdrielVelazquez@gmail.com";
|
||||
github = "AdrielVelazquez";
|
||||
githubId = 3443378;
|
||||
name = "Adriel Velazquez";
|
||||
};
|
||||
AdrienLemaire = {
|
||||
email = "lemaire.adrien@gmail.com";
|
||||
github = "AdrienLemaire";
|
||||
@@ -1875,10 +1876,7 @@
|
||||
github = "ap-1";
|
||||
githubId = 67872951;
|
||||
name = "Anish Pallati";
|
||||
keys = [
|
||||
{ fingerprint = "2A0A 16F5 E026 BE3B A47F B7A6 841A FB68 9A5B ACCB"; }
|
||||
{ fingerprint = "B89E A3F3 16A7 411C B5B2 8A14 B1CA 8321 35A8 C503"; }
|
||||
];
|
||||
keys = [ { fingerprint = "2A0A 16F5 E026 BE3B A47F B7A6 841A FB68 9A5B ACCB"; } ];
|
||||
};
|
||||
ankhers = {
|
||||
email = "me@ankhers.dev";
|
||||
@@ -4284,12 +4282,6 @@
|
||||
{ fingerprint = "D088 A5AF C45B 78D1 CD4F 457C 6957 B3B6 46F2 BB4E"; }
|
||||
];
|
||||
};
|
||||
c6rg0 = {
|
||||
email = "c6rg0@protonmail.com";
|
||||
github = "c6rg0";
|
||||
githubId = 64259221;
|
||||
name = "c6rg0";
|
||||
};
|
||||
caarlos0 = {
|
||||
name = "Carlos A Becker";
|
||||
email = "carlos@becker.software";
|
||||
@@ -4370,6 +4362,12 @@
|
||||
githubId = 1516457;
|
||||
name = "Christian Albrecht";
|
||||
};
|
||||
callahad = {
|
||||
email = "dan.callahan@gmail.com";
|
||||
github = "callahad";
|
||||
githubId = 24193;
|
||||
name = "Dan Callahan";
|
||||
};
|
||||
callumio = {
|
||||
email = "git@cleslie.uk";
|
||||
github = "callumio";
|
||||
@@ -4557,12 +4555,6 @@
|
||||
githubId = 53847249;
|
||||
name = "Casey Avila";
|
||||
};
|
||||
castorNova2 = {
|
||||
email = "solemnsquire@gmail.com";
|
||||
github = "castorNova2";
|
||||
githubId = 84083897;
|
||||
name = "Nidhish Chauhan";
|
||||
};
|
||||
catap = {
|
||||
email = "kirill@korins.ky";
|
||||
github = "catap";
|
||||
@@ -5066,6 +5058,12 @@
|
||||
github = "cigrainger";
|
||||
githubId = 3984794;
|
||||
};
|
||||
ciil = {
|
||||
email = "simon@lackerbauer.com";
|
||||
github = "ciil";
|
||||
githubId = 3956062;
|
||||
name = "Simon Lackerbauer";
|
||||
};
|
||||
cilki = {
|
||||
github = "cilki";
|
||||
githubId = 10459406;
|
||||
@@ -7362,6 +7360,12 @@
|
||||
github = "DSeeLP";
|
||||
githubId = 46624152;
|
||||
};
|
||||
dsferruzza = {
|
||||
email = "david.sferruzza@gmail.com";
|
||||
github = "dsferruzza";
|
||||
githubId = 1931963;
|
||||
name = "David Sferruzza";
|
||||
};
|
||||
dsluijk = {
|
||||
name = "Dany Sluijk";
|
||||
email = "nix@dany.dev";
|
||||
@@ -7653,12 +7657,6 @@
|
||||
github = "eclairevoyant";
|
||||
name = "éclairevoyant";
|
||||
};
|
||||
eConnah = {
|
||||
email = "git@econnah.uk";
|
||||
github = "eConnah";
|
||||
githubId = 63052937;
|
||||
name = "Connor Alecks";
|
||||
};
|
||||
edanaher = {
|
||||
email = "nixos@edanaher.net";
|
||||
github = "edanaher";
|
||||
@@ -8315,11 +8313,6 @@
|
||||
githubId = 5427394;
|
||||
name = "Ersin Akinci";
|
||||
};
|
||||
es-sai-fi = {
|
||||
name = "es-sai-fi";
|
||||
github = "es-sai-fi";
|
||||
githubId = 96452903;
|
||||
};
|
||||
esau79p = {
|
||||
github = "EsAu79p";
|
||||
githubId = 21313906;
|
||||
@@ -8676,13 +8669,6 @@
|
||||
githubId = 88741530;
|
||||
name = "Fabian Rigoll";
|
||||
};
|
||||
fabiob = {
|
||||
email = "fabio@atelie.dev.br";
|
||||
github = "fabiob";
|
||||
githubId = 140875;
|
||||
name = "Fábio Batista";
|
||||
keys = [ { fingerprint = "D2D8 69D8 5EEC 30AD D327 B4A5 6CD5 5257 DB01 8B72"; } ];
|
||||
};
|
||||
fallenbagel = {
|
||||
name = "fallenbagel";
|
||||
github = "fallenbagel";
|
||||
@@ -9249,12 +9235,6 @@
|
||||
githubId = 119691;
|
||||
name = "Michael Gough";
|
||||
};
|
||||
fraggerfox = {
|
||||
email = "santhosh.raju@gmail.com";
|
||||
github = "fraggerfox";
|
||||
githubId = 189939;
|
||||
name = "Santhosh Raju";
|
||||
};
|
||||
fraioveio = {
|
||||
email = "francesco@vecchia.lol";
|
||||
github = "FraioVeio";
|
||||
@@ -9365,6 +9345,14 @@
|
||||
githubId = 1943632;
|
||||
name = "fro_ozen";
|
||||
};
|
||||
frogamic = {
|
||||
email = "frogamic@protonmail.com";
|
||||
github = "frogamic";
|
||||
githubId = 10263813;
|
||||
name = "Dominic Shelton";
|
||||
matrix = "@frogamic:beeper.com";
|
||||
keys = [ { fingerprint = "779A 7CA8 D51C C53A 9C51 43F7 AAE0 70F0 67EC 00A5"; } ];
|
||||
};
|
||||
frontear = {
|
||||
name = "Ali Rizvi";
|
||||
email = "perm-iterate-0b@icloud.com";
|
||||
@@ -10153,12 +10141,6 @@
|
||||
githubId = 6893840;
|
||||
name = "Yacine Hmito";
|
||||
};
|
||||
gquetel = {
|
||||
email = "gregor.quetel@telecom-paris.fr";
|
||||
github = "gquetel";
|
||||
githubId = 48437427;
|
||||
name = "Grégor Quetel";
|
||||
};
|
||||
gracicot = {
|
||||
email = "dev@gracicot.com";
|
||||
matrix = "@gracicot-59e8f173d73408ce4f7ac803:gitter.im";
|
||||
@@ -11084,7 +11066,7 @@
|
||||
name = "Hugo Tavares Reis";
|
||||
};
|
||||
httprafa = {
|
||||
email = "rafa.kienitz@proton.me";
|
||||
email = "rafael.kienitz@gmail.com";
|
||||
github = "HttpRafa";
|
||||
githubId = 60099368;
|
||||
name = "Rafael Kienitz";
|
||||
@@ -11705,12 +11687,6 @@
|
||||
githubId = 7348004;
|
||||
name = "Benjamin Levy";
|
||||
};
|
||||
iogamaster = {
|
||||
email = "iogamastercode+nixpkgs@gmail.com";
|
||||
name = "IogaMaster";
|
||||
github = "IogaMaster";
|
||||
githubId = 67164465;
|
||||
};
|
||||
ionutnechita = {
|
||||
email = "ionut_n2001@yahoo.com";
|
||||
github = "ionutnechita";
|
||||
@@ -12612,12 +12588,6 @@
|
||||
githubId = 30251156;
|
||||
name = "Jesse Moore";
|
||||
};
|
||||
jesssullivan = {
|
||||
email = "jess@sulliwood.org";
|
||||
github = "Jesssullivan";
|
||||
githubId = 37297218;
|
||||
name = "Jess Sullivan";
|
||||
};
|
||||
jethair = {
|
||||
email = "jethair@duck.com";
|
||||
github = "JetHair";
|
||||
@@ -14380,6 +14350,12 @@
|
||||
githubId = 451835;
|
||||
name = "Kirill Elagin";
|
||||
};
|
||||
kirikaza = {
|
||||
email = "k@kirikaza.ru";
|
||||
github = "kirikaza";
|
||||
githubId = 804677;
|
||||
name = "Kirill Kazakov";
|
||||
};
|
||||
kirillrdy = {
|
||||
email = "kirillrdy@gmail.com";
|
||||
github = "kirillrdy";
|
||||
@@ -15624,6 +15600,12 @@
|
||||
githubId = 4312404;
|
||||
name = "Chris Rendle-Short";
|
||||
};
|
||||
lightdiscord = {
|
||||
email = "root@arnaud.sh";
|
||||
github = "lightdiscord";
|
||||
githubId = 24509182;
|
||||
name = "Arnaud Pascal";
|
||||
};
|
||||
lightquantum = {
|
||||
email = "self@lightquantum.me";
|
||||
github = "PhotonQuantum";
|
||||
@@ -15830,6 +15812,12 @@
|
||||
githubId = 23727619;
|
||||
name = "Luca Ruperto";
|
||||
};
|
||||
lnl7 = {
|
||||
email = "daiderd@gmail.com";
|
||||
github = "LnL7";
|
||||
githubId = 689294;
|
||||
name = "Daiderd Jordan";
|
||||
};
|
||||
lo1tuma = {
|
||||
email = "schreck.mathias@gmail.com";
|
||||
github = "lo1tuma";
|
||||
@@ -16294,11 +16282,6 @@
|
||||
githubId = 26020062;
|
||||
name = "lumi";
|
||||
};
|
||||
luminarleaf = {
|
||||
github = "LuminarLeaf";
|
||||
githubId = 80571430;
|
||||
name = "Luminar Leaf";
|
||||
};
|
||||
luna_1024 = {
|
||||
email = "contact@luna.computer";
|
||||
github = "luna-1024";
|
||||
@@ -16477,12 +16460,6 @@
|
||||
githubId = 8094643;
|
||||
keys = [ { fingerprint = "BAA9 7711 58CA D457 B4AE 8B06 8188 423D 2FA2 0A65"; } ];
|
||||
};
|
||||
m4r1vs = {
|
||||
email = "marius.niveri@gmail.com";
|
||||
name = "Marius Niveri";
|
||||
github = "m4r1vs";
|
||||
githubId = 26097311;
|
||||
};
|
||||
m7medvision = {
|
||||
name = "Mohammed";
|
||||
github = "m7medVision";
|
||||
@@ -17421,6 +17398,12 @@
|
||||
githubId = 613740;
|
||||
name = "Martin Baillie";
|
||||
};
|
||||
mbbx6spp = {
|
||||
email = "me@susanpotter.net";
|
||||
github = "mbbx6spp";
|
||||
githubId = 564;
|
||||
name = "Susan Potter";
|
||||
};
|
||||
mbe = {
|
||||
email = "brandonedens@gmail.com";
|
||||
github = "brandonedens";
|
||||
@@ -18282,18 +18265,19 @@
|
||||
githubId = 16974598;
|
||||
name = "Mike Playle";
|
||||
};
|
||||
mkannwischer = {
|
||||
email = "matthias@kannwischer.eu";
|
||||
github = "mkannwischer";
|
||||
githubId = 3984960;
|
||||
name = "Matthias Kannwischer";
|
||||
};
|
||||
mkez = {
|
||||
email = "matias+nix@zwinger.fi";
|
||||
github = "mk3z";
|
||||
githubId = 52108954;
|
||||
name = "Matias Zwinger";
|
||||
};
|
||||
mkf = {
|
||||
email = "m@mikf.pl";
|
||||
github = "mkf";
|
||||
githubId = 7753506;
|
||||
name = "Michał Krzysztof Feiler";
|
||||
keys = [ { fingerprint = "1E36 9940 CC7E 01C4 CFE8 F20A E35C 2D7C 2C6A C724"; } ];
|
||||
};
|
||||
mkg = {
|
||||
email = "mkg@vt.edu";
|
||||
github = "mkgvt";
|
||||
@@ -18726,10 +18710,10 @@
|
||||
keys = [ { fingerprint = "3B66 ACFA D10F 02AA B1D5 2CB1 8DD0 D81D 7D1F C61A"; } ];
|
||||
};
|
||||
mshnwq = {
|
||||
email = "hmachnouk@proton.me";
|
||||
email = "mshnwq.com@gmail.com";
|
||||
github = "mshnwq";
|
||||
githubId = 68467027;
|
||||
name = "Mshnwq";
|
||||
name = "Hayan Al-Machnouk";
|
||||
};
|
||||
msiedlarek = {
|
||||
email = "mikolaj@siedlarek.pl";
|
||||
@@ -19271,12 +19255,6 @@
|
||||
name = "Naufal Fikri";
|
||||
keys = [ { fingerprint = "1575 D651 E31EC 6117A CF0AA C1A3B 8BBC A515 8835"; } ];
|
||||
};
|
||||
naurissteins = {
|
||||
name = "Nauris Steins";
|
||||
email = "me@naurissteins.com";
|
||||
github = "naurissteins";
|
||||
githubId = 5653746;
|
||||
};
|
||||
naxdy = {
|
||||
name = "Naxdy";
|
||||
email = "naxdy@naxdy.org";
|
||||
@@ -19398,11 +19376,6 @@
|
||||
githubId = 79978224;
|
||||
name = "winston";
|
||||
};
|
||||
nelind = {
|
||||
name = "Nel";
|
||||
github = "nelind3";
|
||||
githubId = 57587152;
|
||||
};
|
||||
nelsonjeppesen = {
|
||||
email = "nix@jeppesen.io";
|
||||
github = "NelsonJeppesen";
|
||||
@@ -19431,12 +19404,6 @@
|
||||
name = "neo";
|
||||
email = "chojs990222@gmail.com";
|
||||
};
|
||||
neonvoid = {
|
||||
email = "me@neonvoid.dev";
|
||||
github = "neonvoidx";
|
||||
githubId = 25580051;
|
||||
name = "neonvoid";
|
||||
};
|
||||
neosimsim = {
|
||||
email = "me@abn.sh";
|
||||
github = "neosimsim";
|
||||
@@ -19501,12 +19468,6 @@
|
||||
githubId = 1488603;
|
||||
name = "François Espinet";
|
||||
};
|
||||
netpleb = {
|
||||
email = "netpleb@proton.me";
|
||||
github = "netpleb";
|
||||
githubId = 130105838;
|
||||
name = "netpleb";
|
||||
};
|
||||
netthier = {
|
||||
email = "netthier@proton.me";
|
||||
name = "nett_hier";
|
||||
@@ -20398,12 +20359,6 @@
|
||||
email = "nyu@nyuku.ru";
|
||||
githubId = 97425873;
|
||||
};
|
||||
nyxar77 = {
|
||||
name = "nyxar77";
|
||||
github = "nyxar77";
|
||||
email = "dev@nyxar.space";
|
||||
githubId = 153492661;
|
||||
};
|
||||
nyxonios = {
|
||||
name = "nyxonios";
|
||||
github = "Nyxonios";
|
||||
@@ -21437,12 +21392,6 @@
|
||||
githubId = 7420227;
|
||||
name = "Peter Tri Ho";
|
||||
};
|
||||
peterwaller-arm = {
|
||||
email = "peter.waller@arm.com";
|
||||
github = "peterwaller-arm";
|
||||
githubId = 52030119;
|
||||
name = "Peter Waller";
|
||||
};
|
||||
peterwilli = {
|
||||
email = "peter@codebuffet.co";
|
||||
github = "peterwilli";
|
||||
@@ -22158,12 +22107,6 @@
|
||||
githubId = 246631;
|
||||
keys = [ { fingerprint = "3E46 7EF1 54AA A1D0 C7DF A694 E45C B17F 1940 CA52"; } ];
|
||||
};
|
||||
pretentiousUsername = {
|
||||
name = "Ian Mitchell";
|
||||
email = "mitchell.ian.2001@gmail.com";
|
||||
github = "pretentiousUsername";
|
||||
githubId = 94192644;
|
||||
};
|
||||
priegger = {
|
||||
email = "philipp@riegger.name";
|
||||
github = "priegger";
|
||||
@@ -23398,6 +23341,12 @@
|
||||
githubId = 6047658;
|
||||
name = "Ryan Horiguchi";
|
||||
};
|
||||
rht = {
|
||||
email = "rhtbot@protonmail.com";
|
||||
github = "rht";
|
||||
githubId = 395821;
|
||||
name = "rht";
|
||||
};
|
||||
rhydianjenkins = {
|
||||
name = "Rhydian Jenkins";
|
||||
github = "RhydianJenkins";
|
||||
@@ -23433,13 +23382,6 @@
|
||||
githubId = 61013287;
|
||||
name = "Ricardo Steijn";
|
||||
};
|
||||
ricardomaps = {
|
||||
email = "ricardomapurungajunior@gmail.com";
|
||||
github = "ricardomaps";
|
||||
githubId = 49507078;
|
||||
name = "Ricardo Mapurunga Junior";
|
||||
matrix = "@ricmaps:matrix.org";
|
||||
};
|
||||
richar = {
|
||||
github = "ri-char";
|
||||
githubId = 17962023;
|
||||
@@ -25089,12 +25031,6 @@
|
||||
githubId = 2049686;
|
||||
name = "Sebastián Estrella";
|
||||
};
|
||||
seudonym = {
|
||||
name = "Wahid Khan";
|
||||
email = "wk170179+nixpkgs@gmail.com";
|
||||
github = "seudonym";
|
||||
githubId = 80459261;
|
||||
};
|
||||
seven_bear = {
|
||||
name = "Edmond Freeman";
|
||||
email = "edmondfreeman7@gmail.com";
|
||||
@@ -25367,6 +25303,12 @@
|
||||
githubId = 487050;
|
||||
name = "Shea Levy";
|
||||
};
|
||||
shlok = {
|
||||
email = "sd-nix-maintainer@quant.is";
|
||||
github = "shlok";
|
||||
githubId = 3000933;
|
||||
name = "Shlok Datye";
|
||||
};
|
||||
shmish111 = {
|
||||
email = "shmish111@gmail.com";
|
||||
github = "shmish111";
|
||||
@@ -25709,6 +25651,12 @@
|
||||
githubId = 216167;
|
||||
name = "Steve Jones";
|
||||
};
|
||||
sjmackenzie = {
|
||||
email = "setori88@gmail.com";
|
||||
github = "sjmackenzie";
|
||||
githubId = 158321;
|
||||
name = "Stewart Mackenzie";
|
||||
};
|
||||
skaphi = {
|
||||
name = "Oskar Philipsson";
|
||||
email = "oskar.philipsson@gmail.com";
|
||||
@@ -25751,7 +25699,6 @@
|
||||
};
|
||||
skyesoss = {
|
||||
name = "Skye Soss";
|
||||
email = "skye@soss.website";
|
||||
matrix = "@skyesoss:matrix.org";
|
||||
github = "Skyb0rg007";
|
||||
githubId = 30806179;
|
||||
@@ -26149,12 +26096,6 @@
|
||||
name = "sportshead";
|
||||
keys = [ { fingerprint = "A6B6 D031 782E BDF7 631A 8E7E A874 DB2C BFD3 CFD0"; } ];
|
||||
};
|
||||
spotdemo4 = {
|
||||
email = "me@trev.xyz";
|
||||
github = "spotdemo4";
|
||||
githubId = 3732640;
|
||||
name = "spotdemo4";
|
||||
};
|
||||
spreetin = {
|
||||
email = "spreetin@protonmail.com";
|
||||
name = "David Falk";
|
||||
@@ -28400,6 +28341,12 @@
|
||||
githubId = 77488956;
|
||||
name = "Timothy Tschnitzel";
|
||||
};
|
||||
ttuegel = {
|
||||
email = "ttuegel@mailbox.org";
|
||||
github = "ttuegel";
|
||||
githubId = 563054;
|
||||
name = "Thomas Tuegel";
|
||||
};
|
||||
tu-maurice = {
|
||||
email = "valentin.gehrke+nixpkgs@zom.bi";
|
||||
github = "tu-maurice";
|
||||
@@ -29491,12 +29438,6 @@
|
||||
github = "wdavidw";
|
||||
githubId = 46896;
|
||||
};
|
||||
wduo87391 = {
|
||||
name = "wduo87391";
|
||||
email = "wduo87391@gmail.com";
|
||||
github = "wduo87391";
|
||||
githubId = 197874825;
|
||||
};
|
||||
weathercold = {
|
||||
name = "Weathercold";
|
||||
email = "weathercold.scr@proton.me";
|
||||
@@ -29683,11 +29624,6 @@
|
||||
}
|
||||
];
|
||||
};
|
||||
wilaz = {
|
||||
name = "Wilaz";
|
||||
github = "Wilaz";
|
||||
githubId = 98198668;
|
||||
};
|
||||
wildsebastian = {
|
||||
name = "Sebastian Wild";
|
||||
email = "sebastian@wild-siena.com";
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash
|
||||
#!nix-shell -p jq git
|
||||
# shellcheck shell=bash
|
||||
#
|
||||
# Usage: eval-pkg-sets.sh [extra flags for nix-* commands ...]
|
||||
#
|
||||
# Must be executed in a git checkout of Nixpkgs.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
NIXPKGS="$(git rev-parse --show-toplevel)"
|
||||
PKGSETS="$(nix-env --readonly-mode --json --drv-path -f "$NIXPKGS" -qaP -A haskell.compiler "$@" \
|
||||
| jq -r 'to_entries | unique_by(.value.drvPath) .[] .key | sub("^haskell.compiler";"haskell.packages")')"
|
||||
|
||||
trap 'exit 1' SIGINT SIGTERM
|
||||
|
||||
set +e
|
||||
|
||||
badsets=""
|
||||
for set in $PKGSETS; do
|
||||
# Confirm an equivalent package set to haskell.compiler.$entry exists and is usable
|
||||
if ! nix-instantiate --readonly-mode -A "$set.ghc" "$@" > /dev/null 2>&1; then
|
||||
echo "Skipping $set... ($set.ghc does not evaluate)"
|
||||
else
|
||||
echo "Evaluating $set..."
|
||||
|
||||
if ! nix-env --readonly-mode -f "$NIXPKGS" -qaP --drv-path -A "$set" "$@" > /dev/null; then
|
||||
badsets+="$set "
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$badsets" ]; then
|
||||
echo "Found potential eval issues in the following sets:" >&2
|
||||
# shellcheck disable=SC2086
|
||||
printf '%s\n' $badsets
|
||||
exit 1
|
||||
fi
|
||||
@@ -33,7 +33,7 @@ fi
|
||||
|
||||
# Stackage solver to use, LTS or Nightly
|
||||
# (should be capitalized like the display name)
|
||||
SOLVER=Nightly
|
||||
SOLVER=LTS
|
||||
# Stackage solver verson, if any. Use latest if empty
|
||||
VERSION=
|
||||
TMP_TEMPLATE=update-stackage.XXXXXXX
|
||||
@@ -105,7 +105,6 @@ sed -r \
|
||||
-e '/ hledger-ui /d' \
|
||||
-e '/ hledger-web /d' \
|
||||
-e '/ spacecookie /d' \
|
||||
-e '/ hnix-store-core /d' \
|
||||
< "${tmpfile_new}" >> $stackage_config
|
||||
# Explanations:
|
||||
# cabal2nix, distribution-nixpkgs, jailbreak-cabal, language-nix: These are our packages and we know what we are doing.
|
||||
|
||||
@@ -49,7 +49,6 @@ lpeglabel,,,,1.6.0,,
|
||||
lrexlib-gnu,,,,,,
|
||||
lrexlib-oniguruma,,,,,,junestepp
|
||||
lrexlib-pcre,,,,,,
|
||||
lrexlib-pcre2,,,,,,wishstudio
|
||||
lrexlib-posix,,,,,,
|
||||
lsp-progress.nvim,,,,,5.1,gepbird
|
||||
lsqlite3,,,,,,
|
||||
@@ -176,7 +175,6 @@ tree-sitter-norg-meta,,,,,,
|
||||
tree-sitter-orgmode,,,,,5.1,
|
||||
utf8,,,,,,
|
||||
tree-sitter-teal,,,,,,
|
||||
vicious,,,,,,
|
||||
vstruct,,,,,,
|
||||
vusted,,,,,,
|
||||
xml2lua,,,,,,teto
|
||||
|
||||
|
@@ -662,6 +662,7 @@ with lib.maintainers;
|
||||
python = {
|
||||
members = [
|
||||
hexa
|
||||
natsukium
|
||||
];
|
||||
scope = "Maintain the Python interpreter and related packages.";
|
||||
shortName = "Python";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Common configuration for headless machines (e.g., Amazon EC2 instances).
|
||||
|
||||
Disables serial consoles,
|
||||
Disables [vesa](#opt-boot.vesa), serial consoles,
|
||||
[emergency mode](#opt-systemd.enableEmergencyMode),
|
||||
[grub splash images](#opt-boot.loader.grub.splashImage)
|
||||
and configures the kernel to reboot automatically on panic.
|
||||
|
||||
@@ -6,7 +6,7 @@ Status: in development. This functionality is new in NixOS 25.11, and significan
|
||||
Traditionally, NixOS services were defined using sets of options *in* modules, not *as* modules. This made them non-modular, resulting in problems with composability, reuse, and portability.
|
||||
|
||||
A configuration management framework is an application of `evalModules` with the `class` and `specialArgs` input attribute set to particular values.
|
||||
NixOS is such a configuration management framework, and so are [Home Manager](https://github.com/nix-community/home-manager) and [`nix-darwin`](https://github.com/nix-darwin/nix-darwin).
|
||||
NixOS is such a configuration management framework, and so are [Home Manager](https://github.com/nix-community/home-manager) and [`nix-darwin`](https://github.com/lnl7/nix-darwin).
|
||||
|
||||
The service management component of a configuration management framework is the set of module options that connects Nix expressions with the underlying service (or process) manager.
|
||||
For NixOS this is the module wrapping [`systemd`](https://systemd.io/), on `nix-darwin` this is the module wrapping [`launchd`](https://en.wikipedia.org/wiki/Launchd).
|
||||
|
||||
@@ -494,47 +494,6 @@ Composed types are types that take a type as parameter. `listOf
|
||||
|
||||
Displays the option as `foo.<id>` in the manual.
|
||||
|
||||
`types.attrListOf` *`t`*
|
||||
|
||||
: An ordered list of single-attribute attribute sets, where each value is of *`t`* type.
|
||||
The output is always `[ { name1 = value1; } { name2 = value2; } ... ]`.
|
||||
|
||||
Definitions can be provided in two formats, which may be mixed via `lib.mkMerge`, `imports`, etc:
|
||||
|
||||
- **List format**: `[ { a = 1; } { b = 2; } ]` — each element must be a single-attribute attribute set.
|
||||
Elements may be wrapped in `lib.mkOrder` (or `lib.mkBefore`/`lib.mkAfter`) to control ordering;
|
||||
unwrapped elements use the default order priority.
|
||||
|
||||
- **Attribute set format**: `{ a = lib.mkOrder 100 1; b = 2; }` — each name-value pair becomes a single-attribute attribute set in the output.
|
||||
Values may be wrapped in `lib.mkOrder` (or `lib.mkBefore`/`lib.mkAfter`) to control ordering.
|
||||
Values without `lib.mkOrder` use the default priority.
|
||||
|
||||
Multiple definitions of the same option are concatenated and then sorted by priority.
|
||||
Entries at the same priority level preserve their definition order.
|
||||
|
||||
`types.attrListWith` { *`elemType`*, *`asAttrs`* ? false, *`mergeAttrValues`* ? _name: values: values }
|
||||
|
||||
: An ordered list of single-attribute attribute sets, where each value is of *`elemType`* type.
|
||||
|
||||
**Parameters**
|
||||
|
||||
`elemType` (Required)
|
||||
: Specifies the type of each value in the attribute list.
|
||||
|
||||
`asAttrs`
|
||||
: When `true`, the option value is an attribute set instead of a list.
|
||||
Duplicate keys are merged using `mergeAttrValues`.
|
||||
The ordered list is always available via `valueMeta.attrListValue`.
|
||||
|
||||
`mergeAttrValues`
|
||||
: A function `name: values: mergedValue` that controls how duplicate keys
|
||||
are combined when `asAttrs = true`. This is passed as the callback to
|
||||
`lib.zipAttrsWith`. The `values` list is in order of priority.
|
||||
By default, all values are collected into a list.
|
||||
|
||||
**Behavior**
|
||||
|
||||
- `attrListWith { elemType = t; }` is equivalent to `attrListOf t`
|
||||
|
||||
`types.uniq` *`t`*
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ passed and a selection of packages has been built successfully
|
||||
(see `nixos/release-combined.nix` and `nixos/release-small.nix`).
|
||||
These channels are:
|
||||
|
||||
- *Stable channels*, such as [`nixos-26.05`](https://channels.nixos.org/nixos-26.05).
|
||||
- *Stable channels*, such as [`nixos-25.11`](https://channels.nixos.org/nixos-25.11).
|
||||
These only get conservative bug fixes and package upgrades. For
|
||||
instance, a channel update may cause the Linux kernel on your system
|
||||
to be upgraded from 4.19.34 to 4.19.38 (a minor bug fix), but not
|
||||
@@ -21,7 +21,7 @@ These channels are:
|
||||
radical changes between channel updates. It's not recommended for
|
||||
production systems.
|
||||
|
||||
- *Small channels*, such as [`nixos-26.05-small`](https://channels.nixos.org/nixos-26.05-small)
|
||||
- *Small channels*, such as [`nixos-25.11-small`](https://channels.nixos.org/nixos-25.11-small)
|
||||
or [`nixos-unstable-small`](https://channels.nixos.org/nixos-unstable-small).
|
||||
These are identical to the stable and unstable channels described above,
|
||||
except that they contain fewer binary packages. This means they get updated
|
||||
@@ -40,8 +40,8 @@ supported stable release.
|
||||
|
||||
When you first install NixOS, you're automatically subscribed to the
|
||||
NixOS channel that corresponds to your installation source. For
|
||||
instance, if you installed from a 26.05 ISO, you will be subscribed to
|
||||
the `nixos-26.05` channel. To see which NixOS channel you're subscribed
|
||||
instance, if you installed from a 25.11 ISO, you will be subscribed to
|
||||
the `nixos-25.11` channel. To see which NixOS channel you're subscribed
|
||||
to, run the following as root:
|
||||
|
||||
```ShellSession
|
||||
@@ -56,16 +56,16 @@ To switch to a different NixOS channel, do
|
||||
```
|
||||
|
||||
(Be sure to include the `nixos` parameter at the end.) For instance, to
|
||||
use the NixOS 26.05 stable channel:
|
||||
use the NixOS 25.11 stable channel:
|
||||
|
||||
```ShellSession
|
||||
# nix-channel --add https://channels.nixos.org/nixos-26.05 nixos
|
||||
# nix-channel --add https://channels.nixos.org/nixos-25.11 nixos
|
||||
```
|
||||
|
||||
If you have a server, you may want to use the "small" channel instead:
|
||||
|
||||
```ShellSession
|
||||
# nix-channel --add https://channels.nixos.org/nixos-26.05-small nixos
|
||||
# nix-channel --add https://channels.nixos.org/nixos-25.11-small nixos
|
||||
```
|
||||
|
||||
And if you want to live on the bleeding edge:
|
||||
@@ -118,5 +118,5 @@ 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-26.05"; }
|
||||
{ system.autoUpgrade.channel = "https://channels.nixos.org/nixos-25.11"; }
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
- Added `nixos-init`, a Rust-based bashless initialization system for systemd initrd.
|
||||
- Added `nixos-init`, a Rust-based bashless initialization system for systemd initrd. This allows to build NixOS systems without any interpreter. Enable via `system.nixos-init.enable = true;`.
|
||||
|
||||
- COSMIC DE has been updated to the beta version, bringing it closer to its first stable release. This includes updates to its core components, applications, and overall stability.
|
||||
|
||||
@@ -41,19 +41,17 @@
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
- Added `nixos-init`, a Rust-based bashless initialization system for systemd initrd. This allows building NixOS systems without any interpreter. Enable via `system.nixos-init.enable = true;`.
|
||||
- Added `nixos-init`, a Rust-based bashless initialization system for systemd initrd. This allows to build NixOS systems without any interpreter. Enable via `system.nixos-init.enable = true;`.
|
||||
|
||||
- [angrr](https://github.com/linyinfeng/angrr), a service that automatically cleans up old auto GC roots. Available as [services.angrr](#opt-services.angrr.enable).
|
||||
|
||||
- Auto-scrub support for Bcachefs filesystems can now be enabled through [services.bcachefs.autoScrub.enable](#opt-services.bcachefs.autoScrub.enable) to periodically check for data corruption. If there's a correct copy available, it will automatically repair corrupted blocks.
|
||||
|
||||
- [Beszel](https://beszel.dev), a lightweight server monitoring hub with historical data, docker stats, and alerts. Available as [`services.beszel.agent`](#opt-services.beszel.agent.enable) and [`services.beszel.hub`](#opt-services.beszel.hub.enable).
|
||||
- [Beszel](https://beszel.dev), a lightweight server monitoring hub with historical data, docker stats, and alerts. Available as [`services.beszel.agent`](options.html#opt-services.beszel.agent.enable) and [`services.beszel.hub`](options.html#opt-services.beszel.hub.enable).
|
||||
|
||||
- [boot.kernel.sysfs](#opt-boot.kernel.sysfs), a new way to set sysfs attributes.
|
||||
- [boot.kernel.sysfs](options.html#opt-boot.kernel.sysfs), a new way to set of sysfs attributes.
|
||||
|
||||
- [Broadcast Box](https://github.com/Glimesh/broadcast-box), a WebRTC broadcast server. Available as [services.broadcast-box](#opt-services.broadcast-box.enable).
|
||||
|
||||
- Drivers and utilities for [Tenstorrent](https://tenstorrent.com) have been added. Available as [hardware.tenstorrent](#opt-hardware.tenstorrent.enable).
|
||||
- [Broadcast Box](https://github.com/Glimesh/broadcast-box), a WebRTC broadcast server. Available as [services.broadcast-box](options.html#opt-services.broadcast-box.enable).
|
||||
|
||||
- [byedpi](https://github.com/hufrea/byedpi), a DPI bypass service. Available as [services.byedpi](#opt-services.byedpi.enable).
|
||||
|
||||
@@ -69,7 +67,9 @@
|
||||
|
||||
- [crowdsec-firewall-bouncer](https://www.crowdsec.net/), the CrowdSec Remediation Component for fetching new and old decisions from a CrowdSec API and adding them to a blocklist used by supported firewalls. Available as [services.crowdsec-firewall-bouncer](#opt-services.crowdsec-firewall-bouncer.enable).
|
||||
|
||||
- [docuseal](https://github.com/docusealco/docuseal), a DocuSign alternative. Create, fill, and sign digital documents. Available as [services.docuseal](#opt-services.docuseal.enable).
|
||||
- Docker now defaults to 28.x, because version 27.x stopped receiving security updates and bug fixes after [May 2, 2025](https://github.com/moby/moby/pull/49910).
|
||||
|
||||
- [docuseal](https://github.com/docusealco/docuseal), a DocuSign alternative. Create, fill, and sign digital documents. Available at [services.docuseal](#opt-services.docuseal.enable).
|
||||
|
||||
- [Draupnir](https://github.com/the-draupnir-project/draupnir), a Matrix moderation bot. Available as [services.draupnir](#opt-services.draupnir.enable).
|
||||
|
||||
@@ -93,14 +93,14 @@
|
||||
|
||||
- [Homebridge](https://github.com/homebridge/homebridge), a lightweight Node.js server you can run on your home network that emulates the iOS HomeKit API. Available as [services.homebridge](#opt-services.homebridge.enable).
|
||||
|
||||
- [IfState](https://ifstate.net), manage host interface settings in a declarative manner. Available as [networking.ifstate](#opt-networking.ifstate.enable) and [boot.initrd.network.ifstate](#opt-boot.initrd.network.ifstate.enable).
|
||||
- [IfState](https://ifstate.net), manage host interface settings in a declarative manner. Available as [networking.ifstate](options.html#opt-networking.ifstate.enable) and [boot.initrd.network.ifstate](options.html#opt-boot.initrd.network.ifstate.enable).
|
||||
|
||||
- [KMinion](https://github.com/redpanda-data/kminion), feature-rich Prometheus exporter for Apache Kafka. Available as [services.prometheus.exporters.kafka](options.html#opt-services.prometheus.exporters.kafka).
|
||||
|
||||
- [LACT](https://github.com/ilya-zlobintsev/LACT), a GPU monitoring and configuration tool, can now be enabled through [services.lact.enable](#opt-services.lact.enable).
|
||||
Note that for LACT to work properly on AMD GPU systems, you need to enable [hardware.amdgpu.overdrive.enable](#opt-hardware.amdgpu.overdrive.enable).
|
||||
|
||||
- [lemurs](https://github.com/coastalwhite/lemurs), a customizable TUI display/login manager. Available as [services.displayManager.lemurs](#opt-services.displayManager.lemurs.enable).
|
||||
- [lemurs](https://github.com/coastalwhite/lemurs), a customizable TUI display/login manager. Available at [services.displayManager.lemurs](#opt-services.displayManager.lemurs.enable).
|
||||
|
||||
- [LibreTranslate](https://libretranslate.com), a free and open source machine translation API. Available as [services.libretranslate](#opt-services.libretranslate.enable).
|
||||
|
||||
@@ -121,11 +121,11 @@
|
||||
|
||||
- [nebula-lighthouse-service](https://github.com/manuels/nebula-lighthouse-service), a public Nebula VPN lighthouse service. Available as [services.nebula-lighthouse-service](#opt-services.nebula-lighthouse-service.enable).
|
||||
|
||||
- [Newt](https://github.com/fosrl/newt), a fully user space WireGuard tunnel client and TCP/UDP proxy, designed to securely expose private resources controlled by Pangolin. Available as [services.newt](#opt-services.newt.enable).
|
||||
- [Newt](https://github.com/fosrl/newt), a fully user space WireGuard tunnel client and TCP/UDP proxy, designed to securely expose private resources controlled by Pangolin. Available as [services.newt](options.html#opt-services.newt.enable).
|
||||
|
||||
- [nixbit](https://github.com/pbek/nixbit), a GUI application for updating your NixOS system from a Nix Flakes Git repository. Available as [programs.nixbit](#opt-programs.nixbit.enable).
|
||||
|
||||
- [nix-store-veritysetup](https://github.com/nikstur/nix-store-veritysetup-generator), a systemd generator to unlock the Nix Store as a dm-verity protected block device. Available as [boot.initrd.nix-store-veritysetup](#opt-boot.initrd.nix-store-veritysetup.enable).
|
||||
- [nix-store-veritysetup](https://github.com/nikstur/nix-store-veritysetup-generator), a systemd generator to unlock the Nix Store as a dm-verity protected block device. Available as [boot.initrd.nix-store-veritysetup](options.html#opt-boot.initrd.nix-store-veritysetup.enable).
|
||||
|
||||
- [nvme-rs](https://github.com/liberodark/nvme-rs), NVMe monitoring [services.nvme-rs](#opt-services.nvme-rs.enable).
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
- [Pi-hole](https://pi-hole.net/), a DNS sinkhole for advertisements based on Dnsmasq. Available as [services.pihole-ftl](#opt-services.pihole-ftl.enable), and [services.pihole-web](#opt-services.pihole-web.enable) for the web GUI and API.
|
||||
|
||||
- [pmount](https://salsa.debian.org/debian/pmount), a tool that allows normal users to mount removable devices without requiring root privileges Available as [programs.pmount](#opt-programs.pmount.enable).
|
||||
- [pmount](https://salsa.debian.org/debian/pmount), a tool that allows normal users to mount removable devices without requiring root privileges Available at [programs.pmount](#opt-programs.pmount.enable).
|
||||
|
||||
- [postfix-tlspol](https://github.com/Zuplu/postfix-tlspol), a MTA-STS and DANE resolver and TLS policy server for Postfix. Available as [services.postfix-tlspol](#opt-services.postfix-tlspol.enable).
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
- [radicle-native-ci](https://radicle.network/nodes/seed.radicle.dev/rad:z3qg5TKmN83afz2fj9z3fQjU8vaYE), an adapter for the [Radicle CI broker](https://radicle.network/nodes/seed.radicle.dev/rad:zwTxygwuz5LDGBq255RA2CbNGrz8), for performing CI runs locally. Available as [services.radicle.ci.adapters.native](#opt-services.radicle.ci.adapters.native.instances).
|
||||
|
||||
- [rauc](https://rauc.io/) (the Robust Auto-Update Controller), a daemon that allows reliable and secure software updates in embedded Linux systems. Available as [services.rauc](#opt-services.rauc.enable).
|
||||
- [rauc](https://rauc.io/) (the Robust Auto-Update Controller), a daemon that allows reliable and secure software updates in embedded Linux systems. Available at [services.rauc](#opt-services.rauc.enable).
|
||||
|
||||
- [ringboard](https://github.com/SUPERCILEX/clipboard-history), a fast, efficient, and composable clipboard manager for Linux. Available for x11 as [services.ringboard](#opt-services.ringboard.x11.enable) and for Wayland as [services.ringboard](#opt-services.ringboard.wayland.enable).
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
- [tuwunel](https://matrix-construct.github.io/tuwunel/), a federated chat server implementing the Matrix protocol, forked from Conduwuit. Available as [services.matrix-tuwunel](#opt-services.matrix-tuwunel.enable).
|
||||
|
||||
- [umami](https://github.com/umami-software/umami), a simple, fast, privacy-focused alternative to Google Analytics. Available as [services.umami](#opt-services.umami.enable).
|
||||
- [umami](https://github.com/umami-software/umami), a simple, fast, privacy-focused alternative to Google Analytics. Available with [services.umami](#opt-services.umami.enable).
|
||||
|
||||
- [wayvnc](https://github.com/any1/wayvnc), a VNC server for wlroots based Wayland compositors. Available as [programs.wayvnc](#opt-programs.wayvnc.enable).
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
|
||||
- `miniflux` no longer uses the hstore PostgreSQL extension. Having the extension would prevent Miniflux from starting. In case you are managing your `miniflux` PostgreSQL database externally, disable the extension with `DROP EXTENSION IF EXISTS hstore;`.
|
||||
|
||||
- `netbox-manage` script created by the `netbox` module no longer uses `sudo -u netbox` internally. It can be run as root and will change its user to `netbox` using `runuser`.
|
||||
- `netbox-manage` script created by the `netbox` module no longer uses `sudo -u netbox` internally. It can be run as root and will change it's user to `netbox` using `runuser`.
|
||||
|
||||
- NixOS display manager modules now strictly use tty1, where many of them previously used tty7. Options to configure display managers' VT have been dropped. A configuration with a display manager enabled will not start `getty@tty1.service`, even if the system is forced to boot into `multi-user.target` instead of `graphical.target`.
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
|
||||
- `services.nextcloud.notify_push.enable` now installs the notify_push app. Therefore the appstore is now disabled when using `notify_push`. See `services.nextcloud.appstoreEnable`.
|
||||
|
||||
- `services.nixseparatedebuginfod.enable = true;` has been replaced by `services.nixseparatedebuginfod2.enable = true`. If you only use the official binary cache `https://cache.nixos.org` then no further configuration should be needed. If you have other https substituters, you can add them to `services.nixseparatedebuginfod2.substituters`. SSH substituters are not supported by nixseparatedebuginfod2. Consider running nixseparatedebuginfod2 on the substituter instead, and pointing to it with the new option `environment.debuginfodServers`.
|
||||
- `services.nixseparatedebuginfod.enable = true;` has been replaced by `services.nixseparatedebuginfod2.enable = true`. If you only use the official binary cache `https://cache.nixos.org` then no further configuration should be needed. If you have other https substituters, you can add them to `services.nixseparatedebuginfod2.subsituters`. SSH substituters are not supported by nixseparatedebuginfod2. Consider running nixseparatedebuginfod2 on the substituter instead, and pointing to it with the new option `environment.debuginfodServers`.
|
||||
|
||||
- `services.parsoid` and the `nodePackages.parsoid` package have been removed, as the JavaScript-based version this module uses is not compatible with modern MediaWiki versions.
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
|
||||
- `boot.plymouth` now has a [`package`](#opt-boot.plymouth.package) option to specify the package used in the module.
|
||||
|
||||
- Docker now defaults to 28.x, because version 27.x stopped receiving security updates and bug fixes after [May 2, 2025](https://github.com/moby/moby/pull/49910).
|
||||
- Drivers and utilities for [Tenstorrent](https://tenstorrent.com) have been added. Available as [hardware.tenstorrent](#opt-hardware.tenstorrent.enable).
|
||||
|
||||
- Due to [deprecation of gnome-session X11 support](https://blogs.gnome.org/alatiera/2025/06/08/the-x11-session-removal/), `services.desktopManager.pantheon` now defaults to pantheon-wayland session. The X11 session has been removed, see [this issue](https://github.com/elementary/session-settings/issues/91) for details.
|
||||
|
||||
@@ -436,9 +436,9 @@
|
||||
- `services.k3s` now shares most of its code with `services.rke2`. The merge resulted in both modules providing more options, with `services.rke2` receiving the most improvements.
|
||||
Existing configurations for either module should not be affected.
|
||||
|
||||
- [services.libvirtd.autoSnapshot](#opt-services.libvirtd.autoSnapshot.enable) has been added as a backup service for libvirt managed VMs.
|
||||
- [services.libvirtd.autoSnapshot](options.html#opt-services.libvirtd.autoSnapshot.enable) has been added as a backup service for libvirt managed VMs.
|
||||
|
||||
- `services.limesurvey` now supports nginx as reverse-proxy. Available as [services.limesurvey.webserver](#opt-services.limesurvey.webserver).
|
||||
- `services.limesurvey` now supports nginx as reverse-proxy. Available through [services.limesurvey.webserver](#opt-services.limesurvey.webserver).
|
||||
|
||||
- `services.mattermost` has been updated to use the 10.11 ESR instead of 10.5. While this shouldn't break anyone, we also now package Mattermost 11 as mattermostLatest. Note that Mattermost 11 drops support for MySQL. The Mattermost module will assertion fail if you try to use MySQL with Mattermost 11; support for using MySQL with Mattermost will fully be removed in NixOS 26.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Release 26.05 ("Yarara", 2026.05/30) {#sec-release-26.05}
|
||||
# Release 26.05 ("Yarara", 2026.05/??) {#sec-release-26.05}
|
||||
|
||||
## Highlights {#sec-release-26.05-highlights}
|
||||
|
||||
@@ -13,9 +13,8 @@
|
||||
- If you use LUKS disk encryption, ensure that `fileSystems."/".device` is set to `"/dev/mapper/<name>"`, where `<name>` matches the name in your `boot.initrd.luks.devices.<name>` definition, to avoid systemd timing out while prompting for a passphrase. If you have a more complex setup, e.g. with LVM on top of LUKS, you may need to add `"x-systemd.device-timeout=infinity"` to `fileSystems."/".options` instead. If you need to disable the timeout before you can boot into the system, pass `systemd.default_device_timeout_sec=infinity` on the kernel command line.
|
||||
- The `cryptsetup-askpass` program is not available; use `systemctl default` instead, which will prompt for passphrases as necessary. If you pipe password responses into SSH over stdin, use `ssh -o RequestTTY=force` to ensure `systemctl default` gets a TTY to prompt on.
|
||||
- Many kernel parameters have been replaced with native systemd versions; see [](#sec-boot-problems).
|
||||
- `/dev/root` is not available with the systemd stage 1. In the old scripted stage 1, `/dev/root` was a symlink created by the init script from the `root=` kernel command line. With systemd stage 1, this symlink is not provided. If your configuration uses `/dev/root` in `fileSystems`, replace it with a stable device path such as `/dev/disk/by-label/...`, `/dev/disk/by-uuid/...`, or the appropriate `/dev/mapper/...` path.
|
||||
|
||||
- The system.nix file has been added as an alternative entry point to configuration.nix (and flake.nix) that allows configuring NixOS without using `nix-channel`.
|
||||
- The system.nix file has been added as an alternative entry point to configuration.nix (and flake.nix) that allows to configure NixOS without using `nix-channel`.
|
||||
This file must evaluate to a NixOS system derivation or an attribute set of such derivations, in which case the attribute to build has to be selected with the `--attr` option of `nixos-rebuild` or `nixos-install`.
|
||||
For example,
|
||||
```nix
|
||||
@@ -61,22 +60,19 @@
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
- [](#opt-services.autossh-ng.sessions) NixOS module was introduced as a simpler alternative to the existing [](#opt-services.autossh.sessions) module.
|
||||
|
||||
- [services.nextcloud-spreed-signaling](#opt-services.nextcloud-spreed-signaling.enable) NixOS module has been added to facilitate declarative management of a standalone Spreed signaling server ("High Performance Backend" for Nextcloud Talk).
|
||||
|
||||
- [OpenThread Border Router](https://openthread.io/), a Thread border router for POSIX-based platforms that bridges Thread mesh networks to IP networks. Available as [services.openthread-border-router](#opt-services.openthread-border-router.enable).
|
||||
|
||||
- [Atuin](https://atuin.sh), magical shell history — sync, search and backup your terminal history. Available as [programs.atuin](#opt-programs.atuin.enable).
|
||||
|
||||
- [Meshtastic](https://meshtastic.org), an open-source, off-grid, decentralised mesh network
|
||||
designed to run on affordable, low-power devices. Available as [services.meshtasticd](#opt-services.meshtasticd.enable).
|
||||
designed to run on affordable, low-power devices. Available as [services.meshtasticd]
|
||||
(#opt-services.meshtasticd.enable).
|
||||
|
||||
- [Goupile](https://goupile.org/en), an open-source design tool for secure forms including Clinical Report Forms (eCRF). Available as [services.goupile](#opt-services.goupile.enable).
|
||||
|
||||
- [knot-resolver](https://www.knot-resolver.cz/), in version 6. Available as [services.knot-resolver](#opt-services.knot-resolver.enable). A module for knot-resolver 5 was already available as [services.kresd](#opt-services.kresd.enable).
|
||||
- [knot-resolver](https://www.knot-resolver.cz/) in version 6. Available as `services.knot-resolver`. A module for knot-resolver 5 was already available as `services.kresd`.
|
||||
|
||||
- [ImmichFrame](https://immichframe.dev/), display your photos from Immich as a digital photo frame. Available as [services.immichframe](#opt-services.immichframe.enable).
|
||||
- [ImmichFrame](https://immichframe.dev/), display your photos from Immich as a digital photo frame. Available as `services.immichframe`.
|
||||
|
||||
- [PdfDing](https://www.pdfding.com/), manage, view and edit your PDFs seamlessly on all your devices wherever you are. Available as [services.pdfding](#opt-services.pdfding.enable).
|
||||
|
||||
@@ -84,7 +80,7 @@
|
||||
|
||||
- [reaction](https://reaction.ppom.me/), a daemon that scans program outputs for repeated patterns, and takes action. A common usage is to scan ssh and webserver logs, and to ban hosts that cause multiple authentication errors. A modern alternative to fail2ban. Available as [services.reaction](#opt-services.reaction.enable).
|
||||
|
||||
- [vinyl-cache](https://vinyl-cache.org) as the Varnish Cache project renamed itself. Available as [services.vinyl-cache](#opt-services.vinyl-cache.enable). To aid the migration, the old [services.varnish](#opt-services.varnish.enable) module is still available.
|
||||
- [vinyl-cache] as the Varnish Cache project renamed itself. Available as [services.vinyl-cache](#opt-services.vinyl-cache.enable). To aid the migration, the old `services.varnish` module is still available.
|
||||
|
||||
- [papra](https://papra.app/), an open-source document management platform designed to help you organize, secure, and archive your files effortlessly. Available as [services.papra](#opt-services.papra.enable).
|
||||
|
||||
@@ -96,35 +92,33 @@
|
||||
|
||||
- [kiwix-serve](https://wiki.kiwix.org/wiki/Kiwix-serve), a service that serves ZIM files (such as Wikipedia archives) over HTTP. Available as [services.kiwix-serve](#opt-services.kiwix-serve.enable).
|
||||
|
||||
- [matterjs-server](https://github.com/matter-js/matterjs-server), a Matter controller with a Home Assistant compatible WebSocket API. Available as [services.matterjs-server](#opt-services.matterjs-server.enable).
|
||||
|
||||
- [Remark42](https://remark42.com/), a self-hosted comment engine. Available as [services.remark42](#opt-services.remark42.enable).
|
||||
|
||||
- [LibreChat](https://www.librechat.ai/), open-source self-hostable ChatGPT clone with Agents and RAG APIs. Available as [services.librechat](#opt-services.librechat.enable).
|
||||
|
||||
- [nohang](https://github.com/hakavlad/nohang), a daemon for Linux that prevents out of memory (OOM) situations from affecting system responsiveness. Available as [services.nohang](#opt-services.nohang.enable).
|
||||
- [nohang](https://github.com/hakavlad/nohang), a daemon for Linux that prevents out of memory (OOM) situations from affecting system responsiveness. Available as [services.nohang](#opt-services.nohang.enable)
|
||||
|
||||
- [clevis-luks-askpass](https://github.com/latchset/clevis), automatic LUKS unlocking in initrd using clevis token bindings stored in LUKS headers. Available as [boot.initrd.clevisLuksAskpass](#opt-boot.initrd.clevisLuksAskpass.enable).
|
||||
|
||||
- [bentopdf](https://github.com/alam00000/bentopdf), a privacy-first PDF toolkit running completely in-browser. Available as [services.bentopdf](#opt-services.bentopdf.enable).
|
||||
|
||||
- [hyprwhspr-rs](https://github.com/better-slop/hyprwhspr-rs), a keybind activated speech-to-text voice dictation utility built for use with Hyprland. Available as [services.hyprwhspr-rs](#opt-services.hyprwhspr-rs.enable).
|
||||
- [hyprwhspr-rs](https://github.com/better-slop/hyprwhspr-rs), a keybind activated speech-to-text voice dictation utility built for use with Hyprland. Available as `services.hyprwhspr-rs`
|
||||
|
||||
- [DankMaterialShell](https://danklinux.com), a complete desktop shell for Wayland compositors built with Quickshell. Available as [programs.dms-shell](#opt-programs.dms-shell.enable).
|
||||
|
||||
- [pyroscope](https://github.com/grafana/pyroscope), a continuous profiling platform that allows for performance debugging. Available as [services.pyroscope](#opt-services.pyroscope.enable).
|
||||
- [pyroscope](https://github.com/grafana/pyroscope), a continuous profiling platform. that allows for performance debugging. Available as [services.pyroscope](#opt-services.pyroscope.enable)
|
||||
|
||||
- [dms-greeter](https://danklinux.com), a modern display manager greeter for DankMaterialShell that works with greetd and supports multiple Wayland compositors. Available as [services.displayManager.dms-greeter](#opt-services.displayManager.dms-greeter.enable).
|
||||
|
||||
- [dsearch](https://github.com/AvengeMedia/danksearch), a fast filesystem search service with fuzzy matching. Available as [programs.dsearch](#opt-programs.dsearch.enable).
|
||||
|
||||
- [Rustical](https://github.com/lennart-k/rustical), a CalDav/CardDav server aiming to be simple, fast and passwordless. Available as [services.rustical](#opt-services.rustical.enable).
|
||||
- [Rustical](https://github.com/lennart-k/rustical), a CalDav/CardDav server aiming to be simple, fast and passwordless. Available as [services.rustical](options.html#opt-services.rustical.enable).
|
||||
|
||||
- [Elephant](https://github.com/abenz1267/elephant), a data provider service and backend for building custom application launchers. Available as [services.elephant](#opt-services.elephant.enable).
|
||||
|
||||
- [Dunst](https://github.com/dunst-project/dunst), a lightweight and customizable notification daemon. Available as [services.dunst](#opt-services.dunst.enable).
|
||||
|
||||
- [cocoon](https://github.com/haileyok/cocoon), a PDS (personal data server) that is an alternative to the Bluesky PDS. Available as [services.cocoon](#opt-services.cocoon.enable).
|
||||
- [cocoon](https://github.com/haileyok/cocoon), is a PDS (personal data server) that is a alternative to the bluesky pds. Available as [services.cocoon](#opt-services.cocoon.enable).
|
||||
|
||||
- [Ente Auth](https://ente.io/auth/), an open source 2FA authenticator, with end-to-end encrypted backups. Available as [programs.ente-auth](#opt-programs.ente-auth.enable).
|
||||
|
||||
@@ -136,19 +130,19 @@
|
||||
|
||||
- [Dawarich](https://dawarich.app/), a self-hostable location history tracker. Available as [services.dawarich](#opt-services.dawarich.enable).
|
||||
|
||||
- [Howdy](https://github.com/boltgolt/howdy), a Windows Hello™ style facial authentication program for Linux. Available as [services.howdy](#opt-services.howdy.enable)
|
||||
- [Howdy](https://github.com/boltgolt/howdy), a Windows Hello™ style facial authentication program for Linux.
|
||||
|
||||
- [SuiteNumérique Drive](https://github.com/suitenumerique/drive), a collaborative file sharing and document management platform that scales. Built with Django and React. Open source alternative to Sharepoint or Google Drive. Available as [services.lasuite-drive](#opt-services.lasuite-drive.enable).
|
||||
- [SuiteNumérique Drive](https://github.com/suitenumerique/drive), a collaborative file sharing and document management platform that scales. Built with Django and React. Open source alternative to Sharepoint or Google Drive.
|
||||
|
||||
- [linux-enable-ir-emitter](https://github.com/EmixamPP/linux-enable-ir-emitter), a tool used to set up IR cameras, used with Howdy. Available as [services.linux-enable-ir-emitter](#opt-services.linux-enable-ir-emitter.enable).
|
||||
- [linux-enable-ir-emitter](https://github.com/EmixamPP/linux-enable-ir-emitter), a tool used to set up IR cameras, used with Howdy.
|
||||
|
||||
- [udp-over-tcp](https://github.com/mullvad/udp-over-tcp), a tunnel for proxying UDP traffic over a TCP stream. Available as [](#opt-services.udp-over-tcp.udp2tcp) and [](#opt-services.udp-over-tcp.tcp2udp).
|
||||
- [udp-over-tcp](https://github.com/mullvad/udp-over-tcp), a tunnel for proxying UDP traffic over a TCP stream. Available as `services.udp-over-tcp`.
|
||||
|
||||
- [turborepo-remote-cache](https://ducktors.github.io/turborepo-remote-cache/), an open-source implementation of the [Turborepo custom remote cache server](https://turbo.build/repo/docs/core-concepts/remote-caching#self-hosting). Available as [services.turborepo-remote-cache](#opt-services.turborepo-remote-cache.enable).
|
||||
- [turborepo-remote-cache](https://ducktors.github.io/turborepo-remote-cache/), an open-source implementation of the [Turborepo custom remote cache server](https://turbo.build/repo/docs/core-concepts/remote-caching#self-hosting). Available as [services.turborepo-remote-cache](options.html#opt-services.turborepo-remote-cache).
|
||||
|
||||
- [RSSHub](https://github.com/DIYgod/RSSHub), a service to convert many sources into rss. Available as [services.rsshub](#opt-services.rsshub.enable).
|
||||
- [RSSHub](https://github.com/DIYgod/RSSHub), a service to convert many sources into rss. Available as `services.rsshub`.
|
||||
|
||||
- [ReFrame](https://github.com/AlynxZhou/reframe), a DRM/KMS based remote desktop for Linux that supports Wayland/NVIDIA/headless/login. Available as [services.reframe](#opt-services.reframe.enable)
|
||||
- [ReFrame](https://github.com/AlynxZhou/reframe), a DRM/KMS based remote desktop for Linux that supports Wayland/NVIDIA/headless/login.
|
||||
|
||||
- [Komodo Periphery](https://github.com/moghtech/komodo), a multi-server Docker and Git deployment agent by Komodo. Available as [services.komodo-periphery](#opt-services.komodo-periphery.enable).
|
||||
|
||||
@@ -164,41 +158,20 @@
|
||||
|
||||
- [Headplane](https://headplane.net), a feature-complete Web UI for Headscale. Available as [services.headplane](#opt-services.headplane.enable).
|
||||
|
||||
- [whois](https://packages.qa.debian.org/w/whois.html), an intelligent WHOIS client. Available as [programs.whois](#opt-programs.whois.enable).
|
||||
- [whois](https://packages.qa.debian.org/w/whois.html), an intelligent WHOIS client. Available as `programs.whois`.
|
||||
|
||||
- [porxie](https://codeberg.org/Blooym/porxie), a correct and efficient ATProto blob proxy for secure content delivery. Available as [services.porxie](#opt-services.porxie.enable).
|
||||
|
||||
- [LogiOps](https://github.com/PixlOne/logiops), an unofficial userspace driver for HID++ Logitech devices. Available as [services.logiops](#opt-services.logiops.enable).
|
||||
- [LogiOps](https://github.com/PixlOne/logiops), a unofficial userspace driver for HID++ Logitech devices. Available as [services.logiops](#opt-services.logiops.enable).
|
||||
|
||||
## Backward Incompatibilities {#sec-release-26.05-incompatibilities}
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
- [](#opt-services.openssh.settings.AcceptEnv) is now explicitly defined as an option that takes a list of strings, to facilitate option merging. Setting it to a string value is no longer supported.
|
||||
|
||||
- The default packages in [](#opt-services.jenkins.packages) have been dropped, since not every Jenkins installation needs any package at all. It's more reasonable to leave it empty and let users configure what they need.
|
||||
|
||||
- [services.taskchampion-sync-server](#opt-services.taskchampion-sync-server.enable) module has had an option [](#opt-services.taskchampion-sync-server.dynamicUser) added to use systemd's DynamicUser feature. This is enabled by default when stateVersion is at least 26.05, and disabled otherwise. If you need this feature, you need to set `services.taskchampion-sync-server.dynamicUser` to `true` and migrate `/var/lib/taskchampion-sync-server` to `/var/lib/private/taskchampion-sync-server`.
|
||||
|
||||
- The [programs.captive-browser](#opt-programs.captive-browser.enable) module no longer falls back on a setcap wrapper around udhcpc to discover your network's DNS server due to [GHSA-wc3r-c66x-8xmc](https://github.com/NixOS/nixpkgs/security/advisories/GHSA-wc3r-c66x-8xmc) (CVE-2026-25740). If you're using this module, you must either configure [](#opt-programs.captive-browser.dhcp-dns) manually or enable one of NetworkManager, dhcpcd, or systemd-networkd.
|
||||
|
||||
- The [services.yggdrasil](#opt-services.yggdrasil.enable) module has been refactored with the following breaking changes:
|
||||
- The `services.yggdrasil.configFile` option has been removed. Configuration should now be specified directly via [](#opt-services.yggdrasil.settings).
|
||||
- The `services.yggdrasil.persistentKeys` option has been removed. To maintain persistent keys and IPv6 addresses across reboots, use [](#opt-services.yggdrasil.settings.PrivateKeyPath) to securely load your private key from a file via systemd credentials. The private key must be in PEM format (PKCS #8).
|
||||
- Storing `PrivateKey` directly in `settings` is now explicitly forbidden to prevent keys from being stored world-readable in the Nix store.
|
||||
- If you previously used `configFile`, migrate your configuration to the `settings` option and extract the private key to a separate file referenced by `PrivateKeyPath`.
|
||||
- If you previously used `persistentKeys`, convert your keys to PEM format and store them in a secure location accessible only to root, then reference them via `PrivateKeyPath`.
|
||||
|
||||
- [services.xserver](#opt-services.xserver.enable) will now throw an error if an X11 driver specified in `videoDriver(s)` cannot be found. Previously, unknown drivers would be silently ignored.
|
||||
|
||||
- The [](#opt-services.avahi.wideArea) option now defaults to `false` as a mitigation against [`CVE-2024-52615`/`GHSA-x6vp-f33h-h32g`](https://github.com/avahi/avahi/security/advisories/GHSA-x6vp-f33h-h32g).
|
||||
|
||||
- `systemd.coredump.extraConfig` has been removed in favor of the structured [](#opt-systemd.coredump.settings.Coredump) option. Use `systemd.coredump.settings.Coredump` to set any `coredump.conf(5)` option directly. For example, replace `systemd.coredump.extraConfig = "Storage=journal";` with `systemd.coredump.settings.Coredump.Storage = "journal";`.
|
||||
|
||||
- `services.home-assistant.config.lovelace.mode` has been renamed to `lovelace.dashboards` and `lovelace.resource_mode` to match the [configuration format](https://www.home-assistant.io/dashboards/dashboards/) required by Home Assistant 2026.8. Users who explicitly set `lovelace.mode` should remove it; the module generates the correct entries automatically.
|
||||
|
||||
- `fulcrum` has been updated to 2.x. If run against an existing v1.x database without the `--db-upgrade` flag it refuses to start; the upgrade takes around an hour on Bitcoin mainnet.
|
||||
|
||||
- `opentrack`, `slushload`, `synthesia`, `vtfedit`, `winbox`, `wineasio`, and `yabridge` use wineWow64Packages instead of wineWowPackages as wine versions >= 11.0 have deprecated wineWowPackages. As such, the prefixes for these packages are NOT backwards compatible and need to be regenerated with potential for data loss.
|
||||
|
||||
- []{#sec-release-26.05-incompatibilities-profiles-hardened-removed} `profiles/hardened` has been removed, because:
|
||||
@@ -210,9 +183,9 @@
|
||||
|
||||
- `services.crabfit` was removed because its upstream packages are unmaintained and insecure.
|
||||
|
||||
- [services.opensnitch.settings.Rules.Path](#opt-services.opensnitch.settings.Rules.Path) now defaults to `/var/lib/opensnitch/rules` instead of the previous `/etc/opensnitchd/rules` because it contains mutable data.
|
||||
- `services.opensnitch.settings.Rules.Path` now defaults to `/var/lib/opensnitch/rules` instead of the previous `/etc/opensnitchd/rules` because it contains mutable data.
|
||||
|
||||
- [services.mosquitto](#opt-services.mosquitto.enable) now generates per-listener authentication and access control via the upstream `password-file` and `acl-file` plugins instead of the deprecated `password_file` and `acl_file` options. The plugins contain the same code, so behaviour is unchanged, but [](#opt-services.mosquitto.package) must now be at least version 2.1.
|
||||
- `services.mosquitto` now generates per-listener authentication and access control via the upstream `password-file` and `acl-file` plugins instead of the deprecated `password_file` and `acl_file` options. The plugins contain the same code, so behaviour is unchanged, but [](#opt-services.mosquitto.package) must now be at least version 2.1.
|
||||
|
||||
- `sing-box` has been updated to 1.13.0, which has removed some deprecated options. See [upstream documentation](https://sing-box.sagernet.org/configuration/) for details and migration options.
|
||||
|
||||
@@ -233,7 +206,7 @@
|
||||
|
||||
- `linux_hardened` kernel has been removed due to a lack of maintenance.
|
||||
|
||||
- [services.tandoor-recipes](#opt-services.tandoor-recipes.enable) now uses a sub-directory for media files by default starting with `26.05`. Existing setups should move media files out of the data directory and adjust `services.tandoor-recipes.extraConfig.MEDIA_ROOT` accordingly. See [Migrating media files for pre 26.05 installations](#module-services-tandoor-recipes-migrating-media).
|
||||
- `services.tandoor-recipes` now uses a sub-directory for media files by default starting with `26.05`. Existing setups should move media files out of the data directory and adjust `services.tandoor-recipes.extraConfig.MEDIA_ROOT` accordingly. See [Migrating media files for pre 26.05 installations](#module-services-tandoor-recipes-migrating-media).
|
||||
|
||||
- `linux-rt` kernel has been removed due to a lack of maintenance.
|
||||
|
||||
@@ -245,26 +218,13 @@
|
||||
|
||||
- `services.uptime` has been removed because the package it relies on does not exist anymore in nixpkgs.
|
||||
|
||||
- [services.mattermost](#opt-services.mattermost.enable) now defaults to version 11, which has dropped support for MySQL in favor of Postgres. As a result, all support for MySQL has been removed from the module.
|
||||
- `services.mattermost` now defaults to version 11, which has dropped support for MySQL in favor of Postgres. As a result, all support for MySQL has been removed from the module.
|
||||
See the [migration steps](https://docs.mattermost.com/deployment-guide/manual-postgres-migration.html) if you were not running Postgres.
|
||||
Note that version 11 also restricts the user limit to 250 [by default](https://forum.mattermost.com/t/clarification-request-on-user-limits-max-250-user-server-v-11/25309);
|
||||
see the `pkgs.mattermost` removeUserLimit and removeFreeBadge options combined with [](#opt-services.mattermost.package) to change this behavior. For example:
|
||||
|
||||
```nix
|
||||
{
|
||||
services.mattermost.package = pkgs.mattermost.override {
|
||||
removeUserLimit = true;
|
||||
removeFreeBadge = true;
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
- `post-resume.target` has been removed. See {manpage}`systemd.special(7)` about `sleep.target` for instructions on ordering a process after resume with `ExecStop=`.
|
||||
|
||||
- [services.vsftpd](#opt-services.vsftpd.enable) no longer automatically configures a PAM module. This means configurations using [](#opt-services.vsftpd.localUsers) will no longer work unless [](#opt-services.vsftpd.enableVirtualUsers) and [](#opt-services.vsftpd.userDbPath) are also configured. The old behaviour can be restored by setting `security.pam.services.vsftpd.enable = true`, although this only ever worked by accident and may not be secure.
|
||||
|
||||
- `services.kubernetes.addons.dns.coredns` has been renamed to [](#opt-services.kubernetes.addons.dns.corednsImage) and now expects a
|
||||
package instead of attrs. Now, by default, nixpkgs.coredns in conjunction with `dockerTools.buildImage` is used, instead
|
||||
- `services.kubernetes.addons.dns.coredns` has been renamed to `services.kubernetes.addons.dns.corednsImage` and now expects a
|
||||
package instead of attrs. Now, by default, nixpkgs.coredns in conjunction with dockerTools.buildImage is used, instead
|
||||
of pulling the upstream container image from Docker Hub. If you want the old behavior, you can set:
|
||||
|
||||
```nix
|
||||
@@ -278,7 +238,7 @@ of pulling the upstream container image from Docker Hub. If you want the old beh
|
||||
}
|
||||
```
|
||||
|
||||
- `services.stalwart-mail` has been renamed to [`services.stalwart`](#opt-services.stalwart.enable) to align with upstream re-brand as an e-mail and collaboration server. Other notable breaking changes to module:
|
||||
- `services.stalwart-mail` has been renamed to `services.stalwart` to align with upstream re-brand as an e-mail and collaboration server. Other notable breaking changes to module:
|
||||
|
||||
- Addition of module-specific `stateVersion` option, which on existing installations of Stalwart must be set to the same as `system.stateVersion`.
|
||||
|
||||
@@ -288,9 +248,9 @@ of pulling the upstream container image from Docker Hub. If you want the old beh
|
||||
- Default value for `services.stalwart.dataDir` has changed to `/var/lib/stalwart`. If `stateVersion` is older than `26.05`, will fallback to legacy value of `/var/lib/stalwart-mail`.
|
||||
- Default tracer name and type have changed to `journal`. If `stateVersion` is older than `26.05`, will fallback to legacy value of `stdout`.
|
||||
|
||||
- `services.eintopf` has been renamed to [services.lauti](#opt-services.lauti.enable) to align with upstream re-brand as a community online calendar.
|
||||
- `services.eintopf` has been renamed to `services.lauti` to align with upstream re-brand as a community online calendar.
|
||||
|
||||
- `services.oauth2-proxy.clientSecret` and `services.oauth2-proxy.cookie.secret` have been replaced with [](#opt-services.oauth2-proxy.clientSecretFile) and [](#opt-services.oauth2-proxy.cookie.secretFile) respectively. This was done to ensure secrets don't get made world-readable.
|
||||
- `services.oauth2-proxy.clientSecret` and `services.oauth2-proxy.cookie.secret` have been replaced with `services.oauth2-proxy.clientSecretFile` and `services.oauth2-proxy.cookie.secretFile` respectively. This was done to ensure secrets don't get made world-readable.
|
||||
|
||||
- [`services.grafana.settings.security.secret_key`](#opt-services.grafana.settings.security.secret_key) doesn't have a
|
||||
default value anymore. Please generate your own key or hard-code the old one ("SW2YcwTIb9zpOOhoPsMm") explicitly.
|
||||
@@ -299,7 +259,7 @@ of pulling the upstream container image from Docker Hub. If you want the old beh
|
||||
for further information.
|
||||
|
||||
Please do note that there's no official way to rotate. On a single-node instance with the database and the secret-key being
|
||||
on the same filesystem with the same permissions for Grafana only to read, it is most likely OK to keep using the old key.
|
||||
on the same filesystem with the same permissions for Grafana only to read it's most likely OK to keep using the old key.
|
||||
|
||||
If you need to rotate, a [3rd-party tool, `grafana-secretkey-rotation-tool`](https://github.com/erooke/grafana-secretkey-rotation-tool/tree/d9dc788902fa5185e15cb15ce6129f7237ab6138) is a tested option.
|
||||
When using a secret for this value, make sure to use [Grafana's variable expansion to inject secrets](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#variable-expansion).
|
||||
@@ -310,11 +270,18 @@ of pulling the upstream container image from Docker Hub. If you want the old beh
|
||||
|
||||
- Ethercalc and its associated module have been removed, as the package is unmaintained and cannot be installed from source with npm now.
|
||||
|
||||
- [services.immich](#opt-services.immich.enable) no longer supports pgvecto.rs since the package has been removed from nixpkgs.
|
||||
- `services.headplane` has been updated to 0.6.2, which introduces several changes to the configuration schema:
|
||||
- `services.headplane.settings.oidc.redirect_uri` is deprecated. Use `services.headplane.settings.server.base_url` instead; the OIDC redirect URI is now automatically derived from it. Ensure `base_url` is the bare host URL without the `/admin` suffix.
|
||||
- `services.headplane.settings.oidc.user_storage_file` is deprecated. Headplane 0.6.2 still accepts it to migrate the old JSON user database into the new internal SQL database.
|
||||
- `services.headplane.settings.oidc.strict_validation` is deprecated and has no effect.
|
||||
- `services.headplane.settings.oidc.token_endpoint_auth_method` now defaults to `null` (auto-detection), which typically falls back to `client_secret_basic`. Previous versions defaulted to `client_secret_post`.
|
||||
- `services.headplane.settings.integration.agent.cache_ttl` is deprecated and has no effect in 0.6.2.
|
||||
|
||||
- `services.immich` no longer supports pgvecto.rs since the package has been removed from nixpkgs.
|
||||
As a result, options `services.immich.database.enableVectors` and `services.immich.database.enableVectorchord` have been removed, and VectorChord is now always used.
|
||||
If you have not completed the migration yet, ensure you completely remove the extension from your database before upgrading by following the [migration guide](https://github.com/NixOS/nixpkgs/blob/nixos-25.11/nixos/modules/services/web-apps/immich.md#migrating-from-pgvecto-rs-to-vectorchord-pre-2511-installations-module-services-immich-vectorchord-migration).
|
||||
|
||||
- [](#opt-services.cgit) before always had the git-http-backend and its "export all" setting enabled, which sidestepped any access control configured in cgit's settings. Now you have to make a decision and either enable or disable `opt-services.cgit.<name>.gitHttpBackend.checkExportOkFiles` (or disable the git-http-backend).
|
||||
- `services.cgit` before always had the git-http-backend and its "export all" setting enabled, which sidestepped any access control configured in cgit's settings. Now you have to make a decision and either enable or disable `services.cgit.gitHttpBackend.checkExportOkFiles` (or disable the git-http-backend).
|
||||
|
||||
- `rocmPackages_6` has been removed. `rocmPackages` has been updated to ROCm 7.x. Out of tree packages may rely on obsolete hipblas APIs or compile time constant warp size and need to be updated.
|
||||
|
||||
@@ -324,11 +291,13 @@ of pulling the upstream container image from Docker Hub. If you want the old beh
|
||||
|
||||
- The Bash implementation of the `nixos-rebuild` program is removed. All switchable systems now use the Python rewrite. Any prior usage of `system.rebuild.enableNg` must now be removed. If you have any outstanding issues with the new implementation, please open an issue on GitHub.
|
||||
|
||||
- [services.desktopManager.gnome](#opt-services.desktopManager.gnome.enable) no longer installs the Geary e-mail client since it is not part of the GNOME [core applications](https://apps.gnome.org/) list. Geary's position in the default favorite apps section has been replaced by GNOME Text Editor. To keep it installed, add `programs.geary.enable = true;` to your configuration.
|
||||
- `services.desktopManager.gnome` no longer installs the Geary e-mail client since it is not part of the GNOME [core applications](https://apps.gnome.org/) list. Geary's position in the default favorite apps section has been replaced by GNOME Text Editor. To keep it installed, add `programs.geary.enable = true;` to your configuration.
|
||||
|
||||
- MATE packages have been moved to top level (e.g. if you previously added `pkgs.mate.caja` to `environment.systemPackages`, you will need to change it to `pkgs.caja`).
|
||||
|
||||
- `walker` has been updated to 2.0.0+, which is a complete rewrite in rust.
|
||||
|
||||
It now requires a running `elephant` application launcher backend service, which can be enabled using the new `services.elephant.enable`.
|
||||
It now requires a running `elephant` application launcher backend service, which can be enabled using the new `services.elephpant.enable`.
|
||||
|
||||
The way keybinds and actions are handled have been completely revamped. Please refer to the [default config](https://raw.githubusercontent.com/abenz1267/walker/refs/heads/master/resources/config.toml).
|
||||
|
||||
@@ -336,7 +305,7 @@ of pulling the upstream container image from Docker Hub. If you want the old beh
|
||||
|
||||
- Support for `reiserfs` in nixpkgs has been removed, following the removal in Linux 6.13.
|
||||
|
||||
- [services.tor](#opt-services.tor.enable) no longer bind mounts Unix sockets of onion services into its chroot
|
||||
- `services.tor` no longer bind mounts Unix sockets of onion services into its chroot
|
||||
because it was not reliable. Users should do it themselves using either `JoinsNamespaceOf=` and Unix sockets in `/tmp`
|
||||
or `BindPaths=` from a persistent parent directory of each Unix socket.
|
||||
See <https://github.com/NixOS/nixpkgs/issues/481673>.
|
||||
@@ -345,14 +314,14 @@ See <https://github.com/NixOS/nixpkgs/issues/481673>.
|
||||
|
||||
- `services.xserver.cmt` has been removed as the `xf86-input-cmt` package was broken and unmaintained upstream.
|
||||
|
||||
- `programs.light` was removed from nixpkgs due to the corresponding package being unmaintained upstream. `brightnessctl` and [hardware.acpilight](#opt-hardware.acpilight.enable) offer replacements.
|
||||
- `programs.light` was removed from nixpkgs due to the corresponding package being unmaintained upstream. `brightnessctl` and `programs.acpilight` offer replacements.
|
||||
|
||||
- `ceph` has been upgraded to v20. See the [Ceph "tentacle" release notes](https://docs.ceph.com/en/latest/releases/tentacle/#v20-2-0-tentacle) for details and recommended upgrade procedure.
|
||||
Note that **upgrades of server-side components are one-way**, and downgrading e.g. an OSD from *Tentacle* to *Squid* is not just not supported but is known to break.
|
||||
|
||||
- [](#opt-services.unifi.jrePackage) now defaults to `jdk25_headless` instead of `jdk17_headless`, in order to be compatible with new versions of `unifi`.
|
||||
- `services.unifi`'s `jrePackage` option now defaults to `jdk25_headless` instead of `jdk17_headless`, in order to be compatible with new versions of `unifi`.
|
||||
|
||||
- The [networking.wireless](#opt-networking.wireless.enable) module has been security hardened by default: the `wpa_supplicant` daemon now runs under an unprivileged user with restricted access to the system.
|
||||
- The `networking.wireless` module has been security hardened by default: the `wpa_supplicant` daemon now runs under an unprivileged user with restricted access to the system.
|
||||
|
||||
As part of these changes, `/etc/wpa_supplicant.conf` has been deprecated: the NixOS-generated configuration file is now linked to `/etc/wpa_supplicant/nixos.conf` and `/etc/wpa_supplicant/imperative.conf` has been added for imperatively configuring `wpa_supplicant` or when using [allowAuxiliaryImperativeNetworks](#opt-networking.wireless.allowAuxiliaryImperativeNetworks).
|
||||
|
||||
@@ -372,20 +341,30 @@ See <https://github.com/NixOS/nixpkgs/issues/481673>.
|
||||
- In both "networkd" and "scripted" backends, the configuration of name servers is now part of `network-local-commands.service` (fixes issue [#445496](https://github.com/NixOS/nixpkgs/issues/445496)).
|
||||
- The issue that resulted in a completely unconfigured network if both `resolvconf` was disabled and no default gateway configured, has also been fixed.
|
||||
|
||||
- `kratos` has been updated from 1.3.1 to [25.4.0](https://github.com/ory/kratos/releases/tag/v25.4.0). Upstream switched to a new versioning scheme (year.major.minor). Notable breaking changes:
|
||||
|
||||
- The `migrate sql` CLI command is now `migrate sql up`
|
||||
- OIDC registration validation errors are now placed in the `default` node group instead of `oidc`
|
||||
- Failed OIDC account linking returns HTTP 400 instead of 200
|
||||
|
||||
- `pdns` has been updated to version [v5.0.x](https://doc.powerdns.com/authoritative/changelog/5.0.html), which introduces breaking changes. Check out the [Upgrade Notes](https://doc.powerdns.com/authoritative/upgrading.html#to-5-0-0) for details.
|
||||
|
||||
- In the PowerDNS Recursor module, following the deprecation period started with NixOS 25.05, the option {option}`services.pdns-recursor.old-settings` has been removed and {option}`services.pdns-recursor.yaml-settings` consequently renamed to [](#opt-services.pdns-recursor.settings).
|
||||
|
||||
- [services.angrr](#opt-services.angrr.enable) now uses TOML for configuration. Define policies with [](#opt-services.angrr.settings) (generate TOML file) or point to a file using [](#opt-services.angrr.configFile). The legacy options `services.angrr.period`, `services.angrr.ownedOnly`, and `services.angrr.removeRoot` have been removed. See `man 5 angrr` and the description of [](#opt-services.angrr.settings) options for examples and details.
|
||||
- `services.angrr` now uses TOML for configuration. Define policies with `services.angrr.settings` (generate TOML file) or point to a file using `services.angrr.configFile`. The legacy options `services.angrr.period`, `services.angrr.ownedOnly`, and `services.angrr.removeRoot` have been removed. See `man 5 angrr` and the description of `services.angrr.settings` options for examples and details.
|
||||
|
||||
- `services.homepage-dashboard.environmentFile` has been renamed to [](#opt-services.homepage-dashboard.environmentFiles), and now expects a list of strings.
|
||||
- `services.homepage-dashboard.environmentFile` has been renamed to `services.homepage-dashboard.environmentFiles`, and now expects a list of strings.
|
||||
|
||||
- `services.pingvin-share` has been removed as the `pingvin-share.backend` package was broken and the project was archived upstream.
|
||||
|
||||
- `services.jellyseerr` has been renamed to [services.seerr](#opt-services.seerr.enable) following the upstream changes. Notable breaking changes:
|
||||
- `geph` package's built-in GUI `geph5-client-gui` has been [removed](https://github.com/geph-official/geph5/commit/f2221fb8386312daf2cef05483ebb353ff48bdb4) by the upstream. All users who wish to continue using the GUI should install the `gephgui-wry`, which is consistent with the official release version.
|
||||
|
||||
- `services.jellyseerr` has been renamed to `services.seerr` following the upstream changes. Notable breaking changes:
|
||||
- systemd service name changed accordingly.
|
||||
- Default config directory moved from `/var/lib/jellyseerr/config` to `/var/lib/seerr/`.
|
||||
- If `stateVersion` is older than `26.05`, the module fall backs to the legacy path value.
|
||||
|
||||
- [services.vikunja](#opt-services.vikunja.enable) has been updated to Vikunja [v1.0.0](https://vikunja.io/changelog/whats-new-in-vikunja-1.0.0/), which introduces multiple breaking changes.
|
||||
- `services.vikunja` has been updated to Vikunja [v1.0.0](https://vikunja.io/changelog/whats-new-in-vikunja-1.0.0/), which introduces multiple breaking changes.
|
||||
Notable breaking changes:
|
||||
- CORS is enabled by default. The module now sets
|
||||
`services.vikunja.settings.service.publicurl` by default. Custom overrides must ensure it is
|
||||
@@ -396,11 +375,16 @@ See <https://github.com/NixOS/nixpkgs/issues/481673>.
|
||||
- SQLite paths are now relative to `service.rootpath` unless absolute. Startup now validates file
|
||||
storage and OAuth providers.
|
||||
|
||||
- `xfsprogs` was updated to version 6.18.0, which enables parent pointers and exchange-range by default. Upstream recommends not to use these features with kernels older than 6.18.
|
||||
GRUB2 is likely unable to boot from filesystems with these features enabled.
|
||||
|
||||
- `services.xtreemfs` has been removed as the `xtreemfs` package was broken and unmaintained upstream.
|
||||
|
||||
- `lunarvim` package has been removed, as it was abandoned upstream and relied on an old version of `neovim` to work properly.
|
||||
|
||||
- `opengfw` package and `services.opengfw` module have been removed as the upstream GitHub repository and website have been shut down.
|
||||
|
||||
- [services.esphome](#opt-services.esphome.enable) no longer uses `DynamicUser`. The service now runs as a static `esphome` system user. systemd handles the migration from `/var/lib/private/esphome` automatically, but users with [impermanence](https://github.com/nix-community/impermanence) setups should ensure `/var/lib/esphome` is persisted.
|
||||
- `services.esphome` no longer uses `DynamicUser`. The service now runs as a static `esphome` system user. systemd handles the migration from `/var/lib/private/esphome` automatically, but users with [impermanence](https://github.com/nix-community/impermanence) setups should ensure `/var/lib/esphome` is persisted.
|
||||
|
||||
- `programs.pqos-wrapper` module has been deleted as the corresponding package has been dropped from nixpkgs.
|
||||
|
||||
@@ -410,10 +394,6 @@ See <https://github.com/NixOS/nixpkgs/issues/481673>.
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
- Reloading or restarting systemd units from the NixOS activation script is deprecated, and will be removed in NixOS 26.11. This deprecation is part of a bigger effort to deprecate activation scripts altogether, which will take place over several releases. There are no in-tree usages of the now-deprecated reload/restart functionality.
|
||||
|
||||
- Switch inhibitors were introduced, which add a pre-switch check that compares a list of strings between the previous and the new generation, and refuses to switch into the new generation when there is a difference between the two lists. This allows avoiding switching into a system when for instance the systemd version changed by adding `config.systemd.package.version` to the switch inhibitors for your system. You can still forcefully switch into any generation by setting `NIXOS_NO_CHECK=1`.
|
||||
|
||||
- `switch-to-configuration` now reloads a service instead of restarting it when the only change to its unit is `ExecReload=`, and takes no action when `ExecReload=` is removed. Previously both cases triggered a restart.
|
||||
|
||||
- [`hardware.nvidia.branch`](#opt-hardware.nvidia.branch) was added to select the NVIDIA driver branch; setting [`hardware.nvidia.package`](#opt-hardware.nvidia.package) overrides this.
|
||||
@@ -422,10 +402,12 @@ See <https://github.com/NixOS/nixpkgs/issues/481673>.
|
||||
|
||||
- `nixos/nvidia` now uses EGL external platform ICD libraries built from source (`egl-gbm`, `egl-wayland`, `egl-wayland2`, `egl-x11`) instead of relying on vendor-provided binaries for these components.
|
||||
|
||||
- [](#opt-hardware.nvidia.moduleParams) was added to configure NVIDIA kernel module parameters declaratively. These parameters are now written to `modprobe` configuration instead of being passed through global kernel command-line parameters.
|
||||
- `hardware.nvidia.moduleParams` was added to configure NVIDIA kernel module parameters declaratively. These parameters are now written to `modprobe` configuration instead of being passed through global kernel command-line parameters.
|
||||
|
||||
- [hardware.xpadneo](#opt-hardware.xpadneo.enable) now supports configuring kernel module parameters via a freeform [settings](#opt-hardware.xpadneo.settings) option, with convenience options for [rumble attenuation](#opt-hardware.xpadneo.rumbleAttenuation) and [controller quirks](#opt-hardware.xpadneo.quirks).
|
||||
|
||||
- Wine has been updated to the 11.0 branch. Please check the [upstream announcement](https://gitlab.winehq.org/wine/wine/-/releases/wine-11.0) for more details.
|
||||
|
||||
- `security.acme` now defaults to a dynamic renewal duration, if
|
||||
[security.acme.defaults.validMinDays](#opt-security.acme.defaults.validMinDays)
|
||||
remains unset. This accommodates certificates with different ACME profile:
|
||||
@@ -435,37 +417,44 @@ See <https://github.com/NixOS/nixpkgs/issues/481673>.
|
||||
- For shortlived certificates with a total validity below 10 days renewal
|
||||
will happen after half of the total lifetime has passed
|
||||
|
||||
- The module for the Dovecot IMAP server, [services.dovecot2](#opt-services.dovecot2.enable), now uses RFC-42-style settings, exposing a structured interface to write the configuration file.
|
||||
- The module for the Dovecot IMAP server, *services.dovecot*, now uses RFC-42-style settings, exposing a structured interface to write the configuration file.
|
||||
|
||||
Also see the list of available settings for [Dovecot 2.3](https://doc.dovecot.org/2.3/settings/core/) or [2.4](https://doc.dovecot.org/2.4.2/core/summaries/settings.html).
|
||||
|
||||
- [](#opt-fonts.fontconfig.useEmbeddedBitmaps) is now set to `true` by default.
|
||||
- Cinnamon has been updated to 6.6, please check the [upstream announcement](https://www.linuxmint.com/rel_zena_whatsnew.php) for more details.
|
||||
|
||||
- [services.frp](#opt-services.frp.instances) now supports multiple instances through [](#opt-services.frp.instances) to make it possible to run multiple frp clients or servers at the same time.
|
||||
- Rspamd has been updated to 4.0. Please check the upstream [migration](https://docs.rspamd.com/tutorials/migration/#migration-to-rspamd-400) documentation, especially if you run a sharded Redis deployment.
|
||||
|
||||
- Budgie has been updated to 10.10, please check the [upstream announcement](https://buddiesofbudgie.org/blog/budgie-10-10-released) for more details.
|
||||
|
||||
- `fonts.fontconfig.useEmbeddedBitmaps` is now set to `true` by default.
|
||||
|
||||
- `stestrCheckHook` was added: This test hook runs `stestr run`. You can disable tests with `disabledTests` and `disabledTestsRegex`.
|
||||
|
||||
- `services.frp` now supports multiple instances through `services.frp.instances` to make it possible to run multiple frp clients or servers at the same time.
|
||||
|
||||
- `hyphen` now supports over 40 language variants through `hyphenDicts` and now allows to enable all supported languages through `hyphenDicts.all`.
|
||||
|
||||
- [services.resolved](#opt-services.resolved.enable) module was converted to RFC42-style settings. The moved options have also been renamed to match the upstream names. Aliases mean current configs will continue to function, but users should move to the new options as convenient.
|
||||
|
||||
- `systemd.sleep.extraConfig` was replaced by [RFC 0042](https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md)-compliant [](#opt-systemd.sleep.settings.Sleep), which is used to generate the `sleep.conf` configuration file. See {manpage}`sleep.conf.d(5)` for available options.
|
||||
- `systemd.sleep.extraConfig` was replaced by [RFC 0042](https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md)-compliant `systemd.sleep.settings.Sleep`, which is used to generate the `sleep.conf` configuration file. See {manpage}`sleep.conf.d(5)` for available options.
|
||||
|
||||
- Support for Bluetooth audio based on `bluez-alsa` has been added to the [hardware.alsa](#opt-hardware.alsa.enable) module. It can be enabled with the new [enableBluetooth](#opt-hardware.alsa.enableBluetooth) option.
|
||||
|
||||
- [services.atuin](#opt-services.atuin.enable) now has an `environmentFile` option to safely allow configuring secrets, such as an `ATUIN_DB_URI` containing a Postgres password.
|
||||
- Support for Bluetooth audio based on `bluez-alsa` has been added to the `hardware.alsa` module. It can be enabled with the new [enableBluetooth](#opt-hardware.alsa.enableBluetooth) option.
|
||||
- `services.atuin` now has an `environmentFile` option to safely allow configuring secrets, such as an `ATUIN_DB_URI` containing a Postgres password.
|
||||
|
||||
- `systemd.network.*` has been updated to support all configuration options from upstream `networkd` version 259.
|
||||
|
||||
- [](#opt-networking.resolvconf.enable) now defaults to `true` unconditionally instead of `!(config.environment.etc ? "resolv.conf")`. If you set `environment.etc."resolv.conf"` yourself, then you should also set `networking.resolvconf.enable = false`.
|
||||
- `networking.resolvconf.enable` now defaults to `true` unconditionally instead of `!(config.environment.etc ? "resolv.conf")`.If you set `environment.etc."resolv.conf"` yourself, then you should also set `networking.resolvconf.enable = false`.
|
||||
|
||||
- The [services.drupal](#opt-services.drupal.enable) module has a few improvements aimed at making it better for installing custom Drupal instances, namely a new `webRoot` option for identifying custom webroots in source code, a new `configRoot` option for identifying and synchronizing config yamls onto NixOS, and some new settings for managing variable content and filepaths.
|
||||
- `services.openssh` now supports generating host SSH keys by setting `services.openssh.generateHostKeys = true` while leaving `services.openssh.enable` disabled. This is particularly useful for systems that have no need of an SSH daemon but want SSH host keys for other purposes such as using agenix or sops-nix.
|
||||
|
||||
- [services.openssh](#opt-services.openssh.enable) now supports generating host SSH keys by setting `services.openssh.generateHostKeys = true` while leaving [](#opt-services.openssh.enable) disabled. This is particularly useful for systems that have no need of an SSH daemon but want SSH host keys for other purposes such as using agenix or sops-nix.
|
||||
- `services.openssh.enableRecommendedAlgorithms` has been added to allow users to opt out of NixOS's curated set of recommended algorithms. This set to true by default, and thus is not a breaking change. Users may want to set this to false if they prefer upstream's default algorithms. See <https://github.com/NixOS/nixpkgs/pull/471330>.
|
||||
|
||||
- [](#opt-services.openssh.enableRecommendedAlgorithms) has been added to allow users to opt out of NixOS's curated set of recommended algorithms. This set to true by default, and thus is not a breaking change. Users may want to set this to false if they prefer upstream's default algorithms. See <https://github.com/NixOS/nixpkgs/pull/471330>.
|
||||
- `services.openssh.banner` has been removed. Use `services.openssh.settings.Banner` instead.
|
||||
|
||||
- `services.openssh.banner` has been removed. Use [](#opt-services.openssh.settings.Banner) instead.
|
||||
- IPVLAN interfaces can now be configured through the `networking.ipvlans` option in the networking module.
|
||||
|
||||
- IPVLAN interfaces can now be configured through the [](#opt-networking.ipvlans) option in the networking module.
|
||||
|
||||
- [services.caddy](#opt-services.caddy.enable) now supports setting [](#opt-services.caddy.httpPort) and [](#opt-services.caddy.httpsPort) and opening them in the firewall via [](#opt-services.caddy.openFirewall).
|
||||
- `services.caddy` now supports setting `httpPort` and `httpsPort` and opening them in the firewall via `openFirewall`.
|
||||
|
||||
- The latest available version of Nextcloud is v33 (available as `pkgs.nextcloud33`). The installation logic is as follows:
|
||||
- If [`services.nextcloud.package`](#opt-services.nextcloud.package) is specified explicitly, this package will be installed (**recommended**)
|
||||
@@ -478,19 +467,59 @@ See <https://github.com/NixOS/nixpkgs/issues/481673>.
|
||||
To keep the old behavior for a site `example.com`, set `services.caddy.virtualHosts."example.com".hostName = "http://example.com"`.
|
||||
If you set custom Caddy options for a InvoicePlane site, migrate these options by removing `http://` from `services.caddy.virtualHosts."http://example.com"`.
|
||||
|
||||
- `services.slurm` now supports slurmrestd usage through the [](#opt-services.slurm.rest.enable) NixOS options.
|
||||
- `services.slurm` now supports slurmrestd usage through the `services.slurm.rest` NixOS options.
|
||||
|
||||
- The [](#opt-networking.firewall.logRefusedConnections) option now defaults to
|
||||
- The `networking.firewall.logRefusedConnections` option now defaults to
|
||||
`false`. Logging of refused or dropped incoming connections can generate a
|
||||
very high volume of kernel log messages on internet-facing systems, causing
|
||||
the kernel ring buffer (dmesg) to rotate quickly and potentially discard more
|
||||
relevant diagnostic information.
|
||||
|
||||
- The [services.calibre-web](#opt-services.calibre-web.enable) systemd service has been hardened with additional sandboxing restrictions.
|
||||
- The `services.calibre-web` systemd service has been hardened with additional sandboxing restrictions.
|
||||
|
||||
- `services.kanidm` options for server, client and unix were moved under dedicated namespaces.
|
||||
For each component `enableComponent` and `componentSettings` are now `component.enable` and
|
||||
`component.settings`. The unix module now supports using SSH keys from Kanidm via
|
||||
`services.kanidm.unix.sshIntegration = true`.
|
||||
|
||||
- [services.radicle](#opt-services.radicle.enable) now supports importing the private key and passphrase as systemd creds.
|
||||
- `mdbook-linkcheck` has been removed as it is unmaintained and incompatible with the latest version of `mdbook`. Users can instead migrate to `mdbook-linkcheck2`.
|
||||
|
||||
- `glibc` has been updated to version 2.42.
|
||||
|
||||
This version no longer makes the stack executable when a shared library requires this. A symptom
|
||||
is an error like
|
||||
|
||||
> cannot enable executable stack as shared object requires: Invalid argument
|
||||
|
||||
This is usually a bug. Please consider reporting it to the software maintainers.
|
||||
|
||||
In a lot of cases, the library requires the execstack by mistake only. The following workarounds exist:
|
||||
|
||||
* When building the shared library in question from source, use the following linker flags to force turning off the
|
||||
executable flag:
|
||||
|
||||
```nix
|
||||
mkDerivation {
|
||||
# …
|
||||
|
||||
env.NIX_LDFLAGS = "-z,noexecstack";
|
||||
}
|
||||
```
|
||||
|
||||
* If the sources are not available, the execstack-flag can be cleared with `patchelf`:
|
||||
|
||||
```
|
||||
patchelf --clear-execstack binary-only.so
|
||||
```
|
||||
|
||||
* If the shared library to be loaded actually requires an executable stack and it isn't turned
|
||||
on by the application loading it, you may force allowing that behavior by setting the
|
||||
following environment variable:
|
||||
|
||||
```
|
||||
GLIBC_TUNABLES=glibc.rtld.execstack=2
|
||||
```
|
||||
|
||||
**Do not set this globally!** This makes your setup inherently less secure.
|
||||
|
||||
- `services.radicle` now supports importing the private key and passphrase as systemd creds.
|
||||
|
||||
@@ -10,26 +10,16 @@
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
- [tranquil](https://tangled.org/tranquil.farm/tranquil-pds) is an ATProto PDS (personal data server) implementation in Rust. A featureful, spec conscious and community driven alternative to the Bluesky reference implementation PDS. Available as [services.tranquil-pds](#opt-services.tranquil-pds.enable).
|
||||
|
||||
- [FlapAlerted](https://github.com/Kioubit/FlapAlerted), detects BGP flapping events and provides statistics based on BGP update messages. Available as [services.flap-alerted](#opt-services.flap-alerted.enable).
|
||||
- Create the first release note entry in this section!
|
||||
|
||||
## Backward Incompatibilities {#sec-release-26.11-incompatibilities}
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
- `boot.vesa` has been removed. It was deprecated in 2020 because Xorg now works better with kernel modesetting. If you still need the legacy VESA 800x600 fallback, set `boot.kernelParams = [ "vga=0x317" "nomodeset" ];` directly.
|
||||
|
||||
- Support for the legacy U‐Boot image format has been removed from the initrd generators, as it is deprecated upstream and no longer used by any platform in Nixpkgs.
|
||||
|
||||
- Python 2 has been removed from the top-level package set, as it is long past end-of-life. The `python2`, `python27`, `python2Full`, `python27Full`, `python2Packages`, and `python27Packages` attributes, along with the legacy `python`, `pythonFull`, and `pythonPackages` aliases, now throw an error directing you to `python3`. The `isPy2` and `isPy27` package flags have been removed accordingly. The only remaining Python 2 interpreter is vendored inside the `resholve` package for its `oil` dependency and is not exposed for general use.
|
||||
|
||||
- `services.timesyncd.extraConfig` has been removed in favor of the structured [](#opt-services.timesyncd.settings.Time) option. Use `services.timesyncd.settings.Time` to set any `timesyncd.conf(5)` option directly. For example, replace `services.timesyncd.extraConfig = "PollIntervalMaxSec=180";` with `services.timesyncd.settings.Time.PollIntervalMaxSec = 180;`.
|
||||
- Create the first release note entry in this section!
|
||||
|
||||
## Other Notable Changes {#sec-release-26.11-notable-changes}
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
- `boot.loader.systemd-boot` gained support for [Automatic Boot Assessment](https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT/) via the new [`boot.loader.systemd-boot.bootCounting`](#opt-boot.loader.systemd-boot.bootCounting.enable) options, allowing automatic detection of and recovery from bad NixOS generations. As part of this change, boot loader entries on the ESP/XBOOTLDR partition are now named `nixos-<content-hash>.conf` instead of `nixos-generation-<n>.conf`; existing entries are migrated automatically on the next `nixos-rebuild boot`/`switch`.
|
||||
|
||||
- The `newuidmap` and `newgidmap` security wrappers are now installed with `cap_setuid`/`cap_setgid` file capabilities instead of the setuid-root bit, matching shadow's `--with-fcaps` install mode and other major distributions. Rootless containers (podman, docker-rootless, unprivileged user namespaces) are unaffected. The only behavioural change is that mapping host uid 0 via `/etc/subuid` (which NixOS never configures by default) additionally requires `cap_setfcap`; users who explicitly grant uid 0 in a subuid range can restore the previous behaviour with `security.wrappers.newuidmap.capabilities = lib.mkForce "cap_setuid,cap_setfcap+ep";`.
|
||||
- Create the first release note entry in this section!
|
||||
|
||||
@@ -1031,7 +1031,6 @@ class QemuMachine(BaseMachine):
|
||||
As soon as we read some data from the socket here, we assume that
|
||||
our root shell is operational.
|
||||
"""
|
||||
assert self.shell
|
||||
(ready, _, _) = select.select([self.shell], [], [], timeout_secs)
|
||||
return bool(ready)
|
||||
|
||||
|
||||
@@ -5,12 +5,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
mkOption
|
||||
types
|
||||
literalExpression
|
||||
literalMD
|
||||
;
|
||||
inherit (lib) mkOption types literalMD;
|
||||
|
||||
inherit (config) sshBackdoor;
|
||||
|
||||
@@ -122,10 +117,9 @@ in
|
||||
{
|
||||
options = {
|
||||
pythonTestDriverPackage = mkOption {
|
||||
description = "Package containing the python NixOS test driver implementation";
|
||||
description = "Package containing the python NixOS test driver implemetnation";
|
||||
type = types.package;
|
||||
default = hostPkgs.nixos-test-driver;
|
||||
defaultText = literalExpression "hostPkgs.nixos-test-driver";
|
||||
readOnly = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ in
|
||||
# When imperative, seed /etc/vconsole.conf on first boot from declared
|
||||
# defaults so the keymap isn't lost before localectl is ever used
|
||||
systemd.tmpfiles.rules = lib.mkIf i18nCfg.imperativeLocale [
|
||||
"C /etc/vconsole.conf - - - - ${vconsoleConf true}"
|
||||
"C /etc/vconsole.conf - - - - ${vconsoleConf}"
|
||||
];
|
||||
|
||||
systemd.services.reload-systemd-vconsole-setup = {
|
||||
|
||||
@@ -47,8 +47,6 @@ in
|
||||
gyre-fonts # TrueType substitutes for standard PostScript fonts
|
||||
liberation_ttf
|
||||
unifont
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-color-emoji
|
||||
]
|
||||
);
|
||||
|
||||
@@ -6,16 +6,12 @@
|
||||
- ./nix.nix
|
||||
- ./nix-flakes.nix
|
||||
*/
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkIf
|
||||
mkOption
|
||||
stringAfter
|
||||
types
|
||||
;
|
||||
|
||||
@@ -102,10 +98,8 @@ in
|
||||
''f /root/.nix-channels - - - - ${config.system.defaultChannel} nixos\n''
|
||||
];
|
||||
|
||||
system.preSwitchChecks.no-nix-channel = mkIf (!cfg.channel.enable) (
|
||||
lib.replaceStrings [ "@getent@" ] [ (lib.getExe pkgs.getent) ] (
|
||||
builtins.readFile ./nix-channel/pre-switch-check.sh
|
||||
)
|
||||
system.activationScripts.no-nix-channel = mkIf (!cfg.channel.enable) (
|
||||
stringAfter [ "etc" "users" ] (builtins.readFile ./nix-channel/activation-check.sh)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
warn() {
|
||||
printf "\033[1;35mwarning:\033[0m %s\n" "$*" >&2
|
||||
}
|
||||
# shellcheck shell=bash
|
||||
|
||||
explainChannelWarning=0
|
||||
if [[ -e "/root/.nix-defexpr/channels" ]]; then
|
||||
@@ -13,13 +11,11 @@ if [[ -e "/nix/var/nix/profiles/per-user/root/channels" ]]; then
|
||||
fi
|
||||
while IFS=: read -r _ _ _ _ _ home _ ; do
|
||||
if [[ -n "$home" && -e "$home/.nix-defexpr/channels" ]]; then
|
||||
warn "$home/.nix-defexpr/channels exists, but channels have been disabled."
|
||||
warn "$home/.nix-defexpr/channels exists, but channels have been disabled." 1>&2
|
||||
explainChannelWarning=1
|
||||
fi
|
||||
done < <(@getent@ passwd)
|
||||
done < <(getent passwd)
|
||||
if [[ $explainChannelWarning -eq 1 ]]; then
|
||||
echo "Due to https://github.com/NixOS/nix/issues/9574, Nix may still use these channels when NIX_PATH is unset." >&2
|
||||
echo "Delete the above directory or directories to prevent this." >&2
|
||||
echo "Due to https://github.com/NixOS/nix/issues/9574, Nix may still use these channels when NIX_PATH is unset." 1>&2
|
||||
echo "Delete the above directory or directories to prevent this." 1>&2
|
||||
fi
|
||||
# This check is informational only and must never block a switch.
|
||||
true
|
||||
20
nixos/modules/config/nix-channel/test.nix
Normal file
20
nixos/modules/config/nix-channel/test.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
# Run:
|
||||
# nix-build -A nixosTests.nix-channel
|
||||
{ lib, testers }:
|
||||
let
|
||||
inherit (lib) fileset;
|
||||
|
||||
runShellcheck = testers.shellcheck {
|
||||
name = "activation-check";
|
||||
src = fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = fileset.unions [
|
||||
./activation-check.sh
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
lib.recurseIntoAttrs {
|
||||
inherit runShellcheck;
|
||||
}
|
||||
@@ -36,22 +36,25 @@
|
||||
# Avoid bundling an entire MariaDB installation on the ISO.
|
||||
programs.kde-pim.enable = false;
|
||||
|
||||
systemd.tmpfiles.settings."10-installer-desktop" =
|
||||
system.activationScripts.installerDesktop =
|
||||
let
|
||||
|
||||
# Comes from documentation.nix when xserver and nixos.enable are true.
|
||||
manualDesktopFile = "/run/current-system/sw/share/applications/nixos-manual.desktop";
|
||||
|
||||
homeDir = "/home/nixos/";
|
||||
desktopDir = homeDir + "Desktop/";
|
||||
|
||||
in
|
||||
{
|
||||
"/home/nixos/Desktop".d = {
|
||||
user = "nixos";
|
||||
group = "users";
|
||||
mode = "0755";
|
||||
};
|
||||
"/home/nixos/Desktop/nixos-manual.desktop"."L+".argument = manualDesktopFile;
|
||||
"/home/nixos/Desktop/gparted.desktop"."L+".argument =
|
||||
"${pkgs.gparted}/share/applications/gparted.desktop";
|
||||
"/home/nixos/Desktop/calamares.desktop"."L+".argument =
|
||||
"${pkgs.calamares-nixos}/share/applications/calamares.desktop";
|
||||
};
|
||||
''
|
||||
mkdir -p ${desktopDir}
|
||||
chown nixos ${homeDir} ${desktopDir}
|
||||
|
||||
ln -sfT ${manualDesktopFile} ${desktopDir + "nixos-manual.desktop"}
|
||||
ln -sfT ${pkgs.gparted}/share/applications/gparted.desktop ${desktopDir + "gparted.desktop"}
|
||||
ln -sfT ${pkgs.calamares-nixos}/share/applications/calamares.desktop ${
|
||||
desktopDir + "calamares.desktop"
|
||||
}
|
||||
'';
|
||||
|
||||
}
|
||||
|
||||
@@ -787,10 +787,9 @@ in
|
||||
options = [ "mode=0755" ];
|
||||
};
|
||||
|
||||
# With systemd stage 1, the ISO is identified by its volume label.
|
||||
# With the scripted stage 1, /dev/root is a symlink to the actual
|
||||
# root device specified on the kernel command line, created by the
|
||||
# stage 1 init script.
|
||||
# Note that /dev/root is a symlink to the actual root device
|
||||
# specified on the kernel command line, created in the stage 1
|
||||
# init script.
|
||||
"/iso" = lib.mkImageMediaOverride {
|
||||
device =
|
||||
if config.boot.initrd.systemd.enable then
|
||||
|
||||
@@ -314,27 +314,6 @@ in
|
||||
name = "nixos-rebuild";
|
||||
package = config.system.build.nixos-rebuild;
|
||||
})
|
||||
(
|
||||
{ config, ... }:
|
||||
{
|
||||
options.system.tools.nixos-rebuild.enableRun0Elevation = lib.mkEnableOption ''
|
||||
support for being targeted by `nixos-rebuild --elevate=run0
|
||||
--ask-elevate-password`.
|
||||
|
||||
This enables polkit and adds {command}`polkit-stdin-agent` to
|
||||
{option}`environment.systemPackages` so that a deploying host
|
||||
can find a target-architecture agent at
|
||||
{file}`<toplevel>/sw/bin/polkit-stdin-agent` after copying the
|
||||
closure (which is required for cross-architecture deploys and
|
||||
mismatched nixpkgs revisions to work).
|
||||
'';
|
||||
|
||||
config = lib.mkIf config.system.tools.nixos-rebuild.enableRun0Elevation {
|
||||
security.polkit.enable = lib.mkDefault true;
|
||||
environment.systemPackages = [ pkgs.polkit-stdin-agent ];
|
||||
};
|
||||
}
|
||||
)
|
||||
(mkToolModule {
|
||||
name = "nixos-version";
|
||||
package = nixos-version;
|
||||
|
||||
@@ -394,6 +394,7 @@
|
||||
./security/ca.nix
|
||||
./security/chromium-suid-sandbox.nix
|
||||
./security/default.nix
|
||||
./security/dhparams.nix
|
||||
./security/doas.nix
|
||||
./security/duosec.nix
|
||||
./security/google_oslogin.nix
|
||||
@@ -732,7 +733,6 @@
|
||||
./services/home-automation/home-assistant.nix
|
||||
./services/home-automation/homebridge.nix
|
||||
./services/home-automation/matter-server.nix
|
||||
./services/home-automation/matterjs-server.nix
|
||||
./services/home-automation/openthread-border-router.nix
|
||||
./services/home-automation/wyoming/faster-whisper.nix
|
||||
./services/home-automation/wyoming/openwakeword.nix
|
||||
@@ -887,7 +887,6 @@
|
||||
./services/misc/ihaskell.nix
|
||||
./services/misc/iio-niri.nix
|
||||
./services/misc/input-remapper.nix
|
||||
./services/misc/inventree.nix
|
||||
./services/misc/invidious-router.nix
|
||||
./services/misc/irkerd.nix
|
||||
./services/misc/jackett.nix
|
||||
@@ -1018,7 +1017,6 @@
|
||||
./services/monitoring/das_watchdog.nix
|
||||
./services/monitoring/datadog-agent.nix
|
||||
./services/monitoring/do-agent.nix
|
||||
./services/monitoring/flap-alerted.nix
|
||||
./services/monitoring/fluent-bit.nix
|
||||
./services/monitoring/fusion-inventory.nix
|
||||
./services/monitoring/gatus.nix
|
||||
@@ -1794,7 +1792,6 @@
|
||||
./services/web-apps/suwayomi-server.nix
|
||||
./services/web-apps/szurubooru.nix
|
||||
./services/web-apps/tabbyapi.nix
|
||||
./services/web-apps/tranquil-pds.nix
|
||||
./services/web-apps/trilium.nix
|
||||
./services/web-apps/tt-rss.nix
|
||||
./services/web-apps/tuliprox.nix
|
||||
|
||||
@@ -33,10 +33,7 @@ in
|
||||
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = builtins.pathExists config.programs.command-not-found.dbPath;
|
||||
defaultText = lib.literalExpression ''
|
||||
builtins.pathExists config.programs.command-not-found.dbPath
|
||||
'';
|
||||
default = false;
|
||||
description = ''
|
||||
Whether interactive shells should show which Nix package (if
|
||||
any) provides a missing command.
|
||||
@@ -48,11 +45,6 @@ in
|
||||
};
|
||||
|
||||
dbPath = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
default = pkgs.path + "/programs.sqlite";
|
||||
defaultText = lib.literalExpression ''
|
||||
pkgs.path + "/programs.sqlite"
|
||||
'';
|
||||
description = ''
|
||||
Absolute path to `programs.sqlite`, which contains mappings from binary names to package names.
|
||||
|
||||
@@ -62,29 +54,39 @@ in
|
||||
`/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite`.
|
||||
If you do so, you can update it with `sudo nix-channels --update`.
|
||||
'';
|
||||
type = lib.types.path;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.bash.interactiveShellInit = ''
|
||||
command_not_found_handle() {
|
||||
'${commandNotFound}/bin/command-not-found' "$@"
|
||||
}
|
||||
'';
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
programs.command-not-found = {
|
||||
enable = lib.mkDefault (builtins.pathExists cfg.dbPath);
|
||||
dbPath = pkgs.path + "/programs.sqlite";
|
||||
};
|
||||
}
|
||||
|
||||
programs.zsh.interactiveShellInit = ''
|
||||
command_not_found_handler() {
|
||||
'${commandNotFound}/bin/command-not-found' "$@"
|
||||
}
|
||||
'';
|
||||
(lib.mkIf cfg.enable {
|
||||
programs.bash.interactiveShellInit = ''
|
||||
command_not_found_handle() {
|
||||
'${commandNotFound}/bin/command-not-found' "$@"
|
||||
}
|
||||
'';
|
||||
|
||||
# NOTE: Fish by itself checks for nixos command-not-found, let's instead makes it explicit.
|
||||
programs.fish.interactiveShellInit = ''
|
||||
function fish_command_not_found
|
||||
"${commandNotFound}/bin/command-not-found" $argv
|
||||
end
|
||||
'';
|
||||
programs.zsh.interactiveShellInit = ''
|
||||
command_not_found_handler() {
|
||||
'${commandNotFound}/bin/command-not-found' "$@"
|
||||
}
|
||||
'';
|
||||
|
||||
environment.systemPackages = [ commandNotFound ];
|
||||
};
|
||||
# NOTE: Fish by itself checks for nixos command-not-found, let's instead makes it explicit.
|
||||
programs.fish.interactiveShellInit = ''
|
||||
function fish_command_not_found
|
||||
"${commandNotFound}/bin/command-not-found" $argv
|
||||
end
|
||||
'';
|
||||
|
||||
environment.systemPackages = [ commandNotFound ];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
@@ -15,8 +15,6 @@ in
|
||||
programs.gamemode = {
|
||||
enable = lib.mkEnableOption "GameMode to optimise system performance on demand";
|
||||
|
||||
package = lib.mkPackageOption pkgs "gamemode" { };
|
||||
|
||||
enableRenice =
|
||||
lib.mkEnableOption "CAP_SYS_NICE on gamemoded to support lowering process niceness"
|
||||
// {
|
||||
@@ -55,7 +53,7 @@ in
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment = {
|
||||
systemPackages = [ cfg.package ];
|
||||
systemPackages = [ pkgs.gamemode ];
|
||||
etc."gamemode.ini".source = configFile;
|
||||
};
|
||||
|
||||
@@ -65,14 +63,14 @@ in
|
||||
gamemoded = {
|
||||
owner = "root";
|
||||
group = "root";
|
||||
source = "${cfg.package}/bin/gamemoded";
|
||||
source = "${pkgs.gamemode}/bin/gamemoded";
|
||||
capabilities = "cap_sys_nice+ep";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd = {
|
||||
packages = [ cfg.package ];
|
||||
packages = [ pkgs.gamemode ];
|
||||
user.services.gamemoded = {
|
||||
# Use pkexec from the security wrappers to allow users to
|
||||
# run libexec/cpugovctl & libexec/gpuclockctl as root with
|
||||
|
||||
@@ -26,8 +26,6 @@ in
|
||||
|
||||
package = lib.mkPackageOption pkgs "gamescope" { };
|
||||
|
||||
enableWsi = lib.mkEnableOption "gamescope-wsi, the Vulkan WSI layer, alongside gamescope";
|
||||
|
||||
capSysNice = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
@@ -78,11 +76,6 @@ in
|
||||
};
|
||||
|
||||
environment.systemPackages = lib.mkIf (!cfg.capSysNice) [ gamescope ];
|
||||
|
||||
hardware.graphics = lib.optionalAttrs cfg.enableWsi {
|
||||
extraPackages = with pkgs; [ gamescope-wsi ];
|
||||
extraPackages32 = with pkgs; [ pkgsi686Linux.gamescope-wsi ];
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = [ ];
|
||||
|
||||
@@ -47,9 +47,6 @@ in
|
||||
|
||||
{
|
||||
config = lib.mkIf (cfg.enable && nixPackage.pname == "lix") {
|
||||
# Require the tun kernel module for pasta, can be disabled if pasta is not used.
|
||||
boot.kernelModules.tun = lib.mkDefault true;
|
||||
|
||||
environment.systemPackages = [
|
||||
nixPackage
|
||||
pkgs.nix-info
|
||||
|
||||
@@ -267,22 +267,13 @@ in
|
||||
group = "root";
|
||||
inherit source;
|
||||
};
|
||||
mkCapRoot = capabilities: source: {
|
||||
inherit capabilities source;
|
||||
owner = "root";
|
||||
group = "root";
|
||||
};
|
||||
in
|
||||
{
|
||||
su = mkSetuidRoot "${config.security.shadow.su.package}/bin/su";
|
||||
sg = mkSetuidRoot "${cfg.package.out}/bin/sg";
|
||||
newgrp = mkSetuidRoot "${cfg.package.out}/bin/newgrp";
|
||||
# File capabilities instead of setuid root, mirroring shadow's
|
||||
# own --with-fcaps install mode and what Arch/Fedora/Debian ship.
|
||||
# The kernel only requires CAP_SETUID/CAP_SETGID over the parent
|
||||
# userns to write a multi-line /proc/<pid>/[ug]id_map.
|
||||
newuidmap = mkCapRoot "cap_setuid+ep" "${cfg.package.out}/bin/newuidmap";
|
||||
newgidmap = mkCapRoot "cap_setgid+ep" "${cfg.package.out}/bin/newgidmap";
|
||||
newuidmap = mkSetuidRoot "${cfg.package.out}/bin/newuidmap";
|
||||
newgidmap = mkSetuidRoot "${cfg.package.out}/bin/newgidmap";
|
||||
}
|
||||
// lib.optionalAttrs config.users.mutableUsers {
|
||||
chsh = mkSetuidRoot "${cfg.package.out}/bin/chsh";
|
||||
|
||||
@@ -56,29 +56,38 @@ in
|
||||
'';
|
||||
apply =
|
||||
steam:
|
||||
steam.override (prev: {
|
||||
extraEnv =
|
||||
(lib.optionalAttrs (cfg.extraCompatPackages != [ ]) {
|
||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS = extraCompatPaths;
|
||||
})
|
||||
// (lib.optionalAttrs cfg.extest.enable {
|
||||
LD_PRELOAD = "${pkgs.pkgsi686Linux.extest}/lib/libextest.so";
|
||||
})
|
||||
// (prev.extraEnv or { });
|
||||
extraLibraries =
|
||||
pkgs:
|
||||
let
|
||||
prevLibs = if prev ? extraLibraries then prev.extraLibraries pkgs else [ ];
|
||||
additionalLibs =
|
||||
with config.hardware.graphics;
|
||||
if pkgs.stdenv.hostPlatform.is64bit then
|
||||
[ package ] ++ extraPackages
|
||||
else
|
||||
[ package32 ] ++ extraPackages32;
|
||||
in
|
||||
prevLibs ++ additionalLibs;
|
||||
extraPkgs = p: (cfg.extraPackages ++ lib.optionals (prev ? extraPkgs) (prev.extraPkgs p));
|
||||
});
|
||||
steam.override (
|
||||
prev:
|
||||
{
|
||||
extraEnv =
|
||||
(lib.optionalAttrs (cfg.extraCompatPackages != [ ]) {
|
||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS = extraCompatPaths;
|
||||
})
|
||||
// (lib.optionalAttrs cfg.extest.enable {
|
||||
LD_PRELOAD = "${pkgs.pkgsi686Linux.extest}/lib/libextest.so";
|
||||
})
|
||||
// (prev.extraEnv or { });
|
||||
extraLibraries =
|
||||
pkgs:
|
||||
let
|
||||
prevLibs = if prev ? extraLibraries then prev.extraLibraries pkgs else [ ];
|
||||
additionalLibs =
|
||||
with config.hardware.graphics;
|
||||
if pkgs.stdenv.hostPlatform.is64bit then
|
||||
[ package ] ++ extraPackages
|
||||
else
|
||||
[ package32 ] ++ extraPackages32;
|
||||
in
|
||||
prevLibs ++ additionalLibs;
|
||||
extraPkgs = p: (cfg.extraPackages ++ lib.optionals (prev ? extraPkgs) (prev.extraPkgs p));
|
||||
}
|
||||
// lib.optionalAttrs (cfg.gamescopeSession.enable && gamescopeCfg.capSysNice) {
|
||||
buildFHSEnv = pkgs.buildFHSEnv.override {
|
||||
# use the setuid wrapped bubblewrap
|
||||
bubblewrap = "${config.security.wrapperDir}/..";
|
||||
};
|
||||
}
|
||||
);
|
||||
description = ''
|
||||
The Steam package to use. Additional libraries are added from the system
|
||||
configuration to ensure graphics work properly.
|
||||
@@ -209,6 +218,16 @@ in
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
security.wrappers = lib.mkIf (cfg.gamescopeSession.enable && gamescopeCfg.capSysNice) {
|
||||
# needed or steam fails
|
||||
bwrap = {
|
||||
owner = "root";
|
||||
group = "root";
|
||||
source = "${pkgs.bubblewrap}/bin/bwrap";
|
||||
setuid = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.steam.extraPackages = cfg.fontPackages;
|
||||
|
||||
programs.gamescope.enable = lib.mkDefault cfg.gamescopeSession.enable;
|
||||
|
||||
@@ -23,7 +23,7 @@ in
|
||||
enable = lib.mkEnableOption "TUN mode of Throne";
|
||||
|
||||
setuid = lib.mkEnableOption ''
|
||||
setting suid bit for ThroneCore to run as root, which is less
|
||||
setting suid bit for throne-core to run as root, which is less
|
||||
secure than default setcap method but closer to upstream assumptions.
|
||||
Enable this if you find the default setcap method configured in
|
||||
this module doesn't work for you
|
||||
@@ -36,8 +36,8 @@ in
|
||||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
security.wrappers."ThroneCore" = lib.mkIf cfg.tunMode.enable {
|
||||
source = "${cfg.package}/share/throne/ThroneCore";
|
||||
security.wrappers.throne-core = lib.mkIf cfg.tunMode.enable {
|
||||
source = "${cfg.package}/share/throne/Core";
|
||||
owner = "root";
|
||||
group = "root";
|
||||
setuid = lib.mkIf cfg.tunMode.setuid true;
|
||||
@@ -49,7 +49,7 @@ in
|
||||
|
||||
# avoid resolvectl password prompt popping up three times
|
||||
# https://github.com/SagerNet/sing-tun/blob/0686f8c4f210f4e7039c352d42d762252f9d9cf5/tun_linux.go#L1062
|
||||
# We use a hack here to determine whether the requested process is ThroneCore
|
||||
# We use a hack here to determine whether the requested process is throne-core
|
||||
# Detect whether its capabilities contain at least `net_admin` and `net_raw`.
|
||||
# This does not reduce security, as we can already bypass `resolved` with them.
|
||||
# Alternatives to consider:
|
||||
@@ -61,7 +61,7 @@ in
|
||||
# change its own cmdline. `/proc/<pid>/exe` is reliable but kernel forbids
|
||||
# checking that entry of process from different users, and polkit runs `spawn`
|
||||
# as an unprivileged user.
|
||||
# 3. Put ThroneCore into a systemd service, and let polkit check service name.
|
||||
# 3. Put throne-core into a systemd service, and let polkit check service name.
|
||||
# This is the most secure and convenient way but requires heavy modification
|
||||
# to Throne source code. Would be good to let upstream support that eventually.
|
||||
security.polkit.extraConfig =
|
||||
@@ -69,7 +69,6 @@ in
|
||||
''
|
||||
polkit.addRule(function(action, subject) {
|
||||
const allowedActionIds = [
|
||||
"org.freedesktop.resolve1.revert",
|
||||
"org.freedesktop.resolve1.set-domains",
|
||||
"org.freedesktop.resolve1.set-default-route",
|
||||
"org.freedesktop.resolve1.set-dns-servers"
|
||||
|
||||
@@ -249,8 +249,8 @@ in
|
||||
setopt ${builtins.concatStringsSep " " cfg.setOptions}
|
||||
''}
|
||||
|
||||
# Determine current fqdn hostname
|
||||
HOST=$(hostname --fqdn)
|
||||
# Alternative method of determining short and full hostname.
|
||||
HOST=${config.networking.fqdnOrHostName}
|
||||
|
||||
# Setup command line history.
|
||||
# Don't export these, otherwise other shells (bash) will try to use same HISTFILE.
|
||||
|
||||
@@ -125,9 +125,6 @@ in
|
||||
(mkRemovedOptionModule [ "programs" "yabar" ]
|
||||
"programs.yabar has been removed from NixOS. This is because the yabar repository has been archived upstream."
|
||||
)
|
||||
(mkRemovedOptionModule [ "security" "dhparams" ] ''
|
||||
The security.dhparams module has been removed as RFC 7919 has shown that generating your own params is problematic.
|
||||
'')
|
||||
(mkRemovedOptionModule [ "security" "hideProcessInformation" ] ''
|
||||
The hidepid module was removed, since the underlying machinery
|
||||
is broken when using cgroups-v2.
|
||||
|
||||
223
nixos/modules/security/dhparams.nix
Normal file
223
nixos/modules/security/dhparams.nix
Normal file
@@ -0,0 +1,223 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) literalExpression mkOption types;
|
||||
cfg = config.security.dhparams;
|
||||
opt = options.security.dhparams;
|
||||
|
||||
bitType = types.addCheck types.int (b: b >= 16) // {
|
||||
name = "bits";
|
||||
description = "integer of at least 16 bits";
|
||||
};
|
||||
|
||||
paramsSubmodule =
|
||||
{ name, config, ... }:
|
||||
{
|
||||
options.bits = mkOption {
|
||||
type = bitType;
|
||||
default = cfg.defaultBitSize;
|
||||
defaultText = literalExpression "config.${opt.defaultBitSize}";
|
||||
description = ''
|
||||
The bit size for the prime that is used during a Diffie-Hellman
|
||||
key exchange.
|
||||
'';
|
||||
};
|
||||
|
||||
options.path = mkOption {
|
||||
type = types.path;
|
||||
readOnly = true;
|
||||
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
|
||||
{option}`security.dhparams.path`.
|
||||
'';
|
||||
};
|
||||
|
||||
config.path =
|
||||
let
|
||||
generated = pkgs.runCommand "dhparams-${name}.pem" {
|
||||
nativeBuildInputs = [ pkgs.openssl ];
|
||||
} "openssl dhparam -out \"$out\" ${toString config.bits}";
|
||||
in
|
||||
if cfg.stateful then "${cfg.path}/${name}.pem" else generated;
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
options = {
|
||||
security.dhparams = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to generate new DH params and clean up old DH params.
|
||||
'';
|
||||
};
|
||||
|
||||
params = mkOption {
|
||||
type =
|
||||
with types;
|
||||
let
|
||||
coerce = bits: { inherit bits; };
|
||||
in
|
||||
attrsOf (coercedTo int coerce (submodule paramsSubmodule));
|
||||
default = { };
|
||||
example = lib.literalExpression "{ nginx.bits = 3072; }";
|
||||
description = ''
|
||||
Diffie-Hellman parameters to generate.
|
||||
|
||||
The value is the size (in bits) of the DH params to generate. The
|
||||
generated DH params path can be found in
|
||||
`config.security.dhparams.params.«name».path`.
|
||||
|
||||
::: {.note}
|
||||
The name of the DH params is taken as being the name of
|
||||
the service it serves and the params will be generated before the
|
||||
said service is started.
|
||||
:::
|
||||
|
||||
::: {.warning}
|
||||
If you are removing all dhparams from this list, you
|
||||
have to leave {option}`security.dhparams.enable` for at
|
||||
least one activation in order to have them be cleaned up. This also
|
||||
means if you rollback to a version without any dhparams the
|
||||
existing ones won't be cleaned up. Of course this only applies if
|
||||
{option}`security.dhparams.stateful` is
|
||||
`true`.
|
||||
:::
|
||||
|
||||
::: {.note}
|
||||
**For module implementers:** It's recommended
|
||||
to not set a specific bit size here, so that users can easily
|
||||
override this by setting
|
||||
{option}`security.dhparams.defaultBitSize`.
|
||||
:::
|
||||
'';
|
||||
};
|
||||
|
||||
stateful = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
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
|
||||
{option}`security.dhparams.path`. Otherwise the files are
|
||||
created within the Nix store.
|
||||
|
||||
::: {.note}
|
||||
If this is `false` the resulting store
|
||||
path will be non-deterministic and will be rebuilt every time the
|
||||
`openssl` package changes.
|
||||
:::
|
||||
'';
|
||||
};
|
||||
|
||||
defaultBitSize = mkOption {
|
||||
type = bitType;
|
||||
default = 2048;
|
||||
description = ''
|
||||
This allows to override the default bit size for all of the
|
||||
Diffie-Hellman parameters set in
|
||||
{option}`security.dhparams.params`.
|
||||
'';
|
||||
};
|
||||
|
||||
path = mkOption {
|
||||
type = types.str;
|
||||
default = "/var/lib/dhparams";
|
||||
description = ''
|
||||
Path to the directory in which Diffie-Hellman parameters will be
|
||||
stored. This only is relevant if
|
||||
{option}`security.dhparams.stateful` is
|
||||
`true`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.enable {
|
||||
warnings = [
|
||||
''
|
||||
The `security.dhparams` module is deprecated and scheduled for removal in NixOS 26.11.
|
||||
Generating your own params has been shown to be problematic in RFC 7919 (2016).
|
||||
|
||||
Remove any uses of DHE and migrate to ECDHE (RFC 8422, 2018) and
|
||||
Hybrid PQ (draft-ietf-tls-ecdhe-mlkem, 2026) key exchange algorithms.
|
||||
''
|
||||
];
|
||||
})
|
||||
(lib.mkIf (cfg.enable && cfg.stateful) {
|
||||
systemd.services = {
|
||||
dhparams-init = {
|
||||
description = "Clean Up Old Diffie-Hellman Parameters";
|
||||
|
||||
# Clean up even when no DH params is set
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig.RemainAfterExit = true;
|
||||
serviceConfig.Type = "oneshot";
|
||||
|
||||
script = ''
|
||||
if [ ! -d ${cfg.path} ]; then
|
||||
mkdir -p ${cfg.path}
|
||||
fi
|
||||
|
||||
# Remove old dhparams
|
||||
for file in ${cfg.path}/*; do
|
||||
if [ ! -f "$file" ]; then
|
||||
continue
|
||||
fi
|
||||
${lib.concatStrings (
|
||||
lib.mapAttrsToList (
|
||||
name:
|
||||
{ bits, path, ... }:
|
||||
''
|
||||
if [ "$file" = ${lib.escapeShellArg path} ] && \
|
||||
${pkgs.openssl}/bin/openssl dhparam -in "$file" -text \
|
||||
| head -n 1 | grep "(${toString bits} bit)" > /dev/null; then
|
||||
continue
|
||||
fi
|
||||
''
|
||||
) cfg.params
|
||||
)}
|
||||
rm "$file"
|
||||
done
|
||||
|
||||
# TODO: Ideally this would be removing the *former* cfg.path, though
|
||||
# this does not seem really important as changes to it are quite
|
||||
# unlikely
|
||||
rmdir --ignore-fail-on-non-empty ${cfg.path}
|
||||
'';
|
||||
};
|
||||
}
|
||||
// lib.mapAttrs' (
|
||||
name:
|
||||
{ bits, path, ... }:
|
||||
lib.nameValuePair "dhparams-gen-${name}" {
|
||||
description = "Generate Diffie-Hellman Parameters for ${name}";
|
||||
after = [ "dhparams-init.service" ];
|
||||
before = [ "${name}.service" ];
|
||||
requiredBy = [ "${name}.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
unitConfig.ConditionPathExists = "!${path}";
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
mkdir -p ${lib.escapeShellArg cfg.path}
|
||||
${pkgs.openssl}/bin/openssl dhparam -out ${lib.escapeShellArg path} \
|
||||
${toString bits}
|
||||
'';
|
||||
}
|
||||
) cfg.params;
|
||||
})
|
||||
];
|
||||
|
||||
}
|
||||
@@ -8,21 +8,6 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
attrNames
|
||||
catAttrs
|
||||
concatLines
|
||||
concatMap
|
||||
filter
|
||||
unique
|
||||
flip
|
||||
elem
|
||||
attrValues
|
||||
concatMapStrings
|
||||
hasPrefix
|
||||
concatStringsSep
|
||||
sort
|
||||
;
|
||||
|
||||
moduleSettingsType =
|
||||
with lib.types;
|
||||
@@ -896,30 +881,41 @@ let
|
||||
|
||||
text =
|
||||
let
|
||||
ensureUniqueOrder =
|
||||
type: rules:
|
||||
let
|
||||
checkPair =
|
||||
a: b:
|
||||
assert lib.assertMsg (a.order != b.order)
|
||||
"security.pam.services.${name}.rules.${type}: rules '${a.name}' and '${b.name}' cannot have the same order value (${toString a.order})";
|
||||
b;
|
||||
checked = lib.zipListsWith checkPair rules (lib.drop 1 rules);
|
||||
in
|
||||
lib.take 1 rules ++ checked;
|
||||
# Formats a string for use in `module-arguments`. See `man pam.conf`.
|
||||
formatModuleArgument =
|
||||
token: if lib.hasInfix " " token then "[${lib.replaceStrings [ "]" ] [ "\\]" ] token}]" else token;
|
||||
|
||||
formatRules =
|
||||
type:
|
||||
concatStringsSep "\n" (
|
||||
map
|
||||
(
|
||||
rule:
|
||||
"${type} ${rule.control} ${rule.modulePath}${
|
||||
if rule.args == [ ] then "" else " " + concatStringsSep " " (map formatModuleArgument rule.args)
|
||||
} # ${rule.name} (order ${toString rule.order})"
|
||||
lib.pipe cfg.rules.${type} [
|
||||
lib.attrValues
|
||||
(lib.filter (rule: rule.enable))
|
||||
(lib.sort (a: b: a.order < b.order))
|
||||
(ensureUniqueOrder type)
|
||||
(map (
|
||||
rule:
|
||||
lib.concatStringsSep " " (
|
||||
[
|
||||
type
|
||||
rule.control
|
||||
rule.modulePath
|
||||
]
|
||||
++ map formatModuleArgument rule.args
|
||||
++ [ "# ${rule.name} (order ${toString rule.order})" ]
|
||||
)
|
||||
(
|
||||
sort (
|
||||
a: b:
|
||||
if a.order != b.order then
|
||||
a.order < b.order
|
||||
else
|
||||
throw "security.pam.services.${name}.rules.${type}: rules '${a.name}' and '${b.name}' cannot have the same order value (${toString a.order})"
|
||||
) (filter (rule: rule.enable) (attrValues cfg.rules.${type}))
|
||||
)
|
||||
);
|
||||
))
|
||||
(lib.concatStringsSep "\n")
|
||||
];
|
||||
in
|
||||
lib.mkDefault ''
|
||||
# Account management.
|
||||
@@ -2641,29 +2637,35 @@ in
|
||||
};
|
||||
|
||||
security.apparmor.includes."abstractions/pam" =
|
||||
concatMapStrings (name: "r ${config.environment.etc."pam.d/${name}".source},\n") (
|
||||
attrNames enabledServices
|
||||
lib.concatMapStrings (name: "r ${config.environment.etc."pam.d/${name}".source},\n") (
|
||||
lib.attrNames enabledServices
|
||||
)
|
||||
+ (
|
||||
let
|
||||
types = concatMap attrValues (catAttrs "rules" (attrValues enabledServices));
|
||||
rules = concatMap attrValues types;
|
||||
|
||||
isDirect = flip elem [
|
||||
"include"
|
||||
"substack"
|
||||
];
|
||||
activeRules = filter (rule: rule.enable && !isDirect rule.control) rules;
|
||||
|
||||
modulePaths = concatMap (
|
||||
with lib;
|
||||
pipe enabledServices [
|
||||
lib.attrValues
|
||||
(catAttrs "rules")
|
||||
(lib.concatMap lib.attrValues)
|
||||
(lib.concatMap lib.attrValues)
|
||||
(lib.filter (rule: rule.enable))
|
||||
(lib.filter (
|
||||
rule:
|
||||
if (!hasPrefix "/" rule.modulePath) then
|
||||
throw ''non-absolute PAM modulePath "${rule.modulePath}" is unsupported by apparmor''
|
||||
else
|
||||
[ rule.modulePath ]
|
||||
) activeRules;
|
||||
in
|
||||
concatLines (map (module: "mr ${module},") (unique modulePaths))
|
||||
!builtins.elem rule.control [
|
||||
"include"
|
||||
"substack"
|
||||
]
|
||||
))
|
||||
(lib.catAttrs "modulePath")
|
||||
(map (
|
||||
modulePath:
|
||||
lib.throwIfNot (lib.hasPrefix "/" modulePath)
|
||||
''non-absolute PAM modulePath "${modulePath}" is unsupported by apparmor''
|
||||
modulePath
|
||||
))
|
||||
lib.unique
|
||||
(map (module: "mr ${module},"))
|
||||
concatLines
|
||||
]
|
||||
);
|
||||
|
||||
security.sudo.extraConfig = optionalSudoConfigForSSHAgentAuth;
|
||||
|
||||
@@ -179,10 +179,10 @@ in
|
||||
}" />
|
||||
<!-- specify the binaries to be called -->
|
||||
<!-- the comma in front of the options is necessary for empty options -->
|
||||
<fusemount>${pkgs.fuse3}/bin/mount.fuse3 %(VOLUME) %(MNTPT) -o ,${
|
||||
<fusemount>${pkgs.fuse}/bin/mount.fuse %(VOLUME) %(MNTPT) -o ,${
|
||||
lib.concatStringsSep "," (cfg.fuseMountOptions ++ [ "%(OPTIONS)" ])
|
||||
}'</fusemount>
|
||||
<fuseumount>${pkgs.fuse3}/bin/fusermount3 -u %(MNTPT)</fuseumount>
|
||||
<fuseumount>${pkgs.fuse}/bin/fusermount -u %(MNTPT)</fuseumount>
|
||||
<!-- the comma in front of the options is necessary for empty options -->
|
||||
<cryptmount>${pkgs.pam_mount}/bin/mount.crypt -o ,${
|
||||
lib.concatStringsSep "," (cfg.cryptMountOptions ++ [ "%(OPTIONS)" ])
|
||||
|
||||
@@ -181,23 +181,8 @@ in
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
security.enableWrappers = lib.mkEnableOption "" // {
|
||||
security.enableWrappers = lib.mkEnableOption "SUID/SGID wrappers" // {
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable SUID/SGID wrappers.
|
||||
|
||||
::: {.warning}
|
||||
ONLY DISABLE THIS OPTION IF YOU KNOW WHAT YOU'RE DOING.
|
||||
:::
|
||||
|
||||
A normal interactive NixOS system requires SUID/SGID wrappers (e.g. for
|
||||
PAM and sudo). Disabling them, thus will lock you out from your system.
|
||||
|
||||
Disabling the SUID/SGID binaries is useful for non-interactive systems
|
||||
(like a firewall appliance) to minimize the attack surface. In the
|
||||
future, this might become available for interactive systems as well
|
||||
(e.g. with systemd's [run0](https://www.freedesktop.org/software/systemd/man/latest/run0)).
|
||||
'';
|
||||
};
|
||||
|
||||
security.wrappers = lib.mkOption {
|
||||
@@ -260,134 +245,156 @@ in
|
||||
};
|
||||
|
||||
###### implementation
|
||||
config = lib.mkIf config.security.enableWrappers {
|
||||
|
||||
assertions = lib.mapAttrsToList (name: opts: {
|
||||
assertion = opts.setuid || opts.setgid -> opts.capabilities == "";
|
||||
message = ''
|
||||
The security.wrappers.${name} wrapper is not valid:
|
||||
setuid/setgid and capabilities are mutually exclusive.
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
warnings = lib.optional (wrappers != { } && !config.security.enableWrappers) ''
|
||||
security.enableWrappers is set to false, but the following wrappers are still enabled and will be silently ignored: ${lib.concatStringsSep ", " (lib.attrNames wrappers)}. This might prevent fundamental functionalities, like PAM authentication. To avoid this warning, either set security.enableWrappers = true, or explicitly disable each wrapper with `enable = false`.
|
||||
'';
|
||||
}) wrappers;
|
||||
assertions = [
|
||||
{
|
||||
assertion =
|
||||
!(
|
||||
!config.security.enableWrappers && lib.any (u: u.isNormalUser) (lib.attrValues config.users.users)
|
||||
);
|
||||
message = ''
|
||||
security.enableWrappers is disabled but normal users are defined
|
||||
(${
|
||||
lib.concatStringsSep ", " (
|
||||
lib.mapAttrsToList (n: _: n) (lib.filterAttrs (_: u: u.isNormalUser) config.users.users)
|
||||
)
|
||||
}). Without SUID wrappers, users cannot login. Either enable wrappers or remove all normal user accounts.
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
(lib.mkIf config.security.enableWrappers {
|
||||
assertions = lib.mapAttrsToList (name: opts: {
|
||||
assertion = opts.setuid || opts.setgid -> opts.capabilities == "";
|
||||
message = ''
|
||||
The security.wrappers.${name} wrapper is not valid:
|
||||
setuid/setgid and capabilities are mutually exclusive.
|
||||
'';
|
||||
}) wrappers;
|
||||
|
||||
security.wrappers =
|
||||
let
|
||||
mkSetuidRoot = source: {
|
||||
setuid = true;
|
||||
owner = "root";
|
||||
group = "root";
|
||||
inherit source;
|
||||
security.wrappers =
|
||||
let
|
||||
mkSetuidRoot = source: {
|
||||
setuid = true;
|
||||
owner = "root";
|
||||
group = "root";
|
||||
inherit source;
|
||||
};
|
||||
in
|
||||
{
|
||||
# These are mount related wrappers that require the +s permission.
|
||||
mount = mkSetuidRoot "${lib.getBin pkgs.util-linux}/bin/mount";
|
||||
umount = mkSetuidRoot "${lib.getBin pkgs.util-linux}/bin/umount";
|
||||
};
|
||||
in
|
||||
{
|
||||
# These are mount related wrappers that require the +s permission.
|
||||
mount = mkSetuidRoot "${lib.getBin pkgs.util-linux}/bin/mount";
|
||||
umount = mkSetuidRoot "${lib.getBin pkgs.util-linux}/bin/umount";
|
||||
|
||||
# Make sure our wrapperDir exports to the PATH env variable when
|
||||
# initializing the shell
|
||||
environment.extraInit = ''
|
||||
# Wrappers override other bin directories.
|
||||
export PATH="${wrapperDir}:$PATH"
|
||||
'';
|
||||
|
||||
security.apparmor.includes = lib.mapAttrs' (
|
||||
wrapName: wrap:
|
||||
lib.nameValuePair "nixos/security.wrappers/${wrapName}" ''
|
||||
include "${
|
||||
pkgs.apparmorRulesFromClosure { name = "security.wrappers.${wrapName}"; } [
|
||||
(securityWrapper wrap.source)
|
||||
]
|
||||
}"
|
||||
mrpx ${wrap.source},
|
||||
''
|
||||
) wrappers;
|
||||
|
||||
systemd.mounts = [
|
||||
{
|
||||
where = parentWrapperDir;
|
||||
what = "tmpfs";
|
||||
type = "tmpfs";
|
||||
options = lib.concatStringsSep "," [
|
||||
"nodev"
|
||||
"mode=755"
|
||||
"size=${config.security.wrapperDirSize}"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
systemd.services.suid-sgid-wrappers = {
|
||||
description = "Create SUID/SGID Wrappers";
|
||||
wantedBy = [ "sysinit.target" ];
|
||||
before = [
|
||||
"sysinit.target"
|
||||
"shutdown.target"
|
||||
];
|
||||
conflicts = [ "shutdown.target" ];
|
||||
after = [ "systemd-sysusers.service" ];
|
||||
unitConfig.DefaultDependencies = false;
|
||||
unitConfig.RequiresMountsFor = [
|
||||
"/nix/store"
|
||||
"/run/wrappers"
|
||||
];
|
||||
serviceConfig.RestrictSUIDSGID = false;
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
chmod 755 "${parentWrapperDir}"
|
||||
|
||||
# We want to place the tmpdirs for the wrappers to the parent dir.
|
||||
wrapperDir=$(mktemp --directory --tmpdir="${parentWrapperDir}" wrappers.XXXXXXXXXX)
|
||||
chmod a+rx "$wrapperDir"
|
||||
|
||||
${lib.concatStringsSep "\n" mkWrappedPrograms}
|
||||
|
||||
if [ -L ${wrapperDir} ]; then
|
||||
# Atomically replace the symlink
|
||||
# See https://axialcorps.com/2013/07/03/atomically-replacing-files-and-directories/
|
||||
old=$(readlink -f ${wrapperDir})
|
||||
if [ -e "${wrapperDir}-tmp" ]; then
|
||||
rm --force --recursive "${wrapperDir}-tmp"
|
||||
fi
|
||||
ln --symbolic --force --no-dereference "$wrapperDir" "${wrapperDir}-tmp"
|
||||
mv --no-target-directory "${wrapperDir}-tmp" "${wrapperDir}"
|
||||
rm --force --recursive "$old"
|
||||
else
|
||||
# For initial setup
|
||||
ln --symbolic "$wrapperDir" "${wrapperDir}"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
# Make sure our wrapperDir exports to the PATH env variable when
|
||||
# initializing the shell
|
||||
environment.extraInit = ''
|
||||
# Wrappers override other bin directories.
|
||||
export PATH="${wrapperDir}:$PATH"
|
||||
'';
|
||||
###### wrappers consistency checks
|
||||
system.checks = lib.singleton (
|
||||
pkgs.runCommand "ensure-all-wrappers-paths-exist"
|
||||
{
|
||||
preferLocalBuild = true;
|
||||
}
|
||||
''
|
||||
# make sure we produce output
|
||||
mkdir -p $out
|
||||
|
||||
security.apparmor.includes = lib.mapAttrs' (
|
||||
wrapName: wrap:
|
||||
lib.nameValuePair "nixos/security.wrappers/${wrapName}" ''
|
||||
include "${
|
||||
pkgs.apparmorRulesFromClosure { name = "security.wrappers.${wrapName}"; } [
|
||||
(securityWrapper wrap.source)
|
||||
]
|
||||
}"
|
||||
mrpx ${wrap.source},
|
||||
''
|
||||
) wrappers;
|
||||
echo -n "Checking that Nix store paths of all wrapped programs exist... "
|
||||
|
||||
systemd.mounts = [
|
||||
{
|
||||
where = parentWrapperDir;
|
||||
what = "tmpfs";
|
||||
type = "tmpfs";
|
||||
options = lib.concatStringsSep "," [
|
||||
"nodev"
|
||||
"mode=755"
|
||||
"size=${config.security.wrapperDirSize}"
|
||||
];
|
||||
}
|
||||
];
|
||||
declare -A wrappers
|
||||
${lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: "wrappers['${n}']='${v.source}'") wrappers)}
|
||||
|
||||
systemd.services.suid-sgid-wrappers = {
|
||||
description = "Create SUID/SGID Wrappers";
|
||||
wantedBy = [ "sysinit.target" ];
|
||||
before = [
|
||||
"sysinit.target"
|
||||
"shutdown.target"
|
||||
];
|
||||
conflicts = [ "shutdown.target" ];
|
||||
after = [ "systemd-sysusers.service" ];
|
||||
unitConfig.DefaultDependencies = false;
|
||||
unitConfig.RequiresMountsFor = [
|
||||
"/nix/store"
|
||||
"/run/wrappers"
|
||||
];
|
||||
serviceConfig.RestrictSUIDSGID = false;
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
chmod 755 "${parentWrapperDir}"
|
||||
for name in "''${!wrappers[@]}"; do
|
||||
path="''${wrappers[$name]}"
|
||||
if [[ "$path" =~ /nix/store ]] && [ ! -e "$path" ]; then
|
||||
test -t 1 && echo -ne '\033[1;31m'
|
||||
echo "FAIL"
|
||||
echo "The path $path does not exist!"
|
||||
echo 'Please, check the value of `security.wrappers."'$name'".source`.'
|
||||
test -t 1 && echo -ne '\033[0m'
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# We want to place the tmpdirs for the wrappers to the parent dir.
|
||||
wrapperDir=$(mktemp --directory --tmpdir="${parentWrapperDir}" wrappers.XXXXXXXXXX)
|
||||
chmod a+rx "$wrapperDir"
|
||||
|
||||
${lib.concatStringsSep "\n" mkWrappedPrograms}
|
||||
|
||||
if [ -L ${wrapperDir} ]; then
|
||||
# Atomically replace the symlink
|
||||
# See https://axialcorps.com/2013/07/03/atomically-replacing-files-and-directories/
|
||||
old=$(readlink -f ${wrapperDir})
|
||||
if [ -e "${wrapperDir}-tmp" ]; then
|
||||
rm --force --recursive "${wrapperDir}-tmp"
|
||||
fi
|
||||
ln --symbolic --force --no-dereference "$wrapperDir" "${wrapperDir}-tmp"
|
||||
mv --no-target-directory "${wrapperDir}-tmp" "${wrapperDir}"
|
||||
rm --force --recursive "$old"
|
||||
else
|
||||
# For initial setup
|
||||
ln --symbolic "$wrapperDir" "${wrapperDir}"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
###### wrappers consistency checks
|
||||
system.checks = lib.singleton (
|
||||
pkgs.runCommand "ensure-all-wrappers-paths-exist"
|
||||
{
|
||||
preferLocalBuild = true;
|
||||
}
|
||||
''
|
||||
# make sure we produce output
|
||||
mkdir -p $out
|
||||
|
||||
echo -n "Checking that Nix store paths of all wrapped programs exist... "
|
||||
|
||||
declare -A wrappers
|
||||
${lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: "wrappers['${n}']='${v.source}'") wrappers)}
|
||||
|
||||
for name in "''${!wrappers[@]}"; do
|
||||
path="''${wrappers[$name]}"
|
||||
if [[ "$path" =~ /nix/store ]] && [ ! -e "$path" ]; then
|
||||
test -t 1 && echo -ne '\033[1;31m'
|
||||
echo "FAIL"
|
||||
echo "The path $path does not exist!"
|
||||
echo 'Please, check the value of `security.wrappers."'$name'".source`.'
|
||||
test -t 1 && echo -ne '\033[0m'
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo "OK"
|
||||
''
|
||||
);
|
||||
};
|
||||
echo "OK"
|
||||
''
|
||||
);
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
@@ -289,6 +289,7 @@
|
||||
"node24"
|
||||
]);
|
||||
default = [
|
||||
"node20"
|
||||
"node24"
|
||||
];
|
||||
description = ''
|
||||
|
||||
@@ -189,15 +189,11 @@ let
|
||||
[ "--docker-image ${service.dockerImage}" ]
|
||||
++ optional service.dockerDisableCache "--docker-disable-cache"
|
||||
++ optional service.dockerPrivileged "--docker-privileged"
|
||||
++ optional service.dockerServicesPrivileged "--docker-services_privileged true"
|
||||
++ optional (service.dockerPullPolicy != null) "--docker-pull-policy ${service.dockerPullPolicy}"
|
||||
++ map (v: "--docker-volumes ${escapeShellArg v}") service.dockerVolumes
|
||||
++ map (v: "--docker-extra-hosts ${escapeShellArg v}") service.dockerExtraHosts
|
||||
++ map (v: "--docker-allowed-images ${escapeShellArg v}") service.dockerAllowedImages
|
||||
++ map (v: "--docker-allowed-services ${escapeShellArg v}") service.dockerAllowedServices
|
||||
++ map (
|
||||
v: "--docker-allowed-privileged-services ${escapeShellArg v}"
|
||||
) service.dockerAllowedPrivilegedServices
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -525,13 +521,6 @@ in
|
||||
Give extended privileges to container.
|
||||
'';
|
||||
};
|
||||
dockerServicesPrivileged = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Give extended privileges to services.
|
||||
'';
|
||||
};
|
||||
dockerExtraHosts = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
@@ -565,19 +554,6 @@ in
|
||||
Whitelist allowed services.
|
||||
'';
|
||||
};
|
||||
dockerAllowedPrivilegedServices = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
example = [
|
||||
"docker.io/library/docker:*-dind-rootless"
|
||||
"docker.io/library/docker:dind-rootless"
|
||||
"docker:*-dind-rootless"
|
||||
"docker:dind-rootless"
|
||||
];
|
||||
description = ''
|
||||
Whitelist allowed privileged services.
|
||||
'';
|
||||
};
|
||||
preGetSourcesScript = mkOption {
|
||||
type = types.nullOr (types.either types.str types.path);
|
||||
default = null;
|
||||
|
||||
@@ -40,7 +40,6 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
seatd
|
||||
sdnotify-wrapper
|
||||
];
|
||||
users.groups.seat = lib.mkIf (cfg.group == "seat") { };
|
||||
|
||||
@@ -55,7 +54,7 @@ in
|
||||
Type = "notify";
|
||||
NotifyAccess = "all";
|
||||
SyslogIdentifier = "seatd";
|
||||
ExecStart = "${pkgs.sdnotify-wrapper}/bin/sdnotify-wrapper ${pkgs.seatd.bin}/bin/seatd -n 1 -u ${cfg.user} -g ${cfg.group} -l ${cfg.logLevel}";
|
||||
ExecStart = "${lib.getExe' pkgs.s6 "s6-notify-socket-from-fd"} ${pkgs.seatd.bin}/bin/seatd -n 1 -u ${cfg.user} -g ${cfg.group} -l ${cfg.logLevel}";
|
||||
RestartSec = 1;
|
||||
Restart = "always";
|
||||
};
|
||||
|
||||
@@ -36,8 +36,6 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = lib.mkPackageOption pkgs "gemstash" { };
|
||||
|
||||
settings = lib.mkOption {
|
||||
default = { };
|
||||
description = ''
|
||||
@@ -98,7 +96,7 @@ in
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = lib.mkMerge [
|
||||
{
|
||||
ExecStart = "${lib.getExe cfg.package} start --no-daemonize --config-file ${settingsFormat.generate "gemstash.yaml" (prefixColon cfg.settings)}";
|
||||
ExecStart = "${pkgs.gemstash}/bin/gemstash start --no-daemonize --config-file ${settingsFormat.generate "gemstash.yaml" (prefixColon cfg.settings)}";
|
||||
NoNewPrivileges = true;
|
||||
User = "gemstash";
|
||||
Group = "gemstash";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
config,
|
||||
options,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
@@ -8,9 +7,6 @@
|
||||
|
||||
let
|
||||
cfg = config.services.displayManager;
|
||||
opts = options.services.displayManager;
|
||||
|
||||
toPretty = lib.generators.toPretty { };
|
||||
|
||||
installedSessions =
|
||||
pkgs.runCommand "desktops"
|
||||
@@ -83,7 +79,7 @@ in
|
||||
default = config.user != null;
|
||||
defaultText = lib.literalExpression "config.${options.user} != null";
|
||||
description = ''
|
||||
Automatically log in as {option}`${options.user}`.
|
||||
Automatically log in as {option}`autoLogin.user`.
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -105,7 +101,16 @@ in
|
||||
};
|
||||
|
||||
defaultSession = lib.mkOption {
|
||||
type = lib.types.nullOr (lib.types.str // { description = "session name"; });
|
||||
type = lib.types.nullOr lib.types.str // {
|
||||
description = "session name";
|
||||
check =
|
||||
d:
|
||||
lib.assertMsg (d != null -> (lib.types.str.check d && lib.elem d cfg.sessionData.sessionNames)) ''
|
||||
Default graphical session, '${d}', not found.
|
||||
Valid names for 'services.displayManager.defaultSession' are:
|
||||
${lib.concatStringsSep "\n " cfg.sessionData.sessionNames}
|
||||
'';
|
||||
};
|
||||
default = null;
|
||||
example = "gnome";
|
||||
description = ''
|
||||
@@ -125,12 +130,26 @@ in
|
||||
|
||||
sessionPackages = lib.mkOption {
|
||||
type = lib.types.listOf (
|
||||
lib.types.addCheck lib.types.package (
|
||||
p: p ? providedSessions && p.providedSessions != [ ] && lib.all lib.isString p.providedSessions
|
||||
)
|
||||
lib.types.package
|
||||
// {
|
||||
description = "package with provided sessions";
|
||||
descriptionClass = "composite";
|
||||
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 = [ ];
|
||||
@@ -189,15 +208,7 @@ in
|
||||
{
|
||||
assertion = cfg.autoLogin.enable -> cfg.autoLogin.user != null;
|
||||
message = ''
|
||||
`${opts.autoLogin}.enable` requires `${opts.autoLogin}.user` to be set
|
||||
'';
|
||||
}
|
||||
{
|
||||
assertion = cfg.defaultSession == null || lib.elem cfg.defaultSession cfg.sessionData.sessionNames;
|
||||
message = ''
|
||||
Default graphical session, ${toPretty cfg.defaultSession}, not found. Definitions:${lib.options.showDefs opts.defaultSession.definitionsWithLocations}.
|
||||
Valid names for `${opts.defaultSession}` are:
|
||||
${lib.concatMapStringsSep "\n " toPretty cfg.sessionData.sessionNames}
|
||||
services.displayManager.autoLogin.enable requires services.displayManager.autoLogin.user to be set
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user