mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
nixos/zfs: enable zfs services
This commit is contained in:
parent
606ff955fb
commit
bea4323acf
1 changed files with 8 additions and 5 deletions
|
@ -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 a new issue