Broken polkit auth on KDE install

I installed using a minimal configuration, using these lines

services.displayManager.sddm.enable = true ;
  services.desktopManager.plasma6.enable = true ;
 
  # KDE Plasma in Wayland
  services.displayManager.defaultSession = "plasma" ;
  
  # SDDM in Wayland
  services.displayManager.sddm.wayland.enable = true ;
 
  environment.plasma6.excludePackages = with pkgs.kdePackages; [
    oxygen
    elisa
  ];

There is no polkit auth, so I cannot save my configuration.nix with kwrite/kate.

Interestingly, I can use kio-admin in Dolphin, i.e. enter admin:/ in the location bar to act as administrator. Here, I get a polkit dialog.

The error message I get in kwrite is

The document could not be saved, as it was not possible to write to /etc/nixos/configuration.nix.
Check that you have write access to this file or that enough disk space is available.
The original file may be lost or damaged. Don’t quit the application until the file is successfully written.

Terminal output

QIODevice::write (QFile, "/etc/nixos/.configuration.nix.kate-swp"): device not open

I can edit the file with sudo, what is going on here?

Same happens in KDE Partitionmanager. Added it using the option, so partition-manager.enable and when trying to edit the /etc/fstab inside there, I cannot do that.

I suppose this would be needed to be done in a nix way too?

Does nothing work normally on NixOS? XD this would break a lot of normal apps