summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/GitPython
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2016-07-06 13:41:40 +0200
committerBjørn Forsman <bjorn.forsman@gmail.com>2016-07-06 16:04:27 +0200
commitb30852ed41f7e6729de9a75a71a671ce7d03dff9 (patch)
tree48a927e5c092b645afc63849c31d421fc3ed6291 /pkgs/development/python-modules/GitPython
parent12c055240dcf2aec5f13ca1bfbae6a44e5cd42be (diff)
nixos/swap: support for resizing swapfile
Currently NixOS creates the swapfile (with the specified size) only if it doesn't already exist. Changing the swapfile size afterwards will not have any effect. This commit changes that so the swapfile will be recreated whenever swapDevices.*.size is changed (or more precisely, whenever the actual file size differs from the configured one), allowing both growing and shrinking the swapfile. The service unit has "restartIfChanged = false", so we don't have to worry about the swapfile being in use at the time this code is run (you have to reboot for swapfile changes). fallocate doesn't shrink files, use truncate for that. truncate can also be used to grow files, but it creates "holes" in the file which doesn't work with swapfiles.
Diffstat (limited to 'pkgs/development/python-modules/GitPython')
0 files changed, 0 insertions, 0 deletions