about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authordanbst <abcz2.uprola@gmail.com>2019-01-17 21:18:45 +0200
committerdanbst <abcz2.uprola@gmail.com>2019-01-17 21:18:45 +0200
commit34a764ce87340d0008cf5a06978e73ec7a794334 (patch)
tree762629e7923c095a3cac775d474009093fb11fb7 /nixos/modules
parent8d8a7210e480ac122d55a7d36879b8f41ea6fc80 (diff)
downloadnixlib-34a764ce87340d0008cf5a06978e73ec7a794334.tar
nixlib-34a764ce87340d0008cf5a06978e73ec7a794334.tar.gz
nixlib-34a764ce87340d0008cf5a06978e73ec7a794334.tar.bz2
nixlib-34a764ce87340d0008cf5a06978e73ec7a794334.tar.lz
nixlib-34a764ce87340d0008cf5a06978e73ec7a794334.tar.xz
nixlib-34a764ce87340d0008cf5a06978e73ec7a794334.tar.zst
nixlib-34a764ce87340d0008cf5a06978e73ec7a794334.zip
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
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/config/zram.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/config/zram.nix b/nixos/modules/config/zram.nix
index f8ff926cd56d..925d945c081e 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;