mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-30 23:34:12 +03:00
nixos/zfs: enable zfs services
This commit is contained in:
parent
606ff955fb
commit
bea4323acf
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user