Commit Graph
51 Commits
Author SHA1 Message Date
phaer 360ee1522f revert mkCreateOption 2023-01-19 13:07:31 +01:00
phaer a78d3ce578 add hookMixin 2023-01-19 13:07:31 +01:00
phaer ac991c281b style: concatStrings map -> concatMapStrings 2023-01-19 13:07:31 +01:00
phaer 8e4b2d1e3b wip: optionsAfterCreate -> postCreateHook...
and introduce defineHookVariables
2023-01-19 13:07:31 +01:00
phaer fb229950e0 fix: make optionsAfterCreate optional. 2023-01-19 13:07:31 +01:00
phaer 49badf305f zpool: add optionsAfterCreate...
Not sure about the best implementation here yet.

I'd like to use disk encryption with ZFS and existing disko facilities
work fine to set it up, but we obviously can't use keylocation=prompt
during disko formatting. So unlocking fails on boot if the file referred
to by keylocation isn't included in the initrd.

Ideally I could use keylocation=file://tmp/disk.key during partitioning,
but set keylocation=prompt right after that.

example usage:
```
    rpool = {
      type = "zpool";
      mode = "";
      options = {
        ashift = "12";
        autotrim = "on";
      };
      optionsAfterCreate = {
        keylocation = "prompt";
      };
      rootFsOptions = {
        encryption = "on";
        keylocation = "file:///tmp/disk.key";
        keyformat = "passphrase";
        compression = "zstd";
        acltype = "posixacl";
        mountpoint = "none";
        canmount = "off";
        xattr = "sa";
        dnodesize = "auto";
        normalization = "formD";
        relatime = "on";
      };
```
2023-01-19 13:07:31 +01:00
Lassulus e332988a67 Merge pull request #103 from RossComputerGuy/fix/option-descriptions 2023-01-04 11:55:27 +01:00
bors[bot]andJörg Thalheim 07f6891b62 Merge #98
98: Bcachefs r=Mic92 a=Mic92



Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2023-01-04 09:00:20 +00:00
Jörg Thalheim eca7cb9132 bcachefs support 2023-01-04 09:57:53 +01:00
Tristan Ross d4874c22a0 feat: missing description 2023-01-03 15:35:42 -08:00
Tristan Ross ab33709297 Merge remote-tracking branch 'upstream/master' into fix/option-descriptions 2023-01-03 11:42:37 -08:00
Tristan Ross 809f92cd25 feat: add the descriptions for the options 2023-01-03 10:52:57 -08:00
Tristan Ross 5cf27f814c fix(#101): description for type handles string correctly 2022-12-31 12:30:39 -08:00
Jörg Thalheim cb5748f03a mount filesystems with the correct type flag 2022-12-29 18:54:28 +01:00
Jörg Thalheim e3527b826d Merge pull request #75 from nix-community/zap2
zap only devices we care about
2022-12-25 18:25:37 +00:00
lassulus 17da9b0708 init disk-deactivate for cleaning up the disk 2022-12-24 20:53:56 +01:00
Lily Foster 77c8f6460f types: add btrfs_subvol type 2022-12-23 20:27:47 +01:00
Lily Foster 71a30f9e74 types: pass through mountOptions to _config for all types 2022-12-23 17:43:40 +01:00
Lily Foster ec3ab72d3a swap: fix typo for checking if swap is on 2022-12-23 17:39:17 +01:00
Jörg Thalheim 8b30cb1823 mdadm: add single-disk raid support 2022-12-23 17:30:25 +01:00
lassulus 935feb7496 swap: require gnugrep 2022-12-12 00:12:21 +01:00
lassulus 66add2cd9e zap: destroy all mdadm devices if mdadm is in PATH 2022-12-08 21:03:38 +01:00
lassulus ff7fa87600 add nodev support (for tmpfs, ramfs, nfs) 2022-12-04 12:41:46 +01:00
lassulus bfa2318ca5 types: add default types for topLevel children 2022-12-03 14:13:33 +01:00
lassulus daf5fe8e9b fix all mountOptions 2022-12-03 14:13:33 +01:00
David Arnold efc80d7d89 types: init swap 2022-12-02 08:09:37 +01:00
Jörg Thalheim 6bbdafce48 zapCreateMount: stop mdraids 2022-11-25 17:36:40 +01:00
lassulus 9cf4f170ae add zapCreateMount script for idempodents install from iso/kexec 2022-11-25 17:36:40 +01:00
lassulus 417ad31ca5 types: fix negative relative disk size 2022-11-25 08:38:47 +01:00
a-kenji 581870a444 fix: typos 2022-11-21 12:00:45 +01:00
Jörg Thalheim d0fd785c93 make device matching regexes a bit stricter 2022-11-15 19:30:09 +01:00
Jörg Thalheim 5cbe8fbb48 simplify deviceNumbering function 2022-11-15 19:28:28 +01:00
Rishi Desai 117292f5d6 add support for mmc blk devices 2022-11-15 18:12:39 +00:00
lassulus 78d9448fcf types: make deviceDependencies optional 2022-11-10 09:36:31 +01:00
lassulus 1ddeb716b6 types: add more packages 2022-11-01 20:05:10 +01:00
lassulus 3c4cc93007 export config list in types 2022-10-23 11:36:56 +02:00
lassulus 5aa3ebcb99 types: refactor topLevel into devices, move output generators to lib 2022-10-23 11:36:56 +02:00
lassulus 271b00593f types: add packages output 2022-10-23 11:34:39 +02:00
lassulus 89cc8978eb types: meta.dependencies -> meta.deviceDependencies 2022-10-23 11:34:39 +02:00
lassulus a215a19759 _config: use lists to merge config via nixos' imports = 2022-10-02 13:06:59 +02:00
lassulus fba7b03a21 types mdadm: add metadata option 2022-10-02 13:06:59 +02:00
lassulus 527a945c64 types: fix lvm_lv config device name 2022-09-30 20:06:19 +02:00
Jörg Thalheim 46177f0b30 disko: drop dependency on pkgs
This creates less headaches when importing nixos configuration and also
fix some flake use cases.
2022-09-13 13:29:18 +02:00
Jairo Llopis 48e250464d fix: mkfs randomly not detecting just partitioned device
@moduon MT-1248
2022-09-12 11:32:35 +01:00
Jörg Thalheim 088b2a31d0 config: add zfsutil to zfs datasets as appropriate 2022-09-05 17:26:48 +02:00
Jörg Thalheim 55197cfc55 config: fix fsType for zfs 2022-09-05 17:23:17 +02:00
Jörg Thalheim 11d708dc31 fix nvme device names 2022-09-05 14:34:54 +02:00
Jörg Thalheim 68f950bf20 add test for standalone nixos config 2022-09-04 13:09:10 +02:00
Jörg Thalheim 3e48d1fd85 name on partition is no longer optional 2022-09-04 12:27:59 +02:00
Jörg Thalheim e0de34c07d make error message nicer if type is ommitted 2022-09-04 12:12:09 +02:00