diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-06-15 14:40:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-15 14:40:21 +0200 |
commit | 2b49e4e735c6a7199760df1470fed2a6c7ff4e0c (patch) | |
tree | 40b69c8f266b8b0846a51cd1e05478bcc9b3aab8 /nixos/modules/config | |
parent | b74fb39d95d343f255cc7578c84c3781e161f442 (diff) | |
parent | b922fa959b06179c712f20f2d3c8f71cffe95abb (diff) | |
download | nixpkgs-2b49e4e735c6a7199760df1470fed2a6c7ff4e0c.tar nixpkgs-2b49e4e735c6a7199760df1470fed2a6c7ff4e0c.tar.gz nixpkgs-2b49e4e735c6a7199760df1470fed2a6c7ff4e0c.tar.bz2 nixpkgs-2b49e4e735c6a7199760df1470fed2a6c7ff4e0c.tar.lz nixpkgs-2b49e4e735c6a7199760df1470fed2a6c7ff4e0c.tar.xz nixpkgs-2b49e4e735c6a7199760df1470fed2a6c7ff4e0c.tar.zst nixpkgs-2b49e4e735c6a7199760df1470fed2a6c7ff4e0c.zip |
Merge pull request #107728 from nessdoor/master
Diffstat (limited to 'nixos/modules/config')
-rw-r--r-- | nixos/modules/config/swap.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/config/swap.nix b/nixos/modules/config/swap.nix index 59bc9e9d11e..a37b46b8c46 100644 --- a/nixos/modules/config/swap.nix +++ b/nixos/modules/config/swap.nix @@ -114,6 +114,19 @@ let ''; }; + discardPolicy = mkOption { + default = null; + example = "once"; + type = types.nullOr (types.enum ["once" "pages" "both" ]); + description = '' + Specify the discard policy for the swap device. If "once", then the + whole swap space is discarded at swapon invocation. If "pages", + asynchronous discard on freed pages is performed, before returning to + the available pages pool. With "both", both policies are activated. + See swapon(8) for more information. + ''; + }; + deviceName = mkOption { type = types.str; internal = true; |