From 34a764ce87340d0008cf5a06978e73ec7a794334 Mon Sep 17 00:00:00 2001 From: danbst Date: Thu, 17 Jan 2019 21:18:45 +0200 Subject: [PATCH] zramSwap: remove basic.target for zram devices This creates a dependency cycle when used with boot.tmpOnTmpfs: basic.target <- tmp.mount <- swap.target <- zram-init-dev0 <- basic.target This same fix is done already for tmp.mount Fixes https://github.com/NixOS/nixpkgs/issues/47474 --- nixos/modules/config/zram.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/config/zram.nix b/nixos/modules/config/zram.nix index f8ff926cd56..925d945c081 100644 --- a/nixos/modules/config/zram.nix +++ b/nixos/modules/config/zram.nix @@ -135,6 +135,7 @@ in requires = [ "dev-${dev}.device" "zram-reloader.service" ]; before = [ "dev-${dev}.swap" ]; requiredBy = [ "dev-${dev}.swap" ]; + unitConfig.DefaultDependencies = false; # needed to prevent a cycle serviceConfig = { Type = "oneshot"; RemainAfterExit = true; @@ -158,6 +159,7 @@ in description = "Reload zram kernel module when number of devices changes"; wants = [ "systemd-udevd.service" ]; after = [ "systemd-udevd.service" ]; + unitConfig.DefaultDependencies = false; # needed to prevent a cycle serviceConfig = { Type = "oneshot"; RemainAfterExit = true;