Emergency help~

Emergency help~

After I make configuration changes, I cannot log in to the graphical interface and tty interface

I want use unstables Plasmadesktop version, edit configuration.nix:


sudo nix-channel --add https://mirrors.ustc.edu.cn/nix-channels/nixpkgs-unstable/ unstable

sudo nix-channel --list

sudo nix-channel --update unstable

# configuration.nix edit libsForQt514.plasma-desktop

services.xserver.displayManager.sddm.enable = false;

nixpkgs.config.packageOverrides = pkgs: {

unstable = import <unstable> {

config = config.nixpkgs.config;

};

};

environment = {

systemPackages = with pkgs; [

unstable.libsForQt514.plasma-desktop

];

};

reboot

# Then the system cannot be accessed, and many services fail: img1.png

1.I tried to record grub history, but failed

2.grub add single in , but failed, err mgs: Login incorrect

3.i try into usb live system, Attempt to restore file, but failed


# Attempt to restore file, but failed

vi /mnt/etc/nixos/configuration.nix

services.xserver.displayManager.sddm.enable = true;

nixos-install --root /mnt

# so many chown err

reboot

zKr5xP.jpg

zKr42t.jpg

Try selecting a previous generation from the grub menu?

It doesn’t work. It still failed

Something is terribly wrong in your setup, but I can’t tell you why.

I’d recommend using nixos-install like you did the first time after mounting your system partitions from a NixOS livecd, it should properly rebuild a new profile using your current configuration. Make sure to have backups of course, but it shouldn’t damage anything.

I have tried, the above several ways are failed, can not find a way to recover

Have you tried to start with a small install base? Install only a small bunch of things, like an editor and network manager.

Not yet. I restored the original file to install it,i will try

Finally, reinstall and retain the home data

# Finally, reinstall and retain the home data
vi /mnt/etc/nixos/configuration.nix
mount /dev/nvme0n1p2 /mnt
cd /mnt
# delete all data, but /home
rm -rf bin  boot  data  dev  etc   lib  nix  opt  proc  result  root  run  srv  swp  sys  tmp  usr  var
# install
nixos-install --root /mnt
# chroot in system
nixos-enter --root '/mnt'
# set root passwd
passwd
# set my jcleng passwd
passwd jcleng
1 Like

unstable.libsForQt514.plasma-desktop

Why are you pulling in the version built against Qt 5.14 ? You need the regular ones (built against 5.15)