Thinkpad x280 nixos lxqt wifi connection drops problem

not quite sure it’s a software problem, but i’d like to ask the forum’s advice nonetheless. my wifi connection keeps dropping and it seems to be getting worse over time. it used to be 100%, now only when the laptop is idle for a while, i always come back to a broken connection i have to manually start again by disabling and enabling wifi connections. this gets pretty tiresome, but also means i can’t rely on the computer for remote connections any more as it will be disconnected in 3-4 hours after i leave home. not sure what is going wrong as the network portion of my setup has been unchanged for about a year? also my router has been the same for about that long as well, and i don’t mess with that either. i know i could start by enabling wpa_supplicant, but i’d rather ask here because i want to understand why it disconnects, and even more important, why it doesn’t automatically connect again after it disconnects like it should, and it used to do. in the graphical user interface LXQt provides there’s a single wifi network with an automatic reconnect enabled, so it is not the case of competing network connections messing with each-other. if the the stuff quoted isn’t enough to diagnose this (probably isn’t), please tell me what else i should be looking at:

ifconfig

enp0s31f6: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0xec200000-ec220000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 574  bytes 75762 (73.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 574  bytes 75762 (73.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp59s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.88.245  netmask 255.255.255.0  broadcast 192.168.88.255
        inet6 fe80::c5c8:ba33:4439:ef6d  prefixlen 64  scopeid 0x20<link>
        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 1077715  bytes 1073864117 (1.0 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 594499  bytes 157983314 (150.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

configuration.nix

# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
	 <nixos-hardware/lenovo/thinkpad/x280> # sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware && sudo nix-channel --update
    ];

  # Bootloader.
  boot.loader.grub.enable = true;
  boot.loader.grub.device = "/dev/nvme0n1";
  boot.loader.grub.useOSProber = true;
  boot.loader.timeout = 1;
  boot.supportedFilesystems = [ "ntfs" ];
  networking.hostName = "nixos"; # Define your hostname.
  # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.

  # Configure network proxy if necessary
  # networking.proxy.default = "http://user:password@proxy:port/";
  # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";

  # Enable networking
  networking.networkmanager.enable = true;

  # Enable network manager applet
  programs.nm-applet.enable = true;

  # Set your time zone.
  time.timeZone = "Europe/Budapest";

  # Select internationalisation properties.
  i18n.defaultLocale = "en_GB.UTF-8";

  i18n.extraLocaleSettings = {
    LC_ADDRESS = "hu_HU.UTF-8";
    LC_IDENTIFICATION = "hu_HU.UTF-8";
    LC_MEASUREMENT = "hu_HU.UTF-8";
    LC_MONETARY = "hu_HU.UTF-8";
    LC_NAME = "hu_HU.UTF-8";
    LC_NUMERIC = "hu_HU.UTF-8";
    LC_PAPER = "hu_HU.UTF-8";
    LC_TELEPHONE = "hu_HU.UTF-8";
    LC_TIME = "hu_HU.UTF-8";
  };

  # Enable the X11 windowing system.
  services.xserver.enable = true;

  # Enable the LXQT Desktop Environment.
  services.xserver.displayManager.lightdm.enable = true;
  services.xserver.desktopManager.lxqt.enable = true;

  # Configure keymap in X11
  services.xserver = {
    layout = "hu";
    xkbVariant = "";
    xkbOptions = "caps:ctrl_modifier";
  };

  # Configure console keymap
  console.keyMap = "hu";

  # Enable CUPS to print documents.
  services.printing.enable = true;

  # Enable sound with pipewire.
  sound.enable = true;
  hardware.pulseaudio.enable = false;
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
    # If you want to use JACK applications, uncomment this
    #jack.enable = true;

    # use the example session manager (no others are packaged yet so this is enabled by default,
    # no need to redefine it in your config for now)
    #media-session.enable = true;
  };

  # Enable touchpad support (enabled default in most desktopManager).
  # services.xserver.libinput.enable = true;

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users.user = {
    isNormalUser = true;
    description = "user";
    extraGroups = [ "networkmanager" "wheel" ];
    packages = with pkgs; [
    #  firefox
    #  thunderbird
	ungoogled-chromium
	ffmpeg
	losslesscut-bin
	leafpad
	xorg.xkill
	# gimp
	krita
	pkgs.djview
	qpdfview
	calibre
	p7zip
	ktimer
	arandr
	xclip
	scantailor
	screen
	ventoy-bin
	aria2
	pkgs.pv
	cron
	galculator
	weechat
	qbittorrent
	anydesk # this has caused problems before with updating
	nomachine-client
	mpv
	trash-cli
	openjdk
	lxqt.qlipper
	libsForQt5.kcharselect
	chirp
	brightnessctl
	par2cmdline
	openai-whisper
	syncthing
	pb_cli
	inkscape
	winbox
	yt-dlp
	iperf
	synergy
	moonlight-qt
	tlp # sudo tlp setcharge 50 65 BAT0 # good for battery
	gpsbabel-gui
	gpxsee-qt6
	sunwait
	xdotool
	ecasound
	mumble
	wakeonlan
	libreoffice-qt
	streamlink
	gpodder
	flameshot
	pngquant
	fswebcam
	plocate
	fstl
	samba
	slskd
	kiwix
	python3
	fastfetch
	hardinfo
	sonobus
	croc
	git-get
    ];
  };

  # Enable automatic login for the user.
  services.xserver.displayManager.autoLogin.enable = true;
  services.xserver.displayManager.autoLogin.user = "user";

  # Allow unfree packages
  nixpkgs.config.allowUnfree = true;

  # List packages installed in system profile. To search, run:
  # $ nix search wget
  environment.systemPackages = with pkgs; [
  #  vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
  #  wget
	atkinson-hyperlegible
	python311Packages.google-api-python-client
  	python311Packages.pip
	tt-rss
	tt-rss-theme-feedly
	libgen-cli
  ];

  # Some programs need SUID wrappers, can be configured further or are
  # started in user sessions.
  # programs.mtr.enable = true;
  # programs.gnupg.agent = {
  #   enable = true;
  #   enableSSHSupport = true;
  # };

  # List services that you want to enable:

  # Enable the OpenSSH daemon.
  # services.openssh.enable = true;

  # Open ports in the firewall.
  # networking.firewall.allowedTCPPorts = [ ... ];
  # networking.firewall.allowedUDPPorts = [ ... ];
  # Or disable the firewall altogether.
  networking.firewall.enable = false;

  # This value determines the NixOS release from which the default
  # settings for stateful data, like file locations and database versions
  # on your system were taken. It‘s perfectly fine and recommended to leave
  # this value at the release version of the first install of this system.
  # Before changing this value read the documentation for this option
  # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  system.stateVersion = "23.11"; # Did you read the comment?

}