Commit Graph
64 Commits
Author SHA1 Message Date
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
Sizhe Zhao 874c83c948 fix(lib): fix typo 2024-05-07 07:34:02 +00: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
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
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
Andrew Marshall 2d7d77878c Implement preMountHook & postMountHook
These options previously existed but had no effect. Now they are
implemented. They only affect mount during disko’s filesystem creation,
not during any later mounts.

Adding test case to existing “complex” example and test mostly because
couldn’t think of any better place to put it.
2023-11-12 09:36:50 +00:00
Aleksander Heintz 72bc152626 add btrfs swap support 2023-11-08 22:36:40 +00:00
lassulus 2bf4fc166b flake: deprecate .lib.lib 2023-09-26 14:00:14 +00:00
lassulus 9f29cedac7 rename makeDiskImage -> makeDiskImages 2023-09-18 12:16:33 +00:00
Jörg Thalheim 9ab96378f8 reformat tree 2023-09-17 04:43:25 +00:00
lassulus 7036bb8b30 disk-deactivate: execute directly instead of echoing script 2023-09-12 08:41:56 +00:00
Jörg Thalheim c4f2de908d fix evaluation of checks on non-x86_64-linux
run nix fmt
2023-09-02 18:37:01 +02:00
Jörg Thalheim b32f0e2876 apply treefmt 2023-08-11 08:45:46 +00:00
ktrinh-anduril ceabbec315 Added missing dependency to destroyScript (#318)
* Added bash to destroScript dep

* Added jq directly as dep for destroyScript
2023-08-10 22:29:40 +02:00
lassulus ab5f8eea75 make-disk-image: add impure variant 2023-08-07 15:57:14 +00:00
Jörg Thalheim 493b347d8f disko: drop binPrefix when building destroyScript
This seems to cause eval errors and I also don't know where this is supposed to come from
2023-08-06 16:28:59 +00:00
lassulus a8834f94f3 lib: add makeDiskImage 2023-07-28 12:43:42 +00:00
lassulus 97b09a791f lib toplevel._scripts: set mountScriptNoDeps in correct namespace 2023-07-20 18:05:23 +02:00
lassulus 480d61c3f7 lib: rename umount to destroy 2023-07-19 19:07:40 +00:00
lassulus 056637d3c9 move tests/lib.nix into diskoLib.testLib 2023-07-19 19:07:40 +00:00
lassulus cdaff66b57 lib: refactor outputs into toplevel 2023-07-19 19:07:40 +00:00
lassulus c9c2fa9d3a lib: better formatting of generated shell output 2023-07-04 16:02:25 +00:00
lassulus c52e425b02 lib: add indexOf function 2023-07-04 16:02:25 +00:00
lassulus ab9b880db2 lib.types: turn _create, _mount and _config into values 2023-07-04 16:02:25 +00:00
lassulus c230584db3 types: init table_gpt 2023-06-16 21:11:44 +02:00
lassulus 62f939e213 types: pass parent node to all subTypes 2023-06-16 21:11:44 +02:00
Jörg Thalheim a8d85d9f89 apply deadnix 2023-06-06 13:32:47 +02:00
Lassulus 40f3218b14 Merge pull request #248 from nix-community/json-serializer 2023-06-03 16:47:15 +02:00
vdbewout aac82e1b86 types: add support for /dev/xvd[a-z] style disks
this style is for the xen hypervisor
2023-06-01 22:48:21 +02:00
lassulus e6d41e39e3 lib: add json serializer function for types 2023-05-30 15:29:32 +02:00
lassulus 1c31612335 lib: read types from subdir 2023-05-20 13:56:42 +02:00
lassulus 22b33a4fd6 types: refactor into diskoLib 2023-05-20 13:56:42 +02:00
lassulus 6b0b20da18 /lib -> / 2022-08-24 22:24:33 +02:00
Lassulus 1be70de384 Merge pull request #23 from Baitinq/master 2022-08-24 20:32:36 +02:00
Baitinq 84214f3e3c Support logical volume sizing in logical extents units
This allows us to create a lv with size 100%FREE for all the availeable
size of the VG, etc.
2022-08-24 20:27:47 +02:00
Jörg Thalheim 1b836c9724 Merge pull request #22 from nix-community/raid2
add mdadm support
2022-08-24 19:20:53 +01:00
lassulus 88cb7a4719 add mdadm support 2022-08-24 20:15:18 +02:00
Baitinq e1927693e3 Support optional keyfile for luks encrypted partitions
If the keyfile attribute is not present it will omit any keyfile luks
configuration and instead will make the user be prompted for any
passphrases.
2022-08-24 16:48:31 +02:00
Jörg Thalheim 5643130fbb fix mount.partition by non rehashing already hashed device-id 2022-08-23 20:37:22 +02:00
Jörg Thalheim e9d1f151a2 use nix at eval time rather grep at runtime 2022-08-23 20:37:00 +02:00
lassulus af29463588 use /dev/disk/by-path for better nvme support 2022-08-23 09:55:05 +02:00
Jörg Thalheim fc568cf797 add flag support 2022-08-19 09:52:12 +02:00
Jörg Thalheim e123b05ff4 use findmnt and mount with X-mount.mkdir
This feels slightly cleaner and makes the code shorter.
2022-08-17 15:55:07 +02:00
Jörg Thalheim 20bfa32750 disko: get rid of impure imports
This is a backwards-incompatible change but it allows to pin nixpkgs,
which is desirable especially in professional environments where
reproduciblity is important.
2022-08-17 14:53:43 +02:00
Jairo Llopis 9b53ee7b11 feat: noop partitions
Some deployments just need a raw block device because the app works better when handling those.

Examples: Ceph, Longhorn, OpenEBS.

The new `noop` type supports that. It just does nothing with the partitions created, whenever applied.

@moduon MT-904
2022-07-08 12:49:58 +01:00
tv 16cd458af0 lib.*.lv: /dev/foo/bar -> /dev/mapper/foo-bar 2018-10-07 11:09:55 +02:00
tv 74703de270 lib.config.filesystem: propagate options 2018-10-07 10:53:47 +02:00
tv 396553d258 lib.config: mergeAttrs -> recursiveUpdate 2018-10-07 10:47:34 +02:00