remove swapfile script, as it's now a part of nixos

This commit is contained in:
Leonardo Eugênio 2022-10-16 21:13:25 -03:00
parent 76ff36ff13
commit d65fa178ab

View file

@ -65,17 +65,6 @@
networking.hostName = "monolith"; # Define your hostname. networking.hostName = "monolith"; # Define your hostname.
# swap # swap
systemd.services = {
create-swapfile = {
serviceConfig.Type = "oneshot";
wantedBy = [ "swap-swapfile.swap" ];
script = ''
${pkgs.coreutils}/bin/truncate -s 0 /swap/swapfile
${pkgs.e2fsprogs}/bin/chattr +C /swap/swapfile
${pkgs.btrfs-progs}/bin/btrfs property set /swap/swapfile compression none
'';
};
};
fileSystems."/swap" = { fileSystems."/swap" = {
device = "/dev/disk/by-label/BTRFS_ROOT"; device = "/dev/disk/by-label/BTRFS_ROOT";
fsType = "btrfs"; fsType = "btrfs";