From 8d4bc5c029b8ce92ed7aebdc1178b6aef013310a Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Tue, 5 Jan 2016 21:23:04 +0300 Subject: [PATCH] nixos/swap: fix stopping mkswap for encrypted device --- nixos/modules/config/swap.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/config/swap.nix b/nixos/modules/config/swap.nix index 9a5d6a9fc33..0ab5bb3d89c 100644 --- a/nixos/modules/config/swap.nix +++ b/nixos/modules/config/swap.nix @@ -149,7 +149,7 @@ in unitConfig.DefaultDependencies = false; # needed to prevent a cycle serviceConfig.Type = "oneshot"; serviceConfig.RemainAfterExit = sw.randomEncryption; - serviceConfig.ExecStop = optionalString sw.randomEncryption "cryptsetup luksClose ${sw.deviceName}"; + serviceConfig.ExecStop = optionalString sw.randomEncryption "${pkgs.cryptsetup}/bin/cryptsetup luksClose ${sw.deviceName}"; }; in listToAttrs (map createSwapDevice (filter (sw: sw.size != null || sw.randomEncryption) config.swapDevices));