remove swapfile script, as it's now a part of nixos
This commit is contained in:
		
							parent
							
								
									76ff36ff13
								
							
						
					
					
						commit
						d65fa178ab
					
				
					 1 changed files with 0 additions and 11 deletions
				
			
		| 
						 | 
					@ -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";
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue