Commit Graph
9 Commits
Author SHA1 Message Date
phaer 313d0e2315 re-add mkCreateOption 2023-01-19 13:07:31 +01:00
phaer 7b59532520 _mount: take an attrset 2023-01-19 13:07:31 +01:00
phaer 30642cadbc _create: take an attrset
Please enter the commit message for your changes. Lines starting
2023-01-19 13:07:31 +01:00
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