Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Luflosi <luflosi@luflosi.de>
  • Loading branch information
phanirithvij and Luflosi authored Oct 19, 2024
1 parent 60fb16b commit 12b3126
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nixos/modules/services/system/swapspace.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
config,
lib,
pkgs,
utils,
...
}:
let
Expand All @@ -19,9 +20,9 @@ in
enable = mkEnableOption "Swapspace, a dynamic swap space manager";
package = mkPackageOption pkgs "swapspace" { };
extraArgs = mkOption {
type = types.str;
default = "";
example = "-P -v";
type = types.listOf types.str;
default = [];
example = [ "-P" "-v" ];
description = "Any extra arguments to pass to swapspace";
};
settings = mkOption {
Expand Down Expand Up @@ -104,7 +105,7 @@ in
documentation = [ "man:swapspace(8)" ];
description = "Swapspace, a dynamic swap space manager";
serviceConfig = {
ExecStart = "${lib.getExe cfg.package} -c ${configFile} ${cfg.extraArgs}";
ExecStart = "${lib.getExe cfg.package} -c ${configFile} ${utils.escapeSystemdExecArgs cfg.extraArgs}";
};
};
};
Expand Down

0 comments on commit 12b3126

Please sign in to comment.