Commit graph

155 commits

Author SHA1 Message Date
nothingnesses
be1a6b8a05 bcachefs: fix subvolume mounting 2025-12-14 04:58:58 +00:00
fidgetingbits
d64e5cdca3 feat(mdadm): add test for mdadm with extraArgs 2025-12-10 00:31:19 +00:00
Yifei Sun
c8a0e78d86 examples: gpt partition attributes
cherry-picked from 9dc58d4d49

usage example:

- set attribute: 2847963e75/disko-nvme-zfs.nix (L9L11)
- check: 2847963e75/flake.nix (L154L160)
2025-09-07 14:37:19 +00:00
Matthias Beyer
490c0d6bd1 Fix typo 2025-05-14 12:38:36 +00:00
nothingnesses
78d6a1365c Use a hard-coded UUID for the failing example to get it to work 2025-05-07 17:27:41 +00:00
nothingnesses
7b63642358 Make bcachefs subvolumes boot-time mount tests pass + more tests 2025-05-04 20:24:55 +00:00
nothingnesses
ca27b88c88 Add bcachefs type with encryption and multi-disk support
This update introduces a bcachefs type with encryption support and advanced formatting options.
It includes a new example (`examples/bcachefs-multi-disk.nix`) to demonstrate multi-disk setups and available options.

Key changes:

- Deterministic UUID generation.
- Addressed limitations with multi-disk root setups due to bcachefs and systemd issues.
- Provided a systemd-mount alternative for fileSystems configuration.
- Added subvolume support and updated scripts for clarity and functionality.

---------

Co-authored-by: Jonas Heinrich <onny@project-insanity.org>
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
Co-authored-by: Kyle Petryszak <6314611+ProjectInitiative@users.noreply.github.com>

Update
* Add examples
* Improve descriptions

Remove debugging

Remove comment

Use `unique` to dedup lists
2025-04-24 13:41:42 +00:00
Dennis Værum
2db1d64fc0 Added example for swap on zfs_volume
I could not find an example of how to enable swap on a `zfs_volume` but since I made it work I wanted to share it 😁
2025-03-11 09:06:40 +00:00
DavHau
ff2d853a84 treewide: format all files 2025-02-15 10:08:56 +00:00
DavHau
d478e2f9f3 zfs: add example for encrypted root 2025-02-15 05:51:50 +00:00
Jörg Thalheim
4edb87a2ac test explicit gpt uuid optoin 2025-02-15 01:27:47 +00:00
Leonie Marcy Vack
1ae7c794d9 zfs_volume: add zfs_volume without content to zfs example 2025-01-16 14:45:30 +01:00
provokateurin
5be012e917
fix: Apply umask=0077 to /boot partition in all examples 2025-01-06 20:23:33 +01:00
Aos Dabbagh
7d9940a4df doc: simple xfs with options
This PR documents an XFS example that uses the `xfs_quota` feature.
2024-12-28 16:43:16 -05:00
Jörg Thalheim
7ea6edd857 zfs-with-vdevs: add an example for using absolute device paths
This is the only way to assign devices rather than fixed gpt partitions.
Without reading the code it's not very obvious how disko actually
assigns devices to zpools.
2024-12-24 14:45:56 +01:00
Jörg Thalheim
d8f3cfc582 zfs: run load-key on mount 2024-12-20 14:24:53 +01:00
Gary Guo
3e83c11038 Fix evaluation when a GPT partition is left unformatted 2024-11-25 02:10:48 +00:00
mergify[bot]
b1aa08f8ce
Merge branch 'master' into feature/zfs-vdev-types 2024-11-20 06:17:47 +00:00
carschandler
da52cf4020
Add explanatory comment to examples/zfs-over-legacy.nix (#886) 2024-11-19 16:38:19 +01:00
Michon van Dooren
d192ffd944
Fix zpool create for disk vdev after mirror vdev
A config like

```nix
{
  vdev = [
    {
      mode = "mirror";
      members = [ "data1" "data2" ];
    }
    {
      members = [ "data3" ];
    }
  ];
}
```

would result in the following command:

```shell
zpool create -f <name> mirror /dev/data1 /dev/data2 /dev/data3
```

which would result in a single vdev with a 3-way mirror, rather than a
vdev with a 2-way mirror and a second vdev with a single disk. By
reordering the vdevs to handle those with an empty mode first we
transform this into:

```shell
zpool create -f <name> /dev/data3 mirror /dev/data1 /dev/data2
```

which does have the desired outcome.
2024-11-18 01:33:49 +01:00
Michon van Dooren
9b56c1afdb
Add support for ZFS spare, log & dedup vdevs 2024-11-17 15:52:28 +01:00
DavHau
58cd832497 lvm_vg: fix size=100% leading to crash
lvcreate -l does not accept a '100%' parameter which currently leads to a crash. THis change automatically changes `100%` to `100%FREE` leading to the intended behavior.
2024-10-26 11:42:42 +00:00
Felix Uhl
ca47da60e5 disko: fix improper handling of whitespace
Fixes #130

This should fix pretty much all cases where spaces or other special
characters would break disko due to improper quoting. I searched for all
instances of '.label', '.device' and '.name', so I believe I caught
whatever I could.

In some cases I changed single quotes to double quotes for consistency.

I know we don't usually fix bugs in the legacy table type, but it was so
easy I couldn't resist.
2024-10-22 09:10:08 +00:00
Chris Scutcher
78d685c123 tests: Add failing test to demonstrate issues with whitespace in part names
Reproduces #130.

For new style table the generated script has a few problems for example;

```sh
    sgdisk \
      --new=2:0:+100M \
      --change-name=2:disk-vdb-name with spaces \
      --typecode=2:EF00 \
      /dev/vdb
```

and

```sh
mkfs.vfat \
         \
        /dev/disk/by-partlabel/disk-vdb-name with spaces
```

Legacy table style generates slightly different problems e.g.;

```sh
parted -s /dev/vdb -- mkpart name with spaces  1MiB 100MiB
```
2024-10-22 09:10:08 +00:00
Felix Uhl
da8f49246c docs: Fix /boot security hole warning in examples
The alternative would be to do this automatically if format=="vfat" and
mountpoint=="/boot", but it's better to be upfront about this.

Fixes #527
2024-10-02 08:12:14 +00:00
Felix Uhl
b9c99485aa Fix and comment luks-encrypted btrfs raid example 2024-10-01 19:35:27 +02:00
Sk7Str1pe
c312692abe Create luks-btrfs-raid.nix 2024-10-01 19:34:46 +02:00
Jörg Thalheim
4e30bc7921 zfs-with-vdevs: increase pool import timeout
Fix fixes a long-standing test failures we have with the zfs-with-vdevs.
2024-10-01 10:08:10 +02:00
Jörg Thalheim
e72de0702d add workaround for failing zpool import test 2024-09-23 15:07:20 +02:00
Jörg Thalheim
9adb48e682 add workaround for flakey zfs tests 2024-09-20 15:16:46 +02:00
Jörg Thalheim
93c1dde419 tests/f2fs: add compression
This is a regression test for shellcheck, where we had to disable SC2054
2024-09-20 15:02:37 +02:00
Jörg Thalheim
37c83c08d1
Merge pull request #723 from dmadisetti/dm/zfs-extra
zfs: add ZFS "topology" features like explicit vdevs, cache, and special
2024-09-03 17:07:39 +02:00
dylan madisetti
c9d3bc3755
fix: properly apply oneOf 2024-08-26 14:00:44 -04:00
dylan madisetti
ea3ce722ea
zfs: fix test and add documentation 2024-08-26 13:03:25 -04:00
dylan madisetti
cc2e247193
zfs: make topology a mode type 2024-08-26 12:27:04 -04:00
matthewcroughan
cc86fe1a7c f2fs: init 2024-08-20 10:26:29 +01:00
dylan madisetti
8d071db09b
test: fix and add stub test for zfs-with-vdevs 2024-08-05 12:11:35 -04:00
dylan madisetti
f484389085
example: barebones example of zfs-with-vdevs 2024-08-01 16:00:11 -04:00
Jörg Thalheim
bec6e3cde9 examples: rename vdb -> main 2024-07-19 19:33:40 +00:00
Jörg Thalheim
d185770ea2 examples: drop priority as we now have a reasonable default 2024-06-30 07:50:33 +00:00
Matthew_Cash
b6a1262796 lvm_vg: add lvm thinpool/thinlv support
Co-authored-by: ajs124 <git@ajs124.de>
2024-06-26 11:36:52 +00:00
Giel van Schijndel
c5a25d5ced
swap: support swapDevices.*.priority option
This just forwards to the underlying NixOS option and expands the mount
script to exhibit the same behavior.
2024-05-06 12:11:58 +02:00
Giel van Schijndel
8a02c0507c
swap: support swapDevices.*.discardPolicy option 2024-05-06 12:11:58 +02:00
Qubasa
35d4378e74 Add EF02 priority=1 flag. Systems won't boot otherwise 2024-04-29 14:57:02 +00:00
Kira Bruneau
79eab0e82c types btrfs: fix format without swap or subvolumes 2024-04-08 21:37:04 +00:00
lassulus
f6b72bfed7 types *: make create idempotent 2024-03-13 09:58:33 +01:00
lassulus
561579a631 add long-device-name test & example 2024-03-04 14:55:56 +01:00
lassulus
c13d481b78 hybrid-mbr: cleanup test, wait for udev after paritioning 2024-02-17 04:06:51 +00:00
NAHO
15b52c3c8a example: fix typo 2024-02-08 10:44:38 +01:00
danjujan
f7424625dc
Rework Hybrid MBR https://github.com/nix-community/disko/pull/168 (#508)
Add hybrid MBR functionality to the gpt type
2024-01-26 21:59:23 +01:00