Commit Graph

186 Commits

Author SHA1 Message Date
a-kenji
4015740375 fix: typos 2023-07-30 17:43:54 +00:00
lassulus
5e253d949f makeDiskImage: add extraPostVM arg 2023-07-28 12:43:42 +00:00
lassulus
8edfd2295c fixup! types disk: add imageSize for makeDiskImage 2023-07-28 12:43:42 +00:00
lassulus
578ad4ef34 types disk: add imageSize for makeDiskImage 2023-07-28 12:43:42 +00:00
lassulus
a8834f94f3 lib: add makeDiskImage 2023-07-28 12:43:42 +00:00
lassulus
5c5279567f types mdadm: enable swraid 2023-07-28 12:43:42 +00:00
lassulus
0e40d07f86 lib/tests: cleanup 2023-07-28 12:43:42 +00:00
lassulus
0d2ae00b00 testLib.makeDiskoTest: remove base & minimal profile 2023-07-28 12:43:42 +00:00
rogarb
140edd2d01 fix(btrfs): automatic setting of fileSystems
Subvolumes without a mountpoint shouldn't be declared as fileSystems.
2023-07-27 08:55:04 +00:00
rogarb
818207b99b fix(btrfs): add warning for subvolume mounts 2023-07-27 08:55:04 +00:00
rogarb
4f1cc11c51 fix(btrfs): subvolume mount behaviour
Since subvolumes appear automatically when their parent is mounted, no
action is required until the user wants them to be mounted somewhere
else.
This allows access to the volume manager capabilities of BTRFS.
2023-07-27 08:55:04 +00:00
Jared Baur
5b19fb2e74 Fix msdos partition table creation
The partition fs-type was specified twice on partition creation when the
msdos partition table type is used. Fix this to only be specified once.
2023-07-25 09:44:19 +00:00
rogarb
78eee2c7b2
fix(luks): type error with keyfile size/offset 2023-07-21 23:11:32 +02:00
lassulus
7a37b47634 lib makeDiskoTest: create -> format 2023-07-21 14:25:51 +02:00
lassulus
737a21794c lib makeDiskoTest: set networking.hostId to non null value 2023-07-20 21:51:54 +02:00
lassulus
1ddcff717c module: pass makeTest and eval-config to diskoLib 2023-07-20 21:32:53 +02:00
lassulus
2800cf502a tests cli: use direct mode 2023-07-20 19:17:11 +02:00
lassulus
2b728ffe02 libTests prepareDisks: set grub.devices to nodev if empty 2023-07-20 19:03:26 +02:00
lassulus
4df1400b38 makeDiskoTest: remove deprecated grub-devices 2023-07-20 18:31:53 +02:00
lassulus
fc98920ef5 lib makeDiskoTest: use systemd-boot if efi is enabled 2023-07-20 18:31:17 +02:00
lassulus
815d018e2f lib makeDiskoTest: allow passing of extendModules 2023-07-20 18:30:55 +02:00
lassulus
97b09a791f lib toplevel._scripts: set mountScriptNoDeps in correct namespace 2023-07-20 18:05:23 +02:00
lassulus
260c0023db types gpt: set grub.devices automatically 2023-07-20 18:04:41 +02:00
lassulus
774ce7df25 types disk: cleanup name 2023-07-19 19:07:40 +00:00
Sandro Jäckel
b7f3ee8e14 zpool: deduplicate root mount option 2023-07-19 19:07:40 +00:00
lassulus
9191c0ed48 types mdadm: fix typo 2023-07-19 19:07:40 +00:00
lassulus
480d61c3f7 lib: rename umount to destroy 2023-07-19 19:07:40 +00:00
lassulus
04452cfd2b tests: refactor to not use args and to use gpt type 2023-07-19 19:07:40 +00:00
lassulus
c77e66cea1 types swap: check real path of the device before mount 2023-07-19 19:07:40 +00:00
lassulus
96815862d8 types.mdadm: zap raid after creation 2023-07-19 19:07:40 +00:00
lassulus
715c211dd7 testLib.makeDiskoTest: split extraConfig into nixos-config, extraSystemConfig & extraInstallerConfig 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
arch
7eb0940839 add additionalKeyFiles option to luks 2023-07-14 08:51:17 +00:00
rogarb
68eb09b183 feat(luks): Add settings submodule
The settings submodule mirrors the options which can be set for
boot.initrd.luks.devices.<name>.

The keyFile option is now deprecated and should be declared under settings.
2023-07-13 09:17:50 +00:00
lassulus
86e90d0fdb types luks: pass keyFile to nixos config 2023-07-10 19:04:15 +02:00
Technofab
3200614b9f fix(swap): rename dev to config.device
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2023-07-04 21:35:38 +00:00
Technofab
57622c4a68 feat(swap): add resumeDevice option which sets boot.resumeDevice 2023-07-04 21:35:38 +00:00
lassulus
c9c2fa9d3a lib: better formatting of generated shell output 2023-07-04 16:02:25 +00:00
lassulus
5333c4034a types.gpt: add support for tables on mdadm 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
64c9c78c15 types gpt: sort after priority. add size option 2023-06-17 19:07:36 +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
Yan Minari
44f5dba12d feat: create zfs parent datasets 2023-06-16 13:39:12 +02:00
Felix Richter
88c99e1d39 zfs: always force creation of zpool 2023-06-16 13:39:04 +02:00
Jörg Thalheim
a8d85d9f89 apply deadnix 2023-06-06 13:32:47 +02:00
lassulus
7be0f0cab5 btrfs: create all subvolumes 2023-06-04 08:58:37 +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
e634253dfc types table: remove deprecated index 2023-05-30 15:29:32 +02:00
lassulus
e6d41e39e3 lib: add json serializer function for types 2023-05-30 15:29:32 +02:00
lassulus
3dc9d4a2fa types btrfs: inline subvolumes 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
makefu
9c9b62e15e
lib/default: check for fs instead of luks 2018-09-11 23:23:14 +02:00
makefu
969d4e1f6a
optional string brackets 2018-09-11 22:47:42 +02:00
lassulus
52b077dabb mount.devices: fix attribute not found error 2018-09-11 21:14:10 +02:00
lassulus
fab04d2a5e mount: prefix with /mnt 2018-08-05 11:44:34 +02:00
lassulus
107a37f527 lib.mount.filesystem: don't mount if already mounted 2018-07-31 22:17:39 +02:00
lassulus
348d4f164f lib.body.*: don't require initial (unused) state 2018-07-31 22:09:14 +02:00
lassulus
9cbf541974 lib: add mount 2018-07-31 21:47:23 +02:00
lassulus
e8f7aa94c2 add luks.extraArgs 2018-07-31 21:39:56 +02:00
lassulus
0e8c5d1e67 layout -> devices, expose body 2018-07-31 21:39:51 +02:00
lassulus
d2f8f4a6cf rename format -> create 2018-07-24 18:53:51 +02:00
lassulus
7262439401 add top-level layout type 2018-07-19 21:52:11 +02:00
lassulus
6232ab3078 generate nixos config from definition, split into format & config 2018-07-19 21:32:10 +02:00
tv
bff1223462 fun.table: remove -a optimal 2018-07-17 19:47:27 +02:00
lassulus
ced8b1197c lib: add disko 2018-07-17 19:39:38 +02:00