Remove swap

This commit is contained in:
mups 2025-05-29 09:15:35 +00:00
parent 96ddf30b5c
commit 93b29996bb

View file

@ -1,4 +1,5 @@
{ config, lib, pkgs, modulesPath, ... }: let { config, lib, pkgs, modulesPath, ... }:
let
ip = "93.95.230.11"; ip = "93.95.230.11";
gateway = "93.95.230.1"; gateway = "93.95.230.1";
hostname = "vpsorvhm2v"; hostname = "vpsorvhm2v";
@ -6,32 +7,37 @@
dns1 = "93.95.224.29"; dns1 = "93.95.224.29";
in { in {
imports = imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; boot.initrd.availableKernelModules =
[ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/031e2049-33ed-4d21-a208-8da3fc250260"; device = "/dev/disk/by-uuid/031e2049-33ed-4d21-a208-8da3fc250260";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = [{ # swapDevices = [{
device = "/dev/disk/by-uuid/bc6acd1f-98bb-4f94-b52c-40aa7312e838"; # device = "/dev/disk/by-uuid/bc6acd1f-98bb-4f94-b52c-40aa7312e838";
} { # } {
device = "/var/lib/swapfile"; # device = "/var/lib/swapfile";
size = 2*1024; # size = 2*1024;
}]; # }];
networking.useDHCP = lib.mkForce false; networking.useDHCP = lib.mkForce false;
networking.domain = ""; networking.domain = "";
networking.interfaces.ens3.ipv4.addresses = [{ address = ip; prefixLength = 24; }]; networking.interfaces.ens3.ipv4.addresses = [{
networking.defaultGateway = { address = gateway; interface = "ens3"; }; address = ip;
prefixLength = 24;
}];
networking.defaultGateway = {
address = gateway;
interface = "ens3";
};
networking.nameservers = [ dns0 dns1 ]; networking.nameservers = [ dns0 dns1 ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";