diff options
author | Philip Taron | 2024-08-13 07:05:46 -0700 |
---|---|---|
committer | GitHub | 2024-08-13 07:05:46 -0700 |
commit | 04a8c1e76494717a6cedc453dda8c3c0f7e18463 (patch) | |
tree | 7f1b14343f356b86e60cf14c2fcd6546486b0ebf /nixos/modules/config | |
parent | 6264da49ab004873576c62e7bb4bd35e0230b994 (diff) | |
parent | f2f8f302fdaf59a90e8ab93ed910723a1f4aa236 (diff) |
Merge pull request #328030 from Wulfsta/swap-status
Diffstat (limited to 'nixos/modules/config')
-rw-r--r-- | nixos/modules/config/swap.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/config/swap.nix b/nixos/modules/config/swap.nix index 4d6ee0b17837..e945e18b1f25 100644 --- a/nixos/modules/config/swap.nix +++ b/nixos/modules/config/swap.nix @@ -272,7 +272,8 @@ in truncate --size 0 "$DEVICE" chattr +C "$DEVICE" 2>/dev/null || true - dd if=/dev/zero of="$DEVICE" bs=1M count=${toString sw.size} + echo "Creating swap file using dd and mkswap." + dd if=/dev/zero of="$DEVICE" bs=1M count=${toString sw.size} status=progress ${lib.optionalString (!sw.randomEncryption.enable) "mkswap ${sw.realDevice}"} fi ''} |