nixpkgs-suyu/nixos/modules
Bjørn Forsman b30852ed41 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.
2016-07-06 16:04:27 +02:00
..
config nixos/swap: support for resizing swapfile 2016-07-06 16:04:27 +02:00
hardware nixos ati_unfree: auto-switch xorg to fglrxComat 2016-05-23 10:12:44 +02:00
i18n/input-method input methods: fix gtk cache 2016-04-16 17:51:32 +09:00
installer sd-image-armv7l-multiplatform.nix: Preliminary Raspberry Pi 2/3 support 2016-07-04 02:07:13 +03:00
misc nixos/elasticsearch: Set a group on the user 2016-07-01 18:21:42 +02:00
profiles documentation: fix start display-manager command 2016-07-04 10:25:31 +02:00
programs nixos/spacefm: unbreak manual build 2016-07-05 13:27:17 +02:00
security Merge pull request #16180 from zimbatm/shell-escaping 2016-06-19 23:27:52 +01:00
services Merge pull request #16681 from Aske/tlp-restart 2016-07-03 23:56:41 +04:00
system nixos/grub: change state file device separator from ':' to ',' 2016-07-06 00:11:57 +02:00
tasks Make fileSystems example literal. 2016-06-19 01:21:22 -06:00
testing KDE test: Bump kdm start timeout 2016-05-27 11:22:27 +02:00
virtualisation nixos/libvirtd: Don't use the --daemon flag now that we use the 'notify' service type 2016-07-01 18:21:42 +02:00
module-list.nix Merge pull request #16650 from RamKromberg/fix/spacefm-issue-15758 2016-07-05 13:02:43 +03:00
rename.nix nixos: rewrite the grsecurity module 2016-06-14 03:38:12 +02:00