Michael Hoang
640d1dd8e0
tests: fix enabling Canokey
2026-05-25 10:55:36 +02:00
Michael Hoang
7da3d737f7
luks: fix not asking for password in format script
2026-05-20 00:19:04 +02:00
Michael Hoang
0d15976fce
luks: don't depend on autogenerated password
2026-05-20 00:14:40 +02:00
Michael Hoang
d60b2b5e00
luks: improve idempotency for enrolling FIDO2
...
Using FIDO2 automatically generates a temporary password for setting up LUKS
which is not available on subsequent runs of the script causing the format
script to crash with `password: unbound variable`.
2026-05-20 00:07:06 +02:00
Michael Hoang
65fb947964
flake: bump nixpkgs ( #1258 )
2026-05-19 21:37:54 +00:00
Michael Hoang
6795806dbc
tests/zfs-with-vdevs: fix not all vdevs detected
2026-05-19 23:33:40 +02:00
a-kenji
e40d944dec
tests/bcachefs: read filesystem metadata from sysfs
...
`bcachefs-tools`: `v1.33.1` cannot read the superblock from a mounted
device. The kernel returns EBUSY whenever
the filesystem is already mounted, so every `bcachefs show-super
/dev/vd*` assertion in this test now fails on the booted system.
2026-05-19 23:07:41 +02:00
a-kenji
403186440c
lib/types/bcachefs_filesystem: tolerate already-unlocked filesystem
2026-05-19 16:50:50 +02:00
a-kenji
21d9daf255
tests/disko-install: drop default value for oldmachine
2026-05-19 16:50:50 +02:00
a-kenji
baf057aa5b
lib/tests: stage the test password file under systemd initrd
...
`boot.initrd.preDeviceCommands` only runs in the script-based stage 1
and is gated on `!config.boot.initrd.systemd.enable`. Tests that
enable systemd initrd therefore never get `/tmp/secret.key` staged,
and disko's encrypted-filesystem mount hooks fail to find the
configured `passwordFile`.
2026-05-19 16:50:50 +02:00
a-kenji
8ebce63228
tests: register dynamically-created machines with the driver
...
The nixpkgs test driver was refactored: `driver.machines` is now a
computed property that returns a fresh sorted list combining
`driver.machines_qemu` and `driver.machines_nspawn`. Appending to the
property therefore mutates only the temporary returned list, so the
machines created via `create_test_machine` are no longer registered
with the driver.
2026-05-19 16:50:50 +02:00
a-kenji
17e2eee822
flake: bump nixpkgs
2026-05-19 16:50:50 +02:00
Michael Hoang
d405a17988
devShells: expose disko CLI ( #1261 )
2026-05-18 20:18:46 +00:00
Michael Hoang
a6a0a068c2
devShells: expose disko CLI
2026-05-17 10:44:15 +02:00
lassulus
6e8dc7aa0e
make-disk-image: don't build native /etc, only the udev rules. ( #1260 )
...
This is a very simple change that should mostly address #988 and #1062
without a new option or changing behavior.
2026-05-16 19:15:12 +00:00
June Stepp
4c81091646
make-disk-image: don't build native /etc.
...
Grab just the udev part.
2026-05-16 09:07:05 -05:00
lassulus
63b4e7e6cf
Remove alias usage ( #1254 )
2026-05-02 09:13:35 +00:00
Sandro
1be7610ee9
Remove alias usage
2026-05-02 01:02:39 +02:00
lassulus
32f4236bfc
disk-deactivate: wipe raid arrays before stopping them ( #1248 )
...
Closes #1247
## How to test
1. Go to $TMP: `cd "$(mktemp -d)"`
2. Get [the
gist](https://gist.github.com/kmein/9644e65ab8218a4b57c35cb9290b86ad ):
`wget
https://gist.githubusercontent.com/kmein/9644e65ab8218a4b57c35cb9290b86ad/raw/3ec76f6a142abb1f4ea3764563a8843984b300d4/flake.nix `
3. See it fail: `nix build` (output: _Exception: The canary file
survived the Disko wipe process!_)
4. Switch the branch: `sed -i
's#github:nix-community/disko#github:kmein/disko?ref=fix/mdadm-destroy#'
flake.nix`
5. Watch it work: `nix build`
2026-04-19 15:46:07 +00:00
lassulus
ce160f5185
Fix failing ShellCheck for LUKS partitions ( #1250 )
...
Trivial fix
2026-04-19 15:42:53 +00:00
lassulus
156dd93f59
feat: add FIDO2 & recovery support for LUKS ( #1143 )
...
This introduces what has been described in
https://0pointer.net/blog/unlocking-luks2-volumes-with-tpm2-fido2-pkcs11-security-hardware-on-systemd-248.html .
That is: support for FIDO2 and recovery passphrases and their boot
mechanism.
Testing is hard right now because of canokey-qemu being broken and U2F
is not a valid replacement for FIDO2…
I tried to keep as much as possible the previous behavior and make it
possible to mix FIDO2 and normal passphrases or key files without any
problem.
PIV support is out of scope for this change but can easily be added.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* FIDO2 token enrollment for LUKS-encrypted root with optional automatic
recovery passphrase and new configuration options to control enrollment
behavior.
* **Examples**
* Added an example configuration demonstrating a FIDO2-protected disk
layout (ESP + encrypted root) with FIDO2 enrollment enabled.
* **Tests**
* Added automated test coverage for the FIDO2/LUKS workflow and a
test-mode option to simulate a hardware FIDO2 device.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-19 14:03:58 +00:00
Raito Bezarius
b02541f2d0
feat: add FIDO2 & recovery support for LUKS
...
This introduces what has been described in
https://0pointer.net/blog/unlocking-luks2-volumes-with-tpm2-fido2-pkcs11-security-hardware-on-systemd-248.html .
That is: support for FIDO2 and recovery passphrases and their boot
mechanism.
Testing is hard right now because of canokey-qemu being broken and U2F
is not a valid replacement for FIDO2…
I tried to keep as much as possible the previous behavior and make it
possible to mix FIDO2 and normal passphrases or key files without any
problem.
PIV support is out of scope for this change but can easily be added.
Signed-off-by: Raito Bezarius <masterancpp@gmail.com >
2026-04-19 15:26:35 +02:00
magic_rb
47deadb7c1
Fix failing ShellCheck for LUKS partitions
...
Signed-off-by: magic_rb <magic_rb@redalder.org >
2026-04-13 14:23:41 +02:00
Kierán Meinhardt
dffa2001ce
add canary test for btrfs on mdadm wipes
...
Adds a NixOS integration test to verify that the `disk-deactivate`
script properly destroys BTRFS filesystems residing on mdadm RAID arrays.
2026-04-08 10:26:37 +02:00
Kierán Meinhardt
669ca49ae4
disk-deactivate: wipe raid arrays before stopping them
...
Previously, the `disk-deactivate` script stopped mdadm arrays before
wiping the underlying physical disks. This caused filesystems with
backup superblocks (like BTRFS at 64 MiB and 256 GiB offsets) to
survive the wipe, as the backups were striped across the physical
disks and missed by `wipefs` on the raw block devices.
When the array was reassembled during reprovisioning, the filesystem
superblocks realigned. `disko` would detect the old filesystem via
`blkid` and silently skip the `mkfs` step, leaving stale data intact.
This commit adds a `wipefs --all` command against the assembled RAID
device *before* stopping it, ensuring all filesystem signatures and
backup superblocks are cleanly destroyed.
2026-04-08 09:40:37 +02:00
github-actions[bot]
5ad85c82cc
flake: update inputs ( #1231 )
...
Automated changes by
[create-pull-request](https://github.com/peter-evans/create-pull-request )
GitHub action
2026-03-19 03:01:46 +00:00
bors
c3b6033c65
[create-pull-request] automated change
2026-03-19 02:45:56 +00:00
Jörg Thalheim
878ec37d6a
Escape ZFS args ( #1222 )
...
Args to ZFS (like mountpoints) might have spaces or other
shell-unfriendly characters in them. This escapes those so they get
passed to zfs correctly.
2026-03-14 16:38:37 +00:00
Jörg Thalheim
c4d34f2031
fix: correct typos across docs and messages ( #1229 )
...
## Summary
This PR fixes typos in docs and user-facing messages.
## Detailed Changes
| File | Fixed |
|---|---|
| `scripts/create-release.nix` | `uncommited` -> `uncommitted` (4x) |
| `lib/default.nix:906` | `Depracated` -> `Deprecated` |
| `lib/tests.nix:195` | `mkOveride` -> `mkOverride` |
| `docs/interactive-vm.md:3` | `similiar` -> `similar` |
| `docs/disko-images.md:82` | `involed` -> `involved` |
| `docs/disko-images.md:110` | `scirpt` -> `script` |
| `docs/table-to-gpt.md:62` | `partiton` -> `partition` |
| `lib/make-disk-image.nix:212` | `involed` -> `involved` |
| `docs/disko-images.md:11` | `In the this example` -> `In this example`
|
No intended behavior change.
Closes #1228
2026-03-14 16:34:36 +00:00
github-actions[bot]
7b9f7f88ab
flake: update inputs ( #1227 )
...
Automated changes by
[create-pull-request](https://github.com/peter-evans/create-pull-request )
GitHub action
2026-03-09 02:56:50 +00:00
bors
0fce0ab2bd
[create-pull-request] automated change
2026-03-09 02:41:51 +00:00
lassulus
eaafb89b56
Mount file-systems in the correct order ( #1057 )
...
Use the `fsBefore` function from NixOS to sort the file-systems.
The function originates from `nixpkgs/nixos/lib/utils.nix`, but the file
is a lambda that requires more arguments than we have available.
2026-03-07 07:05:52 +00:00
Francesco Zanini
0597c9262e
Mount file-systems in the correct order
...
Use the `fsBefore` function from NixOS to sort the file-systems.
The function originates from `nixpkgs/nixos/lib/utils.nix`, but the file
is a lambda that requires more arguments than we have available.
2026-03-05 09:33:32 +01:00
lassulus
42affa9d33
Better handling of bind mounts in make-disk-image ( #1056 )
...
The device of the bind mounts is incorrectly taken verbatim while making
the image. The root hierarchy is mounted at `config.rootMountDir`
(`/mnt` by default) during the process, and this commit prepends that
path to the `device` in these cases.
2026-03-05 08:25:10 +00:00
luojiyin
089cf54ff3
fix: correct uncommitted spelling in release script
2026-03-05 12:13:10 +08:00
luojiyin
29d01f4245
test: fix typo in mkOverride comment
2026-03-05 12:13:09 +08:00
luojiyin
6be2229087
fix: correct typo in disk image help text
2026-03-05 12:13:08 +08:00
luojiyin
8b94abcd23
fix: correct deprecation typo in lib default
2026-03-05 12:13:08 +08:00
luojiyin
f1bcd0707b
docs: fix typo in table to gpt guide
2026-03-05 12:13:07 +08:00
luojiyin
bc23e2e89c
docs: fix typo in interactive vm guide
2026-03-05 12:13:07 +08:00
luojiyin
d17b956f94
docs: fix typos in disko-images
2026-03-05 12:12:09 +08:00
Josh Gustafson
dff80bbcd9
Escape ZFS args
2026-03-02 09:31:30 -07:00
github-actions[bot]
5af7af10f1
flake: update inputs ( #1219 )
...
Automated changes by
[create-pull-request](https://github.com/peter-evans/create-pull-request )
GitHub action
2026-03-02 02:54:02 +00:00
bors
c0e77ffb52
[create-pull-request] automated change
2026-03-02 02:38:31 +00:00
github-actions[bot]
a4cb7bf73f
build(deps): bump peter-evans/create-pull-request from 7 to 8 ( #1217 )
...
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request )
from 7 to 8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/peter-evans/create-pull-request/releases ">peter-evans/create-pull-request's
releases</a>.</em></p>
<blockquote>
<h2>Create Pull Request v8.0.0</h2>
<h2>What's new in v8</h2>
<ul>
<li>Requires <a
href="https://github.com/actions/runner/releases/tag/v2.327.1 ">Actions
Runner v2.327.1</a> or later if you are using a self-hosted runner for
Node 24 support.</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>chore: Update checkout action version to v6 by <a
href="https://github.com/yonas "><code>@yonas</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4258 ">peter-evans/create-pull-request#4258</a></li>
<li>Update actions/checkout references to <a
href="https://github.com/v6 "><code>@v6</code></a> in docs by <a
href="https://github.com/Copilot "><code>@Copilot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4259 ">peter-evans/create-pull-request#4259</a></li>
<li>feat: v8 by <a
href="https://github.com/peter-evans "><code>@peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4260 ">peter-evans/create-pull-request#4260</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/yonas "><code>@yonas</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4258 ">peter-evans/create-pull-request#4258</a></li>
<li><a href="https://github.com/Copilot "><code>@Copilot</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4259 ">peter-evans/create-pull-request#4259</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v7.0.11...v8.0.0 ">https://github.com/peter-evans/create-pull-request/compare/v7.0.11...v8.0.0 </a></p>
<h2>Create Pull Request v7.0.11</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: restrict remote prune to self-hosted runners by <a
href="https://github.com/peter-evans "><code>@peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4250 ">peter-evans/create-pull-request#4250</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v7.0.10...v7.0.11 ">https://github.com/peter-evans/create-pull-request/compare/v7.0.10...v7.0.11 </a></p>
<h2>Create Pull Request v7.0.10</h2>
<p>⚙️ Fixes an issue where updating a pull request failed when targeting
a forked repository with the same owner as its parent.</p>
<h2>What's Changed</h2>
<ul>
<li>build(deps): bump the github-actions group with 2 updates by <a
href="https://github.com/dependabot "><code>@dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4235 ">peter-evans/create-pull-request#4235</a></li>
<li>build(deps-dev): bump prettier from 3.6.2 to 3.7.3 in the npm group
by <a
href="https://github.com/dependabot "><code>@dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4240 ">peter-evans/create-pull-request#4240</a></li>
<li>fix: provider list pulls fallback for multi fork same owner by <a
href="https://github.com/peter-evans "><code>@peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4245 ">peter-evans/create-pull-request#4245</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/obnyis "><code>@obnyis</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4064 ">peter-evans/create-pull-request#4064</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v7.0.9...v7.0.10 ">https://github.com/peter-evans/create-pull-request/compare/v7.0.9...v7.0.10 </a></p>
<h2>Create Pull Request v7.0.9</h2>
<p>⚙️ Fixes an <a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4228 ">incompatibility</a>
with the recently released <code>actions/checkout@v6</code>.</p>
<h2>What's Changed</h2>
<ul>
<li>~70 dependency updates by <a
href="https://github.com/dependabot "><code>@dependabot</code></a></li>
<li>docs: fix workaround description about <code>ready_for_review</code>
by <a href="https://github.com/ybiquitous "><code>@ybiquitous</code></a>
in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3939 ">peter-evans/create-pull-request#3939</a></li>
<li>Docs: <code>add-paths</code> default behavior by <a
href="https://github.com/joeflack4 "><code>@joeflack4</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3928 ">peter-evans/create-pull-request#3928</a></li>
<li>docs: update to create-github-app-token v2 by <a
href="https://github.com/Goooler "><code>@Goooler</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4063 ">peter-evans/create-pull-request#4063</a></li>
<li>Fix compatibility with actions/checkout@v6 by <a
href="https://github.com/ericsciple "><code>@ericsciple</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4230 ">peter-evans/create-pull-request#4230</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/joeflack4 "><code>@joeflack4</code></a>
made their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3928 ">peter-evans/create-pull-request#3928</a></li>
<li><a href="https://github.com/Goooler "><code>@Goooler</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4063 ">peter-evans/create-pull-request#4063</a></li>
<li><a
href="https://github.com/ericsciple "><code>@ericsciple</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4230 ">peter-evans/create-pull-request#4230</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/c0f553fe549906ede9cf27b5156039d195d2ece0 "><code>c0f553f</code></a>
feat: add <code>@octokit/plugin-retry</code> to handle retriable server
errors (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4298 ">#4298</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/70001242bfa9ec7844891e620fdda69a2a2a06c7 "><code>7000124</code></a>
fix: Handle remote prune failures gracefully (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4295 ">#4295</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/34aa40e9cf0bb8b5be745a552003fdeb25e4dd3a "><code>34aa40e</code></a>
build: update distribution (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4289 ">#4289</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/641099ddca097df58c3369dd5e1f33322b223029 "><code>641099d</code></a>
build(deps-dev): bump undici from 6.22.0 to 6.23.0 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4284 ">#4284</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/2271f1ddcf09437ed8f019733eb5cfba58ac76f0 "><code>2271f1d</code></a>
build(deps-dev): bump the npm group with 2 updates (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4274 ">#4274</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/437c31a11dd02128dd37633ad8d3832853477e7a "><code>437c31a</code></a>
build(deps): bump the github-actions group with 2 updates (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4273 ">#4273</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/0979079bc20c05bbbb590a56c21c4e2b1d1f1bbe "><code>0979079</code></a>
docs: update readme</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/5b751cdf403b4f0314c656b2618939e4c8bdf824 "><code>5b751cd</code></a>
README.md: bump given GitHub actions to their latest versions (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4265 ">#4265</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/98357b18bf14b5342f975ff684046ec3b2a07725 "><code>98357b1</code></a>
feat: v8 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4260 ">#4260</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/41c0e4b7899a4a0922bf899d64c5f25738cfe356 "><code>41c0e4b</code></a>
Update actions/checkout references to <a
href="https://github.com/v6 "><code>@v6</code></a> in docs (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4259 ">#4259</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/peter-evans/create-pull-request/compare/v7...v8 ">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
2026-02-23 21:16:04 +00:00
dependabot[bot]
5abb5af1de
build(deps): bump peter-evans/create-pull-request from 7 to 8
...
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request ) from 7 to 8.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases )
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v7...v8 )
---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
dependency-version: '8'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-02-23 21:10:10 +00:00
github-actions[bot]
4707eec8d1
flake: update inputs ( #1214 )
...
Automated changes by
[create-pull-request](https://github.com/peter-evans/create-pull-request )
GitHub action
2026-02-19 02:51:10 +00:00
bors
061761eef4
[create-pull-request] automated change
2026-02-19 02:42:28 +00:00
github-actions[bot]
92fceb1119
flake: update inputs ( #1213 )
...
Automated changes by
[create-pull-request](https://github.com/peter-evans/create-pull-request )
GitHub action
2026-02-17 19:06:38 +00:00
Enzime
8383dadd06
[create-pull-request] automated change
2026-02-17 18:57:51 +00:00