diff --git a/nixos/modules/services/system/swapspace.nix b/nixos/modules/services/system/swapspace.nix index aa8bb76e53b24..9dfea492cd672 100644 --- a/nixos/modules/services/system/swapspace.nix +++ b/nixos/modules/services/system/swapspace.nix @@ -96,16 +96,7 @@ in environment.systemPackages = [ cfg.package ]; systemd.packages = [ cfg.package ]; systemd.services.swapspace = { - after = [ - "local-fs.target" - "swap.target" - ]; - requires = [ - "local-fs.target" - "swap.target" - ]; wantedBy = [ "multi-user.target" ]; - description = "Swapspace, a dynamic swap space manager"; serviceConfig = { ExecStart = [ "" @@ -113,7 +104,11 @@ in ]; }; }; - systemd.tmpfiles.rules = [ "d '${cfg.settings.swappath}' 0700 - - - - " ]; + systemd.tmpfiles.settings.swapspace = { + ${cfg.settings.swappath}.d = { + mode = "0700"; + }; + }; }; meta = {