Skip to content

Commit

Permalink
fixup! nixos/swapspace: init module
Browse files Browse the repository at this point in the history
  • Loading branch information
phanirithvij committed Oct 26, 2024
1 parent 75b3a40 commit c8da588
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions nixos/modules/services/system/swapspace.nix
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,19 @@ 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 = [
""
"${lib.getExe cfg.package} -c ${configFile} ${utils.escapeSystemdExecArgs cfg.extraArgs}"
];
};
};
systemd.tmpfiles.rules = [ "d '${cfg.settings.swappath}' 0700 - - - - " ];
systemd.tmpfiles.settings.swapspace = {
${cfg.settings.swappath}.d = {
mode = "0700";
};
};
};

meta = {
Expand Down

0 comments on commit c8da588

Please sign in to comment.