diff options
author | Frank Doepper <fd@taz.de> | 2018-06-13 12:38:15 +0200 |
---|---|---|
committer | Frank Doepper <woffs@woffs.de> | 2018-06-13 16:31:05 +0200 |
commit | bea4323acf44bad55bf3083926ea0c188aebd74d (patch) | |
tree | 7889b3eb817df13b8dbefe20095d1e3b2b81348e /nixos/modules/tasks/filesystems | |
parent | 606ff955fb8856d092aa5a5889b98227b0d2295b (diff) |
nixos/zfs: enable zfs services
Diffstat (limited to 'nixos/modules/tasks/filesystems')
-rw-r--r-- | nixos/modules/tasks/filesystems/zfs.nix | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index de735e9ba11b..c54cfd4e1aa6 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -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 |