baremetal: add zfs deps

This commit is contained in:
Sandro - 2024-01-07 18:11:20 +01:00
parent 1ab11f6491
commit bbe1aa490d
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 9 additions and 1 deletions

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, utils, ... }:
{
options.c3d2.baremetal = lib.mkEnableOption "baremetal";
@ -42,6 +42,14 @@
contents."/etc/profile".text = ''
systemd-tty-ask-password-agent
'';
services = lib.mkIf config.boot.zfs.enabled {
zfs-import-rpool = let
devices = map (name: "dev-mapper-${utils.escapeSystemdPath name}.device") (lib.attrNames config.boot.initrd.luks.devices);
in {
wants = devices;
after = devices;
};
};
};
};
kernelParams = [