Commit Graph
26 Commits
Author SHA1 Message Date
Paul Haerle 637d87df3f Merge pull request #280 from nix-community/module-default
flake: expose the module as nixosModules.default
2023-06-22 13:03:12 +02:00
phaer 9da50f9b9f zfs: add tests for hooks
Note that we currently need to hardcode the pool name as it isn't
exposed correctly for the subshells atm.
2023-04-10 22:52:52 +02:00
phaer a63d0fa12b hooks: add description 2023-01-19 13:12:08 +01:00
phaer caf893b6eb hooks: remove debug output 2023-01-19 13:09:41 +01:00
phaer dfd7ee9590 module: dash -> bash 2023-01-19 13:07:31 +01:00
phaer f8050d6f84 fix examples...
...why did those tests pass before? config didn't match options schema
2023-01-19 13:07:31 +01:00
phaer 94d1319001 remove trace 2023-01-19 13:07:31 +01:00
phaer d64b6b0868 create: use tempdir for DEVICES...
instead of env vars. As we need to append to them in subshells.
2023-01-19 13:07:31 +01:00
phaer 5034d2d836 mount: allow empty .dev 2023-01-19 13:07:31 +01:00
phaer 10e1037ad7 Revert "replace subshell by code block..."
This reverts commit 9628475f870cafc470dd7ad7b829b60f1b649861.
2023-01-19 13:07:31 +01:00
phaer 63eca64653 replace subshell by code block...
..for now, because subshell break zfs creation
2023-01-19 13:07:31 +01:00
phaer 32f3730777 Revert "try an anonymous function for namespacing..."
This reverts commit 6390d835025eb36a81bd2b97dcd1a5746e07ebfe.
2023-01-19 13:07:31 +01:00
phaer 21e31af678 try an anonymous function for namespacing...
...no local yet
2023-01-19 13:07:31 +01:00
phaer ad6ab7df50 add debug output 2023-01-19 13:07:31 +01:00
phaer c7e5f3caec wip: add mkMountOption 2023-01-19 13:07:31 +01:00
phaer 92467bb9a8 namespace hooks via subshell 2023-01-19 13:07:31 +01:00
phaer 0e658ad7f7 run hooks, fix defineHookVariables 2023-01-19 13:07:31 +01:00
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