diff options
author | danbst <abcz2.uprola@gmail.com> | 2019-01-17 21:18:45 +0200 |
---|---|---|
committer | danbst <abcz2.uprola@gmail.com> | 2019-01-17 21:18:45 +0200 |
commit | 34a764ce87340d0008cf5a06978e73ec7a794334 (patch) | |
tree | 762629e7923c095a3cac775d474009093fb11fb7 /nixos/modules/config/zram.nix | |
parent | 8d8a7210e480ac122d55a7d36879b8f41ea6fc80 (diff) |
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/config/zram.nix')
-rw-r--r-- | nixos/modules/config/zram.nix | 2 |
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; |