zfs: add example for encrypted root

This commit is contained in:
DavHau authored and lassulus committed 2025-02-15 05:51:50 +00:00
1 parent 4edb87a2ac
commit d478e2f9f3
2 files changed
+81

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
{ pkgs ? import <nixpkgs> { }
, diskoLib ? pkgs.callPackage ../lib { }
}:
diskoLib.testLib.makeDiskoTest {
inherit pkgs;
name = "zfs-encrypted-root";
extraInstallerConfig.networking.hostId = "8425e349";
extraSystemConfig.networking.hostId = "8425e349";
disko-config =
pkgs.lib. recursiveUpdate (import ../example/zfs-encrypted-root.nix) {
disko.devices.zpool.zroot.datasets.root.options.keylocation = "file:///tmp/secret.key";
};
extraTestScript = ''
machine.succeed("mountpoint /");
machine.succeed("mountpoint /nix");
'';
}