Commit graph

195 commits

Author SHA1 Message Date
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
zerox
540cd416f6
zfs: add ability to specify full path of to the disk. 2024-08-26 09:48:53 +05:00
dylan madisetti
8d071db09b
test: fix and add stub test for zfs-with-vdevs 2024-08-05 12:11:35 -04:00
dylan madisetti
6bebcc728e
tidy: move relevant variables and format script block 2024-08-01 15:59:33 -04:00
dylan madisetti
b2a106f8ed
zfs: Add topology attribute to zpool 2024-08-01 15:41:09 -04:00
Jörg Thalheim
05f4e223b5 gpt: move boot partitions to the front of disko
Than we no longer need to do this in our examples.

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-06-30 07:50:33 +00:00
Jörg Thalheim
115311bc39 zfs: try to import zpool in incremental mode
if the pool is not imported, zfs list will return a value. So to check
that the pool does not exist, we also import it.

fixes https://github.com/nix-community/disko/issues/690
2024-06-28 13:52:20 +00:00
Jörg Thalheim
96cab883db zfs: when dataset already exist, only update dataset options 2024-06-28 13:53:07 +02: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
name_snrl
48580409a2 also add indentation to the hooks 2024-06-19 18:46:17 +00:00
name_snrl
248f65b9c4 fix option type in mkHook 2024-06-19 18:46:17 +00:00
Jörg Thalheim
804ab2de77 treewide: reformat with nix fmt 2024-06-09 06:40:59 +00:00
Jörg Thalheim
398acc470f update to new nixos test api 2024-06-07 14:20:40 +00:00
Jörg Thalheim
6de2014749 make-disk-image: make efi variables writeable 2024-06-03 11:52:20 +00:00
pedohorse
c194451352 keep only origBuilder env from host 2024-06-03 11:35:13 +00:00
lassulus
a77fb7dde9 add table-to-gpt migration guide 2024-05-30 21:28:52 +02:00
matthewcroughan
6c37763eb8 make-disk-image: use OVMF efi always 2024-05-19 23:16:38 +01:00
matthewcroughan
4444751300 make-disk-image: make extraPostVM configurable from module.nix 2024-05-19 14:38:05 +01:00
Jared Baur
e9dd5abae3
Add coreutils to list of dependencies
This allows for the disko scripts to be ran in more foreign environments
where we can't assume the basic utilities coreutils provides are
available or aren't 1-for-1 compatible (e.g. busybox utilities).
2024-05-15 09:57:53 -07:00
Jared Baur
27c40e5381
Add missing gawk dependency 2024-05-15 09:57:25 -07:00
danjujan
d62af72c22 Fix xargs command not found in make-disk-image script 2024-05-14 21:38:05 +00:00
Giel van Schijndel
f236f6df36 swap: forward discardPolicy option to randomEncryption.allowDiscards
I.e. instead of effectively ignoring `discardPolicy` when combined with
`randomEncryption`, or adding a second option requiring the user to
repeat themselves (DRY violation), just enable both when requested via
`discardPolicy`.

Without this `discardPolicy` is a NOP when `randomEncryption` is
enabled.
2024-05-14 21:30:40 +00:00
lassulus
159d87ea5b
Merge pull request #623 from muggenhor/feat/swap-discard
swap: support swapDevices' discardPolicy and priority options
2024-05-11 18:33:55 +02:00
lassulus
4677f6c534
Merge pull request #625 from nix-community/image-fixes
Fix building images when non-binary reproducible builds are present
2024-05-07 10:26:51 +02:00
Sizhe Zhao
874c83c948 fix(lib): fix typo 2024-05-07 07:34:02 +00:00
Jörg Thalheim
718565dfbb drop dependency on xcp
It's actually not faster in combination with xargs...
2024-05-07 08:53:10 +02:00
Jörg Thalheim
cdefe26742 load database with checksum again but do the same in disko-install 2024-05-07 08:53:10 +02:00
Jörg Thalheim
8a4585a200 disko-images: replace nix-copy with cp
This hopefully fixes the large memory consumption we have seen in the
past. Also presumably coreutils cp is more tuned for performance than
whatever nix does.
2024-05-06 20:51:39 +02:00
Jörg Thalheim
4f8c8580b4 fix building images when non-binary reproducible builds are present
closure-info has one flaw, it's possible that this file contains stale
information when build are not reproducible and the local checksum
doesn't match what the remote build created.
The work-around here is that we disregard the hashes and re-compute with
what nar's we actually have locally instead.
2024-05-06 19:29:20 +02: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
9f5d4e45cd nix fmt 2024-04-29 14:57:02 +00:00
Jared Baur
8d4ae698ea Use existing bash instance when running destroyScript
The destroy script already has a bash interpreter in use, but when the
`disk-deactivate` script is ran, it calls out to /usr/bin/env to query
for a bash interpreter. When running the destroyScript in unique places
(such as the stage-1 initrd), /usr/bin/env might not exist, so we can
make destroyScript more self-contained by reusing the same bash.
2024-04-12 18:51:46 +00:00
0x4A6F
07b7d662d8
make partitions.alignment configurable 2024-04-09 21:45:35 +02:00
Kira Bruneau
79eab0e82c types btrfs: fix format without swap or subvolumes 2024-04-08 21:37:04 +00:00
lassulus
89b617b99d idempotent gpt 2024-04-07 12:47:36 +02:00
Jared Baur
0a17298c0d Add missing dependency gnused
gnused is used in the disk-deactivate.jq script, but was not defined in
the list of dependencies.
2024-04-05 22:34:38 +00:00
lassulus
f6f2e009d6 types zpool: create pool if device is a zfs_member 2024-03-21 05:36:42 +01:00
lassulus
b7a91b50fd types table: fix duplicate create run 2024-03-20 03:26:36 +01:00
lassulus
f6b72bfed7 types *: make create idempotent 2024-03-13 09:58:33 +01:00
Jörg Thalheim
72818e54ec move disko-install into disko package 2024-03-09 07:05:35 +00:00
Maximilian Bosch
007625baaa
Fix manual build
The option `disko.devices.lvm_vg.<name>.lvs.<name>.priority` depends on
a different option that's unset by default breaking the manual build
like this:

    … while evaluating the attribute 'optionalValue.value'

     at /nix/store/lwyjz70qh12nq6cb7fixl85vryzxqm3c-source/lib/modules.nix:856:5:

      855|
      856|     optionalValue =
         |     ^
      857|       if isDefined then { value = mergedValue; }

    … while evaluating a branch condition

     at /nix/store/lwyjz70qh12nq6cb7fixl85vryzxqm3c-source/lib/modules.nix:857:7:

      856|     optionalValue =
      857|       if isDefined then { value = mergedValue; }
         |       ^
      858|       else {};

    (stack trace truncated; use '--show-trace' to show the full trace)

    error: The option `disko.devices.lvm_vg.<name>.lvs.<name>.size' is used but not defined.

This is especially noticeable when using `documentation.nixos.includeAllModules` locally.

Fixed the issue itself by adding a `defaultText` and added the
`disko-doc` job to the `checks` output so that CI hopefully catches this
from now on.
2024-03-05 17:35:13 +01:00
lassulus
56f6d3d4af types gpt: hash label if it's > 36 characters 2024-03-04 14:55:56 +01:00
lassulus
3cb3775f9b lib/tests: use startCommand for create_machine 2024-03-04 01:51:42 +01:00
ivan770
2ca4b06bdf lvm_vg: add priority option 2024-03-02 13:08:52 -05:00
Jörg Thalheim
590245271a add assertion if mirroredBoots is used in vm test 2024-02-22 00:01:18 +00:00
lassulus
0661bb800c types table: add deprecation warning 2024-02-17 05:31:02 +01:00
lassulus
c13d481b78 hybrid-mbr: cleanup test, wait for udev after paritioning 2024-02-17 04:06:51 +00: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