nixos/zfs: enable zfs services

This commit is contained in:
Frank Doepper 2018-06-13 12:38:15 +02:00 committed by Frank Doepper
parent 606ff955fb
commit bea4323acf

View file

@ -414,12 +414,15 @@ in
${packages.zfsUser}/sbin/zfs set nixos:shutdown-time="$(date)" "${pool}"
'';
};
createZfsService = serv:
nameValuePair serv {
after = [ "systemd-modules-load.service" ];
wantedBy = [ "zfs.target" ];
};
in listToAttrs (map createImportService dataPools ++ map createSyncService allPools) // {
"zfs-mount" = { after = [ "systemd-modules-load.service" ]; };
"zfs-share" = { after = [ "systemd-modules-load.service" ]; };
"zfs-zed" = { after = [ "systemd-modules-load.service" ]; };
};
in listToAttrs (map createImportService dataPools ++
map createSyncService allPools ++
map createZfsService [ "zfs-mount" "zfs-share" "zfs-zed" ]);
systemd.targets."zfs-import" =
let